[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
9.2.13 ContD sample

C++ code
mglData a(50,40), v(9); a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); v.Fill(-1,1); gr->Box(); gr->ContD(v,a); gr->Colorbar(v);
MGL code
new a 50 40 modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' var v 9 -1 1 box contd v a colorbar v
Pure C code
HMDT a = mgl_create_data_size(50,40,1); HMDT v = mgl_create_data_size(9,1,1); mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); mgl_data_fill(v,-1.,1.,'x'); mgl_box(gr,1); mgl_contd_val(gr,v,a,0,0); mgl_colorbar_val(gr,v,NULL,0); mgl_delete_data(a); mgl_delete_data(v);
Fortran code
integer a, v, mgl_create_data_size a = mgl_create_data_size(50,40,1); v = mgl_create_data_size(9,1,1); call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); call mgl_data_fill(v,-1.,1.,'x'); call mgl_box(gr,1) call mgl_contd_val(gr,v,a,'',0); call mgl_colorbar_val(gr,v,NULL,0); call mgl_delete_data(a) call mgl_delete_data(v)
Python
a, v = mglData(50,40), mglData(9); a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); v.Fill(-1,1); gr.Box(); gr.ContD(v,a); gr.Colorbar(v);