[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
9.7.14 StickPlot sample
C++ code
gr->SetRanges(-1, 1, -1, 1, 0, 1); gr->Light(true); gr->StickPlot(3, 0, 40, 30); gr->Axis("xyz_"); gr->Surf("exp(-10*y^2-6*x^2)"); gr->Text(mglPoint(0.2, 0, 1.2), "z=0", "", -2); gr->StickPlot(3, 1, 40, 30); gr->Axis("xyz_"); gr->Surf("exp(-10*y^2/2-6*x^2)/sqrt(2)"); gr->Text(mglPoint(0.2, 0, 1.2), "z=1", "", -2); gr->StickPlot(3, 2, 40, 30); gr->Axis("xyz_"); gr->Surf("exp(-10*y^2/5-6*x^2)/sqrt(5)"); gr->Text(mglPoint(0.2, 0, 1.2), "z=2", "", -2); gr->Label('x',"\\tau", 0); gr->Label('y', "\\rho");
MGL code
ranges -1 1 -1 1 0 1:light on stickplot 3 0 40 30 : axis 'xyz_' fsurf 'exp(-10*y^2-6*x^2)' text 0.2 0 1.2 'z=0' '' -2 stickplot 3 1 40 30 : axis 'xy_' fsurf 'exp(-10*y^2/2-6*x^2)/sqrt(2)' text 0.2 0 1.2 'z=1' '' -2 stickplot 3 2 40 30 : axis 'xy_' fsurf 'exp(-10*y^2/5-6*x^2)/sqrt(5)' text 0.2 0 1.2 'z=2' '' -2 xlabel '\tau' 0 : ylabel '\rho'
Pure C code
mgl_set_axis_3d(gr, -1, -1, 0, 1, 1, 1); mgl_set_light(gr, 1); mgl_stickplot(gr, 3, 0, 40, 30); mgl_axis(gr, "xyz_"); mgl_fsurf(gr,"exp(-10*y^2-6*x^2)","",100); mgl_text(gr, 0.2, 0, 1.2, "z=0"); mgl_stickplot(gr, 3, 1, 40, 30); mgl_axis(gr, "xyz_"); mgl_fsurf(gr,"exp(-10*y^2/2-6*x^2)/sqrt(2)","",100); mgl_text(gr, 0.2, 0, 1.2, "z=1"); mgl_stickplot(gr, 3, 2, 40, 30); mgl_axis(gr, "xyz_"); mgl_fsurf(gr,"exp(-10*y^2/5-6*x^2)/sqrt(5)","",100); mgl_text(gr, 0.2, 0, 1.2, "z=2"); mgl_label(gr,'x',"\\tau"); mgl_label(gr,'y', "\\rho");
Fortran code
NOT AVAILABLE
Python
gr->SetRanges(-1, 1, -1, 1, 0, 1); gr->Light(true); gr->StickPlot(3, 0, 40, 30); gr->Axis("xyz_"); gr->Surf("exp(-10*y^2-6*x^2)"); gr->Text(mglPoint(0.2, 0, 1.2), "z=0", "", -2); gr->StickPlot(3, 1, 40, 30); gr->Axis("xyz_"); gr->Surf("exp(-10*y^2/2-6*x^2)/sqrt(2)"); gr->Text(mglPoint(0.2, 0, 1.2), "z=1", "", -2); gr->StickPlot(3, 2, 40, 30); gr->Axis("xyz_"); gr->Surf("exp(-10*y^2/5-6*x^2)/sqrt(5)"); gr->Text(mglPoint(0.2, 0, 1.2), "z=2", "", -2); gr->Label('x',"\\tau", 0); gr->Label('y', "\\rho");
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |