manpagez: man pages & more
info mathgl
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.1.22 Chart sample

../png/chart

C++ code

mglData ch(7,2);
ch.Modify("rnd+0.1");
gr->Rotate(40,60);
gr->Light(true);
gr->Box();
gr->Chart(ch,"#");

MGL code

new ch 7 2
modify ch 'rnd+0.1'
rotate 40 60
light on
box
chart ch

Pure C code

HMDT ch = mgl_create_data_size(7,2,1);
mgl_data_modify(ch,"rnd+0.1",0);
mgl_rotate(gr,40.,60.,0.);
mgl_set_light(gr,1);
mgl_box(gr,1);
mgl_chart(gr,ch,"#");
mgl_delete_data(ch);

Fortran code

integer ch, mgl_create_data_size
ch = mgl_create_data_size(7,2,1)
call mgl_data_modify(ch,'rnd+0.1',0)
call mgl_rotate(gr,40.,60.,0.)
call mgl_set_light(gr,1)
call mgl_box(gr,1)
call mgl_chart(gr,ch,'#')
call mgl_delete_data(ch)

Python

ch = mglData(7,2);  ch.Modify("rnd+0.1");
gr.Rotate(40,60);   gr.Light(True);
gr.Box();
gr.Chart(ch,"#");

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.