[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
9.1.9 Bars fall sample
C++ code
mglData y(10,3); y.Modify("0.8*sin(pi*(2*x+y/2))+0.2*rnd"); gr->Org=mglPoint(0,0); gr->Box(); gr->Bars(y,"f");
MGL code
new y 10 3 modify y '0.8*sin(pi*(2*x+y/2))+0.2*rnd' origin 0 0 box bars y 'f'
Pure C code
HMDT y = mgl_create_data_size(10,3,1); mgl_data_modify(y,"0.8*sin(pi*(2*x+y/2))+0.2*rnd"); mgl_set_origin(gr,0.,0.,0.); mgl_box(gr,1); mgl_bars(gr,y,"f"); mgl_delete_data(y);
Fortran code
integer y, mgl_create_data_size y = mgl_create_data_size(10,3,1) call mgl_data_modify(y,'0.8*sin(pi*(2*x+y/2))+0.2*rnd') call mgl_set_origin(gr,0.,0.,0.) call mgl_box(gr,1) call mgl_bars(gr,y,'f') call mgl_delete_data(y)
Python
y = mglData(10,3); y.Modify("0.8*sin(pi*(2*x+y/2))+0.2*rnd"); gr.SetOrigin(0.,0.); gr.Box(); gr.Bars(y,"f");