|
Main
|
The minimal code to view the examples for different languages [C++ / MGL / C / Fortran / Python] are following. C++ code #include <mgl/mgl_zb.h>
int main()
{
mglGraph *gr = new mglGraphZB;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// put sample code here
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gr->ShowImage(); delete gr;
return 0;
}
MGL code #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # put sample code here # --> you may use sample as is :) #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Pure C code #include <mgl/mgl_c.h>
int main()
{
HMGL gr = mgl_create_graph_zb(600,400);
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/* put sample code here */
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
mgl_show_image(gr,"",0);
mgl_delete_graph(gr);
return 0;
}
Fortran code integer gr, mgl_create_graph_zb gr = mgl_create_graph_zb(600,400) !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ! put sample code here !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ call mgl_show_image(gr,'',0) call mgl_delete_graph(gr) end Python from mathgl import * gr = mglGraph(); #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # put sample code here #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gr.ShowImage(); |