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

9.1.8 Bars above sample

../png/bars_a

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,"a");

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 'a'

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,"a");
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,'a')
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,"a");

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