[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
9.1.18 TextMark sample

C++ code
mglData y(50,3), y1(50); y.Modify("0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); y.Modify("sin(2*pi*x)",1); y.Modify("cos(2*pi*x)",2); y1.Modify("0.5+0.3*cos(2*pi*x)"); gr->Box(); gr->TextMark(y,y1,"\\gamma");
MGL code
new y 50 3 modify y '0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)' modify y 'sin(2*pi*x)' 1 modify y 'cos(2*pi*x)' 2 new y1 50 modify y1 '0.5+0.3*cos(2*pi*x)' box textmark y y1 '\gamma'
Pure C code
HMDT y, y1; y = mgl_create_data_size(50,3,1); y1 = mgl_create_data_size(50,1,1); mgl_data_modify(y,"0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); mgl_data_modify(y,"sin(2*pi*x)",1); mgl_data_modify(y,"cos(2*pi*x)",2); mgl_data_modify(y1,"0.5+0.3*cos(2*pi*x)",0); mgl_box(gr,1); mgl_textmark_yr(gr,y,y1,"\\gamma",""); mgl_delete_data(y); mgl_delete_data(y1);
Fortran code
integer y, y1, mgl_create_data_size y = mgl_create_data_size(50,3,1) y1 = mgl_create_data_size(50,1,1) call mgl_data_modify(y,'0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)',0) call mgl_data_modify(y,'sin(2*pi*x)',1) call mgl_data_modify(y,'cos(2*pi*x)',2) call mgl_data_modify(y1,'0.5+0.3*cos(2*pi*x)',0) call mgl_box(gr,1) call mgl_textmark_yr(gr,y,y1,'\gamma','') call mgl_delete_data(y) call mgl_delete_data(y1)
Python
y, y1 = mglData(50,3), mglData(50); y.Modify("0.7*sin(2*pi*x)+0.5*cos(3*pi*x)+0.2*sin(pi*x)",0); y.Modify("sin(2*pi*x)",1); y.Modify("cos(2*pi*x)",2); y1.Modify("0.5+0.3*cos(2*pi*x)"); gr.Box(); gr.TextMark(y,y1,"\\gamma");