| Attribute name | Attribute value |
|---|---|
| sizeX | width picture |
| sizeY | high picture |
#include "gdinfo.ch"
#include "bggraph.ch"
local bg, data, legend, alignleg, signat
bg := BgHistNew(300, 300)
data := {{12, 156, -34, 104, 45, 78, -34},{34,67, 65,11,-45,-67,90}, {32, 56, 11, 43, 67, 34, 89}}
legend := {"first", "second", 'third', 'fourth'}
signat := {"Sun", "Mon", 'Tu', 'Wed', "Thur", "Fri", "Sat"}
alignleg := ALIGN_RIGHT
bg:setData(data, legend, alignleg, signat)
bg:setInfo("Histogram", "One week of...", "Some digits on the axis...")
/* drew graphic in volume */
bg:setAverage(1)
bg:setVolume(.t.)
bg:drawImage()
/* and store it */
bg:storeImage(GDFILE_PNG, "hist1.png")
/* now the same but 2D */
bg:setAverage(0)
bg:setVolume(.f.)
bg:drawImage()
bg:storeImage(GDFILE_PNG, "hist2.png")
Next example for BgNew():
#include "gdinfo.ch"
#include "bggraph.ch"
local bg, data, legend, alignleg, signat
bg := BgNew(BG_TYPE_HIST, 300, 300)
data := {{12, 156, -34, 104, 45, 78, -34},{34,67, 65,11,-45,-67,90}, {32, 56, 11, 43, 67, 34, 89}}
legend := {"first", "second", 'third', 'fourth'}
signat := {"Sun", "Mon", 'Tu', 'Wed', "Thur", "Fri", "Sat"}
alignleg := ALIGN_RIGHT
bg:setData(data, legend, alignleg, signat)
bg:setInfo("Histogram", "One week of...", "Some digits on the axis...")
/* drew graphic in volume */
bg:setAverage(1)
bg:setVolume(.t.)
bg:drawImage()
/* and store it */
bg:storeImage(GDFILE_PNG, "hist1.png")
/* now the same but 2D */
bg:setAverage(0)
bg:setVolume(.f.)
bg:drawImage()
bg:storeImage(GDFILE_PNG, "hist2.png")
| Histogram showed values different categoryes | |
|---|---|
|
|
|
|
| Histogram with cumulation showed part every categories in sum total | |
|
|
|
|
| 100%-normolized histogram showed piece every categories in sum total | |
|
|
|
|
| 3D histogram showed values different categoryes by lines | |
| |
| Circle diagram showed part(values or percent) every categories in sum total | |
|
|
| Ring diagram showed part(values or percent) every categories in sum total. Equivalent circle diagram but showed some lines of data | |
|
|