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

9.7.13 ColumnPlot sample

../png/column

C++ code

char str[32];
for(int i=0;i<4;i++)
{
        gr->ColumnPlot(4,i);
        gr->Box();
        sprintf(str,"Plot %d of 4",i);
        gr->Text(mglPoint(-0.5,0.5),str);
        sprintf(str,"sin(pi*x+pi*%d/2)",i);
        gr->Plot(str);
}

MGL code

for $1 0 3
columnplot 4 $1
box
text -0.5 0.5 'Plot $1 of 4'
fplot 'sin(pi*x+pi*$1/2)'
next

Pure C code

int i;
char str[32];
for(i=0;i<4;i++)
{
        mgl_columnplot(gr,4,i);
        mgl_box(gr,1);
        sprintf(str,"Plot %d of 4",i);
        mgl_text(gr,-0.5,0.5,0.,str);
        sprintf(str,"sin(pi*x+pi*%d/2)",i);
        mgl_fplot(gr,str,"",100);
}

Fortran code

NOT AVAILABLE

Python

NOT AVAILABLE

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