set(CMAKE_VERBOSE_MAKEFILE ON)
set(MathGL_VERSION_MAJOR 2)
set(MathGL_VERSION_MINOR 4)
-set(MathGL_PATCH_VERSION 3)
+set(MathGL_PATCH_VERSION 4)
set(MathGL_VERSION ${MathGL_VERSION_MAJOR}.${MathGL_VERSION_MINOR}.${MathGL_PATCH_VERSION})
set(MathGL_SOVERSION 7.5.0)
string(TIMESTAMP MathGL_DATE UTC)
+2.4.4 Released 8 July 2019
+
+* mglData now have operator() which work as SubData() function.
+* Add 'minmax' for positions of local maximums and minimums.
+* Add ContGen() and ContFGen() to draw contour lines manually. Correspondingly 'cont' and 'contf' commands are extended.
+* Add 'conts' for getting coordinate of contour lines.
+* Extend 'put' for partial filling if data size(s) are smaller as destination.
+* Classes mglFormula and mglFormulaC now can read file with given sizes if string have the format ":fname:x1:x2:y1:y2:z1:z2". Here data is supposed in range [x1,x2]*[y1,y2]*[z1,z2] (by default [0,1]*[0,1]*[0,1]). Calc() in this case return the interpolated values.
+* Fix [xyz]range option for Area and Region.
+* Minor bugfixes.
+
2.4.3 Released 14 March 2019
* Add 'clabel' command -- draw labels for colorbar. Should be used *after* drawing colorbar!
#include "mgl2/mgl.h"\r
#include "mgl2/font.h"\r
#include "mgl2/eval.h"\r
+#include "mgl2/evalc.h"\r
//-----------------------------------------------------------------------------\r
void smgl_fexport(mglGraph *gr); // test file export\r
void MGL_EXPORT mgl_create_cpp_font(HMGL gr, const wchar_t *how);\r
void test(mglGraph *gr)\r
{\r
mglParse par;\r
+ par.Execute(gr,"new f 100 'x^3':save f 'test.dat':axis:box:fplot ':test.dat:-1:1'");\r
par.Execute(gr,"text 0 0 'ab' '@'");\r
// par.Execute(gr,"new a 3 3 'x*y'\nsubplot 2 1 0 '':dens a:dens a 'k+/'\n"\r
// "subplot 2 1 1 '':mask '+' 'ff00182424f800' 30:dens a '3+'");\r
FILE *fs = fopen("wnd_samples.cpp","r");\r
while(!feof(fs))\r
{\r
- fgets(buf,512,fs);\r
- if(strstr(buf,"void mgls_prepare1d")) break;\r
+ if(!fgets(buf,512,fs) || strstr(buf,"void mgls_prepare1d")) break;\r
}\r
while(!feof(fs))\r
- { fprintf(fp,"%s",buf); fgets(buf,512,fs); }\r
+ { fprintf(fp,"%s",buf); if(!fgets(buf,512,fs)) break; }\r
fprintf(fp,"\n@end verbatim\n@end ifclear\n\n@external{}\n");\r
fclose(fs);\r
\r
fseek(fs,0,SEEK_SET);\r
snprintf(name, 64, "void smgl_%s", samp[i].name);\r
while(!feof(fs))\r
- { fgets(buf,512,fs); if(strstr(buf,name)) break; }\r
+ { if(!fgets(buf,512,fs) || strstr(buf,name)) break; }\r
while(!feof(fs))\r
{\r
- fprintf(fp,"%s",buf); fgets(buf,512,fs);\r
- if(*buf=='}') break;\r
+ fprintf(fp,"%s",buf);\r
+ if(!fgets(buf,512,fs) || *buf=='}') break;\r
}\r
fprintf(fp,"}\n@end verbatim\n@end ifclear\n@pfig{%s, Sample @samp{%s}}\n@external{}\n", samp[i].name, samp[i].name);\r
}\r
{\r
char buf[128];\r
while(!feof(fi))\r
- { fgets(buf,128,fi); \r
+ { if(!fgets(buf,128,fi)) break;\r
if(!strstr(buf,"model name"))\r
{ fprintf(fp,"@c %s\n",buf); break; } }\r
fclose(fi);\r
gr->Plot(r,"b");
}
//-----------------------------------------------------------------------------
+const char *mmgl_minmax="define $p 30\n"
+"new h 300 300 '-sqrt(1-x^2-y^2)*(3*x*y^2*$p-x^3*$p+6*y)/(3*sqrt(2))+x*y+(y^2+x^2)*$p/3 -7*(y^2+x^2)^2*$p/24+y^2+3*x^2'\n"
+"\nminmax e h\n\ncrange h:dens h:box\nfplot 'sin(2*pi*t)' 'cos(2*pi*t)' '0' 'k'\nplot e(0)*2-1 e(1)*2-1 '. c'";
+void smgl_minmax(mglGraph *gr) // test minmax
+{
+ mglData h(300,300);
+ gr->Fill(h,"-sqrt(1-x^2-y^2)*(3*x*y^2*30-x^3*30+6*y)/(3*sqrt(2))+x*y+(y^2+x^2)*10 -7*(y^2+x^2)^2*30/24+y^2+3*x^2");
+ mglData e=h.MinMax();
+ gr->SetRange('c',h); gr->Dens(h); gr->Box();
+ gr->FPlot("sin(2*pi*t)","cos(2*pi*t)","0","k");
+ e*=2; e-=1;
+// for(long i=0;i<x.nx;i++) { x.a[i]=e.a[2*i]*2-1; y.a[i]=e.a[2*i+1]*2-1; }
+ gr->Plot(e(0),e(1),". c");
+}
+//-----------------------------------------------------------------------------
+const char *mmgl_conts="new a 10 10 'sin(2*pi*x*y)'\nrotate 40 60\n"
+"dens a '#'\ncont [0,0] a 'r'\nconts r 0 a\nplot 2*r(0)-1 2*r(1)-1 1+r(2) '2c'";
+void smgl_conts(mglGraph *gr) // test conts
+{
+ mglData a(10,10); gr->Fill(a,"sin(2*pi*x*y)");
+ mglData v, r=a.Conts(0);
+ gr->Rotate(40,60); gr->Dens(a,"#"); gr->Cont(v,a,"r");
+ mglData x(r.ny),y(r.ny),z(r.ny);
+ for(long i=0;i<x.nx;i++) { x[i]=r[r.nx*i]*2-1; y[i]=r[r.nx*i+1]*2-1; z[i]=1; }
+ gr->Plot(x,y,z,"2c");
+}
+//-----------------------------------------------------------------------------
const char *mmgl_fexport=all_prims_str
"write 'fexport.jpg':#write 'fexport.png'\nwrite 'fexport.bmp':write 'fexport.tga'\n"
"write 'fexport.eps':write 'fexport.svg'\nwrite 'fexport.gif':write 'fexport.xyz'\n"
{"contf", smgl_contf, mmgl_contf, "Function @ref{contf} draw filled contours. You can select automatic (default) or manual levels for contours."},
{"contf3", smgl_contf3, mmgl_contf3, "Function @ref{contf3} draw ordinary filled contours but at slices of 3D data. "},
{"contf_xyz", smgl_contf_xyz, mmgl_contf_xyz, "Functions @ref{contfz}, @ref{contfy}, @ref{contfx}, draw filled contours on plane perpendicular to corresponding axis. One of possible application is drawing projections of 3D field."},
+ {"conts", smgl_conts, mmgl_conts, "Function @ref{conts} get contour coordinate as data array."},
{"contv", smgl_contv, mmgl_contv, "Function @ref{contv} draw vertical cylinders (belts) at contour lines."},
{"correl", smgl_correl, mmgl_correl, "Test of correlation function (@ref{correl})."},
// {"crust", smgl_crust, mmgl_crust, ""}, // TODO: open after triangulation
{"mark", smgl_mark, mmgl_mark, "Example of @ref{mark}."},
{"mask", smgl_mask, mmgl_mask, "Example of @ref{mask} kinds."},
{"mesh", smgl_mesh, mmgl_mesh, "Function @ref{mesh} draw wired surface. You can use @ref{meshnum} for changing number of lines to be drawn."},
+ {"minmax", smgl_minmax, mmgl_minmax, "Function @ref{minmax} get position of local minimums and maximums."},
{"mirror", smgl_mirror, mmgl_mirror , "Example of using options."},
{"molecule", smgl_molecule, mmgl_molecule , "Example of drawing molecules."},
{"ode", smgl_ode, mmgl_ode, "Example of phase plain created by @ref{ode} solving, contour lines (@ref{cont}) and @ref{flow} threads."},
void MGL_EXPORT mgl_data_set_name_(uintptr_t *dat, const char *name,int);\r
void MGL_EXPORT mgl_data_set_name_w(mglDataA *dat, const wchar_t *name);\r
/// Get name of data variable\r
-MGL_EXPORT const wchar_t *mgl_data_get_name_w(HCDT dat);\r
+MGL_EXPORT_PURE const wchar_t *mgl_data_get_name_w(HCDT dat);\r
/// Set callback function which is called at deleting variable\r
void MGL_EXPORT mgl_data_set_func(mglDataA *dat, void (*func)(void *), void *par);\r
\r
void MGL_EXPORT mgl_data_set_id(mglDataA *d, const char *ids);\r
void MGL_EXPORT mgl_datac_set_id_(uintptr_t *d, const char *eq,int );\r
/// Get names for columns (slices)\r
-MGL_EXPORT const char *mgl_data_get_id(HCDT d);\r
+MGL_EXPORT_PURE const char *mgl_data_get_id(HCDT d);\r
\r
/// Save whole data array (for ns=-1) or only ns-th slice to text file\r
void MGL_EXPORT mgl_data_save(HCDT dat, const char *fname,long ns);\r
void MGL_EXPORT mgl_delete_expr(HMEX ex);\r
void MGL_EXPORT mgl_delete_expr_(uintptr_t *ex);\r
/// Return value of expression for given x,y,z variables\r
-double MGL_EXPORT mgl_expr_eval(HMEX ex, double x, double y,double z);\r
-double MGL_EXPORT mgl_expr_eval_(uintptr_t *ex, mreal *x, mreal *y, mreal *z);\r
+double MGL_EXPORT_PURE mgl_expr_eval(HMEX ex, double x, double y,double z);\r
+double MGL_EXPORT_PURE mgl_expr_eval_(uintptr_t *ex, mreal *x, mreal *y, mreal *z);\r
/// Return value of expression for given variables\r
-double MGL_EXPORT mgl_expr_eval_v(HMEX ex, mreal *vars);\r
+double MGL_EXPORT_PURE mgl_expr_eval_v(HMEX ex, mreal *vars);\r
/// Return value of expression differentiation over variable dir for given x,y,z variables\r
-double MGL_EXPORT mgl_expr_diff(HMEX ex, char dir, double x, double y,double z);\r
-double MGL_EXPORT mgl_expr_diff_(uintptr_t *ex, const char *dir, mreal *x, mreal *y, mreal *z, int);\r
+double MGL_EXPORT_PURE mgl_expr_diff(HMEX ex, char dir, double x, double y,double z);\r
+double MGL_EXPORT_PURE mgl_expr_diff_(uintptr_t *ex, const char *dir, mreal *x, mreal *y, mreal *z, int);\r
/// Return value of expression differentiation over variable dir for given variables\r
-double MGL_EXPORT mgl_expr_diff_v(HMEX ex, char dir, mreal *vars);\r
+double MGL_EXPORT_PURE mgl_expr_diff_v(HMEX ex, char dir, mreal *vars);\r
//-----------------------------------------------------------------------------\r
/// Create HAEX object for expression evaluating\r
HAEX MGL_EXPORT mgl_create_cexpr(const char *expr);\r
/// Remove double spaces from the string
void MGL_EXPORT mgl_strcls(char *str);
/// Get position of substring or return -1 if not found
-long MGL_EXPORT mgl_strpos(const char *str,char *fnd);
+long MGL_EXPORT_PURE mgl_strpos(const char *str,char *fnd);
/// Get position of symbol or return -1 if not found
-long MGL_EXPORT mgl_chrpos(const char *str,char fnd);
+long MGL_EXPORT_PURE mgl_chrpos(const char *str,char fnd);
/// Get uncommented string from file (NOTE: it is not thread safe!!!)
MGL_EXPORT char *mgl_fgetstr(FILE *fp);
void MGL_EXPORT mgl_info(const char *str, ...);
/// Locate next data block (block started by -----)
MGL_EXPORT FILE *mgl_next_data(const char *fname,int p);
+/// Enable executing MGL script if mgl_fgetstr() meet '#MGL fname.mgl [args]. Default value is 0 (false).
+void MGL_EXPORT mgl_fgetstr_mgl(int enable);
#ifdef __cplusplus
}
bool CopyProj(mglPnt &q, long from, mglPoint p, mglPoint n, short sub=0);\r
void CopyProj(long id, long from, mglPoint p, mglPoint n, short sub=0)\r
{ if(id>=0) CopyProj(Pnt[id],from,p,n,sub); }\r
+ void DisablePnt(long id) { Pnt[id].x = NAN; }\r
void SetRGBA(long k, const mglColor &c)\r
{ if(k>=0) {mglPnt &p=Pnt[k]; p.r = c.r; p.g = c.g; p.b = c.b; p.a = c.a;} }\r
virtual void Reserve(long n); ///< Allocate n-cells for Pnt and return current position\r
\r
/// Get color depending on single variable z, which should be scaled if scale=true\r
inline mreal GetC(long s,mreal z,bool scale = true) const\r
- { return s+(scale?GetA(z):(z>0?z/MGL_FEPSILON:0)); }\r
+ { return s+(scale?GetA(z):(z<0?0:z/MGL_FEPSILON)); }\r
+// { return s+(scale?GetA(z):(z>0?z/MGL_FEPSILON:0)); }\r
/// Get alpha value depending on single variable a\r
mreal GetA(mreal a) const MGL_FUNC_PURE;\r
/// Set pen/palette\r
void MGL_EXPORT mgl_suppress_warn(int on);\r
void MGL_EXPORT mgl_suppress_warn_(int *on);\r
/// Get last warning code\r
-int MGL_EXPORT mgl_get_warn(HMGL gr);\r
-int MGL_EXPORT mgl_get_warn_(uintptr_t *gr);\r
+int MGL_EXPORT_PURE mgl_get_warn(HMGL gr);\r
+int MGL_EXPORT_PURE mgl_get_warn_(uintptr_t *gr);\r
/// Set warning code ant fill message\r
void MGL_EXPORT mgl_set_warn(HMGL gr, int code, const char *text);\r
void MGL_EXPORT mgl_set_warn_(uintptr_t *gr, int *code, const char *text,int);\r
/// Get text of warning message(s)\r
-MGL_EXPORT const char *mgl_get_mess(HMGL gr);\r
+MGL_EXPORT_PURE const char *mgl_get_mess(HMGL gr);\r
int MGL_EXPORT mgl_get_mess_(uintptr_t *gr, char *out, int len);\r
\r
/// Set name of plot for saving filename\r
void MGL_EXPORT mgl_set_plotid(HMGL gr, const char *id);\r
void MGL_EXPORT mgl_set_plotid_(uintptr_t *gr, const char *id,int);\r
/// Get name of plot for saving filename\r
-MGL_EXPORT const char *mgl_get_plotid(HMGL gr);\r
+MGL_EXPORT_PURE const char *mgl_get_plotid(HMGL gr);\r
int MGL_EXPORT mgl_get_plotid_(uintptr_t *gr, char *out, int len);\r
\r
/// Ask to stop drawing\r
void MGL_EXPORT mgl_set_event_func(HMGL gr, void (*func)(void *), void *par);\r
\r
/// Get plot quality\r
-int MGL_EXPORT mgl_get_quality(HMGL gr);\r
-int MGL_EXPORT mgl_get_quality_(uintptr_t *gr);\r
+int MGL_EXPORT_PURE mgl_get_quality(HMGL gr);\r
+int MGL_EXPORT_PURE mgl_get_quality_(uintptr_t *gr);\r
/// Set plot quality\r
/** qual=0 -- no face drawing (fastest),\r
* qual=1 -- no color interpolation (fast),\r
void MGL_EXPORT mgl_set_draw_reg_(uintptr_t *gr, int *nx, int *ny, int *m);\r
\r
/// Check if support of frames is enabled (i.e. MGL_VECT_FRAME is set and Quality&MGL_DRAW_LMEM==0)\r
-int MGL_EXPORT mgl_is_frames(HMGL gr);\r
+int MGL_EXPORT_PURE mgl_is_frames(HMGL gr);\r
/// Get bit-value flag of HMGL state (for advanced users only)\r
-int MGL_EXPORT mgl_get_flag(HMGL gr, uint32_t flag);\r
-int MGL_EXPORT mgl_get_flag_(uintptr_t *gr, unsigned long *flag);\r
+int MGL_EXPORT_PURE mgl_get_flag(HMGL gr, uint32_t flag);\r
+int MGL_EXPORT_PURE mgl_get_flag_(uintptr_t *gr, unsigned long *flag);\r
/// Set bit-value flag of HMGL state (for advanced users only)\r
void MGL_EXPORT mgl_set_flag(HMGL gr, int val, uint32_t flag);\r
void MGL_EXPORT mgl_set_flag_(uintptr_t *gr, int *val, unsigned long *flag);\r
MGL_EXPORT const unsigned char *mgl_get_rgba_(uintptr_t *gr);\r
/// Get RGBA values of background image\r
/** Position of element {i,j} is [4*i + 4*Width*j]. */\r
-MGL_EXPORT const unsigned char *mgl_get_background(HMGL gr);\r
-MGL_EXPORT const unsigned char *mgl_get_background_(uintptr_t *gr);\r
+MGL_EXPORT_PURE const unsigned char *mgl_get_background(HMGL gr);\r
+MGL_EXPORT_PURE const unsigned char *mgl_get_background_(uintptr_t *gr);\r
/// Set object/subplot id\r
void MGL_EXPORT mgl_set_obj_id(HMGL gr, int id);\r
void MGL_EXPORT mgl_set_obj_id_(uintptr_t *gr, int *id);\r
/// Get object id\r
-int MGL_EXPORT mgl_get_obj_id(HMGL gr, int x, int y);\r
-int MGL_EXPORT mgl_get_obj_id_(uintptr_t *gr, int *x, int *y);\r
+int MGL_EXPORT_PURE mgl_get_obj_id(HMGL gr, int x, int y);\r
+int MGL_EXPORT_PURE mgl_get_obj_id_(uintptr_t *gr, int *x, int *y);\r
/// Get subplot id\r
-int MGL_EXPORT mgl_get_spl_id(HMGL gr, int x, int y);\r
-int MGL_EXPORT mgl_get_spl_id_(uintptr_t *gr, int *x, int *y);\r
+int MGL_EXPORT_PURE mgl_get_spl_id(HMGL gr, int x, int y);\r
+int MGL_EXPORT_PURE mgl_get_spl_id_(uintptr_t *gr, int *x, int *y);\r
/// Get width of the image\r
int MGL_EXPORT mgl_get_width(HMGL gr);\r
int MGL_EXPORT mgl_get_width_(uintptr_t *gr);\r
void MGL_EXPORT mgl_calc_scr(HMGL gr, double x, double y, double z, int *xs, int *ys);\r
void MGL_EXPORT mgl_calc_scr_(uintptr_t *gr, mreal *x, mreal *y, mreal *z, int *xs, int *ys);\r
/// Check if {xs,ys} is close to active point with accuracy d, and return its position or -1\r
-long MGL_EXPORT mgl_is_active(HMGL gr, int xs, int ys, int d);\r
-long MGL_EXPORT mgl_is_active_(uintptr_t *gr, int *xs, int *ys, int *d);\r
+long MGL_EXPORT_PURE mgl_is_active(HMGL gr, int xs, int ys, int d);\r
+long MGL_EXPORT_PURE mgl_is_active_(uintptr_t *gr, int *xs, int *ys, int *d);\r
\r
/// Create new frame.\r
int MGL_EXPORT mgl_new_frame(HMGL gr);\r
void MGL_EXPORT mgl_end_frame(HMGL gr);\r
void MGL_EXPORT mgl_end_frame_(uintptr_t *gr);\r
/// Get the number of created frames\r
-int MGL_EXPORT mgl_get_num_frame(HMGL gr);\r
-int MGL_EXPORT mgl_get_num_frame_(uintptr_t *gr);\r
+int MGL_EXPORT_PURE mgl_get_num_frame(HMGL gr);\r
+int MGL_EXPORT_PURE mgl_get_num_frame_(uintptr_t *gr);\r
/// Reset frames counter (start it from zero)\r
void MGL_EXPORT mgl_reset_frames(HMGL gr);\r
void MGL_EXPORT mgl_reset_frames_(uintptr_t *gr);\r
* '_' for reserving space at bottom\r
* '#' for using whole region. */\r
void MGL_EXPORT mgl_subplot_d(HMGL gr, int nx,int ny,int m,const char *style, double dx, double dy);\r
-void MGL_EXPORT mgl_subplot_d_(uintptr_t *gr, int *nx,int *ny,int *m, mreal *dx, mreal *dy);\r
+void MGL_EXPORT mgl_subplot_d_(uintptr_t *gr, int *nx,int *ny,int *m,const char *style, mreal *dx, mreal *dy,int l);\r
/// Put further plotting in rectangle of dx*dy cells starting from m-th cell of nx*ny grid of the image.\r
/** String \a style may contain:\r
* '<' for reserving space at left\r
void MGL_EXPORT mgl_zoom_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *x2, mreal *y2);\r
\r
//-----------------------------------------------------------------------------\r
-/// Callback function for mouse click\r
-void MGL_EXPORT mgl_set_click_func(HMGL gr, void (*func)(void *p));\r
-#if MGL_HAVE_PTHR_WIDGET\r
-/// Mutex for lock/unlock by widget\r
-void MGL_EXPORT mgl_wnd_set_mutex(HMGL gr, pthread_mutex_t *mutex);\r
-#endif\r
\r
-/// Make custom dialog for parameters ids of element properties defined by args\r
-void MGL_EXPORT mgl_wnd_make_dialog(HMGL gr, const char *ids, char const * const *args, const char *title);\r
-/// Set callback functions for drawing and data reloading\r
-void MGL_EXPORT mgl_wnd_set_func(HMGL gr, int (*draw)(HMGL gr, void *p), void *par, void (*reload)(void *p));\r
-/// Set callback functions for setting properties\r
-void MGL_EXPORT mgl_wnd_set_prop(HMGL gr, void (*prop)(char id, const char *val, void *p), void *par);\r
-/// Set delay for animation in seconds\r
-void MGL_EXPORT mgl_wnd_set_delay(HMGL gr, double dt);\r
-void MGL_EXPORT mgl_wnd_set_delay_(uintptr_t *gr, mreal *dt);\r
-/// Get delay for animation in seconds\r
-double MGL_EXPORT mgl_wnd_get_delay(HMGL gr);\r
-double MGL_EXPORT mgl_wnd_get_delay_(uintptr_t *gr);\r
-/// Set window properties\r
-void MGL_EXPORT mgl_setup_window(HMGL gr, int clf_upd, int showpos);\r
-void MGL_EXPORT mgl_setup_window_(uintptr_t *gr, int *clf_upd, int *showpos);\r
-/// Switch on/off transparency (do not overwrite user settings)\r
-void MGL_EXPORT mgl_wnd_toggle_alpha(HMGL gr);\r
-void MGL_EXPORT mgl_wnd_toggle_alpha_(uintptr_t *gr);\r
-/// Switch on/off lighting (do not overwrite user settings)\r
-void MGL_EXPORT mgl_wnd_toggle_light(HMGL gr);\r
-void MGL_EXPORT mgl_wnd_toggle_light_(uintptr_t *gr);\r
-/// Switch on/off zooming by mouse\r
-void MGL_EXPORT mgl_wnd_toggle_zoom(HMGL gr);\r
-void MGL_EXPORT mgl_wnd_toggle_zoom_(uintptr_t *gr);\r
-/// Switch on/off rotation by mouse\r
-void MGL_EXPORT mgl_wnd_toggle_rotate(HMGL gr);\r
-void MGL_EXPORT mgl_wnd_toggle_rotate_(uintptr_t *gr);\r
-/// Switch off all zooming and rotation\r
-void MGL_EXPORT mgl_wnd_toggle_no(HMGL gr);\r
-void MGL_EXPORT mgl_wnd_toggle_no_(uintptr_t *gr);\r
-/// Update picture by calling user drawing function\r
-void MGL_EXPORT mgl_wnd_update(HMGL gr);\r
-void MGL_EXPORT mgl_wnd_update_(uintptr_t *gr);\r
-/// Reload user data and update picture\r
-void MGL_EXPORT mgl_wnd_reload(HMGL gr);\r
-void MGL_EXPORT mgl_wnd_reload_(uintptr_t *gr);\r
-/// Adjust size of bitmap to window size\r
-void MGL_EXPORT mgl_wnd_adjust(HMGL gr);\r
-void MGL_EXPORT mgl_wnd_adjust_(uintptr_t *gr);\r
-/// Show next frame (if one)\r
-void MGL_EXPORT mgl_wnd_next_frame(HMGL gr);\r
-void MGL_EXPORT mgl_wnd_next_frame_(uintptr_t *gr);\r
-/// Show previous frame (if one)\r
-void MGL_EXPORT mgl_wnd_prev_frame(HMGL gr);\r
-void MGL_EXPORT mgl_wnd_prev_frame_(uintptr_t *gr);\r
-/// Run slideshow (animation) of frames\r
-void MGL_EXPORT mgl_wnd_animation(HMGL gr);\r
-void MGL_EXPORT mgl_wnd_animation_(uintptr_t *gr);\r
-/// Get last mouse position\r
-void MGL_EXPORT mgl_get_last_mouse_pos(HMGL gr, mreal *x, mreal *y, mreal *z);\r
-void MGL_EXPORT mgl_get_last_mouse_pos_(uintptr_t *gr, mreal *x, mreal *y, mreal *z);\r
-//-----------------------------------------------------------------------------\r
/// Create HMPR object for parsing MGL scripts\r
HMPR MGL_EXPORT mgl_create_parser();\r
uintptr_t MGL_EXPORT mgl_create_parser_();\r
MGL_EXPORT mglDataA *mgl_parser_add_varw(HMPR p, const wchar_t *name);\r
/// Find variable with given name or return NULL if no one\r
/// NOTE !!! You must not delete obtained data arrays !!!\r
-MGL_EXPORT mglDataA *mgl_parser_find_var(HMPR p, const char *name);\r
+MGL_EXPORT_PURE mglDataA *mgl_parser_find_var(HMPR p, const char *name);\r
uintptr_t MGL_EXPORT mgl_parser_find_var_(uintptr_t* p, const char *name, int);\r
-MGL_EXPORT mglDataA *mgl_parser_find_varw(HMPR p, const wchar_t *name);\r
+MGL_EXPORT_PURE mglDataA *mgl_parser_find_varw(HMPR p, const wchar_t *name);\r
/// Get variable with given id\r
/// NOTE !!! You must not delete obtained data arrays !!!\r
-MGL_EXPORT mglDataA *mgl_parser_get_var(HMPR p, unsigned long id);\r
-uintptr_t MGL_EXPORT mgl_parser_get_var_(uintptr_t* p, unsigned long *id);\r
+MGL_EXPORT_PURE mglDataA *mgl_parser_get_var(HMPR p, unsigned long id);\r
+uintptr_t MGL_EXPORT_PURE mgl_parser_get_var_(uintptr_t* p, unsigned long *id);\r
/// Get number of variables\r
-long MGL_EXPORT mgl_parser_num_var(HMPR p);\r
-long MGL_EXPORT mgl_parser_num_var_(uintptr_t* p);\r
+long MGL_EXPORT_PURE mgl_parser_num_var(HMPR p);\r
+long MGL_EXPORT_PURE mgl_parser_num_var_(uintptr_t* p);\r
\r
/// Get constant with given id\r
/// NOTE !!! You must not delete obtained data arrays !!!\r
-MGL_EXPORT mglNum *mgl_parser_get_const(HMPR p, unsigned long id);\r
-uintptr_t MGL_EXPORT mgl_parser_get_const_(uintptr_t* p, unsigned long *id);\r
+MGL_EXPORT_PURE mglNum *mgl_parser_get_const(HMPR p, unsigned long id);\r
+uintptr_t MGL_EXPORT_PURE mgl_parser_get_const_(uintptr_t* p, unsigned long *id);\r
/// Get number of constants\r
-long MGL_EXPORT mgl_parser_num_const(HMPR p);\r
-long MGL_EXPORT mgl_parser_num_const_(uintptr_t* p);\r
+long MGL_EXPORT_PURE mgl_parser_num_const(HMPR p);\r
+long MGL_EXPORT_PURE mgl_parser_num_const_(uintptr_t* p);\r
\r
/// Delete variable with name\r
void MGL_EXPORT mgl_parser_del_var(HMPR p, const char *name);\r
/// 3 - setup, 4 - data handle, 5 - data create, 6 - subplot, 7 - program\r
/// 8 - 1d plot, 9 - 2d plot, 10 - 3d plot, 11 - dd plot, 12 - vector plot\r
/// 13 - axis, 14 - primitives, 15 - axis setup, 16 - text/legend, 17 - data transform\r
-int MGL_EXPORT mgl_parser_cmd_type(HMPR pr, const char *name);\r
-int MGL_EXPORT mgl_parser_cmd_type_(uintptr_t* p, const char *name, int);\r
+int MGL_EXPORT_PURE mgl_parser_cmd_type(HMPR pr, const char *name);\r
+int MGL_EXPORT_PURE mgl_parser_cmd_type_(uintptr_t* p, const char *name, int);\r
/// Return description of MGL command\r
-MGL_EXPORT const char *mgl_parser_cmd_desc(HMPR pr, const char *name);\r
+MGL_EXPORT_PURE const char *mgl_parser_cmd_desc(HMPR pr, const char *name);\r
/// Return string of command format (command name and its argument[s])\r
-MGL_EXPORT const char *mgl_parser_cmd_frmt(HMPR pr, const char *name);\r
+MGL_EXPORT_PURE const char *mgl_parser_cmd_frmt(HMPR pr, const char *name);\r
/// Get name of command with number n\r
-MGL_EXPORT const char *mgl_parser_cmd_name(HMPR pr, long id);\r
+MGL_EXPORT_PURE const char *mgl_parser_cmd_name(HMPR pr, long id);\r
/// Get number of defined commands\r
-long MGL_EXPORT mgl_parser_cmd_num(HMPR pr);\r
+long MGL_EXPORT_PURE mgl_parser_cmd_num(HMPR pr);\r
\r
/// Return result of formula evaluation\r
HMDT MGL_EXPORT mgl_parser_calc(HMPR pr, const char *formula);\r
virtual void NextFrame() {GotoFrame(+1);} ///< Show next frame (if one)\r
virtual void PrevFrame() {GotoFrame(-1);} ///< Show previous frame (if one)\r
virtual void Animation()=0; ///< Run slideshow (animation) of frames\r
+ \r
+ virtual void *Window()=0; ///< Return pointer to widget (Fl_Window* or QMainWindow*) used for plotting\r
+ virtual void *Widget()=0; ///< Return pointer to widget (Fl_MGLView* or QMathGL*) used for plotting\r
+ virtual void WndSize(int w, int h)=0; ///< Resize window\r
+ virtual void WndMove(int x, int y)=0; ///< Move window\r
+ \r
void ReLoad(); ///< Reload user data and update picture\r
/// Create a window for plotting based on callback function (can be NULL).\r
virtual void Window(int argc, char **argv, int (*draw)(mglBase *gr, void *p),\r
void MGL_EXPORT mgl_text_y_(uintptr_t *gr, uintptr_t *y, const char *text, const char *font, const char *opt,int, int l,int n);\r
void MGL_EXPORT mgl_textw_y(HMGL gr, HCDT y, const wchar_t *text, const char *font, const char *opt);\r
\r
-void MGL_EXPORT mgl_cont_gen(HMGL gr, double val, HCDT a, HCDT x, HCDT y, HCDT z, const char *stl);\r
-void MGL_EXPORT mgl_contf_gen(HMGL gr, double v1, double v2, HCDT a, HCDT x, HCDT y, HCDT z, const char *stl);\r
+void MGL_EXPORT mgl_cont_gen(HMGL gr, double val, HCDT a, HCDT x, HCDT y, HCDT z, const char *stl, const char *opt);\r
+void MGL_EXPORT mgl_contf_gen(HMGL gr, double v1, double v2, HCDT a, HCDT x, HCDT y, HCDT z, const char *stl, const char *opt);\r
//void MGL_EXPORT mgl_contv_gen(HMGL gr, double v1, double v2, HCDT a, HCDT x, HCDT y, HCDT z, const char *stl);\r
//void MGL_EXPORT mgl_axial_gen(HMGL gr, double v1, double v2, HCDT a, HCDT x, HCDT y, HCDT z, const char *stl);\r
\r
//-----------------------------------------------------------------------------\r
#include <stdarg.h>\r
//-----------------------------------------------------------------------------\r
-mreal MGL_EXPORT mglLinear(const mreal *a, long nx, long ny, long nz, mreal x, mreal y, mreal z);\r
+mreal MGL_EXPORT_PURE mglLinear(const mreal *a, long nx, long ny, long nz, mreal x, mreal y, mreal z);\r
mreal MGL_EXPORT mglSpline3(const mreal *a, long nx, long ny, long nz, mreal x, mreal y, mreal z,mreal *dx=0, mreal *dy=0, mreal *dz=0);\r
-mreal MGL_EXPORT mglSpline3s(const mreal *a, long nx, long ny, long nz, mreal x, mreal y, mreal z);\r
+mreal MGL_EXPORT_PURE mglSpline3s(const mreal *a, long nx, long ny, long nz, mreal x, mreal y, mreal z);\r
//-----------------------------------------------------------------------------\r
/// Class for working with data array\r
class MGL_EXPORT mglData : public mglDataA\r
{ return mglData(true,mgl_data_section(this,&ids,dir,val)); }\r
inline mglData Section(long id, char dir='y', mreal val=NAN) const\r
{ return mglData(true,mgl_data_section_val(this,id,dir,val)); }\r
+ /// Get contour lines for dat[i,j]=val. NAN values separate the the curves.\r
+ inline mglData Conts(mreal val)\r
+ { return mglData(true,mgl_data_conts(val,this)); }\r
\r
/// Get trace of the data array\r
inline mglData Trace() const\r
/// Get array which is result of minimal values in given direction or directions\r
inline mglData Min(const char *dir) const\r
{ return mglData(true,mgl_data_min_dir(this,dir)); }\r
+ /// Get positions of local maximums and minimums\r
+ inline mglData MinMax() const\r
+ { return mglData(true,mgl_data_minmax(this)); }\r
/// Get the data which is direct multiplication (like, d[i,j] = this[i]*a[j] and so on)\r
inline mglData Combine(const mglDataA &dat) const\r
{ return mglData(true,mgl_data_combine(this,&dat)); }\r
/// Direct access to the data cell\r
inline mreal operator[](long i) const { return a[i]; }\r
inline mreal &operator[](long i) { return a[i]; }\r
+ /// Get sub-array of the data with given fixed indexes\r
+ inline mglData operator()(long xx,long yy=-1,long zz=-1) const\r
+ { return mglData(true,mgl_data_subdata(this,xx,yy,zz)); }\r
+ inline mglData operator()(const mglDataA &xx, const mglDataA &yy, const mglDataA &zz) const\r
+ { return mglData(true,mgl_data_subdata_ext(this,&xx,&yy,&zz)); }\r
+ inline mglData operator()(const mglDataA &xx, const mglDataA &yy) const\r
+ { return mglData(true,mgl_data_subdata_ext(this,&xx,&yy,0)); }\r
+ inline mglData operator()(const mglDataA &xx) const\r
+ { return mglData(true,mgl_data_subdata_ext(this,&xx,0,0)); }\r
#endif\r
\r
#ifndef DEBUG\r
#endif\r
/// Get integer power of x\r
double MGL_EXPORT_CONST mgl_ipow(double x,int n);\r
-double MGL_EXPORT mgl_ipow_(mreal *x,int *n);\r
+double MGL_EXPORT_PURE mgl_ipow_(mreal *x,int *n);\r
/// Get number of seconds since 1970 for given string\r
double MGL_EXPORT mgl_get_time(const char *time, const char *fmt);\r
double MGL_EXPORT mgl_get_time_(const char *time, const char *fmt,int,int);\r
/** If section id is negative then reverse order is used (i.e. -1 give last section). */\r
HMDT MGL_EXPORT mgl_data_section_val(HCDT dat, long id, char dir, mreal val);\r
uintptr_t MGL_EXPORT mgl_data_section_val_(uintptr_t *d, int *id, const char *dir, mreal *val,int);\r
+/// Get contour lines for dat[i,j]=val. NAN values separate the the curves\r
+HMDT mgl_data_conts(mreal val, HCDT dat);\r
\r
/// Equidistantly fill the data to range [x1,x2] in direction dir\r
void MGL_EXPORT mgl_data_fill(HMDT dat, mreal x1,mreal x2,char dir);\r
/// Returns pointer to data element [i,j,k]\r
MGL_EXPORT mreal *mgl_data_value(HMDT dat, long i,long j,long k);\r
/// Returns pointer to internal data array\r
-MGL_EXPORT mreal *mgl_data_data(HMDT dat);\r
+MGL_EXPORT_PURE mreal *mgl_data_data(HMDT dat);\r
\r
/// Gets the x-size of the data.\r
long MGL_EXPORT mgl_data_get_nx(HCDT d);\r
/// Get array which is result of minimal values in given direction or directions\r
HMDT MGL_EXPORT mgl_data_min_dir(HCDT dat, const char *dir);\r
uintptr_t MGL_EXPORT mgl_data_min_dir_(uintptr_t *dat, const char *dir,int);\r
+/// Get positions of local maximums and minimums\r
+HMDT MGL_EXPORT mgl_data_minmax(HCDT dat);\r
+uintptr_t MGL_EXPORT mgl_data_minmax_(uintptr_t *dat);\r
+/// Get indexes of a set of connected surfaces for set of values {a_ijk,b_ijk} as dependent on j,k\r
+/** NOTE: not optimized for general case!!! */\r
+HMDT MGL_EXPORT mgl_data_connect(HCDT a, HCDT b);\r
+uintptr_t MGL_EXPORT mgl_data_connect_(uintptr_t *a, uintptr_t *b);\r
+/// Resort data values according found connected surfaces for set of values {a_ijk,b_ijk} as dependent on j,k\r
+/** NOTE: not optimized for general case!!! */\r
+void MGL_EXPORT mgl_data_connect_r(HMDT a, HMDT b);\r
+void MGL_EXPORT mgl_data_connect_r_(uintptr_t *a, uintptr_t *b);\r
+\r
/// Cumulative summation the data in given direction or directions\r
void MGL_EXPORT mgl_data_cumsum(HMDT dat, const char *dir);\r
void MGL_EXPORT mgl_data_cumsum_(uintptr_t *dat, const char *dir,int);\r
#endif\r
/// Get integer power of x\r
cmdual MGL_EXPORT_CONST mgl_ipowc(mdual x,int n);\r
-cmdual MGL_EXPORT mgl_ipowc_(mdual *x,int *n);\r
+cmdual MGL_EXPORT_PURE mgl_ipowc_(mdual *x,int *n);\r
/// Get complex number from string. Parse (%g,%g), {%g,%g} and [%g,%g] if adv!=0.\r
cmdual MGL_EXPORT mgl_atoc(const char *s, int adv);\r
/// Get exp(i*a)\r
uintptr_t MGL_EXPORT mgl_datac_tridmat_(uintptr_t *A, uintptr_t *B, uintptr_t *C, uintptr_t *D, const char *how, int);\r
\r
/// Returns pointer to internal data array\r
-MGL_EXPORT mdual *mgl_datac_data(HADT dat);\r
+MGL_EXPORT_PURE mdual *mgl_datac_data(HADT dat);\r
/// Returns pointer to data element [i,j,k]\r
MGL_EXPORT mdual *mgl_datac_value(HADT dat, long i,long j,long k);\r
\r
//-----------------------------------------------------------------------------\r
extern float mgl_cos[360]; ///< contain cosine with step 1 degree\r
//-----------------------------------------------------------------------------\r
-/// Find length of wchar_t string (bypass standard wcslen bug)\r
+/// Calculate sqrt(x*x+y*y)\r
double MGL_EXPORT_CONST mgl_hypot(double x, double y);\r
/// Find length of wchar_t string (bypass standard wcslen bug)\r
-size_t MGL_EXPORT mgl_wcslen(const wchar_t *str);\r
+size_t MGL_EXPORT_PURE mgl_wcslen(const wchar_t *str);\r
/// Get RGB values for given color id or fill by -1 if no one found\r
void MGL_EXPORT mgl_chrrgb(char id, float rgb[3]);\r
/// Get number of colors in the string\r
-size_t MGL_EXPORT mgl_get_num_color(const char *s, int smooth);\r
+size_t MGL_EXPORT_PURE mgl_get_num_color(const char *s, int smooth);\r
/// Check if string contain color id and return its number\r
-long MGL_EXPORT mgl_have_color(const char *stl);\r
+long MGL_EXPORT_PURE mgl_have_color(const char *stl);\r
/// Find symbol in string excluding {} and return its position or NULL\r
-MGL_EXPORT const char *mglchr(const char *str, char ch);\r
+MGL_EXPORT_PURE const char *mglchr(const char *str, char ch);\r
/// Find any symbol from chr in string excluding {} and return its position or NULL\r
-MGL_EXPORT const char *mglchrs(const char *str, const char *chr);\r
+MGL_EXPORT_PURE const char *mglchrs(const char *str, const char *chr);\r
/// Set number of thread for plotting and data handling (for pthread version only)\r
void MGL_EXPORT mgl_set_num_thr(int n);\r
void MGL_EXPORT mgl_set_num_thr_(int *n);\r
void MGL_EXPORT mgl_set_global_warn(const char *text);\r
void MGL_EXPORT mgl_set_global_warn_(const char *text,int);\r
/// Get text of global warning message(s)\r
-MGL_EXPORT const char *mgl_get_global_warn();\r
+MGL_EXPORT_PURE const char *mgl_get_global_warn();\r
int MGL_EXPORT mgl_get_global_warn_(char *out, int len);\r
/// Setup gettext usage. NOTE: Russian translation MUST be installed.\r
void MGL_EXPORT mgl_textdomain(const char *argv0, const char *locale);\r
#ifndef _MGL_EVAL_H_\r
#define _MGL_EVAL_H_\r
//-----------------------------------------------------------------------------\r
-#include "mgl2/define.h"\r
+#include "mgl2/abstract.h"\r
/// types of errors\r
#define MGL_ERR_LOG 1\r
#define MGL_ERR_ARC 2\r
#define MGL_ERR_SQRT 3\r
+class mglData;\r
//-----------------------------------------------------------------------------\r
/// Class for evaluating formula specified by the string\r
-class MGL_EXPORT mglFormula // îáúåêò äëÿ ââîäà è âû÷èñëåíèÿ ôîðìóë\r
+class MGL_EXPORT mglFormula\r
{\r
public:\r
/// Evaluates the formula for 'x','r'=\a x, 'y','n'=\a y, 'z','t'=\a z, 'u'=\a u\r
inline int GetError() const { return Error; }\r
/// Parse the formula str and create formula-tree\r
mglFormula(const char *str);\r
+ /// Set data for the spline interpolation\r
+ mglFormula(HCDT d, mreal x1=0, mreal x2=1, mreal y1=0, mreal y2=1, mreal z1=0, mreal z2=1) : \r
+ dat(d),dx1(x1),dx2(x2),dy1(y1),dy2(y2),dz1(z1),dz2(z2),tmp(NULL) {};\r
/// Clean up formula-tree\r
~mglFormula();\r
protected:\r
mglFormula *Left,*Right; // first and second argument of the function\r
int Kod; // the function ID\r
mreal Res; // the number or the variable ID\r
+ HCDT dat; // data file for the interpolation\r
+ mreal dx1,dx2,dy1,dy2,dz1,dz2; // ranges of data files\r
static int Error;\r
+private:\r
+ mglData *tmp;\r
};\r
//-----------------------------------------------------------------------------\r
#endif\r
#define _MGL_EVALC_H_\r
//-----------------------------------------------------------------------------\r
#include "mgl2/eval.h"\r
+class mglDataC;\r
//-----------------------------------------------------------------------------\r
/// Class for evaluating formula specified by the string\r
class MGL_EXPORT mglFormulaC // ������ ��� ����� � ���������� ������\r
inline int GetError() const { return Error; }\r
/// Parse the formula str and create formula-tree\r
mglFormulaC(const char *str);\r
+ /// Set data for the spline interpolation\r
+ mglFormulaC(HCDT d, mreal x1=0, mreal x2=1, mreal y1=0, mreal y2=1, mreal z1=0, mreal z2=1) : \r
+ dat(d),dx1(x1),dx2(x2),dy1(y1),dy2(y2),dz1(z1),dz2(z2),tmp(NULL) {};\r
/// Clean up formula-tree\r
virtual ~mglFormulaC();\r
protected:\r
mglFormulaC *Left,*Right; // first and second argument of the function\r
int Kod; // the function ID\r
dual Res; // the number or the variable ID\r
+ HCDT dat; // data file for the interpolation\r
+ mreal dx1,dx2,dy1,dy2,dz1,dz2; // ranges of data files\r
static int Error;\r
+private:\r
+ mglDataC *tmp;\r
};\r
//-----------------------------------------------------------------------------\r
#endif\r
uintptr_t MGL_EXPORT mgl_fit_xyzas_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, uintptr_t* a, uintptr_t* ss, const char *eq, const char *vars, uintptr_t *ini, const char *opt,int, int l, int n);\r
\r
/// Get last fitted formula\r
-MGL_EXPORT const char *mgl_get_fit(HMGL gr);\r
+MGL_EXPORT_CONST const char *mgl_get_fit(HMGL gr);\r
int MGL_EXPORT mgl_get_fit_(uintptr_t *gr, char *out, int len);\r
\r
/// Make histogram (distribution) of data. This function do not plot data.\r
void MGL_EXPORT mgl_puts_fit(HMGL gr, double x, double y, double z, const char *prefix, const char *font, double size);\r
void MGL_EXPORT mgl_puts_fit_(uintptr_t* gr, mreal *x, mreal *y, mreal *z, const char *prefix, const char *font, mreal *size, int l, int n);\r
/// Get chi for last fitted formula\r
-mreal MGL_EXPORT mgl_get_fit_chi();\r
-mreal MGL_EXPORT mgl_get_fit_chi_();\r
+mreal MGL_EXPORT_PURE mgl_get_fit_chi();\r
+mreal MGL_EXPORT_PURE mgl_get_fit_chi_();\r
/// Get covariance matrix for last fitted formula\r
-HCDT MGL_EXPORT mgl_get_fit_covar();\r
-uintptr_t MGL_EXPORT mgl_get_fit_covar_();\r
+HCDT MGL_EXPORT_CONST mgl_get_fit_covar();\r
+uintptr_t MGL_EXPORT_CONST mgl_get_fit_covar_();\r
//-----------------------------------------------------------------------------\r
#ifdef __cplusplus\r
}\r
/// FLTK function for displaying progress of something.\r
void MGL_EXPORT mgl_progress_fltk(int value, int maximal, HMGL gr);\r
/// Return pointer to widget (Fl_MGLView*) used for plotting\r
-MGL_EXPORT void *mgl_fltk_widget(HMGL gr);\r
+MGL_EXPORT_PURE void *mgl_fltk_widget(HMGL gr);\r
#ifdef __cplusplus\r
}\r
//-----------------------------------------------------------------------------\r
virtual ~mglFLTK() {}\r
int Run() { return mgl_fltk_run(); } ///< Run main loop for event handling\r
int RunThr() { return mgl_fltk_thr(); } ///< Run main loop for event handling in separate thread\r
- /// Return pointer to widget (Fl_MGLView*) used for plotting\r
- void *Widget() { return mgl_fltk_widget(gr); }\r
};\r
//-----------------------------------------------------------------------------\r
#endif\r
* Option "value" set the number of contour levels (default is 7). */\r
inline void Cont(const mglDataA &z, const char *sch="", const char *opt="")\r
{ mgl_cont(gr, &z, sch, opt); }\r
+ /// Draw contour lines at a[i,j]=val specified parametrically\r
+ /** Style 't'/'T' draw contour labels below/above contours.*/\r
+ inline void ContGen(mreal val, const mglDataA &a, const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")\r
+ { mgl_cont_gen(gr, val, &a, &x, &y, &z, sch, opt); }\r
\r
/// Draw solid contours at manual levels for 2d data specified parametrically\r
/** Style ‘_’ to draw contours at bottom of axis box. */\r
* Option "value" set the number of contour levels (default is 7). */\r
inline void ContF(const mglDataA &z, const char *sch="", const char *opt="")\r
{ mgl_contf(gr, &z, sch, opt); }\r
+ /// Draw solid contours between a[i,j]=v1 and a[i,j]=v2 specified parametrically */\r
+ inline void ContFGen(mreal v1, mreal v2, const mglDataA &a, const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")\r
+ { mgl_contf_gen(gr, v1,v2, &a, &x, &y, &z, sch, opt); }\r
\r
/// Draw solid contours at manual levels for 2d data specified parametrically with specified colors\r
/** Style ‘_’ to draw contours at bottom of axis box. */\r
int MGL_EXPORT mgl_qt_run();\r
int MGL_EXPORT mgl_qt_run_();\r
/// Return pointer to widget (QMathGL*) used for plotting\r
-MGL_EXPORT void *mgl_qt_widget(HMGL gr);\r
+MGL_EXPORT_PURE void *mgl_qt_widget(HMGL gr);\r
#ifdef __cplusplus\r
}\r
//-----------------------------------------------------------------------------\r
mgl_set_click_func(gr, mgl_click_class); }\r
virtual ~mglQT() {}\r
int Run() { return mgl_qt_run(); } ///< Run main loop for event handling\r
- /// Return pointer to widget (QMathGL*) used for plotting\r
- void *Widget() { return mgl_qt_widget(gr); }\r
};\r
//-----------------------------------------------------------------------------\r
void MGL_EXPORT mgl_ask_qt(const wchar_t *quest, wchar_t *res);\r
inline mglPoint operator-(const mglPoint &a)
{ return mglPoint(-a.x, -a.y, -a.z, -a.c); }
inline mglPoint operator*(mreal b, const mglPoint &a)
-{ return mglPoint(a.x*b, a.y*b, a.z*b, a.c*b); } // TODO check conficts of a.c*b!!!
+{ return mglPoint(a.x*b, a.y*b, a.z*b, a.c*b); }
inline mglPoint operator*(const mglPoint &a, mreal b)
-{ return mglPoint(a.x*b, a.y*b, a.z*b, a.c*b); } // TODO check conficts of a.c*b!!!
+{ return mglPoint(a.x*b, a.y*b, a.z*b, a.c*b); }
inline mglPoint operator/(const mglPoint &a, mreal b)
{ return mglPoint(a.x/b, a.y/b, a.z/b); }
inline mreal operator*(const mglPoint &a, const mglPoint &b)
float b; ///< Blue component of color
float a; ///< Alpha component of color
- /// Constructor for RGB components manualy
+ /// Constructor for RGB components manually
mglColor(float R,float G,float B, float A=1):r(R),g(G),b(B),a(A) {}
- /// Constructor for RGB components manualy
+ /// Constructor for RGB components manually
mglColor(const unsigned char *c, float A=1):r(c[0]/255.f),g(c[1]/255.f),b(c[2]/255.f),a(A) {}
/// Constructor set default color
mglColor():r(0),g(0),b(0),a(1) {}
#define _MGL_WND_H_\r
\r
#include "mgl2/mgl.h"\r
+#include "mgl2/wnd_cf.h"\r
//-----------------------------------------------------------------------------\r
MGL_EXPORT void *mgl_draw_calc(void *p);\r
void MGL_EXPORT mgl_parse_comments(const char *text, double &a1, double &a2, double &da, std::vector<std::string> &anim, std::string &dlg_ids, std::vector<std::string> &dlg_par);\r
mglWnd() : mglGraph(-1) {}\r
virtual ~mglWnd() { mgl_use_graph(gr,-255); }\r
virtual int Run()=0; ///< Run main loop for event handling\r
- /// Return pointer to widget used for plotting\r
- virtual void *Widget() { return NULL; }\r
+ inline void *Window() ///< Return pointer to widget (Fl_Window* or QMainWindow*) used for plotting\r
+ { return mgl_wnd_window(gr); }\r
+ inline void *Widget() ///< Return pointer to widget (Fl_MGLView* or QMathGL*) used for plotting\r
+ { return mgl_wnd_widget(gr); }\r
+ inline void WndSize(int w, int h) ///< Resize window\r
+ { mgl_wnd_size(gr,w,h); }\r
+ inline void WndMove(int x, int y) ///< Move window\r
+ { mgl_wnd_move(gr,x,y); }\r
\r
inline void ToggleAlpha() ///< Switch on/off transparency (do not overwrite user settings)\r
{ mgl_wnd_toggle_alpha(gr); }\r
--- /dev/null
+/***************************************************************************\r
+ * wnd_cf.h is part of Math Graphic Library\r
+ * Copyright (C) 2007-2016 Alexey Balakin <mathgl.abalakin@gmail.ru> *\r
+ * *\r
+ * This program is free software; you can redistribute it and/or modify *\r
+ * it under the terms of the GNU Library General Public License as *\r
+ * published by the Free Software Foundation; either version 3 of the *\r
+ * License, or (at your option) any later version. *\r
+ * *\r
+ * This program is distributed in the hope that it will be useful, *\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *\r
+ * GNU General Public License for more details. *\r
+ * *\r
+ * You should have received a copy of the GNU Library General Public *\r
+ * License along with this program; if not, write to the *\r
+ * Free Software Foundation, Inc., *\r
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *\r
+ ***************************************************************************/\r
+#ifndef MGL_WND_CF_H\r
+#define MGL_WND_CF_H\r
+#include "mgl2/abstract.h"\r
+//-----------------------------------------------------------------------------\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+//-----------------------------------------------------------------------------\r
+/// Callback function for mouse click\r
+void MGL_EXPORT mgl_set_click_func(HMGL gr, void (*func)(void *p));\r
+#if MGL_HAVE_PTHR_WIDGET\r
+/// Mutex for lock/unlock by widget\r
+void MGL_EXPORT mgl_wnd_set_mutex(HMGL gr, pthread_mutex_t *mutex);\r
+#endif\r
+\r
+/// Make custom dialog for parameters ids of element properties defined by args\r
+void MGL_EXPORT mgl_wnd_make_dialog(HMGL gr, const char *ids, char const * const *args, const char *title);\r
+/// Set callback functions for drawing and data reloading\r
+void MGL_EXPORT mgl_wnd_set_func(HMGL gr, int (*draw)(HMGL gr, void *p), void *par, void (*reload)(void *p));\r
+/// Set callback functions for setting properties\r
+void MGL_EXPORT mgl_wnd_set_prop(HMGL gr, void (*prop)(char id, const char *val, void *p), void *par);\r
+/// Set delay for animation in seconds\r
+void MGL_EXPORT mgl_wnd_set_delay(HMGL gr, double dt);\r
+void MGL_EXPORT mgl_wnd_set_delay_(uintptr_t *gr, mreal *dt);\r
+/// Get delay for animation in seconds\r
+double MGL_EXPORT_PURE mgl_wnd_get_delay(HMGL gr);\r
+double MGL_EXPORT_PURE mgl_wnd_get_delay_(uintptr_t *gr);\r
+/// Set window properties\r
+void MGL_EXPORT mgl_setup_window(HMGL gr, int clf_upd, int showpos);\r
+void MGL_EXPORT mgl_setup_window_(uintptr_t *gr, int *clf_upd, int *showpos);\r
+/// Switch on/off transparency (do not overwrite user settings)\r
+void MGL_EXPORT mgl_wnd_toggle_alpha(HMGL gr);\r
+void MGL_EXPORT mgl_wnd_toggle_alpha_(uintptr_t *gr);\r
+/// Switch on/off lighting (do not overwrite user settings)\r
+void MGL_EXPORT mgl_wnd_toggle_light(HMGL gr);\r
+void MGL_EXPORT mgl_wnd_toggle_light_(uintptr_t *gr);\r
+/// Switch on/off zooming by mouse\r
+void MGL_EXPORT mgl_wnd_toggle_zoom(HMGL gr);\r
+void MGL_EXPORT mgl_wnd_toggle_zoom_(uintptr_t *gr);\r
+/// Switch on/off rotation by mouse\r
+void MGL_EXPORT mgl_wnd_toggle_rotate(HMGL gr);\r
+void MGL_EXPORT mgl_wnd_toggle_rotate_(uintptr_t *gr);\r
+/// Switch off all zooming and rotation\r
+void MGL_EXPORT mgl_wnd_toggle_no(HMGL gr);\r
+void MGL_EXPORT mgl_wnd_toggle_no_(uintptr_t *gr);\r
+/// Update picture by calling user drawing function\r
+void MGL_EXPORT mgl_wnd_update(HMGL gr);\r
+void MGL_EXPORT mgl_wnd_update_(uintptr_t *gr);\r
+/// Reload user data and update picture\r
+void MGL_EXPORT mgl_wnd_reload(HMGL gr);\r
+void MGL_EXPORT mgl_wnd_reload_(uintptr_t *gr);\r
+/// Adjust size of bitmap to window size\r
+void MGL_EXPORT mgl_wnd_adjust(HMGL gr);\r
+void MGL_EXPORT mgl_wnd_adjust_(uintptr_t *gr);\r
+/// Show next frame (if one)\r
+void MGL_EXPORT mgl_wnd_next_frame(HMGL gr);\r
+void MGL_EXPORT mgl_wnd_next_frame_(uintptr_t *gr);\r
+/// Show previous frame (if one)\r
+void MGL_EXPORT mgl_wnd_prev_frame(HMGL gr);\r
+void MGL_EXPORT mgl_wnd_prev_frame_(uintptr_t *gr);\r
+/// Run slideshow (animation) of frames\r
+void MGL_EXPORT mgl_wnd_animation(HMGL gr);\r
+void MGL_EXPORT mgl_wnd_animation_(uintptr_t *gr);\r
+/// Get last mouse position\r
+void MGL_EXPORT mgl_get_last_mouse_pos(HMGL gr, mreal *x, mreal *y, mreal *z);\r
+void MGL_EXPORT mgl_get_last_mouse_pos_(uintptr_t *gr, mreal *x, mreal *y, mreal *z);\r
+/// Return pointer to widget (Fl_Window* or QMainWindow*) used for plotting\r
+MGL_EXPORT void *mgl_wnd_window(HMGL gr);\r
+/// Return pointer to widget (Fl_MGLView* or QMathGL*) used for plotting\r
+MGL_EXPORT void *mgl_wnd_widget(HMGL gr);\r
+/// Move window to given position\r
+void MGL_EXPORT mgl_wnd_move(HMGL gr, int x, int y);\r
+void MGL_EXPORT mgl_wnd_move_(uintptr_t *gr, int *x, int *y);\r
+/// Change window sizes\r
+void MGL_EXPORT mgl_wnd_size(HMGL gr, int w, int h);\r
+void MGL_EXPORT mgl_wnd_size_(uintptr_t *gr, int *w, int *h);\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+//-----------------------------------------------------------------------------\r
+#endif\r
msgstr ""
"Project-Id-Version: MathGL2 2.4.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-03-02 14:41+0300\n"
+"POT-Creation-Date: 2019-07-06 19:59+0300\n"
"PO-Revision-Date: 2018-03-24 11:08-0400\n"
"Last-Translator: Diego Sejas Viscarra <dsejas.math@protonmail.com>\n"
"Language-Team: \n"
"\t- recibir script de entrada estandar\n"
"\t-h imprimir este mensaje\n"
-#: widgets/qt.cpp:872
+#: widgets/qt.cpp:876
msgid ""
"\n"
"(c) Alexey Balakin, 2007\n"
msgid "@<- Prev"
msgstr "@<- Prev."
-#: widgets/qt.cpp:1290 udav/udav_wnd.cpp:331 mgllab/mgllab.cpp:347
+#: widgets/qt.cpp:1294 udav/udav_wnd.cpp:331 mgllab/mgllab.cpp:347
msgid "About"
msgstr "Acerca de"
#. -----------------------------------------------------------------------------
-#: widgets/qt.cpp:876 widgets/qt.cpp:1291 udav/udav_wnd.cpp:332
+#: widgets/qt.cpp:880 widgets/qt.cpp:1295 udav/udav_wnd.cpp:332
#: udav/udav_wnd.cpp:460
msgid "About Qt"
msgstr "Acerca de Qt"
-#: widgets/qt.cpp:1169 udav/plot_pnl.cpp:372
+#: widgets/qt.cpp:1173 udav/plot_pnl.cpp:372
msgid "Add arc"
msgstr "Añadir arco"
-#: widgets/qt.cpp:1172 udav/plot_pnl.cpp:375
+#: widgets/qt.cpp:1176 udav/plot_pnl.cpp:375
msgid "Add arc which properties can be changed later by mouse."
msgstr "Añadir arco configurable por el mouse."
msgid "Add command option(s)"
msgstr "Añadir opción(es) de comando"
-#: widgets/qt.cpp:1174 udav/plot_pnl.cpp:378
+#: widgets/qt.cpp:1178 udav/plot_pnl.cpp:378
msgid "Add curve"
msgstr "Añadir curva"
-#: widgets/qt.cpp:1177 udav/plot_pnl.cpp:381
+#: widgets/qt.cpp:1181 udav/plot_pnl.cpp:381
msgid "Add curve which properties can be changed later by mouse."
msgstr "Añadir curva configurable por el mouse."
-#: src/exec_dat.cpp:1634
+#: src/exec_dat.cpp:1666
msgid "Add data or number"
msgstr "Añadir datos o número"
-#: widgets/qt.cpp:1189 udav/plot_pnl.cpp:396
+#: widgets/qt.cpp:1193 udav/plot_pnl.cpp:396
msgid "Add ellipse"
msgstr "Añadir elipse"
-#: widgets/qt.cpp:1192 udav/plot_pnl.cpp:399 udav/plot_pnl.cpp:405
+#: widgets/qt.cpp:1196 udav/plot_pnl.cpp:399 udav/plot_pnl.cpp:405
msgid "Add ellipse which properties can be changed later by mouse."
msgstr "Añadir elipse configurable por el mouse."
msgid "Add legend entry for the plot"
msgstr "Añadir entrada a leyenda del gráfico"
-#: widgets/qt.cpp:1164 udav/plot_pnl.cpp:366
+#: widgets/qt.cpp:1168 udav/plot_pnl.cpp:366
msgid "Add line"
msgstr "Añadir línea"
-#: widgets/qt.cpp:1167 udav/plot_pnl.cpp:369
+#: widgets/qt.cpp:1171 udav/plot_pnl.cpp:369
msgid "Add line which properties can be changed later by mouse."
msgstr "Añadir línea configurable por el mouse."
-#: widgets/qt.cpp:1199 udav/plot_pnl.cpp:408
+#: widgets/qt.cpp:1203 udav/plot_pnl.cpp:408
msgid "Add mark"
msgstr "Añadir marca"
# Marker or mark?
-#: widgets/qt.cpp:1202 udav/plot_pnl.cpp:411
+#: widgets/qt.cpp:1206 udav/plot_pnl.cpp:411
msgid "Add marker which properties can be changed later by mouse."
msgstr "Añadir marca configurable por el mouse."
-#: widgets/qt.cpp:1194 udav/plot_pnl.cpp:402
+#: widgets/qt.cpp:1198 udav/plot_pnl.cpp:402
msgid "Add polygon"
msgstr "Añadir polígono"
-#: widgets/qt.cpp:1197
+#: widgets/qt.cpp:1201
msgid "Add polygon which properties can be changed later by mouse."
msgstr "Añadir polígono configurable por el mouse."
msgstr "Añadir primitiva"
# rect?
-#: widgets/qt.cpp:1179 udav/plot_pnl.cpp:384
+#: widgets/qt.cpp:1183 udav/plot_pnl.cpp:384
msgid "Add rect"
msgstr "Añadir rectángulo"
-#: widgets/qt.cpp:1182 udav/plot_pnl.cpp:387
+#: widgets/qt.cpp:1186 udav/plot_pnl.cpp:387
msgid "Add rectangle which properties can be changed later by mouse."
msgstr "Añadir rectángulo configurable por el mouse."
-#: widgets/qt.cpp:1184 udav/plot_pnl.cpp:390
+#: widgets/qt.cpp:1188 udav/plot_pnl.cpp:390
msgid "Add rhombus"
msgstr "Añadir rombo"
-#: widgets/qt.cpp:1187 udav/plot_pnl.cpp:393
+#: widgets/qt.cpp:1191 udav/plot_pnl.cpp:393
msgid "Add rhombus which properties can be changed later by mouse."
msgstr "Añadir rombo configurable por el mouse."
-#: widgets/qt.cpp:1204 udav/plot_pnl.cpp:414
+#: widgets/qt.cpp:1208 udav/plot_pnl.cpp:414
msgid "Add text"
msgstr "Añadir texto"
-#: widgets/qt.cpp:1207 udav/plot_pnl.cpp:417
+#: widgets/qt.cpp:1211 udav/plot_pnl.cpp:417
msgid "Add text which properties can be changed later by mouse."
msgstr "Añadir texto configurable por el mouse."
msgid "Add user-defined symbol"
msgstr "Añadir símbolo personalizado"
-#: widgets/fltk.cpp:873
+#: widgets/fltk.cpp:877
msgid "Adjust picture size to fill drawing area"
msgstr "Ajustar imagen al área de dibujo"
-#: widgets/fltk.cpp:836 widgets/qt.cpp:1152 udav/plot_pnl.cpp:337
+#: widgets/fltk.cpp:840 widgets/qt.cpp:1156 udav/plot_pnl.cpp:337
msgid "Adjust size"
msgstr "Ajustar tamaño"
msgid "Airy and Gamma"
msgstr "Funciones de Airy y Gamma"
-#: src/window.cpp:394
+#: src/window.cpp:417
msgid ""
"All indexes (of data arrays, subplots and so on) are always start from 0."
msgstr ""
"en 0."
#. graphics menu
-#: widgets/qt.cpp:1111 udav/opt_dlg.cpp:51 udav/setup_dlg.cpp:109
+#: widgets/qt.cpp:1115 udav/opt_dlg.cpp:51 udav/setup_dlg.cpp:109
#: udav/plot_pnl.cpp:290 mgllab/dialogs.cpp:109
msgid "Alpha"
msgstr "Alfa"
msgstr "Ángulo alrededor del eje z (en grados)"
#. animation menu
-#: widgets/qt.cpp:1257 widgets/qt.cpp:1258 udav/plot_pnl.cpp:559
+#: widgets/qt.cpp:1261 widgets/qt.cpp:1262 udav/plot_pnl.cpp:559
#: mgllab/mathgl.cpp:185
msgid "Animation"
msgstr "Animación"
msgid "Arrow at start"
msgstr "Flecha al principio"
-#: widgets/qt.cpp:1150
+#: widgets/qt.cpp:1154
msgid "Ask to stop plot drawing (F7)."
msgstr "Detener creación de gráfico (F7)."
msgid "C-range"
msgstr "Rango c"
-#: widgets/qt.cpp:1276
+#: widgets/qt.cpp:1280
msgid "Calculations"
msgstr "Cálculos"
msgid "Change (resize) data"
msgstr "Cambiar (tamaño de) datos"
-#: widgets/qt.cpp:1154 udav/plot_pnl.cpp:339
+#: widgets/qt.cpp:1158 udav/plot_pnl.cpp:339
msgid "Change canvas size to fill whole region (F6)."
msgstr "Maximizar el área de dibujo (F6)."
msgstr "Borrar imagen"
#. o = new Fl_Button(180, 130, 25, 25);o->image(img_save); o->tooltip("img_save");
-#: widgets/fltk.cpp:1102 widgets/qt.cpp:1104 udav/find_dlg.cpp:52
+#: widgets/fltk.cpp:1106 widgets/qt.cpp:1108 udav/find_dlg.cpp:52
#: udav/hint_dlg.cpp:52 mgllab/editor.cpp:566 mgllab/help.cpp:289
#: mgllab/help.cpp:349 mgllab/help.cpp:465
msgid "Close"
msgid "Copy data"
msgstr "Copiar datos"
-#: src/exec_dat.cpp:1640
+#: src/exec_dat.cpp:1674
msgid "Copy data from another variable"
msgstr "Copiar datos de otra variable"
-#: widgets/fltk.cpp:833
+#: widgets/fltk.cpp:837
msgid "Copy graphics"
msgstr "Copiar gráfico"
-#: widgets/qt.cpp:1158 udav/plot_pnl.cpp:354
+#: widgets/qt.cpp:1162 udav/plot_pnl.cpp:354
msgid "Copy graphics to clipboard (Ctrl+Shift+G)."
msgstr "Copiar gráfico a memoria (Ctrl+Shift+G)."
-#: widgets/fltk.cpp:877
+#: widgets/fltk.cpp:881
msgid "Copy image to clipboard"
msgstr "Copiar imagen a memoria"
-#: widgets/qt.cpp:1156 udav/plot_pnl.cpp:352
+#: widgets/qt.cpp:1160 udav/plot_pnl.cpp:352
msgid "Copy plot"
msgstr "Copiar gráfico"
msgid "Cos-Fourier transform along direction(s)"
msgstr "Cos-transformada de Fourier en dirrección(es)"
-#: src/exec_dat.cpp:1642
+#: src/exec_dat.cpp:1676
msgid "Cos-Fourier transform at some direction"
msgstr "Cos-transformada de Fourier en una dirección"
msgid "Create data and IO"
msgstr "Crear datos e I/O"
-#: src/exec_dat.cpp:1667
+#: src/exec_dat.cpp:1702
msgid "Create histogram (distribution) of data values"
msgstr "Crear histograma (distribución) de valores de datos"
msgid "Create new"
msgstr "Crear nuevo"
-#: src/exec_dat.cpp:1727
+#: src/exec_dat.cpp:1762
msgid "Create new 1D data and fill it in range"
msgstr "Crear nuevos datos 1D y llenar en rango"
-#: src/exec_dat.cpp:1682
+#: src/exec_dat.cpp:1717
msgid "Create new data"
msgstr "Crear nuevos datos"
msgid "Crop data"
msgstr "Cortar datos"
-#: src/exec_dat.cpp:1643
+#: src/exec_dat.cpp:1677
msgid "Crop edge of data"
msgstr "Cortar borde de datos"
msgid "CumSum"
msgstr "SumCum"
-#: src/exec_dat.cpp:1644
+#: src/exec_dat.cpp:1678
msgid "Cumulative summation along direction(s)"
msgstr "Suma acumulativa en la(s) dirección(es)"
msgid "Delete ALL data arrays"
msgstr "Borrar TODOS los datos"
-#: src/exec_dat.cpp:1647
+#: src/exec_dat.cpp:1681
msgid "Delete data or slice of data"
msgstr "Borrar datos o porción de los datos"
msgid "Description"
msgstr "Descripción"
-#: src/exec_dat.cpp:1648
+#: src/exec_dat.cpp:1682
msgid "Detect curves for maximums of data array"
msgstr "Analizar curvas en busca de máximos"
msgid "Diffuse"
msgstr "Difuso"
-#: src/exec_dat.cpp:1652
+#: src/exec_dat.cpp:1686
msgid "Dilate data larger val"
msgstr "Dilatar datos mayores a val"
-#: src/exec_dat.cpp:1639
+#: src/exec_dat.cpp:1671
msgid "Direct multiplication of arrays"
msgstr "Multiplicación directa de arreglos"
msgid "Divide by"
msgstr "Dividir por"
-#: src/exec_dat.cpp:1653
+#: src/exec_dat.cpp:1687
msgid "Divide by data or number"
msgstr "Dividir por datos o número"
msgid "Do"
msgstr "Hacer"
-#: src/exec_dat.cpp:1716
+#: src/exec_dat.cpp:1751
msgid "Do STFA transform"
msgstr "Transformada STFA"
-#: src/exec_dat.cpp:1722 src/exec_dat.cpp:1723
+#: src/exec_dat.cpp:1757 src/exec_dat.cpp:1758
msgid "Do integral transform of data"
msgstr "Transformada integral de datos"
msgid "Double diff."
msgstr "Doble dif."
-#: src/exec_gr.cpp:1135
+#: src/exec_gr.cpp:1141
msgid "Draw Bifurcation diagram"
msgstr "Diagrama de bifurcación"
-#: src/exec_gr.cpp:1171
+#: src/exec_gr.cpp:1177
msgid "Draw Iris plots"
msgstr "Gráfica de Iris"
-#: src/exec_gr.cpp:1173
+#: src/exec_gr.cpp:1179
msgid "Draw Lamerey diagram"
msgstr "Diagrama de Lamerey"
# apertura-alto-bajo-clausura?
-#: src/exec_gr.cpp:1177
+#: src/exec_gr.cpp:1183
msgid "Draw Open-High-Low-Close (OHLC) diagram"
msgstr "Diagrama OHLC"
-#: src/exec_gr.cpp:1180
+#: src/exec_gr.cpp:1186
msgid "Draw Poincare map"
msgstr "Mapa de Poincaré"
-#: src/exec_gr.cpp:1186
+#: src/exec_gr.cpp:1192
msgid "Draw STFA diagram"
msgstr "Diagrama STFA"
-#: src/exec_gr.cpp:1198
+#: src/exec_gr.cpp:1204
msgid "Draw TeX mark at point position"
msgstr "Graficar marca de TeX en posición"
msgid "Draw angle arc"
msgstr "Graficar arco"
-#: src/exec_gr.cpp:1128
+#: src/exec_gr.cpp:1134
msgid "Draw area plot for 1D data"
msgstr "Gráfica de área para datos 1D"
-#: src/exec_gr.cpp:1131
+#: src/exec_gr.cpp:1137
msgid "Draw bars for 1D data"
msgstr "Gráfica de barras para 1D"
-#: src/exec_gr.cpp:1133
+#: src/exec_gr.cpp:1139
msgid "Draw belts"
msgstr "Gráfica de correas"
-#: src/exec_gr.cpp:1134
+#: src/exec_gr.cpp:1140
msgid "Draw belts colored by other data"
msgstr "Gráfica de correas coloreada por otros datos"
-#: src/exec_gr.cpp:1196
+#: src/exec_gr.cpp:1202
msgid "Draw binormales for 1D data"
msgstr "Gráfica de binormales para datos 1D"
msgid "Draw bounding box"
msgstr "Graficar bordes"
-#: src/exec_gr.cpp:1137
+#: src/exec_gr.cpp:1143
msgid "Draw boxes"
msgstr "Diagrama de cajas"
-#: src/exec_gr.cpp:1136
+#: src/exec_gr.cpp:1142
msgid "Draw boxplot for 2D data"
msgstr "Diagrama de cajas para datos 2D"
-#: src/exec_gr.cpp:1138
+#: src/exec_gr.cpp:1144
msgid "Draw candlestick chart"
msgstr "Diagrama de velas"
-#: src/exec_gr.cpp:1139
+#: src/exec_gr.cpp:1145
msgid "Draw chart"
msgstr "Gráfica de cuadros"
msgid "Draw circle"
msgstr "Graficar círculo"
-#: src/exec_gr.cpp:1140
+#: src/exec_gr.cpp:1146
msgid "Draw cloud"
msgstr "Gráfica de nube"
msgid "Draw cone"
msgstr "Dibujar cono"
-#: src/exec_gr.cpp:1141
+#: src/exec_gr.cpp:1147
msgid "Draw cones for 1D data"
msgstr "Gráfica de conos para datos 1D"
-#: src/exec_gr.cpp:1142
+#: src/exec_gr.cpp:1148
msgid "Draw contour lines"
msgstr "Gráfica de curvas de nivel"
-#: src/exec_gr.cpp:1152
+#: src/exec_gr.cpp:1158
msgid "Draw contour lines at x-slice (or x-plane)"
msgstr "Curvas de nivel en el plano x"
-#: src/exec_gr.cpp:1153
+#: src/exec_gr.cpp:1159
msgid "Draw contour lines at y-slice (or y-plane)"
msgstr "Curvas de nivel en el plano y"
-#: src/exec_gr.cpp:1154
+#: src/exec_gr.cpp:1160
msgid "Draw contour lines at z-slice (or z-plane)"
msgstr "Curvas de nivel en el plano z"
-#: src/exec_gr.cpp:1143
+#: src/exec_gr.cpp:1149
msgid "Draw contour lines for 3D data"
msgstr "Gráfica de curvas de nivel para datos 3D"
-#: src/exec_gr.cpp:1203
+#: src/exec_gr.cpp:1209
msgid "Draw contour lines for surface of triangles"
msgstr "Curvas de nivel para superficie de triángulos"
-#: src/exec_gr.cpp:1150
+#: src/exec_gr.cpp:1156
msgid "Draw contour lines on parametric surface"
msgstr "Curvas de nivel sobre superficie paramétrica"
-#: src/exec_gr.cpp:1151
+#: src/exec_gr.cpp:1157
msgid "Draw contour tubes"
msgstr "Cilindros de nivel"
-#: src/exec_gr.cpp:1204
+#: src/exec_gr.cpp:1210
msgid "Draw contour tubes for surface of triangles"
msgstr "Cilindros de nivel para superficie de triángulos"
msgid "Draw curve"
msgstr "Graficar curva"
-#: src/exec_gr.cpp:1206
+#: src/exec_gr.cpp:1212
msgid "Draw curve by tube"
msgstr "Graficar curva tubular"
-#: src/exec_gr.cpp:1156
+#: src/exec_gr.cpp:1162
msgid "Draw density plot"
msgstr "Gráfica de densidad"
-#: src/exec_gr.cpp:1157
+#: src/exec_gr.cpp:1163
msgid "Draw density plot at slices of 3D data"
msgstr "Gráfica de densidad para secciones de datos 3D data"
-#: src/exec_gr.cpp:1158
+#: src/exec_gr.cpp:1164
msgid "Draw density plot at x-slice (or x-plane)"
msgstr "Gráfica de densidad en el plano x"
-#: src/exec_gr.cpp:1159
+#: src/exec_gr.cpp:1165
msgid "Draw density plot at y-slice (or y-plane)"
msgstr "Gráfica de densidad en el plano y"
-#: src/exec_gr.cpp:1160
+#: src/exec_gr.cpp:1166
msgid "Draw density plot at z-slice (or z-plane)"
msgstr "Gráfica de densidad en el plano z"
# Esquema de gotas?
-#: src/exec_gr.cpp:1161
+#: src/exec_gr.cpp:1167
msgid "Draw dew plot"
msgstr "Gráfica de gotas"
-#: src/exec_gr.cpp:1162
+#: src/exec_gr.cpp:1168
msgid "Draw dots for arbitrary data points"
msgstr "Diagrama de puntos para datos arbitrarios"
msgid "Draw error box"
msgstr "Graficar caja de error"
-#: src/exec_gr.cpp:1163
+#: src/exec_gr.cpp:1169
msgid "Draw error boxes"
msgstr "Graficar cajas de error"
msgid "Draw face perpendicular to z-axis"
msgstr "Graficar faceta perpendicular al eje z"
-#: src/exec_gr.cpp:1183
+#: src/exec_gr.cpp:1189
msgid "Draw filled region (ribbon) between 2 curves"
msgstr "Graficar región rellena (banda) entre dos curbas"
-#: src/exec_gr.cpp:1178
+#: src/exec_gr.cpp:1184
msgid "Draw flow pipes for vector field"
msgstr "Graficar tubos de flujo de campo vectorial"
-#: src/exec_gr.cpp:1165
+#: src/exec_gr.cpp:1171
msgid "Draw flow threads for vector field"
msgstr "Graficar líneas de flujo para campo vectorial"
-#: src/exec_gr.cpp:1167
+#: src/exec_gr.cpp:1173
msgid "Draw flow threads from plain for vector field"
msgstr "Graficar de líneas de flujo desde plano para campo vectorial"
-#: src/exec_gr.cpp:1168
+#: src/exec_gr.cpp:1174
msgid "Draw gradient lines for scalar field"
msgstr "Graficar líneas de gradiente para campo escalar"
msgid "Draw grid"
msgstr "Graficar grilla"
-#: src/exec_gr.cpp:1170
+#: src/exec_gr.cpp:1176
msgid "Draw grid at slices of 3D data"
msgstr "Graficar grilla para cortes de datos 3D"
-#: src/exec_gr.cpp:1169
+#: src/exec_gr.cpp:1175
msgid "Draw grid for data array(s)"
msgstr "Graficar grilla para arreglo(s) de datos"
-#: src/exec_gr.cpp:1130
+#: src/exec_gr.cpp:1136
msgid "Draw horizontal bars for 1D data"
msgstr "Graficar barras horizontales pata datos 1D"
-#: src/exec_gr.cpp:1199
+#: src/exec_gr.cpp:1205
msgid "Draw horizontal tiles"
msgstr "Graficar baldosas horizontales"
-#: src/exec_gr.cpp:1200
+#: src/exec_gr.cpp:1206
msgid "Draw horizontal tiles with variable size"
msgstr "Baldosas horizontales con tamaño variable"
-#: src/exec_gr.cpp:1188
+#: src/exec_gr.cpp:1194
msgid "Draw isosurface for 3D data"
msgstr "Isosuperficie para datos 3D"
-#: src/exec_gr.cpp:1191
+#: src/exec_gr.cpp:1197
msgid "Draw isosurface for 3D data colored and transpared by other data"
msgstr ""
"Isosuperficie para datos 3D coloreados y con transparencia de otros datos"
-#: src/exec_gr.cpp:1190
+#: src/exec_gr.cpp:1196
msgid "Draw isosurface for 3D data colored by other data"
msgstr "Isosuperficie para datos 3D coloreada por otros datos"
-#: src/exec_gr.cpp:1189
+#: src/exec_gr.cpp:1195
msgid "Draw isosurface for 3D data transpared by other data"
msgstr "Isosuperficie para datos 3D con transparencia de otros datos"
-#: src/exec_gr.cpp:1172
+#: src/exec_gr.cpp:1178
msgid "Draw label at arbitrary position"
msgstr "Etiqueta en posición arbitraria"
msgid "Draw line"
msgstr "Graficar recta"
-#: src/exec_gr.cpp:1174
+#: src/exec_gr.cpp:1180
msgid "Draw mapping plot"
msgstr "Gráfica de mapeo"
-#: src/exec_gr.cpp:1175
+#: src/exec_gr.cpp:1181
msgid "Draw mark plot for 1D data"
msgstr "Gráfica de marcas para datos 1D"
-#: src/exec_gr.cpp:1176
+#: src/exec_gr.cpp:1182
msgid "Draw mesh surface"
msgstr "Graficar grilla de superficie"
msgid "Draw polygon"
msgstr "Graficar polígono"
-#: src/exec_gr.cpp:1132
+#: src/exec_gr.cpp:1138
msgid "Draw quasi-optical beam"
msgstr "Graficar haz cuasióptico"
-#: src/exec_gr.cpp:1182
+#: src/exec_gr.cpp:1188
msgid "Draw radar chart"
msgstr "Diagrama de radar"
-#: src/exec_gr.cpp:1155
+#: src/exec_gr.cpp:1161
msgid "Draw reconstructed surface for arbitrary data points"
msgstr "Graficar superficie reconstruida para puntos arbitrarios"
msgid "Draw rhombus"
msgstr "Graficar rombo"
-#: src/exec_gr.cpp:1147
+#: src/exec_gr.cpp:1153
msgid "Draw solid contour lines at x-slice (or x-plane)"
msgstr "Curvas de nivel rellenas en el plano x"
-#: src/exec_gr.cpp:1148
+#: src/exec_gr.cpp:1154
msgid "Draw solid contour lines at y-slice (or y-plane)"
msgstr "Curvas de nivel rellenas en el plano y"
-#: src/exec_gr.cpp:1149
+#: src/exec_gr.cpp:1155
msgid "Draw solid contour lines at z-slice (or z-plane)"
msgstr "Curvas de nivel rellenas en el plano z"
-#: src/exec_gr.cpp:1146
+#: src/exec_gr.cpp:1152
msgid "Draw solid contour lines for 3D data"
msgstr "Isosuperficies rellenas para datos 3D"
-#: src/exec_gr.cpp:1145
+#: src/exec_gr.cpp:1151
msgid "Draw solid contours"
msgstr "Curvas de nivel rellenas"
-#: src/exec_gr.cpp:1144
+#: src/exec_gr.cpp:1150
msgid "Draw solid contours with manual colors"
msgstr "Curvas de nivel rellenas con coloración manual"
-#: src/exec_gr.cpp:1187
+#: src/exec_gr.cpp:1193
msgid "Draw solid surface"
msgstr "Graficar superficie sólida"
-#: src/exec_gr.cpp:1194
+#: src/exec_gr.cpp:1200
msgid "Draw solid surface colored and transpared by other data"
msgstr "Superficie sólida con color y transparencia de otros datos"
-#: src/exec_gr.cpp:1193
+#: src/exec_gr.cpp:1199
msgid "Draw solid surface colored by other data"
msgstr "Superficie sólida con coloración de otros datos"
-#: src/exec_gr.cpp:1192
+#: src/exec_gr.cpp:1198
msgid "Draw solid surface transpared by other data"
msgstr "Superficie sólida con transparencia de otros datos"
msgid "Draw sphere"
msgstr "Graficar esfera"
-#: src/exec_gr.cpp:1184
+#: src/exec_gr.cpp:1190
msgid "Draw stem plot for 1D data"
msgstr "Gráfica de tallos para datos 1D"
-#: src/exec_gr.cpp:1185
+#: src/exec_gr.cpp:1191
msgid "Draw step plot for 1D data"
msgstr "Gráfica escalonada para datos 1D"
-#: src/exec_gr.cpp:1201
+#: src/exec_gr.cpp:1207
msgid "Draw surface of curve rotation"
msgstr "Graficar superficie de rotación"
-#: src/exec_gr.cpp:1181
+#: src/exec_gr.cpp:1187
msgid "Draw surface of quadrangles"
msgstr "Graficar superficie de cuadrángulos"
-#: src/exec_gr.cpp:1205
+#: src/exec_gr.cpp:1211
msgid "Draw surface of triangles"
msgstr "Graficar superficie de triángulos"
-#: src/exec_gr.cpp:1129
+#: src/exec_gr.cpp:1135
msgid "Draw surfaces of contour lines rotation"
msgstr "Superficie de rotación de curvas de nivel"
-#: src/exec_gr.cpp:1195
+#: src/exec_gr.cpp:1201
msgid "Draw table with data values"
msgstr "Graficar tabla de valores"
-#: src/exec_gr.cpp:1197
+#: src/exec_gr.cpp:1203
msgid "Draw tension plot for 1D data"
msgstr "Gráfica de tensión para datos 1D"
msgid "Draw user-defined symbol at given position and direction"
msgstr "Símbolo personalizado en posición y dirección dadas"
-#: src/exec_gr.cpp:1179
+#: src/exec_gr.cpp:1185
msgid "Draw usual plot for 1D data"
msgstr "Gráfica estándar para datos 1D"
-#: src/exec_gr.cpp:1207
+#: src/exec_gr.cpp:1213
msgid "Draw vector field"
msgstr "Campo vectorial"
-#: src/exec_gr.cpp:1208
+#: src/exec_gr.cpp:1214
msgid "Draw vector field at slices of 3D data"
msgstr "Campo vectorial de cortes de datos 3D"
-#: src/exec_gr.cpp:1202
+#: src/exec_gr.cpp:1208
msgid "Draw vectors along a curve"
msgstr "Vectores a lo largo de curva"
-#: src/exec_gr.cpp:1164
+#: src/exec_gr.cpp:1170
msgid "Draw waterfalls"
msgstr "Gráfica de cascadas"
msgid "Enter number for subtraction from data values"
msgstr "Número para restar de valores"
-#: widgets/qt.cpp:949
+#: widgets/qt.cpp:953
msgid "Enter number of vertexes"
msgstr "Ingresar número de vertices"
"Ingresar distancia para guardar puntos. Ejemplos: '1' todo, '2' cada 2 "
"puntos, '3' cada tres puntos, etc."
-#: widgets/qt.cpp:958
+#: widgets/qt.cpp:962
msgid "Enter text"
msgstr "Ingresar texto"
msgid "Envelop"
msgstr "Envoltura"
-#: src/exec_dat.cpp:1656
+#: src/exec_dat.cpp:1690
msgid "Erode data larger val"
msgstr "Erosionar datos"
"Error al escribir al archivo \"%s\"s:\n"
"%s."
-#: src/exec_dat.cpp:1657
+#: src/exec_dat.cpp:1691
msgid ""
"Evaluate (interpolate) values of array Dat at points i=idat,j=jdat,k=kdat"
msgstr ""
msgid "Execute script after loading"
msgstr "Ejecutar script al cargarlo"
-#: widgets/qt.cpp:1145 udav/plot_pnl.cpp:333
+#: widgets/qt.cpp:1149 udav/plot_pnl.cpp:333
msgid "Execute script and redraw graphics (F5)."
msgstr "Ejecutar script y volver a graficar (F5)."
msgid "Export Data?"
msgstr "¿Exportar datos?"
-#: widgets/fltk.cpp:811
+#: widgets/fltk.cpp:815
msgid "Export as ..."
msgstr "Exportar como ..."
-#: widgets/qt.cpp:1080 udav/plot_pnl.cpp:474
+#: widgets/qt.cpp:1084 udav/plot_pnl.cpp:474
msgid "Export as 2D ..."
msgstr "Exportar como 2D ..."
-#: widgets/qt.cpp:1089 udav/plot_pnl.cpp:484
+#: widgets/qt.cpp:1093 udav/plot_pnl.cpp:484
msgid "Export as 3D ..."
msgstr "Exportar como 3D ..."
-#: src/exec_dat.cpp:1658 mgllab/table.cpp:846
+#: src/exec_dat.cpp:1692 mgllab/table.cpp:846
msgid "Export data to PNG file"
msgstr "Exportar a PNG"
msgid "Export to PNG"
msgstr "Exportar a PNG"
-#: src/exec_dat.cpp:1659
+#: src/exec_dat.cpp:1693
msgid "Extend data array"
msgstr "Extender arreglo de datos"
msgid "Extract data"
msgstr "Extraer datos"
-#: src/exec_dat.cpp:1717
+#: src/exec_dat.cpp:1752
msgid "Extract sub-array"
msgstr "Extraer subarreglo"
-#: src/exec_dat.cpp:1709
+#: src/exec_dat.cpp:1744
msgid "Extract sub-array between values"
msgstr "Extraer subarreglo entre valores"
msgstr "Factorizar"
#. file menu
-#: widgets/qt.cpp:1079 udav/udav_wnd.cpp:281 udav/dat_pnl.cpp:681
+#: widgets/qt.cpp:1083 udav/udav_wnd.cpp:281 udav/dat_pnl.cpp:681
#: mgllab/mgllab.cpp:292 mgllab/table.cpp:750
msgid "File"
msgstr "Archivo"
msgid "Fill data by formula"
msgstr "Llenar datos por fórmula"
-#: src/exec_dat.cpp:1665
+#: src/exec_dat.cpp:1700
msgid "Fill data by global spline of Vdat"
msgstr "Llenar datos con spline global de Vdat"
-#: src/exec_dat.cpp:1701
+#: src/exec_dat.cpp:1736
msgid "Fill data by interpolation of Vdat"
msgstr "Llenar datos por interpolación de Vdat"
-#: src/exec_dat.cpp:1645
+#: src/exec_dat.cpp:1679
msgid "Fill data by triangulated values"
msgstr "Llenar datos con valores triángulados"
-#: src/exec_dat.cpp:1660
+#: src/exec_dat.cpp:1695
msgid "Fill data linearly in range [v1, v2]"
msgstr "Llenar datos linealmente en rango [v1, v2]"
msgid "Fill in range"
msgstr "Llenar en rango"
-#: src/exec_dat.cpp:1661
+#: src/exec_dat.cpp:1696
msgid "Fill x-,k-samples for transforms"
msgstr "Llenar muestreo x o k para transformada"
msgid "Find"
msgstr "Buscar"
-#: src/exec_dat.cpp:1641
+#: src/exec_dat.cpp:1675
msgid "Find correlation between data arrays"
msgstr "Correlación entre arreglos de datos"
-#: src/exec_dat.cpp:1655
+#: src/exec_dat.cpp:1689
msgid "Find envelop for the data"
msgstr "Envoltura para datos"
msgid "Find histogram of data."
msgstr "Histograma de datos."
-#: src/exec_dat.cpp:1676
+#: src/exec_dat.cpp:1711
msgid "Find maximal value over direction"
msgstr "Valor maximal en una dirección"
-#: src/exec_dat.cpp:1677
+#: src/exec_dat.cpp:1712
msgid "Find minimal value over direction"
msgstr "Valor minimal en una dirección"
msgid "Find or replace text"
msgstr "Buscar o reemplazar texto"
-#: src/exec_dat.cpp:1713
+#: src/exec_dat.cpp:1748
msgid "Find root Dat[i,j,k]=val (inverse evaluate)"
msgstr "Encontrar raíz Dat[i,j,k]=val (evaluación inversa)"
-#: src/exec_dat.cpp:1705
+#: src/exec_dat.cpp:1740
msgid "Find roots using data as initial values"
msgstr "Encontrar raíces usando datos como valores iniciales"
-#: src/exec_dat.cpp:1719
+#: src/exec_dat.cpp:1754
msgid "Find summation over direction"
msgstr "Suma en una dirección"
-#: src/exec_dat.cpp:1725
+#: src/exec_dat.cpp:1760
msgid "Find triangles of randomly placed points"
msgstr "Triangulación de puntos arbitrarios"
msgid "First slice"
msgstr "Primera sección"
-#: src/exec_dat.cpp:1662 src/exec_dat.cpp:1663
+#: src/exec_dat.cpp:1697 src/exec_dat.cpp:1698
msgid "Fit data to formula"
msgstr "Ajustar datos a fórmula"
msgid "General setup"
msgstr "Config. general"
-#: src/exec_dat.cpp:1673
+#: src/exec_dat.cpp:1708
msgid "Get Jacobian"
msgstr "Obtener Jacobiano"
-#: src/exec_dat.cpp:1638
+#: src/exec_dat.cpp:1673
+msgid "Get contour lines for dat[i,j]=val, separated by NAN"
+msgstr ""
+
+#: src/exec_dat.cpp:1670
msgid "Get data column filled by formula on column ids"
msgstr "Llenar columna de datos por fórmula en ids de columnas"
-#: src/exec_dat.cpp:1708
+#: src/exec_dat.cpp:1743
msgid "Get formated data from file"
msgstr "Obtener datos con formato de archivo"
-#: src/exec_dat.cpp:1680
+#: src/exec_dat.cpp:1672
+msgid ""
+"Get indexes or resort data for found connected surfaces dependent on j,k"
+msgstr ""
+
+#: src/exec_dat.cpp:1715
msgid "Get momentum along direction"
msgstr "Obtener el momento en una dirección"
-#: src/exec_dat.cpp:1690
+#: src/exec_dat.cpp:1694
+#, fuzzy
+msgid "Get positions of local maximums and minimums"
+msgstr "Especificar posición de gráfica en matriz"
+
+#: src/exec_dat.cpp:1725
msgid "Get pulse properties"
msgstr "Obtener propiedades de pulso"
-#: src/exec_dat.cpp:1721
+#: src/exec_dat.cpp:1756
msgid "Get trace of array"
msgstr "Obtener la traza de un arreglo"
msgid "Go to the specified slice for 3D data."
msgstr "Ir a la sección especificada de datos 3D."
-#: widgets/qt.cpp:1108 widgets/qt.cpp:1110 udav/plot_pnl.cpp:66
+#: widgets/qt.cpp:1112 widgets/qt.cpp:1114 udav/plot_pnl.cpp:66
#: mgllab/mgllab.cpp:334
msgid "Graphics"
msgstr "Gráfica"
msgid "Graphics setup"
msgstr "Config. gráfica"
-#: widgets/fltk.cpp:960
+#: widgets/fltk.cpp:964
msgid "Graphics/Adjust size"
msgstr "Gráfica/Ajustar tamaño"
#. /< Callback function for delay
#. /< Callback function for reloading
#. / Toggle transparency (alpha) button
-#: widgets/fltk.cpp:954 include/mgl2/Fl_MathGL.h:164
+#: widgets/fltk.cpp:958 include/mgl2/Fl_MathGL.h:164
msgid "Graphics/Alpha"
msgstr "Gráfica/Alfa"
-#: widgets/fltk.cpp:989
+#: widgets/fltk.cpp:993
msgid "Graphics/Animation/Next frame"
msgstr "Gráfica/Animación/Sgte. cuadro"
-#: widgets/fltk.cpp:990
+#: widgets/fltk.cpp:994
msgid "Graphics/Animation/Prev frame"
msgstr "Gráfica/Animación/Ant. cuadro"
msgstr "Gráfica/Animación/Animación"
#. / Toggle slideshow button
-#: widgets/fltk.cpp:988 include/mgl2/Fl_MathGL.h:168
+#: widgets/fltk.cpp:992 include/mgl2/Fl_MathGL.h:168
msgid "Graphics/Animation/Slideshow"
msgstr "Gráfica/Animación/Presentacion"
-#: widgets/fltk.cpp:964
+#: widgets/fltk.cpp:968
msgid "Graphics/Copy click coor."
msgstr "Gráfica/Copiar coord. al clicar"
-#: widgets/fltk.cpp:963
+#: widgets/fltk.cpp:967
msgid "Graphics/Copy graphics"
msgstr "Gráfica/Copiar gráfica"
-#: widgets/fltk.cpp:977
+#: widgets/fltk.cpp:981
msgid "Graphics/Export/as BMP"
msgstr "Gráfica/Exportar/como BMP"
-#: widgets/fltk.cpp:975
+#: widgets/fltk.cpp:979
msgid "Graphics/Export/as GIF"
msgstr "Gráfica/Exportar/como GIF"
-#: widgets/fltk.cpp:972
+#: widgets/fltk.cpp:976
msgid "Graphics/Export/as JPEG"
msgstr "Gráfica/Exportar/como JPEG"
-#: widgets/fltk.cpp:983
+#: widgets/fltk.cpp:987
msgid "Graphics/Export/as OBJ"
msgstr "Gráfica/Exportar/como OBJ"
-#: widgets/fltk.cpp:984
+#: widgets/fltk.cpp:988
msgid "Graphics/Export/as OFF"
msgstr "Gráfica/Exportar/como OFF"
-#: widgets/fltk.cpp:968
+#: widgets/fltk.cpp:972
msgid "Graphics/Export/as PNG"
msgstr "Gráfica/Exportar/como PNG"
-#: widgets/fltk.cpp:982
+#: widgets/fltk.cpp:986
msgid "Graphics/Export/as PRC"
msgstr "Gráfica/Exportar/como PRC"
-#: widgets/fltk.cpp:985
+#: widgets/fltk.cpp:989
msgid "Graphics/Export/as STL"
msgstr "Gráfica/Exportar/como STL"
-#: widgets/fltk.cpp:978
+#: widgets/fltk.cpp:982
msgid "Graphics/Export/as SVG"
msgstr "Gráfica/Exportar/como SVG"
-#: widgets/fltk.cpp:981
+#: widgets/fltk.cpp:985
msgid "Graphics/Export/as TeX"
msgstr "Gráfica/Exportar/como TeX"
-#: widgets/fltk.cpp:986
+#: widgets/fltk.cpp:990
msgid "Graphics/Export/as XYZ"
msgstr "Gráfica/Exportar/como XYZ"
-#: widgets/fltk.cpp:980
+#: widgets/fltk.cpp:984
msgid "Graphics/Export/as bitmap EPS"
msgstr "Gráfica/Exportar/como mapa de bits EPS"
-#: widgets/fltk.cpp:969
+#: widgets/fltk.cpp:973
msgid "Graphics/Export/as solid PNG"
msgstr "Gráfica/Exportar/como PNG sólido"
-#: widgets/fltk.cpp:979
+#: widgets/fltk.cpp:983
msgid "Graphics/Export/as vector EPS"
msgstr "Gráfica/Exportar/como EPS vectorial"
#. / Toggle grid drawing button
-#: widgets/fltk.cpp:956 include/mgl2/Fl_MathGL.h:170
+#: widgets/fltk.cpp:960 include/mgl2/Fl_MathGL.h:170
msgid "Graphics/Grid"
msgstr "Gráfica/Grilla"
#. / Toggle lighting button
-#: widgets/fltk.cpp:955 include/mgl2/Fl_MathGL.h:166
+#: widgets/fltk.cpp:959 include/mgl2/Fl_MathGL.h:166
msgid "Graphics/Light"
msgstr "Gráfica/Luz"
#. / Toggle pause calculation button
-#: widgets/fltk.cpp:965 include/mgl2/Fl_MathGL.h:182 mgllab/mgllab.cpp:387
+#: widgets/fltk.cpp:969 include/mgl2/Fl_MathGL.h:182 mgllab/mgllab.cpp:387
msgid "Graphics/Pause calc"
msgstr "Gráfica/Pausar calc."
msgid "Graphics/Primitive"
msgstr "Gráfica/Primitiva"
-#: widgets/fltk.cpp:959
+#: widgets/fltk.cpp:963
msgid "Graphics/Redraw"
msgstr "Gráfica/Redibujar"
-#: widgets/fltk.cpp:961
+#: widgets/fltk.cpp:965
msgid "Graphics/Reload data"
msgstr "Gráfica/Volver a cargar datos"
-#: widgets/fltk.cpp:958
+#: widgets/fltk.cpp:962
msgid "Graphics/Restore"
msgstr "Gráfica/Reestablecer"
-#: widgets/fltk.cpp:962
+#: widgets/fltk.cpp:966
msgid "Graphics/Stop"
msgstr "Gráfica/Detener"
-#: widgets/fltk.cpp:996
+#: widgets/fltk.cpp:1000
msgid "Graphics/Transform/Move down"
msgstr "Gráfica/Transformar/Mover abajo"
-#: widgets/fltk.cpp:992
+#: widgets/fltk.cpp:996
msgid "Graphics/Transform/Move left"
msgstr "Gráfica/Transformar/Mover izq."
-#: widgets/fltk.cpp:997
+#: widgets/fltk.cpp:1001
msgid "Graphics/Transform/Move right"
msgstr "Gráfica/Transformar/Mover der."
-#: widgets/fltk.cpp:993
+#: widgets/fltk.cpp:997
msgid "Graphics/Transform/Move up"
msgstr "Gráfica/Transformar/Mover arriba"
-#: widgets/fltk.cpp:994
+#: widgets/fltk.cpp:998
msgid "Graphics/Transform/Zoom in"
msgstr "Gráfica/Transformar/Acercar"
-#: widgets/fltk.cpp:995
+#: widgets/fltk.cpp:999
msgid "Graphics/Transform/Zoom out"
msgstr "Gráfica/Transformar/Alejar"
msgid "Hankel transform along direction(s)"
msgstr "Transformada de Hankel en alguna(s) dirección(es)"
-#: src/exec_dat.cpp:1666
+#: src/exec_dat.cpp:1701
msgid "Hankel transform at some direction"
msgstr "Transformada de Hankel en alguna dirección"
msgid "Height of selected cells"
msgstr "Altura de celdas seleccionadas"
-#: widgets/qt.cpp:1289 udav/help_pnl.cpp:57 udav/udav_wnd.cpp:231
+#: widgets/qt.cpp:1293 udav/help_pnl.cpp:57 udav/udav_wnd.cpp:231
#: udav/udav_wnd.cpp:323 mgllab/mgllab.cpp:344 mgllab/mgllab.cpp:345
#: mgllab/mgllab.cpp:373
msgid "Help"
msgid "Image size"
msgstr "Tamaño de imagen"
-#: src/exec_dat.cpp:1689
+#: src/exec_dat.cpp:1724
msgid "Immediately display the progress of calculation"
msgstr "Mostrar inmediatamente el progreso de cálculo"
-#: src/exec_dat.cpp:1688
+#: src/exec_dat.cpp:1723
msgid "Immediately print the message"
msgstr "Mostrar inmediatamente el mensaje"
msgid "Import Data?"
msgstr "¿Importar datos?"
-#: src/exec_dat.cpp:1669 mgllab/table.cpp:842
+#: src/exec_dat.cpp:1704 mgllab/table.cpp:842
msgid "Import data from PNG file"
msgstr "Importar datos de archivo PNG"
msgid "In range"
msgstr "En rango"
-#: src/exec_dat.cpp:1664
+#: src/exec_dat.cpp:1699
msgid "In-place Fourier transform"
msgstr "Transformada de Gabor"
msgid "Insert last fitted formula with found coefficients."
msgstr "Insertar última fórmula ajustada con coeficientes encontrados."
-#: src/exec_dat.cpp:1671
+#: src/exec_dat.cpp:1706
msgid "Insert slice of data"
msgstr "Insertar sección de datos"
msgid "Integrate"
msgstr "Integrar"
-#: src/exec_dat.cpp:1672 udav/dat_pnl.cpp:615
+#: src/exec_dat.cpp:1707 udav/dat_pnl.cpp:615
msgid "Integrate data along direction(s)"
msgstr "Integrar datos en una(s) dirección(es)"
msgid "Italic style"
msgstr "Estilo itálico"
-#: widgets/qt.cpp:1083 udav/plot_pnl.cpp:477
+#: widgets/qt.cpp:1087 udav/plot_pnl.cpp:477
msgid "JPEG"
msgstr "JPEG"
msgid "Jacobi"
msgstr "Jacobi"
-#: src/exec_dat.cpp:1674
+#: src/exec_dat.cpp:1709
msgid "Join data arrays"
msgstr "Juntar arreglos de datos"
msgid "L - seagreen"
msgstr "L - verde marino"
-#: widgets/qt.cpp:1087 udav/plot_pnl.cpp:481
+#: widgets/qt.cpp:1091 udav/plot_pnl.cpp:481
msgid "LaTeX"
msgstr "LaTeX"
msgid "Legend"
msgstr "Leyenda"
-#: widgets/qt.cpp:1117 udav/opt_dlg.cpp:64 udav/setup_dlg.cpp:110
+#: widgets/qt.cpp:1121 udav/opt_dlg.cpp:64 udav/setup_dlg.cpp:110
#: udav/plot_pnl.cpp:297 mgllab/dialogs.cpp:115
msgid "Light"
msgstr "Luz"
msgid "Light settings"
msgstr "Config. de luz"
-#: src/exec_dat.cpp:1675
+#: src/exec_dat.cpp:1710
msgid "Limit data to be inside [-v,v]"
msgstr "Limitar datos al rango [-v,v]"
"Archivos de datos (*.dat)\n"
"Todos los archivos (*.*)"
-#: widgets/qt.cpp:1090 udav/plot_pnl.cpp:485
+#: widgets/qt.cpp:1094 udav/plot_pnl.cpp:485
msgid "MGLD"
msgstr "MGLD"
msgid "Match case"
msgstr "Match case"
-#: widgets/qt.cpp:873
+#: widgets/qt.cpp:877
msgid "MathGL - about"
msgstr "MathGL - acerca de"
msgid "MathGL message - %s\n"
msgstr "Mensaje de MathGL - %s\n"
-#: widgets/qt.cpp:872
+#: widgets/qt.cpp:876
msgid "MathGL v. 2."
msgstr "MathGL v. 2."
msgid "Mirror data along direction(s)"
msgstr "Reflejar datos en una(s) dirección(es)"
-#: src/exec_dat.cpp:1678
+#: src/exec_dat.cpp:1713
msgid "Mirror data at some direction"
msgstr "Reflejar datos en alguna(s) dirección(es)"
-#: src/exec_dat.cpp:1679
+#: src/exec_dat.cpp:1714
msgid "Modify data values by formula"
msgstr "Modificar datos por fórmula"
msgid "Momentum along 'z' for function"
msgstr "Momento en dirección 'z' para función"
-#: widgets/qt.cpp:1246 udav/plot_pnl.cpp:527
+#: widgets/qt.cpp:1250 udav/plot_pnl.cpp:527
msgid "Move down"
msgstr "Mover abajo"
-#: widgets/qt.cpp:1248 udav/plot_pnl.cpp:530
+#: widgets/qt.cpp:1252 udav/plot_pnl.cpp:530
msgid "Move graphics down 1/3 of its height."
msgstr "Mover gráfico abajo 1/3 de su altura."
-#: widgets/qt.cpp:1232 udav/plot_pnl.cpp:506
+#: widgets/qt.cpp:1236 udav/plot_pnl.cpp:506
msgid "Move graphics left by 1/3 of its width."
msgstr "Mover gráfico a la izq. 1/3 de su ancho."
-#: widgets/qt.cpp:1252 udav/plot_pnl.cpp:536
+#: widgets/qt.cpp:1256 udav/plot_pnl.cpp:536
msgid "Move graphics right by 1/3 of its width."
msgstr "Mover gráfico a la der. 1/3 de su ancho."
-#: widgets/qt.cpp:1236 udav/plot_pnl.cpp:512
+#: widgets/qt.cpp:1240 udav/plot_pnl.cpp:512
msgid "Move graphics up by 1/3 of its height."
msgstr "Mover gráfico arriba 1/3 de su altura."
-#: widgets/qt.cpp:1230 udav/plot_pnl.cpp:503
+#: widgets/qt.cpp:1234 udav/plot_pnl.cpp:503
msgid "Move left"
msgstr "Mover a la izq."
msgid "Move plot up"
msgstr "Mover gráfica arriba"
-#: widgets/qt.cpp:1250 udav/plot_pnl.cpp:533
+#: widgets/qt.cpp:1254 udav/plot_pnl.cpp:533
msgid "Move right"
msgstr "Mover a la der."
msgid "Move selected plot up to previous subplot."
msgstr "Mover gráfica seleccionada al subgráfica arriba."
-#: widgets/qt.cpp:1234 udav/plot_pnl.cpp:509
+#: widgets/qt.cpp:1238 udav/plot_pnl.cpp:509
msgid "Move up"
msgstr "Mover arriba"
msgid "Multiply by"
msgstr "Multiplicar por"
-#: src/exec_dat.cpp:1681
+#: src/exec_dat.cpp:1716
msgid "Multiply by data or number"
msgstr "Multiplicar por datos o número"
msgid "New command"
msgstr "Nuevo comando"
-#: src/window.cpp:392
+#: src/window.cpp:415
msgid ""
"New drawing never clears things drawn already. For example, you can make a "
"surface with contour lines by calling commands 'surf' and 'cont' one after "
msgid "Next slice"
msgstr "Siguiente sección"
-#: widgets/qt.cpp:1260 udav/plot_pnl.cpp:560
+#: widgets/qt.cpp:1264 udav/plot_pnl.cpp:560
msgid "Next slide"
msgstr "Siguiente cuadro"
msgid "No direction/formula is entered. Do nothing."
msgstr "No se ingreso dirección/fórmula. No proceder."
-#: widgets/qt.cpp:692 widgets/qt.cpp:704 widgets/qt.cpp:716 widgets/qt.cpp:728
-#: widgets/qt.cpp:740 widgets/qt.cpp:748 widgets/qt.cpp:756 widgets/qt.cpp:764
-#: widgets/qt.cpp:772 widgets/qt.cpp:780 widgets/qt.cpp:788 widgets/qt.cpp:796
-#: widgets/qt.cpp:812 widgets/qt.cpp:820 widgets/qt.cpp:828
+#: widgets/qt.cpp:696 widgets/qt.cpp:708 widgets/qt.cpp:720 widgets/qt.cpp:732
+#: widgets/qt.cpp:744 widgets/qt.cpp:752 widgets/qt.cpp:760 widgets/qt.cpp:768
+#: widgets/qt.cpp:776 widgets/qt.cpp:784 widgets/qt.cpp:792 widgets/qt.cpp:800
+#: widgets/qt.cpp:816 widgets/qt.cpp:824 widgets/qt.cpp:832
msgid "No filename."
msgstr "No se ingreso nombre de archivo."
msgid "No text rotation"
msgstr "No hay ángulo para texto"
-#: widgets/fltk.cpp:834
+#: widgets/fltk.cpp:838
msgid "Normal view"
msgstr "Vista normal"
msgid "Normalize"
msgstr "Normalizar"
-#: src/exec_dat.cpp:1683
+#: src/exec_dat.cpp:1718
msgid "Normalize data"
msgstr "Normalizar datos"
-#: src/exec_dat.cpp:1684
+#: src/exec_dat.cpp:1719
msgid "Normalize data slice by slice"
msgstr "Normalizar datos sección por sección"
msgid "Numeric value"
msgstr "Valor numérico"
-#: src/exec_dat.cpp:1649
+#: src/exec_dat.cpp:1683
msgid "Numerically differentiate data"
msgstr "Diferenciar numéricamente datos"
-#: src/exec_dat.cpp:1650
+#: src/exec_dat.cpp:1684
msgid "Numerically double differentiate data"
msgstr "Diferenciar numéricamente dos veces datos"
msgid "Nz"
msgstr "Nz"
-#: widgets/qt.cpp:1092 udav/plot_pnl.cpp:487
+#: widgets/qt.cpp:1096 udav/plot_pnl.cpp:487
msgid "OBJ"
msgstr "OBJ"
msgid "Open File?"
msgstr "¿Abrir archivo?"
-#: src/exec_dat.cpp:1686
+#: src/exec_dat.cpp:1721
msgid "Open all data arrays from HDF file"
msgstr "Cargar todos los arreglos del archivo HDF"
msgid "Open file ..."
msgstr "Abrir archivo ..."
-#: widgets/qt.cpp:1101 udav/udav_wnd.cpp:298
+#: widgets/qt.cpp:1105 udav/udav_wnd.cpp:298
msgid "Open printer dialog and print graphics (Ctrl+P)"
msgstr "Abrir dialogo de impresion e imprimir gráfica (Ctrl+P)"
msgid "PDF support was disabled. Please, enable it and rebuild MathGL."
msgstr "Formato PDF deshabilitado. Habilítelo y recompile MathGL."
-#: widgets/qt.cpp:1081 udav/plot_pnl.cpp:475
+#: widgets/qt.cpp:1085 udav/plot_pnl.cpp:475
msgid "PNG"
msgstr "PNG"
msgid "PNG Files \t*.png"
msgstr "Archivos PNG \t*.png"
-#: src/canvas_cf.cpp:502 src/canvas_cf.cpp:504 src/data_png.cpp:118
+#: src/canvas_cf.cpp:495 src/canvas_cf.cpp:497 src/data_png.cpp:118
#: src/export.cpp:75 src/export.cpp:109
msgid "PNG support was disabled. Please, enable it and rebuild MathGL."
msgstr "Formato PNG deshabilitado. Habilítelo y recompile MathGL."
-#: widgets/qt.cpp:1091 udav/plot_pnl.cpp:486
+#: widgets/qt.cpp:1095 udav/plot_pnl.cpp:486
msgid "PRC"
msgstr "PRC"
msgid "Path for user MathGL font files"
msgstr "Direccion de fuentes de MathGL del usuario"
-#: widgets/qt.cpp:1278
+#: widgets/qt.cpp:1282
msgid "Pause calculation"
msgstr "Paudar calculos"
#. Wnd->connect(a, SIGNAL(triggered()), QMGL, SLOT(setPause()));
-#: widgets/fltk.cpp:917 widgets/qt.cpp:1283
+#: widgets/fltk.cpp:921 widgets/qt.cpp:1287
msgid "Pause on/off external calculations"
msgstr "Pausar on/off calculos externos"
-#: src/exec_dat.cpp:1703
+#: src/exec_dat.cpp:1738
msgid "Perform Runge-Kutta step"
msgstr "Ejecutar un paso de Runge-Kutta"
-#: widgets/fltk.cpp:886
+#: widgets/fltk.cpp:890
msgid "Phi angle (rotate in x*y plane)"
msgstr "Ángulo phi (rotar en plano xy)"
msgid "Prev slice"
msgstr "Seccion prev."
-#: widgets/qt.cpp:1269 udav/plot_pnl.cpp:575
+#: widgets/qt.cpp:1273 udav/plot_pnl.cpp:575
msgid "Prev slide"
msgstr "Seccion prev."
msgid "Primitives"
msgstr "Primitivas"
-#: widgets/qt.cpp:1163 udav/plot_pnl.cpp:365
+#: widgets/qt.cpp:1167 udav/plot_pnl.cpp:365
msgid "Primitives ..."
msgstr "Primitivas ..."
msgid "Print MathGL version or check if it is valid"
msgstr "Imprimir version de MathGL o verificar su validez"
-#: src/exec_dat.cpp:1654
+#: src/exec_dat.cpp:1688
msgid "Print content of the data"
msgstr "Imprimir contenido de datos"
-#: src/exec_dat.cpp:1692
+#: src/exec_dat.cpp:1727
msgid "Print fitted formula"
msgstr "Imprimir fórmula ajustada"
-#: widgets/qt.cpp:1099 udav/udav_wnd.cpp:296
+#: widgets/qt.cpp:1103 udav/udav_wnd.cpp:296
msgid "Print graphics"
msgstr "Imprimir gráfica"
-#: src/exec_dat.cpp:1646
+#: src/exec_dat.cpp:1680
msgid "Print list of data names in HDF file"
msgstr "Imprimir lista de nombres de datos de archivo HDF"
-#: src/exec_dat.cpp:1670
+#: src/exec_dat.cpp:1705
msgid "Print message or information about the data"
msgstr "Imprimir mensaje o información acerca de datos"
msgid "Program flow"
msgstr "Flujo de programa"
-#: src/exec_dat.cpp:1637
+#: src/exec_dat.cpp:1669
msgid "Project periodical data in [v1,v2]"
msgstr "Proyectar datos periódicos en [v1,v2]"
msgid "Put to script"
msgstr "Poner en script"
-#: src/exec_dat.cpp:1691
+#: src/exec_dat.cpp:1726
msgid "Put value (numeric or array) to given data element"
msgstr "Poner valor (numérico o arreglo) al elemento dado"
msgid "Rasterize plot and save to background"
msgstr "Rasterizar gráfica y guardar de fondo"
-#: src/exec_dat.cpp:1697
+#: src/exec_dat.cpp:1732
msgid "Read and join data from several files"
msgstr "Leer y juntar datos de varios archivos"
-#: src/exec_dat.cpp:1696
+#: src/exec_dat.cpp:1731
msgid "Read data from file"
msgstr "Leer datos de archivo"
-#: src/exec_dat.cpp:1699
+#: src/exec_dat.cpp:1734
msgid "Read data from file with sizes specified in first row"
msgstr "Leer datos de archivo con tamaño indicado en la 1ra fila"
-#: src/exec_dat.cpp:1698
+#: src/exec_dat.cpp:1733
msgid "Read data with name 'id' from HDF file"
msgstr "Leer datos con nombre 'id' de archivo HDF"
msgid "Ready"
msgstr "Listo"
-#: src/exec_dat.cpp:1700
+#: src/exec_dat.cpp:1735
msgid "Rearrange data dimensions"
msgstr "Reordenar dimensiones de datos"
msgid "Redo editor change (Ctrl+Shift+Z)."
msgstr "Rehacer cambios de editor (Ctrl+Shift+Z)."
-#: widgets/qt.cpp:1143 udav/plot_pnl.cpp:331
+#: widgets/qt.cpp:1147 udav/plot_pnl.cpp:331
msgid "Redraw"
msgstr "Volver a graficar"
msgid "Redraw picture for $0 equal to"
msgstr "Volver a graficar para $0 igual a"
-#: widgets/fltk.cpp:835
+#: widgets/fltk.cpp:839
msgid "Redraw plot"
msgstr "Volver a graficar"
msgid "Refresh"
msgstr "Actualizar"
-#: widgets/fltk.cpp:869
+#: widgets/fltk.cpp:873
msgid "Refresh the picture"
msgstr "Actualizar la imagen"
msgid "Reload"
msgstr "Recargar"
-#: widgets/fltk.cpp:837
+#: widgets/fltk.cpp:841
msgid "Reload data"
msgstr "Recargar datos"
-#: widgets/fltk.cpp:875
+#: widgets/fltk.cpp:879
msgid "Reload data and refresh the picture"
msgstr "REcargar datos y actualizar imagen"
-#: src/exec_dat.cpp:1636
+#: src/exec_dat.cpp:1668
msgid "Remove duplicate rows"
msgstr "Borrar filas duplicadas"
-#: src/exec_dat.cpp:1710
+#: src/exec_dat.cpp:1745
msgid "Remove jump into the data, like phase jumps"
msgstr "Remover saltos en datos, como saltos de fase"
msgid "Resize (interpolate) the data to specified sizes (Ctrl+Shift+R)."
msgstr "Reescalar (interpolar) datos a tamaño especificado (Ctrl+Shift+R)."
-#: src/exec_dat.cpp:1702
+#: src/exec_dat.cpp:1737
msgid "Resize data array"
msgstr "Reescalar datos"
msgid "Resize data with smoothing"
msgstr "Reescalar datos con suavizado"
-#: widgets/qt.cpp:1136 udav/plot_pnl.cpp:325
+#: widgets/qt.cpp:1140 udav/plot_pnl.cpp:325
msgid "Restore"
msgstr "Reestablecer"
-#: widgets/fltk.cpp:866
+#: widgets/fltk.cpp:870
msgid "Restore default graphics rotation, zoom and perspective"
msgstr "Reestablecer rotacion , zoom y perspectiva por defecto"
-#: widgets/qt.cpp:1138
+#: widgets/qt.cpp:1142
msgid "Restore default graphics rotation, zoom and perspective (Alt+Space)."
msgstr "Reestablecer rotacion, zoom y perspectiva por defecto (Alt+Space)."
msgid "Roll"
msgstr "Roll"
-#: src/exec_dat.cpp:1704
+#: src/exec_dat.cpp:1739
msgid "Roll data along direction(s)"
msgstr "Roll data along direction(s)"
msgid "Rotate"
msgstr "Rotar"
-#: widgets/qt.cpp:1123 udav/plot_pnl.cpp:310
+#: widgets/qt.cpp:1127 udav/plot_pnl.cpp:310
msgid "Rotate by mouse"
msgstr "Rotar con el mouse"
msgid "Rotate on"
msgstr "Rotate on"
-#: widgets/fltk.cpp:862
+#: widgets/fltk.cpp:866
msgid "Rotate picture by holding left mouse button"
msgstr "Rotar figura al presionando el botón izq. del mouse"
msgid "Rotation"
msgstr "Rotacion"
-#: widgets/qt.cpp:1267
+#: widgets/qt.cpp:1271
msgid "Run slideshow (CTRl+F5)."
msgstr "Correr animación (CTRl+F5)."
"Correr animación (Ctrl+F5). Si no se especifican\n"
"parámetros, se mostrará el dialogo de animación."
-#: widgets/fltk.cpp:908
+#: widgets/fltk.cpp:912
msgid "Run/Stop slideshow (graphics animation)"
msgstr "Correr/detener animación"
msgid "Russian"
msgstr "Ruso"
-#: widgets/qt.cpp:1093 udav/plot_pnl.cpp:488
+#: widgets/qt.cpp:1097 udav/plot_pnl.cpp:488
msgid "STL"
msgstr "STL"
-#: widgets/qt.cpp:1086 udav/plot_pnl.cpp:480
+#: widgets/qt.cpp:1090 udav/plot_pnl.cpp:480
msgid "SVG"
msgstr "SVG"
msgid "Save Data?"
msgstr "¿Guardar datos?"
-#: widgets/fltk.cpp:591 mgllab/mgllab.cpp:229
+#: widgets/fltk.cpp:595 mgllab/mgllab.cpp:229
msgid "Save File As?"
msgstr "Guardar archivo como"
msgid "Save data"
msgstr "Guardar datos"
-#: src/exec_dat.cpp:1707
+#: src/exec_dat.cpp:1742
msgid "Save data to HDF5 file"
msgstr "Guardar datos a archivo HDF5"
msgid "Save data to a file (Ctrl+Shift+S)."
msgstr "Guardar datos a archivo (Ctrl+Shift+S)."
-#: src/exec_dat.cpp:1706 mgllab/table.cpp:844
+#: src/exec_dat.cpp:1741 mgllab/table.cpp:844
msgid "Save data to file"
msgstr "Guardar datos a archivo"
msgid "Set color range"
msgstr "Especificar rango de colores"
-#: src/exec_dat.cpp:1668
+#: src/exec_dat.cpp:1703
msgid "Set column id for data"
msgstr "Especificar id de columna para datos"
msgid "Set type transparency"
msgstr "Especificar tipo de transparencia"
-#: widgets/qt.cpp:1222
+#: widgets/qt.cpp:1226
msgid "Set value of \\phi angle."
msgstr "Especificar valor de ángulo \\phi."
"Especificar valor de ángulo \\phi.\n"
"Puede usar el teclado (Shift+Meta+Left o Shift+Meta+Right)."
-#: widgets/qt.cpp:1216
+#: widgets/qt.cpp:1220
msgid "Set value of \\theta angle."
msgstr "Especificar valor de ángulo \\theta."
msgid "Shear plot"
msgstr "Recortar gráfica"
-#: widgets/fltk.cpp:901
+#: widgets/fltk.cpp:905
msgid "Shift the picture down"
msgstr "Mover la imagen abajo"
-#: widgets/fltk.cpp:893
+#: widgets/fltk.cpp:897
msgid "Shift the picture left"
msgstr "Mover la imagen a la izq."
-#: widgets/fltk.cpp:899
+#: widgets/fltk.cpp:903
msgid "Shift the picture right"
msgstr "Mover la imagen a la der."
-#: widgets/fltk.cpp:891
+#: widgets/fltk.cpp:895
msgid "Shift the picture up"
msgstr "Mover la imagen arriba"
msgid "Show calculator window"
msgstr "Mostrar ventana de calculadora"
-#: widgets/fltk.cpp:912
+#: widgets/fltk.cpp:916
msgid "Show custom dialog for plot setup"
msgstr "Mostrar dialogo de config. de gráfica"
msgid "Show lines"
msgstr "Mostrar líneas"
-#: widgets/fltk.cpp:909
+#: widgets/fltk.cpp:913
msgid "Show next frame in slideshow"
msgstr "Mostrar sgte. cuadro de la animación"
-#: widgets/qt.cpp:1262 udav/plot_pnl.cpp:563
+#: widgets/qt.cpp:1266 udav/plot_pnl.cpp:563
msgid "Show next slide (Ctrl+.)."
msgstr "Mostrar sgte. cuadro (Ctrl+.)."
-#: widgets/fltk.cpp:904
+#: widgets/fltk.cpp:908
msgid "Show previous frame in slideshow"
msgstr "Mostrar cuadro previo de la animación"
-#: widgets/qt.cpp:1271 udav/plot_pnl.cpp:578
+#: widgets/qt.cpp:1275 udav/plot_pnl.cpp:578
msgid "Show previous slide (Ctrl+,)."
msgstr "Mostrar cuadro previo (Ctrl+,)."
msgid "Sin-Fourier transform along direction(s)"
msgstr "Transformada Sin-Fourier en dirección(es)"
-#: src/exec_dat.cpp:1711
+#: src/exec_dat.cpp:1746
msgid "Sin-Fourier transform at some direction"
msgstr "Transformada Sin-Fourier en alguna dirección"
msgid "Skip commands and iterate for-loop again"
msgstr "Saltar comandos e iterar bucle \"for\" nuevamente"
-#: widgets/qt.cpp:1264 udav/plot_pnl.cpp:566
+#: widgets/qt.cpp:1268 udav/plot_pnl.cpp:566
msgid "Slideshow"
msgstr "Animación"
msgid "Smooth"
msgstr "Suavizado"
-#: src/exec_dat.cpp:1712
+#: src/exec_dat.cpp:1747
msgid "Smooth data"
msgstr "Suavizar datos"
msgstr "Suavizar datos en dirección(es)"
# Mantener ODE y GO o llevar al español?
-#: src/exec_dat.cpp:1695
+#: src/exec_dat.cpp:1730
msgid "Solve Hamiltonian ODE (find GO ray or trajectory)"
msgstr "Resolver ODE (encontrar rayo GO o trayectoria)"
-#: src/exec_dat.cpp:1685
+#: src/exec_dat.cpp:1720
msgid "Solve ODE"
msgstr "Resolver ODE"
-#: src/exec_dat.cpp:1687
+#: src/exec_dat.cpp:1722
msgid "Solve PDE"
msgstr "Resolver PDE"
-#: src/exec_dat.cpp:1693
+#: src/exec_dat.cpp:1728
msgid "Solve PDE in accompanied coordinates for 2d case"
msgstr "Solve PDE in accompanied coordinates for 2d case"
-#: src/exec_dat.cpp:1694
+#: src/exec_dat.cpp:1729
msgid "Solve PDE in accompanied coordinates for 3d case"
msgstr "Solve PDE in accompanied coordinates for 3d case"
-#: src/exec_dat.cpp:1635
+#: src/exec_dat.cpp:1667
msgid "Solve PDE using advanced method (X-Y only)"
msgstr "Resolver PDE usando método avanzado (solo X-Y)"
-#: src/exec_dat.cpp:1726
+#: src/exec_dat.cpp:1761
msgid "Solve tridiagonal matrix"
msgstr "Resolver matriz tridiagonal"
-#: src/exec_dat.cpp:1714
+#: src/exec_dat.cpp:1749
msgid "Sort data by values in column"
msgstr "Ordenar datos por valores en columna"
msgid "Squeeze"
msgstr "Comprimir"
-#: src/exec_dat.cpp:1715
+#: src/exec_dat.cpp:1750
msgid "Squeeze data"
msgstr "Comprimir datos"
msgid "State"
msgstr "Estado"
-#: src/exec_dat.cpp:1651
+#: src/exec_dat.cpp:1685
msgid "Step for pulse diffraction"
msgstr "Paso para pulso de difracción"
-#: widgets/qt.cpp:1148 udav/plot_pnl.cpp:347
+#: widgets/qt.cpp:1152 udav/plot_pnl.cpp:347
msgid "Stop"
msgstr "Deterner"
-#: widgets/fltk.cpp:871
+#: widgets/fltk.cpp:875
msgid "Stop drawing"
msgstr "Detener graficación"
msgid "Subticks"
msgstr "Subescala"
-#: src/exec_dat.cpp:1718
+#: src/exec_dat.cpp:1753
msgid "Subtract data or number"
msgstr "Restar datos o número"
msgid "Summation of"
msgstr "Suma de"
-#: src/exec_dat.cpp:1720
+#: src/exec_dat.cpp:1755
msgid "Swap data (useful after Fourier transform)"
msgstr "Invertir orden de datos (útil luego de la Tranformada de Fourier)"
msgid "Switch on/off gray-scale mode"
msgstr "Activar/desactivar modo B/N"
-#: widgets/fltk.cpp:858
+#: widgets/fltk.cpp:862
msgid "Switch on/off grid drawing"
msgstr "Activar/desactivar dibujado de grilla"
msgid "Switch on/off grid of absolute coordinates (Ctrl+G)."
msgstr "Activar/desactivar grilla de coordenadas absolutas (Ctrl+G)."
-#: widgets/qt.cpp:1121
+#: widgets/qt.cpp:1125
msgid "Switch on/off lightning for the graphics (Alt+L)."
msgstr "Activar/desactivar luz para las gráficas (Alt+L)."
msgid "Switch on/off lightning for the graphics (Ctrl+L)."
msgstr "Activar/desactivar luz para las gráficas (Alt+L)."
-#: widgets/fltk.cpp:855
+#: widgets/fltk.cpp:859
msgid "Switch on/off lightning in the picture"
msgstr "Activar/desactivar luz en la imagen"
-#: widgets/qt.cpp:1127 udav/plot_pnl.cpp:314
+#: widgets/qt.cpp:1131 udav/plot_pnl.cpp:314
msgid ""
"Switch on/off mouse handling of the graphics\n"
"(rotation, shifting, zooming and perspective)."
"Activar/desactivar manipulacion de gráfica con el mouse\n"
"(rotación, traslación, zoom y perspectiva)."
-#: widgets/qt.cpp:1133
+#: widgets/qt.cpp:1137
msgid "Switch on/off mouse zoom of selected region."
msgstr "Activar/desactivar zoom con el mouse de la región seleccionada."
msgid "Switch on/off transparency"
msgstr "Activar/desactivar transparencia"
-#: widgets/qt.cpp:1115
+#: widgets/qt.cpp:1119
msgid "Switch on/off transparency for the graphics (Alt+T)."
msgstr "Activar/desactivar transparencia para gráfica (Alt+T)."
msgid "Switch on/off transparency for the graphics (Ctrl+T)."
msgstr "Activar/desactivar transparencia para gráfica (Alt+T)."
-#: widgets/fltk.cpp:852
+#: widgets/fltk.cpp:856
msgid "Switch on/off transparency in the picture"
msgstr "Activar/desactivar transparencia en la imagen"
msgid "Symmetrical?"
msgstr "¿Simétrico?"
-#: src/addon.cpp:111 src/base_cf.cpp:268
+#: src/addon.cpp:121 src/base_cf.cpp:268
#, c-format
msgid "TEST: %s\n"
msgstr "TEST: %s\n"
msgid "Text style"
msgstr "Estilo de texto"
-#: src/window.cpp:400
+#: src/window.cpp:423
msgid ""
"The calculator can help you to put complex expression in the script. Just "
"type the expression (which may depend on coordinates x,y,z and so on) and "
"El archivo actual no se ha guardado.\n"
"¿Desea guardarlo ahora?"
-#: src/window.cpp:402
+#: src/window.cpp:425
msgid ""
"The special dialog (Edit|Insert|New Command) help you select the command, "
"fill its arguments and put it into the script."
msgid "There is no selection to evaluate."
msgstr "No hay selección para evaluar."
-#: src/window.cpp:399
+#: src/window.cpp:422
msgid ""
"There is powerful calculator with a lot of special functions. You can use "
"buttons or keyboard to type the expression. Also you can use existed "
msgid "There is wrong command(s) in script"
msgstr "Comando(s) incorrecto(s) en el script"
-#: widgets/fltk.cpp:884
+#: widgets/fltk.cpp:888
msgid "Theta angle (tilt z-axis)"
msgstr "Ángulo theta (inclinación del eje z)"
-#: widgets/fltk.cpp:1187
+#: widgets/fltk.cpp:1191
msgid "This is for parameter "
msgstr "Esto es para parámetro "
msgid "Transpose data"
msgstr "Transponer datos"
-#: src/exec_dat.cpp:1724
+#: src/exec_dat.cpp:1759
msgid "Transpose data array"
msgstr "Transponer arreglo de datos"
msgid "Untitled - mgllab"
msgstr "Sin nombre - mgllab"
-#: widgets/fltk.cpp:1104
+#: widgets/fltk.cpp:1108
msgid "Update"
msgstr "Actualizar"
msgid "W - lightgray"
msgstr "W - gris claro"
-#: src/exec_dat.cpp:1728
+#: src/exec_dat.cpp:1763
msgid "Wavelet transform at some direction"
msgstr "Transformada wavelet en alguna dirección"
msgid "X/Z"
msgstr "X/Z"
-#: widgets/qt.cpp:1094 udav/plot_pnl.cpp:489
+#: widgets/qt.cpp:1098 udav/plot_pnl.cpp:489
msgid "XYZ"
msgstr "XYZ"
msgid "Yes"
msgstr "Sí"
-#: src/window.cpp:404
+#: src/window.cpp:427
msgid ""
"You can concatenation of strings and numbers using `,` with out spaces (for "
"example, `'max(u)=',u.max,' a.u.'` or `'u=',!(1+i2)` for complex numbers). "
"together."
msgstr ""
-#: src/window.cpp:388
+#: src/window.cpp:411
msgid ""
"You can copy the current image to clipboard by pressing Ctrl-Shift-C. Later "
"you can paste it directly into yours document or presentation."
"Puede copiar la imagen actual a memoria presionando Ctrl-Shift-C. Luego se "
"puede pegar directamente en un documento o presentación."
-#: src/window.cpp:401
+#: src/window.cpp:424
msgid ""
"You can easily insert file or folder names, last fitted formula or numerical "
"value of selection by using menu Edit|Insert."
"fórmula ajustada o o valores numéricos seleccionados usando el menú Editar|"
"Insertar."
-#: src/window.cpp:395
+#: src/window.cpp:418
msgid ""
"You can edit MGL file in any text editor. Also you can run it in console by "
"help of commands: mglconv, mglview."
"Puede editar un archivo MGL en cualquier editor. También lo puede ejecutar "
"en una terminal con ayuda de los comandos mglconv, mglview."
-#: src/window.cpp:389
+#: src/window.cpp:412
msgid ""
"You can export image into a set of format (EPS, SVG, PNG, JPEG) by pressing "
"right mouse button inside image and selecting 'Export as ...'."
"presionando el botón derecho del mouse sobre la imagen y seleccionado "
"\"Exportar como ...'."
-#: src/window.cpp:393
+#: src/window.cpp:416
msgid ""
"You can put several plots in the same image by help of commands 'subplot' or "
"'inplot'."
"Puede poner varias gráficas en la misma imagen con ayuda de los comando "
"\"subplot\" o \"inplot\"."
-#: src/window.cpp:403
+#: src/window.cpp:426
msgid ""
"You can put several plotting commands in the same line or in separate "
"function, for highlighting all of them simultaneously."
"Puede poner varios comandos en la misma línea o en una función separada, "
"para resaltarlos todos simultáneamente."
-#: src/window.cpp:386
+#: src/window.cpp:409
msgid ""
"You can rotate/shift/zoom whole plot by mouse. Just press 'Rotate' "
"toolbutton, click image and hold a mouse button: left button for rotation, "
"mouse: izquierdo para rotación, derecho para zoom/perspectiva, del medio "
"para traslación."
-#: src/window.cpp:391
+#: src/window.cpp:414
msgid ""
"You can save the parameter of animation inside MGL script by using comment "
"started from '##a ' or '##c ' for loops."
"Puede guardar los parámetros de una animación en un script MGL usando "
"comentarios que inicien con '##a ' o '##c ' para bucles."
-#: src/window.cpp:390
+#: src/window.cpp:413
msgid ""
"You can setup colors for script highlighting in Property dialog. Just select "
"menu item 'Settings/Properties'."
"Puede configurar los colores para el resaltado del script en el dialogo "
"\"Propiedades\". Solo seleccione 'Configuración/Propiedades'."
-#: src/window.cpp:385
+#: src/window.cpp:408
msgid ""
"You can shift axis range by pressing middle button and moving mouse. Also, "
"you can zoom in/out axis range by using mouse wheel."
"rueda del mouse."
# Needs revision of the English version
-#: src/window.cpp:398
+#: src/window.cpp:421
msgid ""
"You can type arbitrary expression as input argument for data or number. In "
"last case (for numbers), the first value of data array is used."
"datos. En el primer caso (para números), el primer valor del arreglo es "
"usado."
-#: src/window.cpp:396
+#: src/window.cpp:419
msgid ""
"You can use command 'once on|off' for marking the block which should be "
"executed only once. For example, this can be the block of large data reading/"
"un bloque largo de lectura/creación/manipulación de datos. Presione F9 (o "
"seleccione 'Gráfica/Recargar') para volver a ejecutar el bloque."
-#: src/window.cpp:397
+#: src/window.cpp:420
msgid ""
"You can use command 'stop' for terminating script parsing. It is useful if "
"you don't want to execute a part of script."
"Puede usar el comando \"stop\" para terminar la ejecución del script. Esto "
"es útil si se desea que una parte de este no se ejecute."
-#: src/window.cpp:387
+#: src/window.cpp:410
msgid ""
"You may quickly draw the data from file. Just use: mgllab 'filename.dat' in "
"command line."
msgid "Zoom axis range"
msgstr "Rango de zoom para eje"
-#: widgets/qt.cpp:1129
+#: widgets/qt.cpp:1133
msgid "Zoom by mouse"
msgstr "Zoom con el mouse"
-#: widgets/qt.cpp:1228
+#: widgets/qt.cpp:1232
msgid "Zoom graphics"
msgstr "Escalar gráfica"
# Zoom in=acercar or ampliar?
-#: widgets/qt.cpp:1238 udav/plot_pnl.cpp:515
+#: widgets/qt.cpp:1242 udav/plot_pnl.cpp:515
msgid "Zoom in"
msgstr "Magnificar"
-#: widgets/qt.cpp:1240 udav/plot_pnl.cpp:518
+#: widgets/qt.cpp:1244 udav/plot_pnl.cpp:518
msgid "Zoom in graphics."
msgstr "Magnificar gráfica."
-#: widgets/fltk.cpp:865
+#: widgets/fltk.cpp:869
msgid "Zoom in selected region of the picture"
msgstr "Magnificar región seleccionada de la imagen"
msgid "Zoom in text"
msgstr "Magnificar texto"
-#: widgets/fltk.cpp:895
+#: widgets/fltk.cpp:899
msgid "Zoom in the picture"
msgstr "Magnificar la imagen"
-#: widgets/qt.cpp:1242 udav/plot_pnl.cpp:521
+#: widgets/qt.cpp:1246 udav/plot_pnl.cpp:521
msgid "Zoom out"
msgstr "Reducir"
-#: widgets/qt.cpp:1244 udav/plot_pnl.cpp:524
+#: widgets/qt.cpp:1248 udav/plot_pnl.cpp:524
msgid "Zoom out graphics."
msgstr "Reducir gráfica."
msgid "Zoom out text"
msgstr "Reducir texto"
-#: widgets/fltk.cpp:897
+#: widgets/fltk.cpp:901
msgid "Zoom out the picture"
msgstr "Reducir la imagen"
msgstr "Escalar región de gráfica"
#. zooming menu
-#: widgets/qt.cpp:1227 udav/plot_pnl.cpp:502
+#: widgets/qt.cpp:1231 udav/plot_pnl.cpp:502
msgid "Zoom/move"
msgstr "Zoom/mover"
msgid "bars"
msgstr "barras"
-#: widgets/qt.cpp:1084 udav/plot_pnl.cpp:478
+#: widgets/qt.cpp:1088 udav/plot_pnl.cpp:478
msgid "bitmap EPS"
msgstr "mapa de bits EPS"
msgid "center"
msgstr "centro"
-#: widgets/fltk.cpp:790
+#: widgets/fltk.cpp:794
#, c-format
msgid "click at %g, %g, %g"
msgstr "clic en %g, %g, %g"
msgid "solid"
msgstr "sólido"
-#: widgets/qt.cpp:1082 udav/plot_pnl.cpp:476
+#: widgets/qt.cpp:1086 udav/plot_pnl.cpp:476
msgid "solid PNG"
msgstr "PNG sólido"
msgid "values"
msgstr "valores"
-#: widgets/qt.cpp:1085 udav/plot_pnl.cpp:479
+#: widgets/qt.cpp:1089 udav/plot_pnl.cpp:479
msgid "vector EPS"
msgstr "EPS vectorial"
msgstr ""
"Project-Id-Version: MathGL2 2.4.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-03-02 14:41+0300\n"
+"POT-Creation-Date: 2019-07-06 19:59+0300\n"
"PO-Revision-Date: 2017-04-19 01:17+0300\n"
"Last-Translator: Alexey Balakin <mathgl.abalakin@gmail.com>\n"
"Language-Team: Russian\n"
"\t- загрузить скрипт из стандартного ввода\n"
"\t-h показать справку\n"
-#: widgets/qt.cpp:872
+#: widgets/qt.cpp:876
msgid ""
"\n"
"(c) Alexey Balakin, 2007\n"
msgid "@<- Prev"
msgstr "@<- Пред."
-#: widgets/qt.cpp:1290 udav/udav_wnd.cpp:331 mgllab/mgllab.cpp:347
+#: widgets/qt.cpp:1294 udav/udav_wnd.cpp:331 mgllab/mgllab.cpp:347
msgid "About"
msgstr "О программе"
#. -----------------------------------------------------------------------------
-#: widgets/qt.cpp:876 widgets/qt.cpp:1291 udav/udav_wnd.cpp:332
+#: widgets/qt.cpp:880 widgets/qt.cpp:1295 udav/udav_wnd.cpp:332
#: udav/udav_wnd.cpp:460
msgid "About Qt"
msgstr "О версии Qt"
-#: widgets/qt.cpp:1169 udav/plot_pnl.cpp:372
+#: widgets/qt.cpp:1173 udav/plot_pnl.cpp:372
msgid "Add arc"
msgstr "Добавить дугу"
-#: widgets/qt.cpp:1172 udav/plot_pnl.cpp:375
+#: widgets/qt.cpp:1176 udav/plot_pnl.cpp:375
msgid "Add arc which properties can be changed later by mouse."
msgstr "Добавить дугу. Ее свойства можно изменить позже мышью."
msgid "Add command option(s)"
msgstr "Добавить опции команды"
-#: widgets/qt.cpp:1174 udav/plot_pnl.cpp:378
+#: widgets/qt.cpp:1178 udav/plot_pnl.cpp:378
msgid "Add curve"
msgstr "Добавить кривую"
-#: widgets/qt.cpp:1177 udav/plot_pnl.cpp:381
+#: widgets/qt.cpp:1181 udav/plot_pnl.cpp:381
msgid "Add curve which properties can be changed later by mouse."
msgstr "Добавить кривую. Ее свойства можно изменить позже мышью."
-#: src/exec_dat.cpp:1634
+#: src/exec_dat.cpp:1666
msgid "Add data or number"
msgstr "Прибавить массив или число"
-#: widgets/qt.cpp:1189 udav/plot_pnl.cpp:396
+#: widgets/qt.cpp:1193 udav/plot_pnl.cpp:396
msgid "Add ellipse"
msgstr "Добавить эллипс"
-#: widgets/qt.cpp:1192 udav/plot_pnl.cpp:399 udav/plot_pnl.cpp:405
+#: widgets/qt.cpp:1196 udav/plot_pnl.cpp:399 udav/plot_pnl.cpp:405
msgid "Add ellipse which properties can be changed later by mouse."
msgstr "Добавить эллипс. Его свойства можно изменить позже мышью."
msgid "Add legend entry for the plot"
msgstr "Добавить запись легенды для графика"
-#: widgets/qt.cpp:1164 udav/plot_pnl.cpp:366
+#: widgets/qt.cpp:1168 udav/plot_pnl.cpp:366
msgid "Add line"
msgstr "Добавить линию"
-#: widgets/qt.cpp:1167 udav/plot_pnl.cpp:369
+#: widgets/qt.cpp:1171 udav/plot_pnl.cpp:369
msgid "Add line which properties can be changed later by mouse."
msgstr "Добавить линию. Ее свойства можно изменить позже мышью."
-#: widgets/qt.cpp:1199 udav/plot_pnl.cpp:408
+#: widgets/qt.cpp:1203 udav/plot_pnl.cpp:408
msgid "Add mark"
msgstr "Добавить маркер"
-#: widgets/qt.cpp:1202 udav/plot_pnl.cpp:411
+#: widgets/qt.cpp:1206 udav/plot_pnl.cpp:411
msgid "Add marker which properties can be changed later by mouse."
msgstr "Добавить маркер. Его свойства можно изменить позже мышью."
-#: widgets/qt.cpp:1194 udav/plot_pnl.cpp:402
+#: widgets/qt.cpp:1198 udav/plot_pnl.cpp:402
msgid "Add polygon"
msgstr "Добавить полигон"
-#: widgets/qt.cpp:1197
+#: widgets/qt.cpp:1201
msgid "Add polygon which properties can be changed later by mouse."
msgstr "Добавить полигон. Его свойства можно изменить позже мышью."
msgid "Add primitive"
msgstr "Добавить примитивы"
-#: widgets/qt.cpp:1179 udav/plot_pnl.cpp:384
+#: widgets/qt.cpp:1183 udav/plot_pnl.cpp:384
msgid "Add rect"
msgstr "Добавить прямоугольник"
-#: widgets/qt.cpp:1182 udav/plot_pnl.cpp:387
+#: widgets/qt.cpp:1186 udav/plot_pnl.cpp:387
msgid "Add rectangle which properties can be changed later by mouse."
msgstr "Добавить прямоугольник. Его свойства можно изменить позже мышью."
-#: widgets/qt.cpp:1184 udav/plot_pnl.cpp:390
+#: widgets/qt.cpp:1188 udav/plot_pnl.cpp:390
msgid "Add rhombus"
msgstr "Добавить ромб"
-#: widgets/qt.cpp:1187 udav/plot_pnl.cpp:393
+#: widgets/qt.cpp:1191 udav/plot_pnl.cpp:393
msgid "Add rhombus which properties can be changed later by mouse."
msgstr "Добавить ромб. Его свойства можно изменить позже мышью."
-#: widgets/qt.cpp:1204 udav/plot_pnl.cpp:414
+#: widgets/qt.cpp:1208 udav/plot_pnl.cpp:414
msgid "Add text"
msgstr "Добавить текст"
-#: widgets/qt.cpp:1207 udav/plot_pnl.cpp:417
+#: widgets/qt.cpp:1211 udav/plot_pnl.cpp:417
msgid "Add text which properties can be changed later by mouse."
msgstr "Добавить текст. Его свойства можно изменить позже мышью."
msgid "Add user-defined symbol"
msgstr "Добавить пользовательский символ"
-#: widgets/fltk.cpp:873
+#: widgets/fltk.cpp:877
msgid "Adjust picture size to fill drawing area"
msgstr "Подогнать размер картинки под область окна"
-#: widgets/fltk.cpp:836 widgets/qt.cpp:1152 udav/plot_pnl.cpp:337
+#: widgets/fltk.cpp:840 widgets/qt.cpp:1156 udav/plot_pnl.cpp:337
msgid "Adjust size"
msgstr "Подогнать размер"
msgid "Airy and Gamma"
msgstr "Эйри и Гамма"
-#: src/window.cpp:394
+#: src/window.cpp:417
msgid ""
"All indexes (of data arrays, subplots and so on) are always start from 0."
msgstr "Все индексы (данных, под-графиков и пр.) всегда начинаются с 0."
#. graphics menu
-#: widgets/qt.cpp:1111 udav/opt_dlg.cpp:51 udav/setup_dlg.cpp:109
+#: widgets/qt.cpp:1115 udav/opt_dlg.cpp:51 udav/setup_dlg.cpp:109
#: udav/plot_pnl.cpp:290 mgllab/dialogs.cpp:109
msgid "Alpha"
msgstr ""
msgstr "Угол относительно оси z (в градусах)"
#. animation menu
-#: widgets/qt.cpp:1257 widgets/qt.cpp:1258 udav/plot_pnl.cpp:559
+#: widgets/qt.cpp:1261 widgets/qt.cpp:1262 udav/plot_pnl.cpp:559
#: mgllab/mathgl.cpp:185
msgid "Animation"
msgstr "Анимация"
msgid "Arrow at start"
msgstr "Стрелка нач."
-#: widgets/qt.cpp:1150
+#: widgets/qt.cpp:1154
msgid "Ask to stop plot drawing (F7)."
msgstr "Запрос на остановку рисования (F7)"
msgid "C-range"
msgstr "Цв.диапазон"
-#: widgets/qt.cpp:1276
+#: widgets/qt.cpp:1280
msgid "Calculations"
msgstr "Вычисления"
msgid "Change (resize) data"
msgstr "Изменить размер данных"
-#: widgets/qt.cpp:1154 udav/plot_pnl.cpp:339
+#: widgets/qt.cpp:1158 udav/plot_pnl.cpp:339
msgid "Change canvas size to fill whole region (F6)."
msgstr "Подогнать размер рисунка под размер окна (F6)."
msgstr "Очистить рисунок"
#. o = new Fl_Button(180, 130, 25, 25);o->image(img_save); o->tooltip("img_save");
-#: widgets/fltk.cpp:1102 widgets/qt.cpp:1104 udav/find_dlg.cpp:52
+#: widgets/fltk.cpp:1106 widgets/qt.cpp:1108 udav/find_dlg.cpp:52
#: udav/hint_dlg.cpp:52 mgllab/editor.cpp:566 mgllab/help.cpp:289
#: mgllab/help.cpp:349 mgllab/help.cpp:465
msgid "Close"
msgid "Copy data"
msgstr "Копировать данные"
-#: src/exec_dat.cpp:1640
+#: src/exec_dat.cpp:1674
msgid "Copy data from another variable"
msgstr "Копировать данные из другой переменной"
-#: widgets/fltk.cpp:833
+#: widgets/fltk.cpp:837
msgid "Copy graphics"
msgstr "Копировать рисунок"
-#: widgets/qt.cpp:1158 udav/plot_pnl.cpp:354
+#: widgets/qt.cpp:1162 udav/plot_pnl.cpp:354
msgid "Copy graphics to clipboard (Ctrl+Shift+G)."
msgstr "Копировать рисунок в буфер обмена (Ctrl+Shift+G)."
-#: widgets/fltk.cpp:877
+#: widgets/fltk.cpp:881
msgid "Copy image to clipboard"
msgstr "Копировать рисунок в буфер обмена"
-#: widgets/qt.cpp:1156 udav/plot_pnl.cpp:352
+#: widgets/qt.cpp:1160 udav/plot_pnl.cpp:352
msgid "Copy plot"
msgstr "Копировать рисунок"
msgid "Cos-Fourier transform along direction(s)"
msgstr "Косинус-Фурье преобразование вдоль направления(й)"
-#: src/exec_dat.cpp:1642
+#: src/exec_dat.cpp:1676
msgid "Cos-Fourier transform at some direction"
msgstr "Косинус-Фурье преобразование вдоль направления"
msgid "Create data and IO"
msgstr "Создание данных и ввод-вывод"
-#: src/exec_dat.cpp:1667
+#: src/exec_dat.cpp:1702
msgid "Create histogram (distribution) of data values"
msgstr "Создать гистограмму (распределение) значений данных"
msgid "Create new"
msgstr "Создать новый"
-#: src/exec_dat.cpp:1727
+#: src/exec_dat.cpp:1762
msgid "Create new 1D data and fill it in range"
msgstr "Создать новые 1d данные и заполнить их в диапазоне"
-#: src/exec_dat.cpp:1682
+#: src/exec_dat.cpp:1717
msgid "Create new data"
msgstr "Создать новый массив данных"
msgid "Crop data"
msgstr "Обрезать данные"
-#: src/exec_dat.cpp:1643
+#: src/exec_dat.cpp:1677
msgid "Crop edge of data"
msgstr "Обрезать края массива данных"
msgid "CumSum"
msgstr ""
-#: src/exec_dat.cpp:1644
+#: src/exec_dat.cpp:1678
msgid "Cumulative summation along direction(s)"
msgstr "Накопительное суммирование данных по направлению"
msgid "Delete ALL data arrays"
msgstr "Удалить ВСЕ массивы данных"
-#: src/exec_dat.cpp:1647
+#: src/exec_dat.cpp:1681
msgid "Delete data or slice of data"
msgstr "Удалить данные или их срез"
msgid "Description"
msgstr "Описание"
-#: src/exec_dat.cpp:1648
+#: src/exec_dat.cpp:1682
msgid "Detect curves for maximums of data array"
msgstr "Найти кривые по максимумам массива данных"
msgid "Diffuse"
msgstr "Расс.свет"
-#: src/exec_dat.cpp:1652
+#: src/exec_dat.cpp:1686
msgid "Dilate data larger val"
msgstr "Расширить данные большие val"
-#: src/exec_dat.cpp:1639
+#: src/exec_dat.cpp:1671
msgid "Direct multiplication of arrays"
msgstr "Прямое произведение массивов"
msgid "Divide by"
msgstr "Разделить на"
-#: src/exec_dat.cpp:1653
+#: src/exec_dat.cpp:1687
msgid "Divide by data or number"
msgstr "Разделить данные поэлементно на массив или число"
msgid "Do"
msgstr "OK"
-#: src/exec_dat.cpp:1716
+#: src/exec_dat.cpp:1751
msgid "Do STFA transform"
msgstr "Выполнить преобразование STFA"
-#: src/exec_dat.cpp:1722 src/exec_dat.cpp:1723
+#: src/exec_dat.cpp:1757 src/exec_dat.cpp:1758
msgid "Do integral transform of data"
msgstr "Выполнить интегральное преобразование данных"
msgid "Double diff."
msgstr "Вторая производная"
-#: src/exec_gr.cpp:1135
+#: src/exec_gr.cpp:1141
msgid "Draw Bifurcation diagram"
msgstr "Нарисовать бифуркационную диаграмму"
-#: src/exec_gr.cpp:1171
+#: src/exec_gr.cpp:1177
msgid "Draw Iris plots"
msgstr "Нарисовать график Iris"
-#: src/exec_gr.cpp:1173
+#: src/exec_gr.cpp:1179
msgid "Draw Lamerey diagram"
msgstr "Нарисовать диаграмму Ламерея"
-#: src/exec_gr.cpp:1177
+#: src/exec_gr.cpp:1183
msgid "Draw Open-High-Low-Close (OHLC) diagram"
msgstr "Нарисовать диаграмму OHLC (Open-High-Low-Close)"
-#: src/exec_gr.cpp:1180
+#: src/exec_gr.cpp:1186
msgid "Draw Poincare map"
msgstr "Нарисовать диаграмму Пуанкаре"
-#: src/exec_gr.cpp:1186
+#: src/exec_gr.cpp:1192
msgid "Draw STFA diagram"
msgstr "Нарисовать диаграмму STFA"
-#: src/exec_gr.cpp:1198
+#: src/exec_gr.cpp:1204
msgid "Draw TeX mark at point position"
msgstr "Нарисовать ТеХ символы в положении точек"
msgid "Draw angle arc"
msgstr "Нарисовать дугу"
-#: src/exec_gr.cpp:1128
+#: src/exec_gr.cpp:1134
msgid "Draw area plot for 1D data"
msgstr "Закрасить область между кривой и осью"
-#: src/exec_gr.cpp:1131
+#: src/exec_gr.cpp:1137
msgid "Draw bars for 1D data"
msgstr "Нарисовать график из вертикальных полос"
-#: src/exec_gr.cpp:1133
+#: src/exec_gr.cpp:1139
msgid "Draw belts"
msgstr "Нарисовать поверхность ленточками"
-#: src/exec_gr.cpp:1134
+#: src/exec_gr.cpp:1140
msgid "Draw belts colored by other data"
msgstr "Нарисовать поверхность ленточками с заданным цветом"
-#: src/exec_gr.cpp:1196
+#: src/exec_gr.cpp:1202
msgid "Draw binormales for 1D data"
msgstr "Нарисовать нормаль и бинормаль для кривой"
msgid "Draw bounding box"
msgstr "Нарисовать ограничивающий параллелепипед"
-#: src/exec_gr.cpp:1137
+#: src/exec_gr.cpp:1143
msgid "Draw boxes"
msgstr "Нарисовать поверхность ящиками"
-#: src/exec_gr.cpp:1136
+#: src/exec_gr.cpp:1142
msgid "Draw boxplot for 2D data"
msgstr "Нарисовать box-and-whisker диаграмму"
-#: src/exec_gr.cpp:1138
+#: src/exec_gr.cpp:1144
msgid "Draw candlestick chart"
msgstr "Нарисовать свечной график"
-#: src/exec_gr.cpp:1139
+#: src/exec_gr.cpp:1145
msgid "Draw chart"
msgstr "Нарисовать линейчатую (круговую) диаграмму"
msgid "Draw circle"
msgstr "Нарисовать окружность (круг)"
-#: src/exec_gr.cpp:1140
+#: src/exec_gr.cpp:1146
msgid "Draw cloud"
msgstr "Нарисовать облако для 3D данных"
msgid "Draw cone"
msgstr "Нарисовать конус"
-#: src/exec_gr.cpp:1141
+#: src/exec_gr.cpp:1147
msgid "Draw cones for 1D data"
msgstr "Нарисовать конусы для 1D данных"
-#: src/exec_gr.cpp:1142
+#: src/exec_gr.cpp:1148
msgid "Draw contour lines"
msgstr "Нарисовать линии уровня"
-#: src/exec_gr.cpp:1152
+#: src/exec_gr.cpp:1158
msgid "Draw contour lines at x-slice (or x-plane)"
msgstr "Нарисовать линии уровня на x-срезе"
-#: src/exec_gr.cpp:1153
+#: src/exec_gr.cpp:1159
msgid "Draw contour lines at y-slice (or y-plane)"
msgstr "Нарисовать линии уровня на y-срезе"
-#: src/exec_gr.cpp:1154
+#: src/exec_gr.cpp:1160
msgid "Draw contour lines at z-slice (or z-plane)"
msgstr "Нарисовать линии уровня на z-срезе"
-#: src/exec_gr.cpp:1143
+#: src/exec_gr.cpp:1149
msgid "Draw contour lines for 3D data"
msgstr "Нарисовать линии уровня на срезах 3D данных"
-#: src/exec_gr.cpp:1203
+#: src/exec_gr.cpp:1209
msgid "Draw contour lines for surface of triangles"
msgstr "Нарисовать линии уровня для поверхности из треугольников"
-#: src/exec_gr.cpp:1150
+#: src/exec_gr.cpp:1156
msgid "Draw contour lines on parametric surface"
msgstr "Нарисовать линии уровня на параметрической поверхности"
-#: src/exec_gr.cpp:1151
+#: src/exec_gr.cpp:1157
msgid "Draw contour tubes"
msgstr "Нарисовать цилиндры по линиям уровней"
-#: src/exec_gr.cpp:1204
+#: src/exec_gr.cpp:1210
msgid "Draw contour tubes for surface of triangles"
msgstr "Нарисовать цилиндры по линиям уровней для поверхности из треугольников"
msgid "Draw curve"
msgstr "Нарисовать кривую"
-#: src/exec_gr.cpp:1206
+#: src/exec_gr.cpp:1212
msgid "Draw curve by tube"
msgstr "Нарисовать трубу около кривой"
-#: src/exec_gr.cpp:1156
+#: src/exec_gr.cpp:1162
msgid "Draw density plot"
msgstr "Нарисовать график плотности"
-#: src/exec_gr.cpp:1157
+#: src/exec_gr.cpp:1163
msgid "Draw density plot at slices of 3D data"
msgstr "Нарисовать график плотности на срезе 3D данных"
-#: src/exec_gr.cpp:1158
+#: src/exec_gr.cpp:1164
msgid "Draw density plot at x-slice (or x-plane)"
msgstr "Нарисовать график плотности на x-срезе"
-#: src/exec_gr.cpp:1159
+#: src/exec_gr.cpp:1165
msgid "Draw density plot at y-slice (or y-plane)"
msgstr "Нарисовать график плотности на y-срезе"
-#: src/exec_gr.cpp:1160
+#: src/exec_gr.cpp:1166
msgid "Draw density plot at z-slice (or z-plane)"
msgstr "Нарисовать график плотности на z-срезе"
-#: src/exec_gr.cpp:1161
+#: src/exec_gr.cpp:1167
msgid "Draw dew plot"
msgstr "Нарисовать векторное поле каплями"
-#: src/exec_gr.cpp:1162
+#: src/exec_gr.cpp:1168
msgid "Draw dots for arbitrary data points"
msgstr "Нарисовать набор точек"
msgid "Draw error box"
msgstr "Нарисовать размер ошибки"
-#: src/exec_gr.cpp:1163
+#: src/exec_gr.cpp:1169
msgid "Draw error boxes"
msgstr "Нарисовать размеры ошибок для 1D данных"
msgid "Draw face perpendicular to z-axis"
msgstr "Нарисовать грань поперек оси z"
-#: src/exec_gr.cpp:1183
+#: src/exec_gr.cpp:1189
msgid "Draw filled region (ribbon) between 2 curves"
msgstr "Закрасить область между двумя кривыми"
-#: src/exec_gr.cpp:1178
+#: src/exec_gr.cpp:1184
msgid "Draw flow pipes for vector field"
msgstr "Нарисовать трубки тока для векторного поля"
-#: src/exec_gr.cpp:1165
+#: src/exec_gr.cpp:1171
msgid "Draw flow threads for vector field"
msgstr "Нарисовать линии тока для векторного поля"
-#: src/exec_gr.cpp:1167
+#: src/exec_gr.cpp:1173
msgid "Draw flow threads from plain for vector field"
msgstr "Нарисовать линии тока для векторного поля, начинающиеся с плоскости"
-#: src/exec_gr.cpp:1168
+#: src/exec_gr.cpp:1174
msgid "Draw gradient lines for scalar field"
msgstr "Нарисовать линии градиента для скалярного поля"
msgid "Draw grid"
msgstr "Нарисовать сетку осей координат"
-#: src/exec_gr.cpp:1170
+#: src/exec_gr.cpp:1176
msgid "Draw grid at slices of 3D data"
msgstr "Нарисовать сетку на срезе 3D данных"
-#: src/exec_gr.cpp:1169
+#: src/exec_gr.cpp:1175
msgid "Draw grid for data array(s)"
msgstr "Нарисовать сетку для массива"
-#: src/exec_gr.cpp:1130
+#: src/exec_gr.cpp:1136
msgid "Draw horizontal bars for 1D data"
msgstr "Нарисовать график из горизонтальных полос"
-#: src/exec_gr.cpp:1199
+#: src/exec_gr.cpp:1205
msgid "Draw horizontal tiles"
msgstr "Нарисовать поверхность горизонтальными плитками"
-#: src/exec_gr.cpp:1200
+#: src/exec_gr.cpp:1206
msgid "Draw horizontal tiles with variable size"
msgstr "Нарисовать поверхность плитками переменного размера"
-#: src/exec_gr.cpp:1188
+#: src/exec_gr.cpp:1194
msgid "Draw isosurface for 3D data"
msgstr "Нарисовать поверхность постоянного уровня"
-#: src/exec_gr.cpp:1191
+#: src/exec_gr.cpp:1197
msgid "Draw isosurface for 3D data colored and transpared by other data"
msgstr "Нарисовать поверхность уровня с заданными цветом и прозрачностью"
-#: src/exec_gr.cpp:1190
+#: src/exec_gr.cpp:1196
msgid "Draw isosurface for 3D data colored by other data"
msgstr "Нарисовать поверхность уровня с заданным цветом"
-#: src/exec_gr.cpp:1189
+#: src/exec_gr.cpp:1195
msgid "Draw isosurface for 3D data transpared by other data"
msgstr "Нарисовать поверхность уровня с заданной прозрачностью"
-#: src/exec_gr.cpp:1172
+#: src/exec_gr.cpp:1178
msgid "Draw label at arbitrary position"
msgstr "Вывести надписи для 1D данных"
#: src/exec_prm.cpp:630
-#, fuzzy
msgid "Draw label for colorbar"
-msgstr "Вывести подпись оси t"
+msgstr "Вывести подпись colorbar"
#: src/exec_prm.cpp:659
msgid "Draw label for t-axis"
msgid "Draw line"
msgstr "Нарисовать прямую линию"
-#: src/exec_gr.cpp:1174
+#: src/exec_gr.cpp:1180
msgid "Draw mapping plot"
msgstr "Нарисовать отображение матрицы"
-#: src/exec_gr.cpp:1175
+#: src/exec_gr.cpp:1181
msgid "Draw mark plot for 1D data"
msgstr "Нарисовать маркеры переменного размера"
-#: src/exec_gr.cpp:1176
+#: src/exec_gr.cpp:1182
msgid "Draw mesh surface"
msgstr "Нарисовать сетчатую поверхность"
msgid "Draw polygon"
msgstr "Нарисовать полигон"
-#: src/exec_gr.cpp:1132
+#: src/exec_gr.cpp:1138
msgid "Draw quasi-optical beam"
msgstr "Нарисовать квазиоптический пучок"
-#: src/exec_gr.cpp:1182
+#: src/exec_gr.cpp:1188
msgid "Draw radar chart"
msgstr "Нарисовать круговой график"
-#: src/exec_gr.cpp:1155
+#: src/exec_gr.cpp:1161
msgid "Draw reconstructed surface for arbitrary data points"
msgstr "Нарисовать поверхность по произвольным точкам"
msgid "Draw rhombus"
msgstr "Нарисовать ромб"
-#: src/exec_gr.cpp:1147
+#: src/exec_gr.cpp:1153
msgid "Draw solid contour lines at x-slice (or x-plane)"
msgstr "Закрасить линии уровня на x-срезе"
-#: src/exec_gr.cpp:1148
+#: src/exec_gr.cpp:1154
msgid "Draw solid contour lines at y-slice (or y-plane)"
msgstr "Закрасить линии уровня на y-срезе"
-#: src/exec_gr.cpp:1149
+#: src/exec_gr.cpp:1155
msgid "Draw solid contour lines at z-slice (or z-plane)"
msgstr "Закрасить линии уровня на z-срезе"
-#: src/exec_gr.cpp:1146
+#: src/exec_gr.cpp:1152
msgid "Draw solid contour lines for 3D data"
msgstr "Закрасить линии уровня на 3D данных"
-#: src/exec_gr.cpp:1145
+#: src/exec_gr.cpp:1151
msgid "Draw solid contours"
msgstr "Закрасить линии уровня"
-#: src/exec_gr.cpp:1144
+#: src/exec_gr.cpp:1150
msgid "Draw solid contours with manual colors"
msgstr "Закрасить линии уровня заданными цветами"
-#: src/exec_gr.cpp:1187
+#: src/exec_gr.cpp:1193
msgid "Draw solid surface"
msgstr "Нарисовать поверхность"
-#: src/exec_gr.cpp:1194
+#: src/exec_gr.cpp:1200
msgid "Draw solid surface colored and transpared by other data"
msgstr "Нарисовать поверхность с заданными цветом и прозрачностью"
-#: src/exec_gr.cpp:1193
+#: src/exec_gr.cpp:1199
msgid "Draw solid surface colored by other data"
msgstr "Нарисовать поверхность с заданным цветом"
-#: src/exec_gr.cpp:1192
+#: src/exec_gr.cpp:1198
msgid "Draw solid surface transpared by other data"
msgstr "Нарисовать поверхность с заданной прозрачностью"
msgid "Draw sphere"
msgstr "Нарисовать сферу"
-#: src/exec_gr.cpp:1184
+#: src/exec_gr.cpp:1190
msgid "Draw stem plot for 1D data"
msgstr "Нарисовать линии от 1D данных до оси"
-#: src/exec_gr.cpp:1185
+#: src/exec_gr.cpp:1191
msgid "Draw step plot for 1D data"
msgstr "Нарисовать ступеньки"
-#: src/exec_gr.cpp:1201
+#: src/exec_gr.cpp:1207
msgid "Draw surface of curve rotation"
msgstr "Нарисовать поверхность вращения"
-#: src/exec_gr.cpp:1181
+#: src/exec_gr.cpp:1187
msgid "Draw surface of quadrangles"
msgstr "Нарисовать поверхность из четырехугольников"
-#: src/exec_gr.cpp:1205
+#: src/exec_gr.cpp:1211
msgid "Draw surface of triangles"
msgstr "Нарисовать поверхность из треугольников"
-#: src/exec_gr.cpp:1129
+#: src/exec_gr.cpp:1135
msgid "Draw surfaces of contour lines rotation"
msgstr "Нарисовать поверхность вращения линий уровня"
-#: src/exec_gr.cpp:1195
+#: src/exec_gr.cpp:1201
msgid "Draw table with data values"
msgstr "Нарисовать таблицу значений данных"
-#: src/exec_gr.cpp:1197
+#: src/exec_gr.cpp:1203
msgid "Draw tension plot for 1D data"
msgstr "Нарисовать кривую с заданным цветом"
msgid "Draw user-defined symbol at given position and direction"
msgstr "Нарисовать символ в заданных точке и направлении"
-#: src/exec_gr.cpp:1179
+#: src/exec_gr.cpp:1185
msgid "Draw usual plot for 1D data"
msgstr "Нарисовать кривую для 1D данных"
-#: src/exec_gr.cpp:1207
+#: src/exec_gr.cpp:1213
msgid "Draw vector field"
msgstr "Нарисовать векторное поле"
-#: src/exec_gr.cpp:1208
+#: src/exec_gr.cpp:1214
msgid "Draw vector field at slices of 3D data"
msgstr "Нарисовать векторное поле на срезах 3D данных"
-#: src/exec_gr.cpp:1202
+#: src/exec_gr.cpp:1208
msgid "Draw vectors along a curve"
msgstr "Нарисовать вектора вдоль кривой"
-#: src/exec_gr.cpp:1164
+#: src/exec_gr.cpp:1170
msgid "Draw waterfalls"
msgstr "Нарисовать поверхность набором линий (водопад)"
msgid "Enter number for subtraction from data values"
msgstr "Введите число для вычитания"
-#: widgets/qt.cpp:949
+#: widgets/qt.cpp:953
msgid "Enter number of vertexes"
msgstr "Введите число вершин"
"Введите шаг сохранения. Например, '1' - все точки, '2' - каждая вторая, и т."
"д."
-#: widgets/qt.cpp:958
+#: widgets/qt.cpp:962
msgid "Enter text"
msgstr "Введите текст"
msgid "Envelop"
msgstr "Огибающая"
-#: src/exec_dat.cpp:1656
+#: src/exec_dat.cpp:1690
msgid "Erode data larger val"
msgstr "Сузить данные большие val"
"Ошибка записи в файл '%s':\n"
"%s."
-#: src/exec_dat.cpp:1657
+#: src/exec_dat.cpp:1691
msgid ""
"Evaluate (interpolate) values of array Dat at points i=idat,j=jdat,k=kdat"
msgstr "Интерполирует значения в точках i=idat,j=jdat,k=kdat"
msgid "Execute script after loading"
msgstr "Выполнить скрипт после загрузки"
-#: widgets/qt.cpp:1145 udav/plot_pnl.cpp:333
+#: widgets/qt.cpp:1149 udav/plot_pnl.cpp:333
msgid "Execute script and redraw graphics (F5)."
msgstr "Выполнить скрипт и обновить рисунок (F5)."
msgid "Export Data?"
msgstr "Экспорт данных?"
-#: widgets/fltk.cpp:811
+#: widgets/fltk.cpp:815
msgid "Export as ..."
msgstr "Экспорт как ..."
-#: widgets/qt.cpp:1080 udav/plot_pnl.cpp:474
+#: widgets/qt.cpp:1084 udav/plot_pnl.cpp:474
msgid "Export as 2D ..."
msgstr "Экспорт как 2D ..."
-#: widgets/qt.cpp:1089 udav/plot_pnl.cpp:484
+#: widgets/qt.cpp:1093 udav/plot_pnl.cpp:484
msgid "Export as 3D ..."
msgstr "Экспорт как 3D ..."
-#: src/exec_dat.cpp:1658 mgllab/table.cpp:846
+#: src/exec_dat.cpp:1692 mgllab/table.cpp:846
msgid "Export data to PNG file"
msgstr "Экспорт данных в PNG файл"
msgid "Export to PNG"
msgstr "Экспорт в PNG"
-#: src/exec_dat.cpp:1659
+#: src/exec_dat.cpp:1693
msgid "Extend data array"
msgstr "Расширить массив данных"
msgid "Extract data"
msgstr "Выделить данные"
-#: src/exec_dat.cpp:1717
+#: src/exec_dat.cpp:1752
msgid "Extract sub-array"
msgstr "Выделить под-массив"
-#: src/exec_dat.cpp:1709
+#: src/exec_dat.cpp:1744
msgid "Extract sub-array between values"
msgstr "Выделить под-массив в диапазоне между значениями"
msgstr "Фактор"
#. file menu
-#: widgets/qt.cpp:1079 udav/udav_wnd.cpp:281 udav/dat_pnl.cpp:681
+#: widgets/qt.cpp:1083 udav/udav_wnd.cpp:281 udav/dat_pnl.cpp:681
#: mgllab/mgllab.cpp:292 mgllab/table.cpp:750
msgid "File"
msgstr "Файл"
msgid "Fill data by formula"
msgstr "Заполнить по формуле"
-#: src/exec_dat.cpp:1665
+#: src/exec_dat.cpp:1700
msgid "Fill data by global spline of Vdat"
msgstr "Заполнить данные по глобальному сплайну Vdat"
-#: src/exec_dat.cpp:1701
+#: src/exec_dat.cpp:1736
msgid "Fill data by interpolation of Vdat"
msgstr "Заполнить данные интерполяцией Vdat"
-#: src/exec_dat.cpp:1645
+#: src/exec_dat.cpp:1679
msgid "Fill data by triangulated values"
msgstr "Заполнить данные триангуляцией"
-#: src/exec_dat.cpp:1660
+#: src/exec_dat.cpp:1695
msgid "Fill data linearly in range [v1, v2]"
msgstr "Заполнить данные линейно в диапазоне [v1, v2]"
msgid "Fill in range"
msgstr "Заполнить в диапазоне"
-#: src/exec_dat.cpp:1661
+#: src/exec_dat.cpp:1696
msgid "Fill x-,k-samples for transforms"
msgstr "Заполнить как x-,k-координаты для трансформации"
msgid "Find"
msgstr "Найти"
-#: src/exec_dat.cpp:1641
+#: src/exec_dat.cpp:1675
msgid "Find correlation between data arrays"
msgstr "Найти корреляцию между данными"
-#: src/exec_dat.cpp:1655
+#: src/exec_dat.cpp:1689
msgid "Find envelop for the data"
msgstr "Найти огибающую данных"
msgid "Find histogram of data."
msgstr "Найти гистограмму данных"
-#: src/exec_dat.cpp:1676
+#: src/exec_dat.cpp:1711
msgid "Find maximal value over direction"
msgstr "Найти максимум по направлению"
-#: src/exec_dat.cpp:1677
+#: src/exec_dat.cpp:1712
msgid "Find minimal value over direction"
msgstr "Найти минимум по направлению"
msgid "Find or replace text"
msgstr "Найти или заменить"
-#: src/exec_dat.cpp:1713
+#: src/exec_dat.cpp:1748
msgid "Find root Dat[i,j,k]=val (inverse evaluate)"
msgstr "Найти корень Dat[i,j,k]=val (обратно evaluate)"
-#: src/exec_dat.cpp:1705
+#: src/exec_dat.cpp:1740
msgid "Find roots using data as initial values"
msgstr "Найти корни используя данные как начальные условия"
-#: src/exec_dat.cpp:1719
+#: src/exec_dat.cpp:1754
msgid "Find summation over direction"
msgstr "Найти сумму по направлению"
-#: src/exec_dat.cpp:1725
+#: src/exec_dat.cpp:1760
msgid "Find triangles of randomly placed points"
msgstr "Триангулировать произвольно расположенные точки"
msgid "First slice"
msgstr "Первый срез"
-#: src/exec_dat.cpp:1662 src/exec_dat.cpp:1663
+#: src/exec_dat.cpp:1697 src/exec_dat.cpp:1698
msgid "Fit data to formula"
msgstr "Подогнать данные по формуле"
msgid "General setup"
msgstr "Общие настройки"
-#: src/exec_dat.cpp:1673
+#: src/exec_dat.cpp:1708
msgid "Get Jacobian"
msgstr "Вычислить якобиан"
-#: src/exec_dat.cpp:1638
+#: src/exec_dat.cpp:1673
+msgid "Get contour lines for dat[i,j]=val, separated by NAN"
+msgstr "Найти координаты линий уровня dat[i,j]=val, разделенных NAN"
+
+#: src/exec_dat.cpp:1670
msgid "Get data column filled by formula on column ids"
msgstr "Вычислить данные по формуле из имен колонок"
-#: src/exec_dat.cpp:1708
+#: src/exec_dat.cpp:1743
msgid "Get formated data from file"
msgstr "Загрузить форматированные данные из файла"
-#: src/exec_dat.cpp:1680
+#: src/exec_dat.cpp:1672
+msgid ""
+"Get indexes or resort data for found connected surfaces dependent on j,k"
+msgstr "Найти индексы или пересортировать данные для поиска связанных поверхностей, зависящих от j,k"
+
+#: src/exec_dat.cpp:1715
msgid "Get momentum along direction"
msgstr "Вычислить момент по направлению"
-#: src/exec_dat.cpp:1690
+#: src/exec_dat.cpp:1694
+msgid "Get positions of local maximums and minimums"
+msgstr "Найти положение локальных максимумов и минимумов"
+
+#: src/exec_dat.cpp:1725
msgid "Get pulse properties"
msgstr "Найти параметры импульса"
-#: src/exec_dat.cpp:1721
+#: src/exec_dat.cpp:1756
msgid "Get trace of array"
msgstr "Найти след матрицы"
msgid "Go to the specified slice for 3D data."
msgstr "Перейти к указанному срезу 3D данных"
-#: widgets/qt.cpp:1108 widgets/qt.cpp:1110 udav/plot_pnl.cpp:66
+#: widgets/qt.cpp:1112 widgets/qt.cpp:1114 udav/plot_pnl.cpp:66
#: mgllab/mgllab.cpp:334
msgid "Graphics"
msgstr "Графика"
msgid "Graphics setup"
msgstr "Настройка графика"
-#: widgets/fltk.cpp:960
+#: widgets/fltk.cpp:964
msgid "Graphics/Adjust size"
msgstr "Графика/Подогнать размер"
#. /< Callback function for delay
#. /< Callback function for reloading
#. / Toggle transparency (alpha) button
-#: widgets/fltk.cpp:954 include/mgl2/Fl_MathGL.h:164
+#: widgets/fltk.cpp:958 include/mgl2/Fl_MathGL.h:164
msgid "Graphics/Alpha"
msgstr "Графика/Прозрачность"
-#: widgets/fltk.cpp:989
+#: widgets/fltk.cpp:993
msgid "Graphics/Animation/Next frame"
msgstr "Графика/Анимация/Следующий"
-#: widgets/fltk.cpp:990
+#: widgets/fltk.cpp:994
msgid "Graphics/Animation/Prev frame"
msgstr "Графика/Анимация/Предыдущий"
msgstr "Графика/Анимация/Настройка"
#. / Toggle slideshow button
-#: widgets/fltk.cpp:988 include/mgl2/Fl_MathGL.h:168
+#: widgets/fltk.cpp:992 include/mgl2/Fl_MathGL.h:168
msgid "Graphics/Animation/Slideshow"
msgstr "Графика/Анимация/Запустить"
-#: widgets/fltk.cpp:964
+#: widgets/fltk.cpp:968
msgid "Graphics/Copy click coor."
msgstr "Графика/Копировать коор."
-#: widgets/fltk.cpp:963
+#: widgets/fltk.cpp:967
msgid "Graphics/Copy graphics"
msgstr "Графика/Копировать рисунок"
-#: widgets/fltk.cpp:977
+#: widgets/fltk.cpp:981
msgid "Graphics/Export/as BMP"
msgstr "Графика/Экспорт/как BMP"
-#: widgets/fltk.cpp:975
+#: widgets/fltk.cpp:979
msgid "Graphics/Export/as GIF"
msgstr "Графика/Экспорт/как GIF"
-#: widgets/fltk.cpp:972
+#: widgets/fltk.cpp:976
msgid "Graphics/Export/as JPEG"
msgstr "Графика/Экспорт/как JPEG"
-#: widgets/fltk.cpp:983
+#: widgets/fltk.cpp:987
msgid "Graphics/Export/as OBJ"
msgstr "Графика/Экспорт/как OBJ"
-#: widgets/fltk.cpp:984
+#: widgets/fltk.cpp:988
msgid "Graphics/Export/as OFF"
msgstr "Графика/Экспорт/как OFF"
-#: widgets/fltk.cpp:968
+#: widgets/fltk.cpp:972
msgid "Graphics/Export/as PNG"
msgstr "Графика/Экспорт/как PNG"
-#: widgets/fltk.cpp:982
+#: widgets/fltk.cpp:986
msgid "Graphics/Export/as PRC"
msgstr "Графика/Экспорт/как PRC"
-#: widgets/fltk.cpp:985
+#: widgets/fltk.cpp:989
msgid "Graphics/Export/as STL"
msgstr "Графика/Экспорт/как STL"
-#: widgets/fltk.cpp:978
+#: widgets/fltk.cpp:982
msgid "Graphics/Export/as SVG"
msgstr "Графика/Экспорт/как SVG"
-#: widgets/fltk.cpp:981
+#: widgets/fltk.cpp:985
msgid "Graphics/Export/as TeX"
msgstr "Графика/Экспорт/как TeX"
-#: widgets/fltk.cpp:986
+#: widgets/fltk.cpp:990
msgid "Graphics/Export/as XYZ"
msgstr "Графика/Экспорт/как XYZ"
-#: widgets/fltk.cpp:980
+#: widgets/fltk.cpp:984
msgid "Graphics/Export/as bitmap EPS"
msgstr "Графика/Экспорт/как растровый EPS"
-#: widgets/fltk.cpp:969
+#: widgets/fltk.cpp:973
msgid "Graphics/Export/as solid PNG"
msgstr "Графика/Экспорт/как PNG с заливкой"
-#: widgets/fltk.cpp:979
+#: widgets/fltk.cpp:983
msgid "Graphics/Export/as vector EPS"
msgstr "Графика/Экспорт/как EPS"
#. / Toggle grid drawing button
-#: widgets/fltk.cpp:956 include/mgl2/Fl_MathGL.h:170
+#: widgets/fltk.cpp:960 include/mgl2/Fl_MathGL.h:170
msgid "Graphics/Grid"
msgstr "Графика/Сетка"
#. / Toggle lighting button
-#: widgets/fltk.cpp:955 include/mgl2/Fl_MathGL.h:166
+#: widgets/fltk.cpp:959 include/mgl2/Fl_MathGL.h:166
msgid "Graphics/Light"
msgstr "Графика/Освещение"
#. / Toggle pause calculation button
-#: widgets/fltk.cpp:965 include/mgl2/Fl_MathGL.h:182 mgllab/mgllab.cpp:387
+#: widgets/fltk.cpp:969 include/mgl2/Fl_MathGL.h:182 mgllab/mgllab.cpp:387
msgid "Graphics/Pause calc"
msgstr "Графика/Пауза расчета"
msgid "Graphics/Primitive"
msgstr "Графика/Примитивы"
-#: widgets/fltk.cpp:959
+#: widgets/fltk.cpp:963
msgid "Graphics/Redraw"
msgstr "Графика/Перерисовать"
-#: widgets/fltk.cpp:961
+#: widgets/fltk.cpp:965
msgid "Graphics/Reload data"
msgstr "Графика/Перезагрузить"
-#: widgets/fltk.cpp:958
+#: widgets/fltk.cpp:962
msgid "Graphics/Restore"
msgstr "Графика/Восстановить"
-#: widgets/fltk.cpp:962
+#: widgets/fltk.cpp:966
msgid "Graphics/Stop"
msgstr "Графика/Стоп"
-#: widgets/fltk.cpp:996
+#: widgets/fltk.cpp:1000
msgid "Graphics/Transform/Move down"
msgstr "Графика/Сдвиг/Вниз"
-#: widgets/fltk.cpp:992
+#: widgets/fltk.cpp:996
msgid "Graphics/Transform/Move left"
msgstr "Графика/Сдвиг/Влево"
-#: widgets/fltk.cpp:997
+#: widgets/fltk.cpp:1001
msgid "Graphics/Transform/Move right"
msgstr "Графика/Сдвиг/Вправо"
-#: widgets/fltk.cpp:993
+#: widgets/fltk.cpp:997
msgid "Graphics/Transform/Move up"
msgstr "Графика/Сдвиг/Вверх"
-#: widgets/fltk.cpp:994
+#: widgets/fltk.cpp:998
msgid "Graphics/Transform/Zoom in"
msgstr "Графика/Сдвиг/Приблизить"
-#: widgets/fltk.cpp:995
+#: widgets/fltk.cpp:999
msgid "Graphics/Transform/Zoom out"
msgstr "Графика/Сдвиг/Отдалить"
msgid "Hankel transform along direction(s)"
msgstr "Преобразование Ханкеля по направлению(ям)"
-#: src/exec_dat.cpp:1666
+#: src/exec_dat.cpp:1701
msgid "Hankel transform at some direction"
msgstr "Преобразование Ханкеля по направлению"
msgid "Height of selected cells"
msgstr "Высота выбранных ячеек"
-#: widgets/qt.cpp:1289 udav/help_pnl.cpp:57 udav/udav_wnd.cpp:231
+#: widgets/qt.cpp:1293 udav/help_pnl.cpp:57 udav/udav_wnd.cpp:231
#: udav/udav_wnd.cpp:323 mgllab/mgllab.cpp:344 mgllab/mgllab.cpp:345
#: mgllab/mgllab.cpp:373
msgid "Help"
msgid "Image size"
msgstr "Размер рисунка"
-#: src/exec_dat.cpp:1689
+#: src/exec_dat.cpp:1724
msgid "Immediately display the progress of calculation"
msgstr "Показать прогресс вычислений сразу"
-#: src/exec_dat.cpp:1688
+#: src/exec_dat.cpp:1723
msgid "Immediately print the message"
msgstr "Напечатать это сообщение сразу же"
msgid "Import Data?"
msgstr "Импортировать данные?"
-#: src/exec_dat.cpp:1669 mgllab/table.cpp:842
+#: src/exec_dat.cpp:1704 mgllab/table.cpp:842
msgid "Import data from PNG file"
msgstr "Импортировать данные из PNG файла"
msgid "In range"
msgstr "В диапазоне"
-#: src/exec_dat.cpp:1664
+#: src/exec_dat.cpp:1699
msgid "In-place Fourier transform"
msgstr "Фурье преобразование по месту"
msgid "Insert last fitted formula with found coefficients."
msgstr "Вставить последнюю подогнанную формулу с найденными коэффициентами"
-#: src/exec_dat.cpp:1671
+#: src/exec_dat.cpp:1706
msgid "Insert slice of data"
msgstr "Вставить срез данных"
msgid "Integrate"
msgstr "Интегрировать"
-#: src/exec_dat.cpp:1672 udav/dat_pnl.cpp:615
+#: src/exec_dat.cpp:1707 udav/dat_pnl.cpp:615
msgid "Integrate data along direction(s)"
msgstr "Интегрировать данные по направлению"
msgid "Italic style"
msgstr "Курсив"
-#: widgets/qt.cpp:1083 udav/plot_pnl.cpp:477
+#: widgets/qt.cpp:1087 udav/plot_pnl.cpp:477
msgid "JPEG"
msgstr ""
msgid "Jacobi"
msgstr "Якоби"
-#: src/exec_dat.cpp:1674
+#: src/exec_dat.cpp:1709
msgid "Join data arrays"
msgstr "Объединить массивы данных"
msgid "L - seagreen"
msgstr "L - морской волны"
-#: widgets/qt.cpp:1087 udav/plot_pnl.cpp:481
+#: widgets/qt.cpp:1091 udav/plot_pnl.cpp:481
msgid "LaTeX"
msgstr "LaTeX"
msgid "Legend"
msgstr "Легенда"
-#: widgets/qt.cpp:1117 udav/opt_dlg.cpp:64 udav/setup_dlg.cpp:110
+#: widgets/qt.cpp:1121 udav/opt_dlg.cpp:64 udav/setup_dlg.cpp:110
#: udav/plot_pnl.cpp:297 mgllab/dialogs.cpp:115
msgid "Light"
msgstr "Свет"
msgid "Light settings"
msgstr "Настройки освещения"
-#: src/exec_dat.cpp:1675
+#: src/exec_dat.cpp:1710
msgid "Limit data to be inside [-v,v]"
msgstr "Ограничить данные диапазоном [-v,v]"
"Data файлы (*.dat)\n"
"Все файлы (*.*)"
-#: widgets/qt.cpp:1090 udav/plot_pnl.cpp:485
+#: widgets/qt.cpp:1094 udav/plot_pnl.cpp:485
msgid "MGLD"
msgstr ""
msgid "Match case"
msgstr "Учитывать регистр"
-#: widgets/qt.cpp:873
+#: widgets/qt.cpp:877
msgid "MathGL - about"
msgstr "MathGL - о программе"
msgid "MathGL message - %s\n"
msgstr "Сообщение MathGL - %s\n"
-#: widgets/qt.cpp:872
+#: widgets/qt.cpp:876
msgid "MathGL v. 2."
msgstr ""
msgid "Mirror data along direction(s)"
msgstr "Отразить данные по направлению"
-#: src/exec_dat.cpp:1678
+#: src/exec_dat.cpp:1713
msgid "Mirror data at some direction"
msgstr "Отразить данные по направлению"
-#: src/exec_dat.cpp:1679
+#: src/exec_dat.cpp:1714
msgid "Modify data values by formula"
msgstr "Изменить данные по формуле"
msgid "Momentum along 'z' for function"
msgstr "Момент вдоль 'z' для функции"
-#: widgets/qt.cpp:1246 udav/plot_pnl.cpp:527
+#: widgets/qt.cpp:1250 udav/plot_pnl.cpp:527
msgid "Move down"
msgstr "Сдвиг вниз"
-#: widgets/qt.cpp:1248 udav/plot_pnl.cpp:530
+#: widgets/qt.cpp:1252 udav/plot_pnl.cpp:530
msgid "Move graphics down 1/3 of its height."
msgstr "Сдвинуть графику вниз на 1/3 высоты"
-#: widgets/qt.cpp:1232 udav/plot_pnl.cpp:506
+#: widgets/qt.cpp:1236 udav/plot_pnl.cpp:506
msgid "Move graphics left by 1/3 of its width."
msgstr "Сдвинуть графику влево на 1/3 ширины"
-#: widgets/qt.cpp:1252 udav/plot_pnl.cpp:536
+#: widgets/qt.cpp:1256 udav/plot_pnl.cpp:536
msgid "Move graphics right by 1/3 of its width."
msgstr "Сдвинуть графику вправо на 1/3 ширины"
-#: widgets/qt.cpp:1236 udav/plot_pnl.cpp:512
+#: widgets/qt.cpp:1240 udav/plot_pnl.cpp:512
msgid "Move graphics up by 1/3 of its height."
msgstr "Сдвинуть графику вверх на 1/3 высоты"
-#: widgets/qt.cpp:1230 udav/plot_pnl.cpp:503
+#: widgets/qt.cpp:1234 udav/plot_pnl.cpp:503
msgid "Move left"
msgstr "Сдвиг влево"
msgid "Move plot up"
msgstr "Сдвинуть график вверх"
-#: widgets/qt.cpp:1250 udav/plot_pnl.cpp:533
+#: widgets/qt.cpp:1254 udav/plot_pnl.cpp:533
msgid "Move right"
msgstr "Сдвиг вправо"
msgid "Move selected plot up to previous subplot."
msgstr "Переместить выбранное в предыдущий под-график."
-#: widgets/qt.cpp:1234 udav/plot_pnl.cpp:509
+#: widgets/qt.cpp:1238 udav/plot_pnl.cpp:509
msgid "Move up"
msgstr "Сдвиг вверх"
msgid "Multiply by"
msgstr "Умножить на"
-#: src/exec_dat.cpp:1681
+#: src/exec_dat.cpp:1716
msgid "Multiply by data or number"
msgstr "Умножить на массив данных или число"
msgid "New command"
msgstr "Новая команда"
-#: src/window.cpp:392
+#: src/window.cpp:415
msgid ""
"New drawing never clears things drawn already. For example, you can make a "
"surface with contour lines by calling commands 'surf' and 'cont' one after "
msgid "Next slice"
msgstr "Следующий срез"
-#: widgets/qt.cpp:1260 udav/plot_pnl.cpp:560
+#: widgets/qt.cpp:1264 udav/plot_pnl.cpp:560
msgid "Next slide"
msgstr "Следующий кадр"
msgid "No direction/formula is entered. Do nothing."
msgstr "Не введено направление/формула"
-#: widgets/qt.cpp:692 widgets/qt.cpp:704 widgets/qt.cpp:716 widgets/qt.cpp:728
-#: widgets/qt.cpp:740 widgets/qt.cpp:748 widgets/qt.cpp:756 widgets/qt.cpp:764
-#: widgets/qt.cpp:772 widgets/qt.cpp:780 widgets/qt.cpp:788 widgets/qt.cpp:796
-#: widgets/qt.cpp:812 widgets/qt.cpp:820 widgets/qt.cpp:828
+#: widgets/qt.cpp:696 widgets/qt.cpp:708 widgets/qt.cpp:720 widgets/qt.cpp:732
+#: widgets/qt.cpp:744 widgets/qt.cpp:752 widgets/qt.cpp:760 widgets/qt.cpp:768
+#: widgets/qt.cpp:776 widgets/qt.cpp:784 widgets/qt.cpp:792 widgets/qt.cpp:800
+#: widgets/qt.cpp:816 widgets/qt.cpp:824 widgets/qt.cpp:832
msgid "No filename."
msgstr "Отсутствует имя файла."
msgid "No text rotation"
msgstr "Не вращать текст"
-#: widgets/fltk.cpp:834
+#: widgets/fltk.cpp:838
msgid "Normal view"
msgstr "Обычный вид"
msgid "Normalize"
msgstr "Нормировать"
-#: src/exec_dat.cpp:1683
+#: src/exec_dat.cpp:1718
msgid "Normalize data"
msgstr "Нормировать данные"
-#: src/exec_dat.cpp:1684
+#: src/exec_dat.cpp:1719
msgid "Normalize data slice by slice"
msgstr "Нормировать данные по срезам"
msgid "Numeric value"
msgstr "Численное значение"
-#: src/exec_dat.cpp:1649
+#: src/exec_dat.cpp:1683
msgid "Numerically differentiate data"
msgstr "Численно дифференцировать данные"
-#: src/exec_dat.cpp:1650
+#: src/exec_dat.cpp:1684
msgid "Numerically double differentiate data"
msgstr "Численно дифференцировать данные дважды"
msgid "Nz"
msgstr "Nz"
-#: widgets/qt.cpp:1092 udav/plot_pnl.cpp:487
+#: widgets/qt.cpp:1096 udav/plot_pnl.cpp:487
msgid "OBJ"
msgstr "OBJ"
msgid "Open File?"
msgstr "Открыть файл?"
-#: src/exec_dat.cpp:1686
+#: src/exec_dat.cpp:1721
msgid "Open all data arrays from HDF file"
msgstr "Загрузить все данные из HDF файла"
msgid "Open file ..."
msgstr "Открыть файл ..."
-#: widgets/qt.cpp:1101 udav/udav_wnd.cpp:298
+#: widgets/qt.cpp:1105 udav/udav_wnd.cpp:298
msgid "Open printer dialog and print graphics (Ctrl+P)"
msgstr "Открыть диалог и напечатать график (CTRl+P)"
msgid "PDF support was disabled. Please, enable it and rebuild MathGL."
msgstr "PDF поддержка отключена. Включите ее и пересоберите MathGL."
-#: widgets/qt.cpp:1081 udav/plot_pnl.cpp:475
+#: widgets/qt.cpp:1085 udav/plot_pnl.cpp:475
msgid "PNG"
msgstr ""
msgid "PNG Files \t*.png"
msgstr "PNG файлы \t*.png"
-#: src/canvas_cf.cpp:502 src/canvas_cf.cpp:504 src/data_png.cpp:118
+#: src/canvas_cf.cpp:495 src/canvas_cf.cpp:497 src/data_png.cpp:118
#: src/export.cpp:75 src/export.cpp:109
msgid "PNG support was disabled. Please, enable it and rebuild MathGL."
msgstr "PNG поддержка отключена. Включите ее и пересоберите MathGL."
-#: widgets/qt.cpp:1091 udav/plot_pnl.cpp:486
+#: widgets/qt.cpp:1095 udav/plot_pnl.cpp:486
msgid "PRC"
msgstr ""
msgid "Path for user MathGL font files"
msgstr "Путь к шрифтам MathGL"
-#: widgets/qt.cpp:1278
+#: widgets/qt.cpp:1282
msgid "Pause calculation"
msgstr "Пауза вычислений"
#. Wnd->connect(a, SIGNAL(triggered()), QMGL, SLOT(setPause()));
-#: widgets/fltk.cpp:917 widgets/qt.cpp:1283
+#: widgets/fltk.cpp:921 widgets/qt.cpp:1287
msgid "Pause on/off external calculations"
msgstr "Пауза вкл/выкл для внешних вычислений"
-#: src/exec_dat.cpp:1703
+#: src/exec_dat.cpp:1738
msgid "Perform Runge-Kutta step"
msgstr "Выполнить шаг Рунге-Кутта"
-#: widgets/fltk.cpp:886
+#: widgets/fltk.cpp:890
msgid "Phi angle (rotate in x*y plane)"
msgstr "Угол Phi (вращать в плоскости x*y)"
msgid "Prev slice"
msgstr "Предыдущий срез"
-#: widgets/qt.cpp:1269 udav/plot_pnl.cpp:575
+#: widgets/qt.cpp:1273 udav/plot_pnl.cpp:575
msgid "Prev slide"
msgstr "Предыдущий кадр"
msgid "Primitives"
msgstr "Примитивы"
-#: widgets/qt.cpp:1163 udav/plot_pnl.cpp:365
+#: widgets/qt.cpp:1167 udav/plot_pnl.cpp:365
msgid "Primitives ..."
msgstr "Примитивы ..."
msgid "Print MathGL version or check if it is valid"
msgstr "Вывести версию MathGL или проверить, что она подходит"
-#: src/exec_dat.cpp:1654
+#: src/exec_dat.cpp:1688
msgid "Print content of the data"
msgstr "Вывести содержимое массива данных"
-#: src/exec_dat.cpp:1692
+#: src/exec_dat.cpp:1727
msgid "Print fitted formula"
msgstr "Вывести подобранную формулу"
-#: widgets/qt.cpp:1099 udav/udav_wnd.cpp:296
+#: widgets/qt.cpp:1103 udav/udav_wnd.cpp:296
msgid "Print graphics"
msgstr "Напечатать график"
-#: src/exec_dat.cpp:1646
+#: src/exec_dat.cpp:1680
msgid "Print list of data names in HDF file"
msgstr "Вывести список имен переменных в HDF файле"
-#: src/exec_dat.cpp:1670
+#: src/exec_dat.cpp:1705
msgid "Print message or information about the data"
msgstr "Вывести сообщение или информацию о данных"
msgid "Program flow"
msgstr "Команды управления"
-#: src/exec_dat.cpp:1637
+#: src/exec_dat.cpp:1669
msgid "Project periodical data in [v1,v2]"
msgstr "Проецирует периодические данные в [v1,v2]"
msgid "Put to script"
msgstr "В скрипт"
-#: src/exec_dat.cpp:1691
+#: src/exec_dat.cpp:1726
msgid "Put value (numeric or array) to given data element"
msgstr "Поместить число или массив в заданный элемент данных"
msgid "Rasterize plot and save to background"
msgstr "Растеризовать график и установить вместо фона"
-#: src/exec_dat.cpp:1697
+#: src/exec_dat.cpp:1732
msgid "Read and join data from several files"
msgstr "Загрузить и объединить данные из нескольких файлов"
-#: src/exec_dat.cpp:1696
+#: src/exec_dat.cpp:1731
msgid "Read data from file"
msgstr "Загрузить данные из файла"
-#: src/exec_dat.cpp:1699
+#: src/exec_dat.cpp:1734
msgid "Read data from file with sizes specified in first row"
msgstr "Загрузить данные из файла с размерами из первой строки"
-#: src/exec_dat.cpp:1698
+#: src/exec_dat.cpp:1733
msgid "Read data with name 'id' from HDF file"
msgstr "Загрузить данные с именем 'id' из HDF файла"
msgid "Ready"
msgstr "Готов"
-#: src/exec_dat.cpp:1700
+#: src/exec_dat.cpp:1735
msgid "Rearrange data dimensions"
msgstr "Упорядочить размерности массива данных"
msgid "Redo editor change (Ctrl+Shift+Z)."
msgstr "Отменить правку в редакторе (Ctrl+Shift+Z)."
-#: widgets/qt.cpp:1143 udav/plot_pnl.cpp:331
+#: widgets/qt.cpp:1147 udav/plot_pnl.cpp:331
msgid "Redraw"
msgstr "Перерисовать"
msgid "Redraw picture for $0 equal to"
msgstr "Перерисовать для $0 равного"
-#: widgets/fltk.cpp:835
+#: widgets/fltk.cpp:839
msgid "Redraw plot"
msgstr "Перерисовать график"
msgid "Refresh"
msgstr "Обновить"
-#: widgets/fltk.cpp:869
+#: widgets/fltk.cpp:873
msgid "Refresh the picture"
msgstr "Обновить рисунок"
msgid "Reload"
msgstr "Перезагрузить"
-#: widgets/fltk.cpp:837
+#: widgets/fltk.cpp:841
msgid "Reload data"
msgstr "Перезагрузить"
-#: widgets/fltk.cpp:875
+#: widgets/fltk.cpp:879
msgid "Reload data and refresh the picture"
msgstr "Перезагрузить данные и обновить рисунок"
-#: src/exec_dat.cpp:1636
+#: src/exec_dat.cpp:1668
msgid "Remove duplicate rows"
msgstr "Удалить одинаковые строки"
-#: src/exec_dat.cpp:1710
+#: src/exec_dat.cpp:1745
msgid "Remove jump into the data, like phase jumps"
msgstr "Убрать скачки данных, например скачки фазы"
msgid "Resize (interpolate) the data to specified sizes (Ctrl+Shift+R)."
msgstr "Изменить размер (интерполоировать) данных (Ctrl+Shift+R)."
-#: src/exec_dat.cpp:1702
+#: src/exec_dat.cpp:1737
msgid "Resize data array"
msgstr "Изменить размер массива данных"
msgid "Resize data with smoothing"
msgstr "Изменить размер массива данных со сглаживанием"
-#: widgets/qt.cpp:1136 udav/plot_pnl.cpp:325
+#: widgets/qt.cpp:1140 udav/plot_pnl.cpp:325
msgid "Restore"
msgstr "Восстановить"
-#: widgets/fltk.cpp:866
+#: widgets/fltk.cpp:870
msgid "Restore default graphics rotation, zoom and perspective"
msgstr "Восстановить вращение, приближение и перспективу графика"
-#: widgets/qt.cpp:1138
+#: widgets/qt.cpp:1142
msgid "Restore default graphics rotation, zoom and perspective (Alt+Space)."
msgstr "Восстановить вращение, приближение и перспективу графика (Alt+Space)."
msgid "Roll"
msgstr "Сдвинуть"
-#: src/exec_dat.cpp:1704
+#: src/exec_dat.cpp:1739
msgid "Roll data along direction(s)"
msgstr "Сдвинуть данные по направлению"
msgid "Rotate"
msgstr "Вращать"
-#: widgets/qt.cpp:1123 udav/plot_pnl.cpp:310
+#: widgets/qt.cpp:1127 udav/plot_pnl.cpp:310
msgid "Rotate by mouse"
msgstr "Вращать мышкой"
msgid "Rotate on"
msgstr "Поворот"
-#: widgets/fltk.cpp:862
+#: widgets/fltk.cpp:866
msgid "Rotate picture by holding left mouse button"
msgstr "Вращать рисунок при удержании кнопок мыши"
msgid "Rotation"
msgstr "Вращение"
-#: widgets/qt.cpp:1267
+#: widgets/qt.cpp:1271
msgid "Run slideshow (CTRl+F5)."
msgstr "Запустить анимацию (CTRl+F5)."
"Запустить анимацию (CTRl+F5). Если ее параметры\n"
"не заданы, то будет показан диалог настройки."
-#: widgets/fltk.cpp:908
+#: widgets/fltk.cpp:912
msgid "Run/Stop slideshow (graphics animation)"
msgstr "Запустить/остановить анимацию"
msgid "Russian"
msgstr "Русский"
-#: widgets/qt.cpp:1093 udav/plot_pnl.cpp:488
+#: widgets/qt.cpp:1097 udav/plot_pnl.cpp:488
msgid "STL"
msgstr ""
-#: widgets/qt.cpp:1086 udav/plot_pnl.cpp:480
+#: widgets/qt.cpp:1090 udav/plot_pnl.cpp:480
msgid "SVG"
msgstr ""
msgid "Save Data?"
msgstr "Сохранить данные?"
-#: widgets/fltk.cpp:591 mgllab/mgllab.cpp:229
+#: widgets/fltk.cpp:595 mgllab/mgllab.cpp:229
msgid "Save File As?"
msgstr "Сохранить файл?"
msgid "Save data"
msgstr "Сохранить данные"
-#: src/exec_dat.cpp:1707
+#: src/exec_dat.cpp:1742
msgid "Save data to HDF5 file"
msgstr "Сохранить данные в HDF5 файл"
msgid "Save data to a file (Ctrl+Shift+S)."
msgstr "Сохранить данные в файл (Ctrl+Shift+S)."
-#: src/exec_dat.cpp:1706 mgllab/table.cpp:844
+#: src/exec_dat.cpp:1741 mgllab/table.cpp:844
msgid "Save data to file"
msgstr "Сохранить данные в файл"
msgid "Set color range"
msgstr "Задать диапазон цвета"
-#: src/exec_dat.cpp:1668
+#: src/exec_dat.cpp:1703
msgid "Set column id for data"
msgstr "Задать id колонок данных"
msgid "Set type transparency"
msgstr "Задать тип прозрачности"
-#: widgets/qt.cpp:1222
+#: widgets/qt.cpp:1226
msgid "Set value of \\phi angle."
msgstr "Задать значени угла φ"
"Задать значени угла φ.\n"
"Вы можете использовать клавиши (Shift+Meta+Left или Shift+Meta+Right)."
-#: widgets/qt.cpp:1216
+#: widgets/qt.cpp:1220
msgid "Set value of \\theta angle."
msgstr "Задать значени угла θ"
msgid "Shear plot"
msgstr "Наклон графика"
-#: widgets/fltk.cpp:901
+#: widgets/fltk.cpp:905
msgid "Shift the picture down"
msgstr "Сдвинуть рисунок вниз"
-#: widgets/fltk.cpp:893
+#: widgets/fltk.cpp:897
msgid "Shift the picture left"
msgstr "Сдвинуть рисунок слево"
-#: widgets/fltk.cpp:899
+#: widgets/fltk.cpp:903
msgid "Shift the picture right"
msgstr "Сдвинуть рисунок вправо"
-#: widgets/fltk.cpp:891
+#: widgets/fltk.cpp:895
msgid "Shift the picture up"
msgstr "Сдвинуть рисунок вверх"
msgid "Show calculator window"
msgstr "Показать окно калькулятора"
-#: widgets/fltk.cpp:912
+#: widgets/fltk.cpp:916
msgid "Show custom dialog for plot setup"
msgstr "Показать диалог настроек графика"
msgid "Show lines"
msgstr "Показать строки"
-#: widgets/fltk.cpp:909
+#: widgets/fltk.cpp:913
msgid "Show next frame in slideshow"
msgstr "Показать следующий кадр"
-#: widgets/qt.cpp:1262 udav/plot_pnl.cpp:563
+#: widgets/qt.cpp:1266 udav/plot_pnl.cpp:563
msgid "Show next slide (Ctrl+.)."
msgstr "Показать следующий кадр (Ctrl+.)."
-#: widgets/fltk.cpp:904
+#: widgets/fltk.cpp:908
msgid "Show previous frame in slideshow"
msgstr "Показать предыдущий кадр"
-#: widgets/qt.cpp:1271 udav/plot_pnl.cpp:578
+#: widgets/qt.cpp:1275 udav/plot_pnl.cpp:578
msgid "Show previous slide (Ctrl+,)."
msgstr "Показать предыдущий кадр (Ctrl+,)."
msgid "Sin-Fourier transform along direction(s)"
msgstr "Синус-Фурье преобразование вдоль направления"
-#: src/exec_dat.cpp:1711
+#: src/exec_dat.cpp:1746
msgid "Sin-Fourier transform at some direction"
msgstr "Синус-Фурье преобразование вдоль направления"
msgid "Skip commands and iterate for-loop again"
msgstr "Пропустить команды до конца цикла for"
-#: widgets/qt.cpp:1264 udav/plot_pnl.cpp:566
+#: widgets/qt.cpp:1268 udav/plot_pnl.cpp:566
msgid "Slideshow"
msgstr "Анимация"
msgid "Smooth"
msgstr "Сгладить"
-#: src/exec_dat.cpp:1712
+#: src/exec_dat.cpp:1747
msgid "Smooth data"
msgstr "Сгладить массив данных"
msgid "Smooth data along direction(s)"
msgstr "Сгладить массив данных по направлению"
-#: src/exec_dat.cpp:1695
+#: src/exec_dat.cpp:1730
msgid "Solve Hamiltonian ODE (find GO ray or trajectory)"
msgstr "Решить гамильтонову ОДУ (найти ГО луч/траекторию)"
-#: src/exec_dat.cpp:1685
+#: src/exec_dat.cpp:1720
msgid "Solve ODE"
msgstr "Решить систему обыкновенных диф. уравнений"
-#: src/exec_dat.cpp:1687
+#: src/exec_dat.cpp:1722
msgid "Solve PDE"
msgstr "Решить уравнение в частных производных"
-#: src/exec_dat.cpp:1693
+#: src/exec_dat.cpp:1728
msgid "Solve PDE in accompanied coordinates for 2d case"
msgstr "Решить PDE в сопровождающей системе координат (2d)"
-#: src/exec_dat.cpp:1694
+#: src/exec_dat.cpp:1729
msgid "Solve PDE in accompanied coordinates for 3d case"
msgstr "Решить PDE в сопровождающей системе координат (3d)"
-#: src/exec_dat.cpp:1635
+#: src/exec_dat.cpp:1667
msgid "Solve PDE using advanced method (X-Y only)"
msgstr "Решить PDE (сложные уравнения, 2d случай)"
-#: src/exec_dat.cpp:1726
+#: src/exec_dat.cpp:1761
msgid "Solve tridiagonal matrix"
msgstr "Решить трехдиагональную систему"
-#: src/exec_dat.cpp:1714
+#: src/exec_dat.cpp:1749
msgid "Sort data by values in column"
msgstr "Сортировать данные по значениям в колонке"
#: udav/prop_dlg.cpp:141
msgid "Spanish"
-msgstr ""
+msgstr "Испанский"
#: udav/calc_dlg.cpp:194
msgid "Special"
msgid "Squeeze"
msgstr "Сжать"
-#: src/exec_dat.cpp:1715
+#: src/exec_dat.cpp:1750
msgid "Squeeze data"
msgstr "Сжать данные"
msgid "State"
msgstr "Состояние"
-#: src/exec_dat.cpp:1651
+#: src/exec_dat.cpp:1685
msgid "Step for pulse diffraction"
msgstr "Шаг для расчета дифракции импульса"
-#: widgets/qt.cpp:1148 udav/plot_pnl.cpp:347
+#: widgets/qt.cpp:1152 udav/plot_pnl.cpp:347
msgid "Stop"
msgstr "Стоп"
-#: widgets/fltk.cpp:871
+#: widgets/fltk.cpp:875
msgid "Stop drawing"
msgstr "Остановить рисование"
msgid "Subticks"
msgstr "Подметки"
-#: src/exec_dat.cpp:1718
+#: src/exec_dat.cpp:1753
msgid "Subtract data or number"
msgstr "Вычесть данные или число"
msgid "Summation of"
msgstr "Сумма от"
-#: src/exec_dat.cpp:1720
+#: src/exec_dat.cpp:1755
msgid "Swap data (useful after Fourier transform)"
msgstr "Поменять местами левую и правую части данных"
msgid "Switch on/off gray-scale mode"
msgstr "Вкл/выкл режим оттенков серого"
-#: widgets/fltk.cpp:858
+#: widgets/fltk.cpp:862
msgid "Switch on/off grid drawing"
msgstr "Вкл/выкл рисование сетки"
msgid "Switch on/off grid of absolute coordinates (Ctrl+G)."
msgstr "Вкл/выкл сетку абсолютных координат (Ctrl+G)."
-#: widgets/qt.cpp:1121
+#: widgets/qt.cpp:1125
msgid "Switch on/off lightning for the graphics (Alt+L)."
msgstr "Вкл/выкл освещение графика (Alt+L)."
msgid "Switch on/off lightning for the graphics (Ctrl+L)."
msgstr "Вкл/выкл освещение графика (Ctrl+L)."
-#: widgets/fltk.cpp:855
+#: widgets/fltk.cpp:859
msgid "Switch on/off lightning in the picture"
msgstr "Вкл/выкл освещение графика"
-#: widgets/qt.cpp:1127 udav/plot_pnl.cpp:314
+#: widgets/qt.cpp:1131 udav/plot_pnl.cpp:314
msgid ""
"Switch on/off mouse handling of the graphics\n"
"(rotation, shifting, zooming and perspective)."
"Вкл/выкл изменение графика мышью\n"
"(вращение, сдвиг, приближение и перспективу)."
-#: widgets/qt.cpp:1133
+#: widgets/qt.cpp:1137
msgid "Switch on/off mouse zoom of selected region."
msgstr "Вкл/выкл приближение мышью выбранной области."
msgid "Switch on/off transparency"
msgstr "Вкл/выкл прозрачность"
-#: widgets/qt.cpp:1115
+#: widgets/qt.cpp:1119
msgid "Switch on/off transparency for the graphics (Alt+T)."
msgstr "Вкл/выкл прозрачность рисунка (Alt+T)."
msgid "Switch on/off transparency for the graphics (Ctrl+T)."
msgstr "Вкл/выкл прозрачность рисунка (Ctrl+T)."
-#: widgets/fltk.cpp:852
+#: widgets/fltk.cpp:856
msgid "Switch on/off transparency in the picture"
msgstr "Вкл/выкл прозрачность рисунка"
msgid "Symmetrical?"
msgstr "Симметрично?"
-#: src/addon.cpp:111 src/base_cf.cpp:268
+#: src/addon.cpp:121 src/base_cf.cpp:268
#, c-format
msgid "TEST: %s\n"
msgstr "ТЕСТ: %s\n"
msgid "Text style"
msgstr "Стиль текста"
-#: src/window.cpp:400
+#: src/window.cpp:423
msgid ""
"The calculator can help you to put complex expression in the script. Just "
"type the expression (which may depend on coordinates x,y,z and so on) and "
"Would you like to save it now?"
msgstr "Текущий документ не сохранен. Сохранить сейчас?"
-#: src/window.cpp:402
+#: src/window.cpp:425
msgid ""
"The special dialog (Edit|Insert|New Command) help you select the command, "
"fill its arguments and put it into the script."
msgid "There is no selection to evaluate."
msgstr "Ничего не выделено для вычисления."
-#: src/window.cpp:399
+#: src/window.cpp:422
msgid ""
"There is powerful calculator with a lot of special functions. You can use "
"buttons or keyboard to type the expression. Also you can use existed "
msgid "There is wrong command(s) in script"
msgstr "В скрипте неправильная команд(ы)"
-#: widgets/fltk.cpp:884
+#: widgets/fltk.cpp:888
msgid "Theta angle (tilt z-axis)"
msgstr "Угол Theta (наклон оси z)"
-#: widgets/fltk.cpp:1187
+#: widgets/fltk.cpp:1191
msgid "This is for parameter "
msgstr "Это для параметра "
msgid "Transpose data"
msgstr "Транспонировать данные"
-#: src/exec_dat.cpp:1724
+#: src/exec_dat.cpp:1759
msgid "Transpose data array"
msgstr "Транспонировать данные"
msgid "Untitled - mgllab"
msgstr "без имени - mgllab"
-#: widgets/fltk.cpp:1104
+#: widgets/fltk.cpp:1108
msgid "Update"
msgstr "Обновить"
msgid "W - lightgray"
msgstr "W - светло-серый"
-#: src/exec_dat.cpp:1728
+#: src/exec_dat.cpp:1763
msgid "Wavelet transform at some direction"
msgstr "Wavelet преобразование вдоль направления"
msgid "X/Z"
msgstr ""
-#: widgets/qt.cpp:1094 udav/plot_pnl.cpp:489
+#: widgets/qt.cpp:1098 udav/plot_pnl.cpp:489
msgid "XYZ"
msgstr ""
msgid "Yes"
msgstr "Да"
-#: src/window.cpp:404
+#: src/window.cpp:427
msgid ""
"You can concatenation of strings and numbers using `,` with out spaces (for "
"example, `'max(u)=',u.max,' a.u.'` or `'u=',!(1+i2)` for complex numbers). "
"together."
msgstr ""
-#: src/window.cpp:388
+#: src/window.cpp:411
msgid ""
"You can copy the current image to clipboard by pressing Ctrl-Shift-C. Later "
"you can paste it directly into yours document or presentation."
"Текущий рисунок можно скопировать нажав Ctrl-Shift-C. Позже его можно "
"вставить в документ или презентацию."
-#: src/window.cpp:401
+#: src/window.cpp:424
msgid ""
"You can easily insert file or folder names, last fitted formula or numerical "
"value of selection by using menu Edit|Insert."
"Можно легко вставить имя файла, путь к папке, последнюю подобранную формулу "
"и т.л., используя меню Правка|Вставить"
-#: src/window.cpp:395
+#: src/window.cpp:418
msgid ""
"You can edit MGL file in any text editor. Also you can run it in console by "
"help of commands: mglconv, mglview."
"запустить (и просмотреть) прямо из консоли с помошью программ mglconv, "
"mglview."
-#: src/window.cpp:389
+#: src/window.cpp:412
msgid ""
"You can export image into a set of format (EPS, SVG, PNG, JPEG) by pressing "
"right mouse button inside image and selecting 'Export as ...'."
"Текущий рисунок можно экспортировать во множество форматов (EPS, SVG, PNG, "
"JPEG и др.), просто нажав правой кнопкой на рисунке и выбрать 'Экспорт'"
-#: src/window.cpp:393
+#: src/window.cpp:416
msgid ""
"You can put several plots in the same image by help of commands 'subplot' or "
"'inplot'."
"Рисунок может содержать несколько вставок (под-графиков) при использовании "
"команд 'subplot', 'inplot' и пр."
-#: src/window.cpp:403
+#: src/window.cpp:426
msgid ""
"You can put several plotting commands in the same line or in separate "
"function, for highlighting all of them simultaneously."
"разделителем ':' или в функцию. Группа графиков будет подсвечиваться и "
"перемещаться как целое."
-#: src/window.cpp:386
+#: src/window.cpp:409
msgid ""
"You can rotate/shift/zoom whole plot by mouse. Just press 'Rotate' "
"toolbutton, click image and hold a mouse button: left button for rotation, "
"кнопку 'Вращать' и удерживайте кнопку мыши: левую для вращения, правую для "
"приближения/перспективы, среднюю для сдвига."
-#: src/window.cpp:391
+#: src/window.cpp:414
msgid ""
"You can save the parameter of animation inside MGL script by using comment "
"started from '##a ' or '##c ' for loops."
"Параметры анимации можно сохранить внутри скрипта с помощью комментариев "
"'##a' или '##c'."
-#: src/window.cpp:390
+#: src/window.cpp:413
msgid ""
"You can setup colors for script highlighting in Property dialog. Just select "
"menu item 'Settings/Properties'."
msgstr "Расцветку скрипта можно настроить в диалоге 'Свойства'."
-#: src/window.cpp:385
+#: src/window.cpp:408
msgid ""
"You can shift axis range by pressing middle button and moving mouse. Also, "
"you can zoom in/out axis range by using mouse wheel."
"Диапазон осей координат можно сместить нажав среднюю кнопку мыши, при этом "
"колесо мыши приближает/отдаляет график."
-#: src/window.cpp:398
+#: src/window.cpp:421
msgid ""
"You can type arbitrary expression as input argument for data or number. In "
"last case (for numbers), the first value of data array is used."
"Аргументом может быть любое выражение. Если требуется число, то будет "
"использован первый элемент массива."
-#: src/window.cpp:396
+#: src/window.cpp:419
msgid ""
"You can use command 'once on|off' for marking the block which should be "
"executed only once. For example, this can be the block of large data reading/"
"длительные вычисления и т.д. Нажмите F9 (меню 'Графика|Перезагрузить') для "
"повторного выполнения этого блока команд."
-#: src/window.cpp:397
+#: src/window.cpp:420
msgid ""
"You can use command 'stop' for terminating script parsing. It is useful if "
"you don't want to execute a part of script."
"Команда 'stop' останавливает выполение скрипта. Она полезна если Вы не "
"хотите выполнять часть скрипта."
-#: src/window.cpp:387
+#: src/window.cpp:410
msgid ""
"You may quickly draw the data from file. Just use: mgllab 'filename.dat' in "
"command line."
msgid "Zoom axis range"
msgstr "Увеличить диапазон осей координат"
-#: widgets/qt.cpp:1129
+#: widgets/qt.cpp:1133
msgid "Zoom by mouse"
msgstr "Приблизить мышкой"
-#: widgets/qt.cpp:1228
+#: widgets/qt.cpp:1232
msgid "Zoom graphics"
msgstr "Приблизить рисунок"
-#: widgets/qt.cpp:1238 udav/plot_pnl.cpp:515
+#: widgets/qt.cpp:1242 udav/plot_pnl.cpp:515
msgid "Zoom in"
msgstr "Приблизить"
-#: widgets/qt.cpp:1240 udav/plot_pnl.cpp:518
+#: widgets/qt.cpp:1244 udav/plot_pnl.cpp:518
msgid "Zoom in graphics."
msgstr "Приблизить рисунок"
-#: widgets/fltk.cpp:865
+#: widgets/fltk.cpp:869
msgid "Zoom in selected region of the picture"
msgstr "Приблизить выбранную область рисунка"
msgid "Zoom in text"
msgstr "Увеличить текст"
-#: widgets/fltk.cpp:895
+#: widgets/fltk.cpp:899
msgid "Zoom in the picture"
msgstr "Приблизить рисунок"
-#: widgets/qt.cpp:1242 udav/plot_pnl.cpp:521
+#: widgets/qt.cpp:1246 udav/plot_pnl.cpp:521
msgid "Zoom out"
msgstr "Отдалить"
-#: widgets/qt.cpp:1244 udav/plot_pnl.cpp:524
+#: widgets/qt.cpp:1248 udav/plot_pnl.cpp:524
msgid "Zoom out graphics."
msgstr "Отдалить рисунок"
msgid "Zoom out text"
msgstr "Уменьшить текст"
-#: widgets/fltk.cpp:897
+#: widgets/fltk.cpp:901
msgid "Zoom out the picture"
msgstr "Отдалить рисунок"
msgstr "Приблизить область рисунка"
#. zooming menu
-#: widgets/qt.cpp:1227 udav/plot_pnl.cpp:502
+#: widgets/qt.cpp:1231 udav/plot_pnl.cpp:502
msgid "Zoom/move"
msgstr "Приближение/сдвиг"
msgid "bars"
msgstr ""
-#: widgets/qt.cpp:1084 udav/plot_pnl.cpp:478
+#: widgets/qt.cpp:1088 udav/plot_pnl.cpp:478
msgid "bitmap EPS"
msgstr "растровый EPS"
msgid "center"
msgstr "центр"
-#: widgets/fltk.cpp:790
+#: widgets/fltk.cpp:794
#, c-format
msgid "click at %g, %g, %g"
msgstr "клик в %g, %g, %g"
#: mgllab/dialogs.cpp:1028
msgid "no origin tick"
-msgstr ""
+msgstr "нет меток на пересечении"
#. "-+=;oOsS~<>jdD*^"
#. ".+x*sdv^<>o.*+xsdv^<>o" : nf = 10
msgid "solid"
msgstr "сплош."
-#: widgets/qt.cpp:1082 udav/plot_pnl.cpp:476
+#: widgets/qt.cpp:1086 udav/plot_pnl.cpp:476
msgid "solid PNG"
msgstr "PNG с заливкой"
msgid "values"
msgstr "значения"
-#: widgets/qt.cpp:1085 udav/plot_pnl.cpp:479
+#: widgets/qt.cpp:1089 udav/plot_pnl.cpp:479
msgid "vector EPS"
msgstr "векторный EPS"
font_kind = kind; font_size = size;\r
}\r
//-----------------------------------------------------------------------------\r
-bool is_sfx(const char *s) // suffix\r
+bool MGL_FUNC_PURE is_sfx(const char *s) // suffix\r
{\r
size_t i,n=strlen(s);\r
for(i=0;i<n && s[i]>='a';i++);\r
// char *t = new char[i+1]; memcpy(t,s,i*sizeof(char)); t[i]=0;\r
}\r
//-----------------------------------------------------------------------------\r
-bool is_opt(const char *s) // option\r
+bool MGL_FUNC_PURE is_opt(const char *s) // option\r
{\r
const char *o[13]={"xrange","yrange","zrange","crange","alpha",\r
"cut","value","meshnum","size","legend",\r
return false;\r
}\r
//-----------------------------------------------------------------------------\r
-bool is_num(const char *s) // number\r
+bool MGL_FUNC_PURE is_num(const char *s) // number\r
{\r
size_t n=strlen(s);\r
// if(s[0]==':' && (s[1]<=' ' || s[1]==';')) return true;\r
//-----------------------------------------------------------------------------\r
mglParse *Parse=0;\r
//-----------------------------------------------------------------------------\r
-mreal udav_delay(void *v)\r
+mreal MGL_FUNC_PURE udav_delay(void *v)\r
{ return ((Fl_MGL*)v)->delay; }\r
void udav_reload(void *v)\r
{ Parse->RestoreOnce(); ((Fl_MGL*)v)->update(); }\r
delete []tmp;
}
//-----------------------------------------------------------------------------
-long MGL_EXPORT mgl_strpos(const char *str,char *fnd)
+long MGL_EXPORT_PURE mgl_strpos(const char *str,char *fnd)
{
const char *p=strstr(str,fnd);
return p?p-str:-1L;
}
//-----------------------------------------------------------------------------
-long MGL_EXPORT mgl_chrpos(const char *str,char ch)
+long MGL_EXPORT_PURE mgl_chrpos(const char *str,char ch)
{
const char *p=str?strchr(str,ch):0;
return p?p-str:-1L;
}
//-----------------------------------------------------------------------------
+int mgl_fgetstr_script = 0;
+void MGL_EXPORT mgl_fgetstr_mgl(int enable)
+{
+ mgl_fgetstr_script = enable;
+}
MGL_EXPORT char *mgl_fgetstr(FILE *fp)
{
const long size=10240; // NOTE: this set maximal length of string to be read
{
if(!fgets(s,size,fp)) break;
mgl_strtrim(s);
+ if(mgl_fgetstr_script && s[0]=='#' && s[1]=='M' && s[2]=='G' && s[3]=='L' && s[4]==' ')
+ {
+ std::string buf("mglconv -n "); buf+= s+5;
+ system(buf.c_str());
+ }
// strlwr(s);
} while(!feof(fp) && (s[0]==0 || s[0]=='%' || s[0]=='#'));
for(long i=0;s[i];i++) if(s[i]=='#') { s[i]=0; break; }
const tm *res = use_utc?gmtime(clock):localtime(clock);
memcpy(result,res,sizeof(tm)); return result; }
//-----------------------------------------------------------------------------
-long MGL_EXPORT mgl_have_color(const char *stl)
+long MGL_EXPORT_PURE mgl_have_color(const char *stl)
{
return mgl_get_num_color(stl,0);
// long j=0;
// scl&8 -- bypass palette for enabling alpha\r
// scl&16 -- put points inside axis range\r
if(mgl_isnan(c) || mgl_isnan(a)) { q.x=NAN; return false; }\r
- bool norefr = mgl_isnan(n.x) && mgl_isnan(n.y) && !mgl_isnan(n.z);\r
+ bool norefr = mgl_isnan(n.x) && mgl_isnan(n.y) && !mgl_isnan(n.z), res=true;\r
if(scl>0)\r
{\r
if(scl&16) mgl_coor_box(this, p);\r
- ScalePoint(mat,p,n,!(scl&2));\r
+ res = ScalePoint(mat,p,n,!(scl&2));\r
}\r
if(mgl_isnan(p.x)) { q.x=NAN; return false; }\r
a = (a>=0 && a<=1) ? a : AlphaDef;\r
if(norefr) q.v=0;\r
if(!get(MGL_ENABLE_LIGHT) && !(scl&4)) q.u=q.v=NAN;\r
q.sub=mat->norot?-1*(int)Sub.size():Sub.size()-1;\r
- return true;\r
+ return (scl&16)?res:true;\r
}\r
//-----------------------------------------------------------------------------\r
long mglBase::CopyNtoC(long from, mreal c)\r
}\r
}\r
//-----------------------------------------------------------------------------\r
-size_t MGL_EXPORT mgl_get_num_color(const char *s, int smooth)\r
+size_t MGL_EXPORT_PURE mgl_get_num_color(const char *s, int smooth)\r
{\r
if(!s || !s[0]) return 0;\r
size_t l=strlen(s), n=0; long j=0;\r
return cc;\r
}\r
//-----------------------------------------------------------------------------\r
-MGL_EXPORT const char *mglchrs(const char *str, const char *chr)\r
+MGL_EXPORT_PURE const char *mglchrs(const char *str, const char *chr)\r
{\r
if(!str || !str[0] || !chr || !chr[0]) return NULL;\r
size_t l=strlen(chr);\r
return NULL;\r
}\r
//-----------------------------------------------------------------------------\r
-MGL_EXPORT const char *mglchr(const char *str, char ch)\r
+MGL_EXPORT_PURE const char *mglchr(const char *str, char ch)\r
{\r
if(!str || !str[0]) return NULL;\r
size_t l=strlen(str),k=0;\r
{\r
if(fa) a = fa->Calc(0,0,0,a);\r
a = (a-FMin.c)/(FMax.c-FMin.c);\r
- a = (a<1?(a>0?a:0):1)/MGL_FEPSILON; // for texture a must be <1 always!!!\r
+ a = (a>1?1:(a<0?0:a))/MGL_FEPSILON; // for texture a must be <1 always!!!\r
+// a = (a<1?(a>0?a:0):1)/MGL_FEPSILON; // for texture a must be <1 always!!!\r
return a;\r
}\r
//-----------------------------------------------------------------------------\r
void MGL_EXPORT mgl_suppress_warn_(int *on) { mgl_suppress_warn(*on); }\r
void MGL_EXPORT mgl_set_quality(HMGL gr, int qual) { gr->SetQuality(qual); }\r
void MGL_EXPORT mgl_set_quality_(uintptr_t *gr, int *qual) { _GR_->SetQuality(*qual); }\r
-int MGL_EXPORT mgl_get_quality(HMGL gr) { return gr->GetQuality(); }\r
-int MGL_EXPORT mgl_get_quality_(uintptr_t *gr) { return _GR_->GetQuality(); }\r
-int MGL_EXPORT mgl_is_frames(HMGL gr)\r
+int MGL_EXPORT_PURE mgl_get_quality(HMGL gr) { return gr->GetQuality(); }\r
+int MGL_EXPORT_PURE mgl_get_quality_(uintptr_t *gr) { return _GR_->GetQuality(); }\r
+int MGL_EXPORT_PURE mgl_is_frames(HMGL gr)\r
{ return gr->get(MGL_VECT_FRAME) && !(gr->GetQuality()&MGL_DRAW_LMEM); }\r
void MGL_EXPORT mgl_set_draw_reg(HMGL gr, long nx, long ny, long m) { gr->SetDrawReg(nx,ny,m); }\r
void MGL_EXPORT mgl_set_draw_reg_(uintptr_t *gr, int *nx, int *ny, int *m) { _GR_->SetDrawReg(*nx,*ny,*m); }\r
//-----------------------------------------------------------------------------\r
-int MGL_EXPORT mgl_get_flag(HMGL gr, uint32_t flag) { return gr->get(flag); }\r
-int MGL_EXPORT mgl_get_flag_(uintptr_t *gr, unsigned long *flag) { return _GR_->get(*flag); }\r
+int MGL_EXPORT_PURE mgl_get_flag(HMGL gr, uint32_t flag) { return gr->get(flag); }\r
+int MGL_EXPORT_PURE mgl_get_flag_(uintptr_t *gr, unsigned long *flag) { return _GR_->get(*flag); }\r
void MGL_EXPORT mgl_set_flag(HMGL gr, int val, uint32_t flag) { gr->set(val,flag); }\r
void MGL_EXPORT mgl_set_flag_(uintptr_t *gr, int *val, unsigned long *flag) { _GR_->set(*val,*flag); }\r
//-----------------------------------------------------------------------------\r
void MGL_EXPORT mgl_set_plotid_(uintptr_t *gr, const char *id,int l)\r
{ char *s=new char[l+1]; memcpy(s,id,l); s[l]=0;\r
_GR_->PlotId = s; delete []s; }\r
-MGL_EXPORT const char *mgl_get_plotid(HMGL gr) { return gr->PlotId.c_str(); }\r
+MGL_EXPORT_PURE const char *mgl_get_plotid(HMGL gr) { return gr->PlotId.c_str(); }\r
int MGL_EXPORT mgl_get_plotid_(uintptr_t *gr, char *out, int len)\r
{\r
const char *res = mgl_get_plotid(_GR_);\r
return strlen(res);\r
}\r
//-----------------------------------------------------------------------------\r
-MGL_EXPORT const char *mgl_get_mess(HMGL gr) { return gr->Mess.c_str(); }\r
+MGL_EXPORT_PURE const char *mgl_get_mess(HMGL gr) { return gr->Mess.c_str(); }\r
int MGL_EXPORT mgl_get_mess_(uintptr_t *gr, char *out, int len)\r
{\r
const char *res = mgl_get_mess(_GR_);\r
if(out) mgl_strncpy(out,res,len);\r
return strlen(res);\r
}\r
-int MGL_EXPORT mgl_get_warn(HMGL gr) { return gr->GetWarn(); }\r
+int MGL_EXPORT_PURE mgl_get_warn(HMGL gr) { return gr->GetWarn(); }\r
void MGL_EXPORT mgl_set_warn(HMGL gr, int code, const char *txt)\r
{ gr->SetWarn(code,txt); }\r
extern bool mglPrintWarn;\r
}\r
void MGL_EXPORT mgl_set_global_warn_(const char *txt, int l)\r
{ char *s=new char[l+1]; memcpy(s,txt,l); s[l]=0; mgl_set_global_warn(s); delete []s; }\r
-MGL_EXPORT const char *mgl_get_global_warn() { return mglGlobalMess.c_str(); }\r
+MGL_EXPORT_PURE const char *mgl_get_global_warn() { return mglGlobalMess.c_str(); }\r
int MGL_EXPORT mgl_get_global_warn_(char *out, int len)\r
{\r
const char *res = mgl_get_global_warn();\r
void MGL_EXPORT mgl_highlight_(uintptr_t *gr, int *id) { _GR_->Highlight(*id); }\r
void MGL_EXPORT mgl_set_origin_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0)\r
{ _GR_->SetOrigin(*x0,*y0,*z0); }\r
-int MGL_EXPORT mgl_get_warn_(uintptr_t *gr) { return _GR_->GetWarn(); }\r
+int MGL_EXPORT_PURE mgl_get_warn_(uintptr_t *gr) { return _GR_->GetWarn(); }\r
void MGL_EXPORT mgl_set_warn_(uintptr_t *gr, int *code, const char *txt, int l)\r
{ char *s=new char[l+1]; memcpy(s,txt,l); s[l]=0;\r
_GR_->SetWarn(*code, s); delete []s; }\r
{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); return g?g->GetBits():0; }\r
MGL_EXPORT const unsigned char *mgl_get_rgba(HMGL gr)\r
{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); return g?g->GetRGBA():0; }\r
-MGL_EXPORT const unsigned char* mgl_get_background(HMGL gr)\r
+MGL_EXPORT_PURE const unsigned char* mgl_get_background(HMGL gr)\r
{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); return g?g->GetBackground():0; }\r
int MGL_EXPORT mgl_get_width(HMGL gr)\r
{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); return g?g->GetWidth():0; }\r
{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->CalcScr(mglPoint(x,y,z),xs,ys); }\r
void MGL_EXPORT mgl_set_obj_id(HMGL gr, int id)\r
{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetObjId(id); }\r
-int MGL_EXPORT mgl_get_obj_id(HMGL gr, int x, int y)\r
+int MGL_EXPORT_PURE mgl_get_obj_id(HMGL gr, int x, int y)\r
{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); return g?g->GetObjId(x,y):-1; }\r
-int MGL_EXPORT mgl_get_spl_id(HMGL gr, int x, int y)\r
+int MGL_EXPORT_PURE mgl_get_spl_id(HMGL gr, int x, int y)\r
{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); return g?g->GetSplId(x,y):-1; }\r
//-----------------------------------------------------------------------------\r
-long MGL_EXPORT mgl_is_active(HMGL gr, int xs, int ys, int d)\r
+long MGL_EXPORT_PURE mgl_is_active(HMGL gr, int xs, int ys, int d)\r
{\r
if(d<=0) d=1;\r
for(size_t i=0;i<gr->Act.size();i++)\r
}\r
return -1;\r
}\r
-long MGL_EXPORT mgl_is_active_(uintptr_t *gr, int *xs, int *ys, int *d)\r
+long MGL_EXPORT_PURE mgl_is_active_(uintptr_t *gr, int *xs, int *ys, int *d)\r
{ return mgl_is_active(_GR_, *xs, *ys, *d); }\r
//-----------------------------------------------------------------------------\r
int MGL_EXPORT mgl_new_frame(HMGL gr)\r
{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); return g?g->NewFrame():-1; }\r
void MGL_EXPORT mgl_end_frame(HMGL gr)\r
{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->EndFrame(); }\r
-int MGL_EXPORT mgl_get_num_frame(HMGL gr)\r
+int MGL_EXPORT_PURE mgl_get_num_frame(HMGL gr)\r
{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); return g?g->GetNumFrame():0; }\r
void MGL_EXPORT mgl_reset_frames(HMGL gr)\r
{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->ResetFrames(); }\r
//-----------------------------------------------------------------------------\r
int MGL_EXPORT mgl_new_frame_(uintptr_t *gr) { return _GR_->NewFrame(); }\r
void MGL_EXPORT mgl_end_frame_(uintptr_t *gr) { _GR_->EndFrame(); }\r
-int MGL_EXPORT mgl_get_num_frame_(uintptr_t *gr) { return _GR_->GetNumFrame(); }\r
+int MGL_EXPORT_PURE mgl_get_num_frame_(uintptr_t *gr) { return _GR_->GetNumFrame(); }\r
void MGL_EXPORT mgl_reset_frames_(uintptr_t *gr) { _GR_->ResetFrames(); }\r
void MGL_EXPORT mgl_get_frame_(uintptr_t *gr, int *i) { _GR_->GetFrame(*i); }\r
void MGL_EXPORT mgl_set_frame_(uintptr_t *gr, int *i) { _GR_->SetFrame(*i); }\r
//-----------------------------------------------------------------------------\r
MGL_EXPORT const unsigned char *mgl_get_rgb_(uintptr_t *gr) { return gr ? _GR_->GetBits():0; }\r
MGL_EXPORT const unsigned char *mgl_get_rgba_(uintptr_t *gr){ return gr ? _GR_->GetRGBA():0; }\r
-MGL_EXPORT const unsigned char* mgl_get_background_(uintptr_t* gr) { return gr ? _GR_->GetBackground():0; }\r
+MGL_EXPORT_PURE const unsigned char* mgl_get_background_(uintptr_t* gr) { return gr ? _GR_->GetBackground():0; }\r
int MGL_EXPORT mgl_get_width_(uintptr_t *gr) { return gr ? _GR_->GetWidth():0; }\r
int MGL_EXPORT mgl_get_height_(uintptr_t *gr) { return gr ? _GR_->GetHeight():0;}\r
void MGL_EXPORT mgl_calc_xyz_(uintptr_t *gr, int *xs, int *ys, mreal *x, mreal *y, mreal *z)\r
void MGL_EXPORT mgl_calc_scr_(uintptr_t *gr, mreal *x, mreal *y, mreal *z, int *xs, int *ys)\r
{ _GR_->CalcScr(mglPoint(*x,*y,*z),xs,ys); }\r
void MGL_EXPORT mgl_set_obj_id_(uintptr_t *gr, int *id) { _GR_->SetObjId(*id); }\r
-int MGL_EXPORT mgl_get_obj_id_(uintptr_t *gr, int *x, int *y) { return _GR_->GetObjId(*x,*y); }\r
-int MGL_EXPORT mgl_get_spl_id_(uintptr_t *gr, int *x, int *y) { return _GR_->GetSplId(*x,*y); }\r
+int MGL_EXPORT_PURE mgl_get_obj_id_(uintptr_t *gr, int *x, int *y) { return _GR_->GetObjId(*x,*y); }\r
+int MGL_EXPORT_PURE mgl_get_spl_id_(uintptr_t *gr, int *x, int *y) { return _GR_->GetSplId(*x,*y); }\r
//-----------------------------------------------------------------------------\r
double mgl_size_scl = 1;\r
HMGL MGL_EXPORT mgl_create_graph(int width, int height)\r
void MGL_EXPORT mgl_adjust_ticks_(uintptr_t *gr, const char *dir, int l)\r
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;\r
_GR_->AdjustTicks(s,true); delete []s; }\r
-void MGL_EXPORT mgl_adjust_ticks_(uintptr_t *gr, const char *dir, const char *stl, int l, int m)\r
+void MGL_EXPORT mgl_adjust_ticks_ext_(uintptr_t *gr, const char *dir, const char *stl, int l, int m)\r
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;\r
char *f=new char[m+1]; memcpy(f,stl,m); f[m]=0;\r
_GR_->AdjustTicks(s,true,f); delete []s; delete []f; }\r
void MGL_EXPORT mgl_set_legend_marks_(uintptr_t *gr, int *num)\r
{ _GR_->SetLegendMarks(*num); }\r
//-----------------------------------------------------------------------------\r
-void MGL_EXPORT mgl_wnd_set_delay(HMGL gr, double dt)\r
-{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetDelay(dt); }\r
-double MGL_EXPORT mgl_wnd_get_delay(HMGL gr)\r
-{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); return g?g->GetDelay():0; }\r
-void MGL_EXPORT mgl_wnd_set_delay_(uintptr_t *gr, mreal *dt) { _GR_->SetDelay(*dt); }\r
-double MGL_EXPORT mgl_wnd_get_delay_(uintptr_t *gr) { return _GR_->GetDelay(); }\r
-//-----------------------------------------------------------------------------\r
void MGL_EXPORT mgl_set_plotfactor(HMGL gr, double val)\r
{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetPlotFactor(val); }\r
void MGL_EXPORT mgl_set_plotfactor_(uintptr_t *gr, mreal *val)\r
return mdual(dd ? mglSpline3st<dual>(dd->a,dd->nx,dd->ny,dd->nz,x,y,z) : d->value(x,y,z));\r
}\r
//-----------------------------------------------------------------------------\r
-cmdual MGL_EXPORT mgl_datac_spline_ext(HCDT d, mreal x,mreal y,mreal z, dual *dx,dual *dy,dual *dz)\r
+cmdual MGL_EXPORT mgl_datac_spline_ext(HCDT d, mreal x,mreal y,mreal z, mdual *dx,mdual *dy,mdual *dz)\r
{\r
const mglDataC *dd=dynamic_cast<const mglDataC *>(d);\r
if(!dd)\r
if(dz) *dz=rz;\r
return mdual(res);\r
}\r
- return mdual(mglSpline3t<dual>(dd->a,dd->nx,dd->ny,dd->nz,x,y,z,dx,dy,dz));\r
+ dual xx,yy,zz, res = mglSpline3t<dual>(dd->a,dd->nx,dd->ny,dd->nz,x,y,z,&xx,&yy,&zz);\r
+ if(dx) *dx=xx;\r
+ if(dy) *dy=yy;\r
+ if(dz) *dz=zz;\r
+ return mdual(res);\r
}\r
//-----------------------------------------------------------------------------\r
cmdual MGL_EXPORT mgl_datac_spline_(uintptr_t *d, mreal *x,mreal *y,mreal *z)\r
{ return mgl_datac_spline(_DA_(d),*x,*y,*z); }\r
-cmdual MGL_EXPORT mgl_datac_spline_ext_(uintptr_t *d, mreal *x,mreal *y,mreal *z, dual *dx,dual *dy,dual *dz)\r
+cmdual MGL_EXPORT mgl_datac_spline_ext_(uintptr_t *d, mreal *x,mreal *y,mreal *z, mdual *dx,mdual *dy,mdual *dz)\r
{ return mgl_datac_spline_ext(_DA_(d),*x,*y,*z,dx,dy,dz); }\r
//-----------------------------------------------------------------------------\r
cmdual MGL_EXPORT mgl_datac_linear_ext(HCDT d, mreal x,mreal y,mreal z, mdual *dx,mdual *dy,mdual *dz)\r
void MGL_EXPORT mgl_datac_delete_(uintptr_t *d, const char *dir, int *at, int *num, int)\r
{ mgl_datac_delete(_DC_,*dir,*at,*num); }\r
//-----------------------------------------------------------------------------\r
-void MGL_EXPORT mgl_datac_set_value(HADT dat, dual v, long i, long j, long k)\r
+void MGL_EXPORT mgl_datac_set_value(HADT dat, mdual v, long i, long j, long k)\r
{\r
if(i>=0 && i<dat->nx && j>=0 && j<dat->ny && k>=0 && k<dat->nz)\r
dat->a[i+dat->nx*(j+dat->ny*k)]=v;\r
}\r
-void MGL_EXPORT mgl_datac_set_value_(uintptr_t *d, dual *v, int *i, int *j, int *k)\r
+void MGL_EXPORT mgl_datac_set_value_(uintptr_t *d, mdual *v, int *i, int *j, int *k)\r
{ mgl_datac_set_value(_DC_,*v,*i,*j,*k); }\r
//-----------------------------------------------------------------------------\r
cmdual MGL_EXPORT mgl_datac_get_value(HCDT dat, long i, long j, long k)\r
cmdual MGL_EXPORT mgl_datac_get_value_(uintptr_t *d, int *i, int *j, int *k)\r
{ return mgl_datac_get_value(_DA_(d),*i,*j,*k); }\r
//-----------------------------------------------------------------------------\r
-MGL_EXPORT mdual *mgl_datac_data(HADT dat)\r
+MGL_EXPORT_PURE mdual *mgl_datac_data(HADT dat)\r
{ return reinterpret_cast<mdual*>(dat->a); }\r
//-----------------------------------------------------------------------------\r
MGL_EXPORT mdual *mgl_datac_value(HADT dat, long i,long j,long k)\r
void MGL_EXPORT mgl_datac_create_(uintptr_t *d, int *nx,int *ny,int *nz)\r
{ mgl_datac_create(_DC_,*nx,*ny,*nz); }\r
//-----------------------------------------------------------------------------\r
-void MGL_EXPORT mgl_datac_link(HADT d, dual *A, long mx,long my,long mz)\r
+void MGL_EXPORT mgl_datac_link(HADT d, mdual *A, long mx,long my,long mz)\r
{\r
if(!A) return;\r
if(!d->link && d->a) delete [](d->a);\r
d->nx = mx>0 ? mx:1; d->ny = my>0 ? my:1; d->nz = mz>0 ? mz:1;\r
- d->link=true; d->a=A; d->NewId();\r
+ d->link=true; d->a=reinterpret_cast<dual*>(A); d->NewId();\r
}\r
-void MGL_EXPORT mgl_datac_link_(uintptr_t *d, dual *A, int *nx,int *ny,int *nz)\r
+void MGL_EXPORT mgl_datac_link_(uintptr_t *d, mdual *A, int *nx,int *ny,int *nz)\r
{ mgl_datac_link(_DC_,A,*nx,*ny,*nz); }\r
//-----------------------------------------------------------------------------\r
int MGL_EXPORT mgl_datac_read_dim(HADT d, const char *fname,long mx,long my,long mz)\r
return lines;\r
}\r
//-----------------------------------------------------------------------------\r
-std::vector<mglSegment> MGL_EXPORT mgl_get_curvs(HMGL gr, std::vector<mglSegment> lines)\r
+std::vector<mglSegment> MGL_EXPORT mgl_get_curvs(const mglPoint &Min, const mglPoint &Max, std::vector<mglSegment> lines)\r
{\r
long n = lines.size(), m = n;\r
const long nsl=(n>0 && n*n>100)?sqrt(double(n)):10;\r
- mreal dxsl = nsl/((gr->Max.x-gr->Min.x)*MGL_FEPSILON), x0 = gr->Min.x;\r
- mreal dysl = nsl/((gr->Max.y-gr->Min.y)*MGL_FEPSILON), y0 = gr->Min.y;\r
+ mreal dxsl = nsl/((Max.x-Min.x)*MGL_FEPSILON), x0 = Min.x;\r
+ mreal dysl = nsl/((Max.y-Min.y)*MGL_FEPSILON), y0 = Min.y;\r
std::vector<long> *xsl, *ysl;\r
xsl = new std::vector<long>[nsl+1];\r
ysl = new std::vector<long>[nsl+1];\r
delete []used; delete []xsl; delete []ysl;\r
return curvs;\r
}\r
+std::vector<mglSegment> MGL_EXPORT mgl_get_curvs(HMGL gr, std::vector<mglSegment> lines)\r
+{ return mgl_get_curvs(gr->Min, gr->Max, lines); }\r
//-----------------------------------------------------------------------------\r
void MGL_NO_EXPORT mgl_draw_curvs(HMGL gr, mreal val, mreal c, int text, const std::vector<mglSegment> &curvs)\r
{\r
delete []nn; delete []ff;\r
}\r
//-----------------------------------------------------------------------------\r
+HMDT mgl_data_conts(mreal val, HCDT dat)\r
+{\r
+ mglPoint Min(0,0,0), Max(1,1,1);\r
+ mglDataV x(dat->GetNx(),dat->GetNy(),dat->GetNz(),0,1,'x');\r
+ mglDataV y(dat->GetNx(),dat->GetNy(),dat->GetNz(),0,1,'y');\r
+ mglDataV z(dat->GetNx(),dat->GetNy(),dat->GetNz(),0,1,'z');\r
+ std::vector<mglSegment> curvs = mgl_get_curvs(Min,Max,mgl_get_lines(val,dat,&x,&y,&z,0));\r
+ long pc=curvs.size(), m=0;\r
+ if(pc==0) return NULL;\r
+ for(size_t i=0;i<curvs.size();i++) pc += curvs[i].pp.size();\r
+ // fill arguments for other functions\r
+ HMDT res = new mglData(3,pc);\r
+ for(size_t i=0;i<curvs.size();i++)\r
+ {\r
+ const std::list<mglPoint> &pp=curvs[i].pp;\r
+ for(std::list<mglPoint>::const_iterator it=pp.begin(); it != pp.end(); ++it)\r
+ {\r
+ long i0 = 3*m;\r
+ res->a[i0] = (*it).x;\r
+ res->a[1+i0] = (*it).y;\r
+ res->a[2+i0] = (*it).z;\r
+ m++;\r
+ }\r
+ long i0 = 3*m; m++;\r
+ res->a[i0] = res->a[1+i0] = res->a[2+i0] = NAN;\r
+ }\r
+ return res;\r
+}\r
+//-----------------------------------------------------------------------------\r
// NOTE! All data MUST have the same size! Only first slice is used!\r
void MGL_EXPORT mgl_cont_gen(HMGL gr, mreal val, HCDT a, HCDT x, HCDT y, HCDT z, mreal c, int text,long ak)\r
{\r
mgl_draw_curvs(gr,val,c,text,mgl_get_curvs(gr,mgl_get_lines(val,a,x,y,z,ak)));\r
}\r
//-----------------------------------------------------------------------------\r
-void MGL_EXPORT mgl_cont_gen(HMGL gr, double val, HCDT a, HCDT x, HCDT y, HCDT z, const char *sch)\r
+void MGL_EXPORT mgl_cont_gen(HMGL gr, double val, HCDT a, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)\r
{\r
+ if(mgl_check_dim2(gr,x,y,z,a,"ContGen")) return;\r
+ gr->SaveState(opt);\r
+ static int cgid=1; gr->StartGroup("ContGen",cgid++);\r
+\r
int text=0;\r
if(mglchr(sch,'t')) text=1;\r
if(mglchr(sch,'T')) text=2;\r
gr->SetPenPal(sch);\r
mgl_cont_gen(gr,val,a,x,y,z,gr->CDef,text,0);\r
+ gr->EndGroup();\r
}\r
//-----------------------------------------------------------------------------\r
void MGL_EXPORT mgl_cont_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)\r
delete []kk;\r
}\r
//-----------------------------------------------------------------------------\r
-void MGL_EXPORT mgl_contf_gen(HMGL gr, double v1, double v2, HCDT a, HCDT x, HCDT y, HCDT z, const char *c)\r
+void MGL_EXPORT mgl_contf_gen(HMGL gr, double v1, mreal v2, HCDT a, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)\r
{\r
- gr->SetPenPal(c);\r
+ if(mgl_check_dim2(gr,x,y,z,a,"ContFGen")) return;\r
+ gr->SaveState(opt);\r
+ static int cgid=1; gr->StartGroup("ContFGen",cgid++);\r
+\r
+ gr->SetPenPal(sch);\r
mgl_contf_gen(gr,v1,v2,a,x,y,z,gr->CDef,0);\r
+ gr->EndGroup();\r
}\r
//-----------------------------------------------------------------------------\r
void MGL_EXPORT mgl_contf_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)\r
}\r
}\r
//-----------------------------------------------------------------------------\r
-mreal MGL_EXPORT mglSpline3s(const mreal *a, long nx, long ny, long nz, mreal x, mreal y, mreal z)\r
+mreal MGL_EXPORT_PURE mglSpline3s(const mreal *a, long nx, long ny, long nz, mreal x, mreal y, mreal z)\r
{ return mglSpline3st<mreal>(a,nx,ny,nz,x,y,z); }\r
//-----------------------------------------------------------------------------\r
mreal MGL_EXPORT mglSpline3(const mreal *a, long nx, long ny, long nz, mreal x, mreal y, mreal z,mreal *dx, mreal *dy, mreal *dz)\r
{ return mglSpline3t<mreal>(a,nx,ny,nz,x,y,z,dx,dy,dz); }\r
//-----------------------------------------------------------------------------\r
-mreal MGL_EXPORT mglLinear(const mreal *a, long nx, long ny, long nz, mreal x, mreal y, mreal z)\r
+mreal MGL_EXPORT_PURE mglLinear(const mreal *a, long nx, long ny, long nz, mreal x, mreal y, mreal z)\r
{ return mglLineart<mreal>(a,nx,ny,nz,x,y,z); }\r
//-----------------------------------------------------------------------------\r
double MGL_EXPORT_CONST mgl_ipow(double x,int n)\r
if(n%2==1) t *= x;\r
return t;\r
}\r
-double MGL_EXPORT mgl_ipow_(mreal *x,int *n) { return mgl_ipow(*x,*n); }\r
+double MGL_EXPORT_PURE mgl_ipow_(mreal *x,int *n) { return mgl_ipow(*x,*n); }\r
//-----------------------------------------------------------------------------\r
double mgl_get_time(const char *time, const char *fmt)\r
{\r
uintptr_t MGL_EXPORT mgl_data_solve_(uintptr_t *d, mreal *val, const char *dir, uintptr_t *i0, int *norm,int)\r
{ return uintptr_t(mgl_data_solve(_DA_(d),*val, *dir, _DA_(i0), *norm)); }\r
//-----------------------------------------------------------------------------\r
-long static int_pow(long x, long n)\r
+long MGL_LOCAL_CONST int_pow(long x, long n)\r
{\r
if(n==2) return x*x;\r
if(n==1) return x;\r
long vx=v->GetNx(), vy=v->GetNy(), vz=v->GetNz();\r
if(xx<0 && yy<0 && zz<0) // whole array\r
{\r
- if(vx>=nx && vy>=ny && vz>=nz)\r
-#pragma omp parallel for\r
- for(long ii=0;ii<nx*ny*nz;ii++)\r
- { long i=ii%nx, j=(ii/nx)%ny, k=ii/(nx*ny);\r
- a[ii] = b?b[i+vx*(j+k*vy)]:v->v(i,j,k); }\r
- else if(vx>=nx && vy>=ny)\r
-#pragma omp parallel for\r
- for(long ii=0;ii<nx*ny*nz;ii++)\r
- { long i=ii%nx, j=(ii/nx)%ny;\r
- a[ii] = b?b[i+vx*j]:v->v(i,j); }\r
- else if(vx>=nx)\r
-#pragma omp parallel for\r
- for(long ii=0;ii<nx*ny*nz;ii++)\r
- { long i=ii%nx; a[ii] = b?b[i]:v->v(i); }\r
+ long nn = vx>=nx?nx:vx, mm = vy>=ny?ny:vy, ll = vz>=nz?nz:vz;\r
+ if(nn>1 && mm>1 && ll>1)\r
+// #pragma omp parallel for\r
+ for(long k=0;k<ll;k++) for(long j=0;j<mm;j++) for(long i=0;i<nn;i++)\r
+ a[i+nx*(j+k*ny)] = b?b[i+vx*(j+k*vy)]:v->v(i,j,k);\r
+ if(nn>1 && mm>1)\r
+// #pragma omp parallel for\r
+ for(long k=0;k<nz;k++) for(long j=0;j<mm;j++) for(long i=0;i<nn;i++)\r
+ a[i+nx*(j+k*ny)] = b?b[i+vx*j]:v->v(i,j);\r
+ else if(nn>1)\r
+// #pragma omp parallel for\r
+ for(long k=0;k<nz;k++) for(long j=0;j<ny;j++) for(long i=0;i<nn;i++)\r
+ a[i+nx*(j+k*ny)] = b?b[i]:v->v(i);\r
else\r
-#pragma omp parallel for\r
+// #pragma omp parallel for\r
for(long ii=0;ii<nx*ny*nz;ii++) a[ii] = vv;\r
}\r
else if(xx<0 && yy<0) // 2d\r
{\r
zz*=nx*ny;\r
- if(vx>=nx && vy>=ny)\r
-#pragma omp parallel for\r
- for(long ii=0;ii<nx*ny;ii++)\r
- { long i=ii%nx, j=ii/nx;\r
- a[ii+zz] = b?b[i+vx*j]:v->v(i,j); }\r
- else if(vx>=nx)\r
-#pragma omp parallel for\r
- for(long ii=0;ii<nx*ny;ii++)\r
- { long i=ii%nx; a[ii+zz] = b?b[i]:v->v(i); }\r
+ long nn = vx>=nx?nx:vx, mm = vy>=ny?ny:vy;\r
+ if(nn>1 && mm>1)\r
+// #pragma omp parallel for\r
+ for(long j=0;j<mm;j++) for(long i=0;i<nn;i++)\r
+ a[i+j*nx+zz] = b?b[i+vx*j]:v->v(i,j);\r
+ else if(nn>1)\r
+// #pragma omp parallel for\r
+ for(long j=0;j<ny;j++) for(long i=0;i<nn;i++)\r
+ a[i+j*nx+xx] = b?b[i]:v->v(i);\r
else\r
-#pragma omp parallel for\r
+// #pragma omp parallel for\r
for(long ii=0;ii<nx*ny;ii++) a[ii+zz] = vv;\r
}\r
else if(yy<0 && zz<0) // 2d\r
{\r
- if(vx>=ny && vy>=nz)\r
-#pragma omp parallel for\r
- for(long ii=0;ii<ny*nz;ii++)\r
- { long i=ii%ny, j=ii/ny;\r
- a[ii*nx+xx] = b?b[i+vx*j]:v->v(i,j); }\r
- else if(vx>=ny)\r
-#pragma omp parallel for\r
- for(long ii=0;ii<ny*nz;ii++)\r
- { long i=ii%ny; a[ii*nx+xx] = b?b[i]:v->v(i); }\r
+ long nn = vx>=ny?ny:vx, mm = vy>=nz?nz:vy;\r
+ if(nn>1 && mm>1)\r
+// #pragma omp parallel for collapse(2)\r
+ for(long j=0;j<mm;j++) for(long i=0;i<nn;i++)\r
+ a[(i+ny*j)*nx+xx] = b?b[i+vx*j]:v->v(i,j);\r
+ else if(nn>1)\r
+// #pragma omp parallel for collapse(2)\r
+ for(long j=0;j<nz;j++) for(long i=0;i<nn;i++)\r
+ a[(i+ny*j)*nx+xx] = b?b[i]:v->v(i);\r
else\r
-#pragma omp parallel for\r
+// #pragma omp parallel for\r
for(long ii=0;ii<ny*nz;ii++) a[ii*nx+xx] = vv;\r
}\r
else if(xx<0 && zz<0) // 2d\r
{\r
yy *= nx; zz = nx*ny;\r
- if(vx>=nx && vy>=nz)\r
-#pragma omp parallel for\r
- for(long ii=0;ii<nx*nz;ii++)\r
- { long i=ii%nx, j=ii/nx;\r
- a[i+yy+j*zz] = b?b[i+vx*j]:v->v(i,j); }\r
- else if(vx>=nx)\r
-#pragma omp parallel for\r
- for(long ii=0;ii<nx*nz;ii++)\r
- { long i=ii%nx, j=ii/nx;\r
- a[i+yy+j*zz] = b?b[i]:v->v(i); }\r
+ long nn = vx>=nx?nx:vx, mm = vy>=nz?nz:vy;\r
+ if(nn>1 && mm>1)\r
+// #pragma omp parallel for collapse(2)\r
+ for(long j=0;j<mm;j++) for(long i=0;i<nn;i++)\r
+ a[i+yy+j*zz] = b?b[i+vx*j]:v->v(i,j);\r
+ else if(nn>1)\r
+// #pragma omp parallel for collapse(2)\r
+ for(long j=0;j<nz;j++) for(long i=0;i<nn;i++)\r
+ a[i+yy+j*zz] = b?b[i]:v->v(i);\r
else\r
-#pragma omp parallel for\r
+// #pragma omp parallel for\r
for(long ii=0;ii<nx*nz;ii++)\r
- { long i=ii%nx, j=ii/nx;\r
- a[i+yy+j*zz] = vv; }\r
+ { long i=ii%nx, j=ii/nx; a[i+yy+j*zz] = vv; }\r
}\r
else if(xx<0)\r
{\r
xx = nx*(yy+zz*ny);\r
- if(vx>=nx)\r
-#pragma omp parallel for\r
- for(long i=0;i<nx;i++) a[i+xx] = b?b[i]:v->v(i);\r
+ long nn = vx>=nx?nx:vx;\r
+ if(nn>1)\r
+// #pragma omp parallel for\r
+ for(long i=0;i<nn;i++) a[i+xx] = b?b[i]:v->v(i);\r
else\r
-#pragma omp parallel for\r
+// #pragma omp parallel for\r
for(long i=0;i<nx;i++) a[i+xx] = vv;\r
}\r
else if(yy<0)\r
{\r
xx += zz*nx*ny;\r
- if(vx>=ny)\r
-#pragma omp parallel for\r
- for(long i=0;i<ny;i++) a[xx+nx*i] = b?b[i]:v->v(i);\r
+ long nn = vx>=ny?ny:vx;\r
+ if(nn>1)\r
+// #pragma omp parallel for\r
+ for(long i=0;i<nn;i++) a[xx+nx*i] = b?b[i]:v->v(i);\r
else\r
-#pragma omp parallel for\r
+// #pragma omp parallel for\r
for(long i=0;i<ny;i++) a[xx+nx*i] = vv;\r
}\r
else if(zz<0)\r
{\r
xx += nx*yy; yy = nx*ny;\r
- if(vx>=nz)\r
-#pragma omp parallel for\r
- for(long i=0;i<nz;i++) a[xx+yy*i] = b?b[i]:v->v(i);\r
+ long nn = vx>=nz?nz:vx;\r
+ if(nn>1)\r
+// #pragma omp parallel for\r
+ for(long i=0;i<nn;i++) a[xx+yy*i] = b?b[i]:v->v(i);\r
else\r
-#pragma omp parallel for\r
+// #pragma omp parallel for\r
for(long i=0;i<nz;i++) a[xx+yy*i] = vv;\r
}\r
else a[xx+nx*(yy+ny*zz)] = vv;\r
mreal MGL_EXPORT mgl_data_get_value_(uintptr_t *d, int *i, int *j, int *k)\r
{ return mgl_data_get_value(_DA_(d),*i,*j,*k); }\r
//-----------------------------------------------------------------------------\r
-MGL_EXPORT mreal *mgl_data_data(HMDT dat) { return dat->a; }\r
+MGL_EXPORT_PURE mreal *mgl_data_data(HMDT dat) { return dat->a; }\r
//-----------------------------------------------------------------------------\r
MGL_EXPORT mreal *mgl_data_value(HMDT dat, long i,long j,long k)\r
{ long ii=i*dat->nx*(j+dat->ny*k);\r
* Free Software Foundation, Inc., *\r
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *\r
***************************************************************************/\r
+#include <set>\r
+#include <stdarg.h>\r
#include <ctype.h>\r
#include "mgl2/data.h"\r
#include "mgl2/eval.h"\r
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;\r
uintptr_t r=uintptr_t(mgl_data_min_dir(_DT_,s)); delete []s; return r; }\r
//-----------------------------------------------------------------------------\r
+HMDT MGL_EXPORT mgl_data_minmax(HCDT dat)\r
+{\r
+ long n=dat->GetNx(), m=dat->GetNy(), l=dat->GetNz();\r
+ std::vector<mreal> imax, jmax, kmax;\r
+ HMDT res=NULL;\r
+ if(n>3 && m==1 && l==1)\r
+ {\r
+ std::vector<mreal> imax;\r
+ for(long i=1;i<n-1;i++)\r
+ {\r
+ mreal v = dat->v(i);\r
+ if(v > dat->v(i-1) && v >= dat->v(i+1)) imax.push_back(i);\r
+ if(v < dat->v(i-1) && v <= dat->v(i+1)) imax.push_back(i);\r
+ }\r
+ size_t nn = imax.size();\r
+ if(nn>0)\r
+ { res = new mglData(nn);\r
+ for(size_t i=0;i<nn;i++) res->a[i] = imax[i]/(n-1.); }\r
+ }\r
+ else if(n>3 && m>3 && l==1)\r
+ {\r
+ std::vector<mreal> imax, jmax;\r
+ for(long j=1;j<m-1;j++) for(long i=1;i<n-1;i++)\r
+ {\r
+ mreal v = dat->v(i,j);\r
+ long di[] = {-1,0,1, -1,1, -1,0,1}, dj[] = {-1,-1, -1,0, 0,1,1,1}, vmax=0, vmin=0;\r
+ for(int ii=0;ii<8;ii++)\r
+ {\r
+ mreal u = dat->v(i+di[ii],j+dj[ii]);\r
+ if(mgl_isnan(u)) { vmax=vmin=0; break; }\r
+ if(v < u) vmin++;\r
+ if(v > u) vmax++;\r
+ }\r
+ if(vmin>0 && vmax==0) { imax.push_back(i); jmax.push_back(j); }\r
+ if(vmax>0 && vmin==0) { imax.push_back(i); jmax.push_back(j); }\r
+ }\r
+ size_t nn = imax.size();\r
+ if(nn>0)\r
+ {\r
+ res = new mglData(2,nn);\r
+ for(size_t i=0;i<nn;i++)\r
+ { res->a[2*i] = imax[i]/(n-1.); res->a[2*i+1] = jmax[i]/(m-1.); }\r
+ }\r
+ }\r
+ else if(n>3 && m>3 && l>3)\r
+ {\r
+ std::vector<mreal> imax, jmax;\r
+ for(long k=1;k<l-1;k++) for(long j=1;j<m-1;j++) for(long i=1;i<n-1;i++)\r
+ {\r
+ mreal v = dat->v(i,j,k);\r
+ long di[] = {-1,0,1,-1,0,1,-1,0,1, -1,0,1,-1,1,-1,0,1, -1,0,1,-1,0,1,-1,0,1};\r
+ long dj[] = {-1,-1,-1,0,0,0,1,1,1, -1,-1,-1,0,0,1,1,1, -1,-1,-1,0,0,0,1,1,1};\r
+ long dk[] = {-1,-1,-1,-1,-1,-1,-1,-1,-1, 0,0,0,0,0,0,0,0, 1,1,1,1,1,1,1,1,1}, vmax=0, vmin=0;\r
+ for(int ii=0;ii<26;ii++)\r
+ {\r
+ mreal u = dat->v(i+di[ii],j+dj[ii],k+dk[ii]);\r
+ if(mgl_isnan(u)) { vmax=vmin=0; break; }\r
+ if(v < u) vmin++;\r
+ if(v > u) vmax++;\r
+ }\r
+ if(vmin>0 && vmax==0) { imax.push_back(i); jmax.push_back(j); kmax.push_back(k); }\r
+ if(vmax>0 && vmin==0) { imax.push_back(i); jmax.push_back(j); kmax.push_back(k); }\r
+ }\r
+ size_t nn = imax.size();\r
+ if(nn>0)\r
+ { \r
+ res = new mglData(3,nn);\r
+ for(size_t i=0;i<nn;i++)\r
+ { res->a[3*i] = imax[i]/(n-1.); res->a[3*i+1] = jmax[i]/(m-1.); res->a[3*i+2] = kmax[i]/(l-1.); }\r
+ }\r
+ }\r
+ return res;\r
+}\r
+uintptr_t MGL_EXPORT mgl_data_minmax_(uintptr_t *d)\r
+{ return uintptr_t(mgl_data_minmax(_DT_)); }\r
+//-----------------------------------------------------------------------------\r
HMDT MGL_EXPORT mgl_data_momentum(HCDT dat, char dir, const char *how)\r
{\r
if(!how || !(*how) || !strchr("xyz",dir)) return 0;\r
uintptr_t MGL_EXPORT mgl_data_section_val_(uintptr_t *d, int *id, const char *dir, mreal *val,int)\r
{ return uintptr_t(mgl_data_section_val(_DT_,*id,dir[0],*val)); }\r
//-----------------------------------------------------------------------------\r
+void MGL_NO_EXPORT mgl_closest(mreal *res, long n, long i0, long i1, HCDT a, HCDT b)\r
+{\r
+ mreal *rr = new mreal[n*n];\r
+ for(long k0=0;k0<n;k0++) for(long k1=0;k1<n;k1++)\r
+ rr[k0+n*k1] = hypot(a->vthr(k0+i0)-a->vthr(k1+i1), b->vthr(k0+i0)-b->vthr(k1+i1));\r
+ std::set<long> ids, idk;\r
+ for(long k=0;k<n;k++) { ids.insert(k); idk.insert(k); }\r
+ for(long k=0;k<n;k++)\r
+ {\r
+ long k0=-1,k1=-1;\r
+ mreal rm = INFINITY;\r
+ for(long kk=0;kk<n*n;kk++)\r
+ if(rr[kk]<rm) { rm=rr[kk]; k0=kk%n; k1=kk/n; }\r
+ if(k0>=0)\r
+ {\r
+ for(long i=0;i<n;i++) rr[i+k1*n] = rr[k0+i*n] = NAN;\r
+ long kk = long(0.5+res[k1+i1]); res[k0+i0] = kk;\r
+ ids.erase(kk); idk.erase(k0);\r
+ }\r
+ else\r
+ {\r
+ long kk=*(ids.begin()), ik = *(idk.begin());\r
+ res[ik+i0] = kk;\r
+ ids.erase(kk); idk.erase(ik);\r
+ }\r
+ }\r
+ delete []rr;\r
+}\r
+HMDT MGL_EXPORT mgl_data_connect(HCDT a, HCDT b)\r
+{\r
+ int nx = a->GetNx(), ny = a->GetNy(), nz = a->GetNz();\r
+ HMDT res = new mglData(nx,ny,nz);\r
+ for(long j=0;j<ny*nz;j++) for(long i=0;i<nx;i++) res->a[i+nx*j] = i;\r
+ for(long j=0;j<nz;j++)\r
+ {\r
+ if(j>0)\r
+ {\r
+ long i0 = nx*(ny-1+ny*j);\r
+ mgl_closest(res->a, nx, i0, i0-nx*ny, a, b);\r
+ }\r
+ for(long i=ny-1;i>0;i--) // TODO optimized for QHCU_dh case only!!!\r
+ {\r
+ long i0 = nx*(i+ny*j);\r
+ mgl_closest(res->a, nx, i0-nx, i0, a, b);\r
+ }\r
+ }\r
+ return res;\r
+}\r
+//-----------------------------------------------------------------------------\r
+uintptr_t MGL_EXPORT mgl_data_connect_(uintptr_t *a, uintptr_t *b)\r
+{ return uintptr_t(mgl_data_connect(_DA_(a),_DA_(b))); }\r
+//-----------------------------------------------------------------------------\r
+void MGL_EXPORT mgl_data_connect_r(HMDT a, HMDT b)\r
+{\r
+ int nx = a->GetNx(), ny = a->GetNy(), nz = a->GetNz();\r
+ HMDT res = mgl_data_connect(a,b);\r
+ mreal *buf = new mreal[2*nx];\r
+ for(long j=0;j<ny*nz;j++)\r
+ {\r
+ long i0 = nx*j;\r
+ memcpy(buf,a->a+i0,nx*sizeof(mreal));\r
+ memcpy(buf+nx,b->a+i0,nx*sizeof(mreal));\r
+ for(long i=0;i<nx;i++)\r
+ {\r
+ long i1 = res->a[i0+i];\r
+ a->a[i0+i1] = buf[i];\r
+ b->a[i0+i1] = buf[i+nx];\r
+ }\r
+ }\r
+ delete []buf; delete res;\r
+}\r
+//-----------------------------------------------------------------------------\r
+void MGL_EXPORT mgl_data_connect_r_(uintptr_t *a, uintptr_t *b)\r
+{ mgl_data_connect_r(_DM_(a),_DM_(b)); }\r
+//-----------------------------------------------------------------------------\r
void MGL_EXPORT mgl_data_rearrange_(uintptr_t *d, int *mx, int *my, int *mz)\r
{ mgl_data_rearrange(_DT_,*mx,*my,*mz); }\r
//-----------------------------------------------------------------------------\r
-MGL_EXPORT const char *mgl_data_get_id(HCDT d) { return d->id.s; }\r
+MGL_EXPORT_PURE const char *mgl_data_get_id(HCDT d) { return d->id.s; }\r
void MGL_EXPORT mgl_data_set_id(mglDataA *d, const char *ids) { d->id = ids; }\r
void MGL_EXPORT mgl_data_set_id_(uintptr_t *d, const char *eq,int l)\r
{ char *s=new char[l+1]; memcpy(s,eq,l); s[l]=0;\r
//-----------------------------------------------------------------------------\r
void MGL_EXPORT mgl_data_set_name_w(mglDataA *dat, const wchar_t *name)\r
{ dat->s = name; }\r
-MGL_EXPORT const wchar_t *mgl_data_get_name_w(HCDT dat)\r
+MGL_EXPORT_PURE const wchar_t *mgl_data_get_name_w(HCDT dat)\r
{ return dat->s.w; }\r
void MGL_EXPORT mgl_data_set_name(mglDataA *dat, const char *name)\r
{ MGL_TO_WCS(name,dat->Name(wcs)); }\r
#include <time.h>\r
#include <ctype.h>\r
\r
-#include "mgl2/data_cf.h"\r
+#include "mgl2/data.h"\r
#include "mgl2/eval.h"\r
\r
#if MGL_HAVE_GSL\r
//-----------------------------------------------------------------------------\r
mglFormula::~mglFormula()\r
{\r
- if(Left) delete Left;\r
- if(Right) delete Right;\r
+ if(tmp) delete tmp;\r
+ if(Left) delete Left;\r
+ if(Right) delete Right;\r
}\r
//-----------------------------------------------------------------------------\r
// Formula constructor (automatically parse and "compile" formula)\r
mglFormula::mglFormula(const char *string)\r
{\r
+ dat = tmp = NULL;\r
+ dx1=dy1=dz1=0; dx2=dy2=dz2=1;\r
#if MGL_HAVE_GSL\r
gsl_set_error_handler_off();\r
#endif\r
len-=2; str[len]=0;\r
}\r
len=strlen(str);\r
+ if(str[0]==':' && str[1]!=0) // this data file for interpolation\r
+ {\r
+ double sx1,sx2,sy1,sy2,sz1,sz2;\r
+ char *buf = strchr(str+1,':');\r
+ if(buf && *buf)\r
+ {\r
+ *buf = 0;\r
+ int r = sscanf(buf+1,"%lg:%lg:%lg:%lg:%lg:%lg",&sx1,&sx2,&sy1,&sy2,&sz1,&sz2);\r
+ if(r>1 && sx1!=sx2) { dx1=sx1; dx2=sx2; }\r
+ if(r>3 && sy1!=sy2) { dy1=sy1; dy2=sy2; }\r
+ if(r>5 && sz1!=sz2) { dz1=sz1; dz2=sz2; }\r
+ }\r
+ dat = tmp = new mglData(str+1);\r
+ delete []str; return;\r
+ }\r
n=mglFindInText(str,"&|"); // lowest priority -- logical\r
if(n>=0)\r
{\r
// evaluation of embedded (included) expressions\r
mreal mglFormula::CalcIn(const mreal *a1) const\r
{\r
+ if(dat)\r
+ {\r
+ mreal x = (a1['x'-'a']-dx1)*(dat->GetNx()-1)/(dx2-dx1);\r
+ mreal y = (a1['y'-'a']-dy1)*(dat->GetNy()-1)/(dy2-dy1);\r
+ mreal z = (a1['z'-'a']-dz1)*(dat->GetNz()-1)/(dz2-dz1);\r
+ return mgl_data_spline(dat,x,y,z);\r
+ }\r
if(Kod<EQ_LT)\r
{\r
if(Kod==EQ_RND) return mgl_rnd();\r
// evaluation of derivative of embedded (included) expressions\r
mreal mglFormula::CalcDIn(int id, const mreal *a1) const\r
{\r
+ if(dat)\r
+ {\r
+ mreal x = (a1['x'-'a']-dx1)*(dat->GetNx()-1)/(dx2-dx1);\r
+ mreal y = (a1['y'-'a']-dy1)*(dat->GetNy()-1)/(dy2-dy1);\r
+ mreal z = (a1['z'-'a']-dz1)*(dat->GetNz()-1)/(dz2-dz1);\r
+ mreal dx,dy,dz, res=0;\r
+ mgl_data_spline_ext(dat,x,y,z,&dx,&dy,&dz);\r
+ if(id=='x'-'a') res = dx/(dat->GetNx()-1)*(dx2-dx1);\r
+ if(id=='y'-'a') res = dy/(dat->GetNy()-1)*(dy2-dy1);\r
+ if(id=='z'-'a') res = dz/(dat->GetNz()-1)*(dz2-dz1);\r
+ return res;\r
+ }\r
if(Kod==EQ_A && id==(int)Res) return 1;\r
else if(Kod<EQ_LT) return 0;\r
double a = Left->CalcIn(a1), d = Left->CalcDIn(id,a1);\r
//-----------------------------------------------------------------------------\r
HMEX MGL_EXPORT mgl_create_expr(const char *expr) { return new mglFormula(expr); }\r
void MGL_EXPORT mgl_delete_expr(HMEX ex) { if(ex) delete ex; }\r
-double MGL_EXPORT mgl_expr_eval(HMEX ex, double x, double y,double z)\r
+double MGL_EXPORT_PURE mgl_expr_eval(HMEX ex, double x, double y,double z)\r
{ return ex->Calc(x,y,z); }\r
-double MGL_EXPORT mgl_expr_eval_v(HMEX ex, mreal *var)\r
+double MGL_EXPORT_PURE mgl_expr_eval_v(HMEX ex, mreal *var)\r
{ return ex->Calc(var); }\r
-double MGL_EXPORT mgl_expr_diff(HMEX ex, char dir, double x, double y,double z)\r
+double MGL_EXPORT_PURE mgl_expr_diff(HMEX ex, char dir, double x, double y,double z)\r
{ return ex->CalcD(dir,x,y,z); }\r
-double MGL_EXPORT mgl_expr_diff_v(HMEX ex, char dir, mreal *var)\r
+double MGL_EXPORT_PURE mgl_expr_diff_v(HMEX ex, char dir, mreal *var)\r
{ return ex->CalcD(var, dir); }\r
//-----------------------------------------------------------------------------\r
uintptr_t MGL_EXPORT mgl_create_expr_(const char *expr, int l)\r
uintptr_t res = uintptr_t(mgl_create_expr(s));\r
delete []s; return res; }\r
void MGL_EXPORT mgl_delete_expr_(uintptr_t *ex) { mgl_delete_expr((HMEX)ex); }\r
-double MGL_EXPORT mgl_expr_eval_(uintptr_t *ex, mreal *x, mreal *y, mreal *z)\r
+double MGL_EXPORT_PURE mgl_expr_eval_(uintptr_t *ex, mreal *x, mreal *y, mreal *z)\r
{ return mgl_expr_eval((HMEX) ex, *x,*y,*z); }\r
-double MGL_EXPORT mgl_expr_diff_(uintptr_t *ex, const char *dir, mreal *x, mreal *y, mreal *z, int)\r
+double MGL_EXPORT_PURE mgl_expr_diff_(uintptr_t *ex, const char *dir, mreal *x, mreal *y, mreal *z, int)\r
{ return mgl_expr_diff((HMEX) ex, *dir,*x,*y,*z); }\r
//-----------------------------------------------------------------------------\r
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *\r
***************************************************************************/\r
#include <time.h>\r
-#include "mgl2/data_cf.h"\r
-#include "mgl2/datac_cf.h"\r
+#include "mgl2/datac.h"\r
#include "mgl2/evalc.h"\r
#if MGL_HAVE_GSL\r
#include <gsl/gsl_sf.h>\r
//-----------------------------------------------------------------------------\r
mglFormulaC::~mglFormulaC()\r
{\r
- if(Left) delete Left;\r
- if(Right) delete Right;\r
+ if(tmp) delete tmp;\r
+ if(Left) delete Left;\r
+ if(Right) delete Right;\r
}\r
//-----------------------------------------------------------------------------\r
// Formula constructor (automatically parse and "compile" formula)\r
mglFormulaC::mglFormulaC(const char *string)\r
{\r
+ dat = tmp = NULL;\r
+ dx1=dy1=dz1=0; dx2=dy2=dz2=1;\r
Error=0;\r
Left=Right=0;\r
Res=0; Kod=0;\r
len-=2; str[len]=0;\r
}\r
len=strlen(str);\r
+ if(str[0]==':' && str[1]!=0) // this data file for interpolation\r
+ {\r
+ double sx1,sx2,sy1,sy2,sz1,sz2;\r
+ char *buf = strchr(str+1,':');\r
+ if(buf && *buf)\r
+ {\r
+ *buf = 0;\r
+ int r = sscanf(buf+1,"%lg:%lg:%lg:%lg:%lg:%lg",&sx1,&sx2,&sy1,&sy2,&sz1,&sz2);\r
+ if(r>1 && sx1!=sx2) { dx1=sx1; dx2=sx2; }\r
+ if(r>3 && sy1!=sy2) { dy1=sy1; dy2=sy2; }\r
+ if(r>5 && sz1!=sz2) { dz1=sz1; dz2=sz2; }\r
+ }\r
+ dat = tmp = new mglDataC(str+1);\r
+ delete []str; return;\r
+ }\r
n=mglFindInText(str,"<>="); // low priority -- conditions\r
if(n>=0)\r
{\r
// evaluation of embedded (included) expressions\r
dual mglFormulaC::CalcIn(const dual *a1) const\r
{\r
+ if(dat)\r
+ {\r
+ mreal x = (real(a1['x'-'a'])-dx1)*(dat->GetNx()-1)/(dx2-dx1);\r
+ mreal y = (real(a1['y'-'a'])-dy1)*(dat->GetNy()-1)/(dy2-dy1);\r
+ mreal z = (real(a1['z'-'a'])-dz1)*(dat->GetNz()-1)/(dz2-dz1);\r
+ return mgl_datac_spline(dat,x,y,z);\r
+ }\r
if(Kod<EQ_LT)\r
{\r
if(Kod==EQ_RND) return mgl_rnd();\r
}\r
cmdual MGL_EXPORT_CONST mgl_ipowc(mdual x,int n)\r
{ return mdual(mgl_ipowc_c(x,n)); }\r
-cmdual MGL_EXPORT mgl_ipowc_(mdual *x,int *n) { return mgl_ipowc(*x,*n); }\r
+cmdual MGL_EXPORT_PURE mgl_ipowc_(mdual *x,int *n) { return mgl_ipowc(*x,*n); }\r
//-----------------------------------------------------------------------------\r
HAEX MGL_EXPORT mgl_create_cexpr(const char *expr) { return new mglFormulaC(expr); }\r
uintptr_t MGL_EXPORT mgl_create_cexpr_(const char *expr, int l)\r
mgl_delete_datac(d); return r;
}
//-----------------------------------------------------------------------------
-bool mglCheck(std::wstring str)
+bool MGL_LOCAL_PURE mglCheck(std::wstring str)
{
long s = 0,i,n=str.length();
for(i=0;i<n;i++)
return (s==0) ? true : false;
}
//-----------------------------------------------------------------------------
-long mglFindInText(const std::wstring &str,const char *lst)
+long MGL_LOCAL_PURE mglFindInText(const std::wstring &str,const char *lst)
{
long l=0,r=0;
for(long i=str.length()-1;i>=0;i--)
long n,len=str.length();
if(str[0]=='(' && mglCheck(str.substr(1,len-2))) // remove braces
{ str = str.substr(1,len-2); len-=2; }
+ if(str[0]==':' && str[1]!=0) // this data file
+ {
+ size_t l=str.length()+1;
+ char *buf = new char[l]; memset(buf,0,l);
+ for(size_t i=1;str[i]!=0 && str[i]!=':' && i<l;i++) buf[i-1]=str[i];
+ HMDT res = new mglData(buf); delete []buf;
+ return res;
+ }
if(str[0]=='[') // this is manual subdata
{
long i, j, br=0,k;
return res;
}
//-----------------------------------------------------------------------------
+int static mgls_conts(mglGraph *, long , mglArg *a, const char *k, const char *)
+{
+ int res=0;
+ if(k[0]=='d' && a[0].d->temp) return 5;
+ mglData *d = dynamic_cast<mglData *>(a[0].d);
+ if(d && !strcmp(k,"dnd")) *d = mglData(true,mgl_data_conts(a[1].v,a[2].d));
+ else res = 1;
+ return res;
+}
+//-----------------------------------------------------------------------------
int static mgls_copy(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
return res;
}
//-----------------------------------------------------------------------------
+int static mgls_minmax(mglGraph *, long , mglArg *a, const char *k, const char *)
+{
+ int res=0;
+ if(k[0]=='d' && a[0].d->temp) return 5;
+ mglData *d = dynamic_cast<mglData *>(a[0].d);
+ if(d && !strcmp(k,"dd")) *d = mglData(true,mgl_data_minmax(a[1].d));
+ else res = 1;
+ return res;
+}
+//-----------------------------------------------------------------------------
+int static mgls_connect(mglGraph *, long , mglArg *a, const char *k, const char *)
+{
+ int res=0;
+// if(k[0]=='d' && a[0].d->temp) return 5;
+ mglData *d1 = dynamic_cast<mglData *>(a[0].d);
+ mglData *d2 = dynamic_cast<mglData *>(a[1].d);
+ if(d1 && !strcmp(k,"ddd")) *d1 = mglData(true,mgl_data_connect(a[1].d,a[2].d));
+ else if(d1 && d2 && !strcmp(k,"dd")) mgl_data_connect_r(d1,d2);
+ else res = 1;
+ return res;
+}
+//-----------------------------------------------------------------------------
int static mgls_fill(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
{"coil",_("Project periodical data in [v1,v2]"),"coil Dat v1 v2 [sep]", mgls_coil ,16},
{"column",_("Get data column filled by formula on column ids"),"column Res Dat 'eq'", mgls_column ,4},
{"combine",_("Direct multiplication of arrays"), "combine Res Adat Bdat", mgls_combine ,4},
+ {"connect",_("Get indexes or resort data for found connected surfaces dependent on j,k"),"connect Adat Bdat|Res Adat Bdat", mgls_connect ,4},
+ {"conts",_("Get contour lines for dat[i,j]=val, separated by NAN"),"conts Res val Dat", mgls_conts ,4},
{"copy",_("Copy data from another variable"),"copy Dat1 Dat2 ['eq']|ReDat ImDat Cdat|Dat val|Dat 'name'", mgls_copy ,4},
{"correl",_("Find correlation between data arrays"), "correl Res Adat Bdat 'dir'|Res Adat 'dir'", mgls_correl ,4},
{"cosfft",_("Cos-Fourier transform at some direction"),"cosfft Dat 'dir'", mgls_cosfft ,16},
{"evaluate",_("Evaluate (interpolate) values of array Dat at points i=idat,j=jdat,k=kdat"),"evaluate Res Dat Idat [norm]|Res Dat Idat Jdat [norm]|Res Dat Idat Jdat Kdat [norm]", mgls_evaluate ,4},
{"export",_("Export data to PNG file"),"export Dat 'fname' 'sch' [v1 v2]", mgls_export ,3},
{"extend",_("Extend data array"),"extend Dat dim1 [dim2]", mgls_extend ,3},
+ {"minmax",_("Get positions of local maximums and minimums"),"minmax Res Dat", mgls_minmax ,4},
{"fill",_("Fill data linearly in range [v1, v2]"),"fill Var v1 v2 ['dir']|Var 'eq' [Vdat Wdat]", mgls_fill ,3},
{"fillsample",_("Fill x-,k-samples for transforms"),"fillsample Var 'how'", mgls_fillsample ,3},
{"fit",_("Fit data to formula"),"fit Res A 'eq' 'var' [Ini]|Res X A 'eq' 'var' [Ini]|Res X Y A 'eq' 'var' [Ini]|Res X Y Z A 'eq' 'var' [Ini]", mgls_fit ,4},
else if(!strcmp(k,"dds")) gr->Plot(*(a[0].d),*(a[1].d),a[2].s.s,opt);
else if(!strcmp(k,"ddd")) gr->Plot(*(a[0].d),*(a[1].d),*(a[2].d),"",opt);
else if(!strcmp(k,"ddds")) gr->Plot(*(a[0].d),*(a[1].d),*(a[2].d),a[3].s.s,opt);
+ else if(!strcmp(k,"nns")) gr->Mark(mglPoint(a[0].v,a[1].v,NAN),a[2].s.s);
+ else if(!strcmp(k,"nnns")) gr->Mark(mglPoint(a[0].v,a[1].v,a[2].v),a[3].s.s);
else res = 1;
return res;
}
else if(!strcmp(k,"ddds")) gr->Cont(*(a[0].d), *(a[1].d), *(a[2].d), a[3].s.s,opt);
else if(!strcmp(k,"dddd")) gr->Cont(*(a[0].d), *(a[1].d), *(a[2].d), *(a[3].d), "",opt);
else if(!strcmp(k,"dddds")) gr->Cont(*(a[0].d), *(a[1].d), *(a[2].d), *(a[3].d), a[4].s.s,opt);
+ else if(!strcmp(k,"ndddd")) gr->ContGen(a[0].v, *(a[1].d), *(a[2].d), *(a[3].d), *(a[4].d),"",opt);
+ else if(!strcmp(k,"ndddds")) gr->ContGen(a[0].v, *(a[1].d), *(a[2].d), *(a[3].d), *(a[4].d), a[5].s.s,opt);
else res = 1;
return res;
}
else if(!strcmp(k,"ddds")) gr->ContF(*(a[0].d), *(a[1].d), *(a[2].d), a[3].s.s,opt);
else if(!strcmp(k,"dddd")) gr->ContF(*(a[0].d), *(a[1].d), *(a[2].d), *(a[3].d), "",opt);
else if(!strcmp(k,"dddds")) gr->ContF(*(a[0].d), *(a[1].d), *(a[2].d), *(a[3].d), a[4].s.s,opt);
+ else if(!strcmp(k,"nndddd")) gr->ContFGen(a[0].v, a[1].v, *(a[2].d), *(a[3].d), *(a[4].d), *(a[5].d),"",opt);
+ else if(!strcmp(k,"nndddds")) gr->ContFGen(a[0].v, a[1].v, *(a[2].d), *(a[3].d), *(a[4].d), *(a[5].d), a[6].s.s,opt);
else res = 1;
return res;
}
{"chart",_("Draw chart"),"chart Dat ['fmt']", mgls_chart ,7},
{"cloud",_("Draw cloud"),"cloud Adat ['fmt']|Xdat Ydat Zdat Adat ['fmt']", mgls_cloud ,9},
{"cones",_("Draw cones for 1D data"),"cones Ydat ['fmt' above]|Xdat Ydat ['fmt' above]|Xdat Ydat Zdat ['fmt' above]", mgls_cones ,7},
- {"cont",_("Draw contour lines"),"cont Zdat ['fmt' num zpos]|Vdat Zdat ['fmt' zpos]|Xdat Ydat Zdat ['fmt' num zpos]|Vdat Xdat Ydat Zdat ['fmt' zpos]", mgls_cont ,8},
+ {"cont",_("Draw contour lines"),"cont Zdat ['fmt']|Vdat Zdat ['fmt']|Xdat Ydat Zdat ['fmt']|Vdat Xdat Ydat Zdat ['fmt']|val Adat Xdat Ydat Zdat ['fmt']", mgls_cont ,8},
{"cont3",_("Draw contour lines for 3D data"),"cont3 Adat 'dir' [val 'fmt' num]|Vdat Adat 'dir' [val 'fmt']|Xdat Ydat Zdat Adat 'dir' [val 'fmt' num]|Vdat Xdat Ydat Zdar Adat 'dir' [val 'fmt']", mgls_cont3 ,9},
- {"contd",_("Draw solid contours with manual colors"),"contd Zdat ['fmt' num zpos]|Vdat Zdat ['fmt' zpos]|Xdat Ydat Zdat ['fmt' num zpos]|Vdat Xdat Ydat Zdat ['fmt' zpos]", mgls_contd ,8},
- {"contf",_("Draw solid contours"),"contf Zdat ['fmt' num zpos]|Vdat Zdat ['fmt' zpos]|Xdat Ydat Zdat ['fmt' num zpos]|Vdat Xdat Ydat Zdat ['fmt' zpos]", mgls_contf ,8},
+ {"contd",_("Draw solid contours with manual colors"),"contd Zdat ['fmt']|Vdat Zdat ['fmt']|Xdat Ydat Zdat ['fmt']|Vdat Xdat Ydat Zdat ['fmt']", mgls_contd ,8},
+ {"contf",_("Draw solid contours"),"contf Zdat ['fmt']|Vdat Zdat ['fmt']|Xdat Ydat Zdat ['fmt']|Vdat Xdat Ydat Zdat ['fmt']|v1 v2 Adat Xdat Ydat Zdat ['fmt']", mgls_contf ,8},
{"contf3",_("Draw solid contour lines for 3D data"),"contf3 Adat 'dir' [val 'fmt' num]|Vdat Adat 'dir' [val 'fmt']|Xdat Ydat Zdat Adat 'dir' [val 'fmt' num]|Vdat Xdat Ydat Zdar Adat 'dir' [val 'fmt']", mgls_contf3 ,9},
{"contfx",_("Draw solid contour lines at x-slice (or x-plane)"),"contfx Dat ['fmt' pos num]", mgls_contfx ,0},
{"contfy",_("Draw solid contour lines at y-slice (or y-plane)"),"contfy Dat ['fmt' pos num]", mgls_contfy ,0},
mreal mglFitChi=NAN; ///< Chi value for last fitted formula\r
mglData mglFitCovar; ///< Covar matrix for lat fitted formula\r
//-----------------------------------------------------------------------------\r
-mreal MGL_EXPORT mgl_get_fit_chi() { return mglFitChi; }\r
-mreal MGL_EXPORT mgl_get_fit_chi_() { return mglFitChi; }\r
+mreal MGL_EXPORT_PURE mgl_get_fit_chi() { return mglFitChi; }\r
+mreal MGL_EXPORT_PURE mgl_get_fit_chi_() { return mglFitChi; }\r
//-----------------------------------------------------------------------------\r
-HCDT MGL_EXPORT mgl_get_fit_covar() { return &mglFitCovar; }\r
-uintptr_t MGL_EXPORT mgl_get_fit_covar_() { return (uintptr_t)&mglFitCovar; }\r
+HCDT MGL_EXPORT_CONST mgl_get_fit_covar() { return &mglFitCovar; }\r
+uintptr_t MGL_EXPORT_CONST mgl_get_fit_covar_() { return (uintptr_t)&mglFitCovar; }\r
//-----------------------------------------------------------------------------\r
void MGL_EXPORT mgl_puts_fit(HMGL gr, double x, double y, double z, const char *pre, const char *font, double size)\r
{\r
uintptr_t r = (uintptr_t)mgl_hist_xyz(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(a), o);\r
delete []o; return r; }\r
//-----------------------------------------------------------------------------\r
-MGL_EXPORT const char *mgl_get_fit(HMGL ) { return mglFitRes; }\r
+MGL_EXPORT_CONST const char *mgl_get_fit(HMGL ) { return mglFitRes; }\r
int MGL_EXPORT mgl_get_fit_(uintptr_t *gr, char *out, int len)\r
{\r
const char *res = mgl_get_fit(_GR_);\r
mglFont mglDefFont;\r
#define MGL_USE_H12 {if(h1<y1) y1=h1; if(h2>y2) y2=h2; h1=1e5; h2=-1e5;}\r
//-----------------------------------------------------------------------------\r
-size_t MGL_EXPORT mgl_wcslen(const wchar_t *str)\r
+size_t MGL_EXPORT_PURE mgl_wcslen(const wchar_t *str)\r
{\r
long i=0;\r
if(str) while(str[i]) i++;\r
if(arg[1][1]==0 && (r>=0 && r<40))
{
if(a[1].type==0) { st.v = *(a[1].d); n=0; }
- else if(a[1].type==2 && a[2].type==2 && a[2].v>a[1].v)
+ else if(a[1].type==2 && a[2].type==2 && a[2].v>=a[1].v)
{
mreal step = a[3].type==2?a[3].v:1;
mm = int(step>0 ? (a[2].v-a[1].v)/step : 0);
void MGL_EXPORT mgl_parser_add_param(HMPR p, int id, const char *str) { p->AddParam(id,str); }
void MGL_EXPORT mgl_parser_add_paramw(HMPR p, int id, const wchar_t *str) { p->AddParam(id,str); }
MGL_EXPORT mglDataA *mgl_parser_add_var(HMPR p, const char *name) { return p->AddVar(name); }
-MGL_EXPORT mglDataA *mgl_parser_find_var(HMPR p, const char *name) { return p->FindVar(name);}
+MGL_EXPORT_PURE mglDataA *mgl_parser_find_var(HMPR p, const char *name) { return p->FindVar(name);}
void MGL_EXPORT mgl_parser_del_var(HMPR p, const char *name) { p->DeleteVar(name); }
MGL_EXPORT mglDataA *mgl_parser_add_varw(HMPR p, const wchar_t *name) { return p->AddVar(name); }
-MGL_EXPORT mglDataA *mgl_parser_find_varw(HMPR p, const wchar_t *name) { return p->FindVar(name);}
+MGL_EXPORT_PURE mglDataA *mgl_parser_find_varw(HMPR p, const wchar_t *name) { return p->FindVar(name);}
void MGL_EXPORT mgl_parser_del_varw(HMPR p, const wchar_t *name) { p->DeleteVar(name); }
int MGL_EXPORT mgl_parse_line(HMGL gr, HMPR p, const char *str, int pos)
{ return p->Parse(gr, str, pos); }
long MGL_EXPORT mgl_use_parser_(uintptr_t *p, int *inc)
{ _PR_->InUse+=*inc; return _PR_->InUse; }
//---------------------------------------------------------------------------
-MGL_EXPORT mglDataA *mgl_parser_get_var(HMPR p, unsigned long id)
+MGL_EXPORT_PURE mglDataA *mgl_parser_get_var(HMPR p, unsigned long id)
{ return id<p->DataList.size()?p->DataList[id]:0; }
-uintptr_t MGL_EXPORT mgl_parser_get_var_(uintptr_t* p, unsigned long *id)
+uintptr_t MGL_EXPORT_PURE mgl_parser_get_var_(uintptr_t* p, unsigned long *id)
{ return uintptr_t(mgl_parser_get_var(_PR_,*id)); }
-long MGL_EXPORT mgl_parser_num_var(HMPR p)
+long MGL_EXPORT_PURE mgl_parser_num_var(HMPR p)
{ return p->DataList.size(); }
-long MGL_EXPORT mgl_parser_num_var_(uintptr_t* p)
+long MGL_EXPORT_PURE mgl_parser_num_var_(uintptr_t* p)
{ return mgl_parser_num_var(_PR_); }
-long MGL_EXPORT mgl_parser_num_const(HMPR p)
+long MGL_EXPORT_PURE mgl_parser_num_const(HMPR p)
{ return p->NumList.size(); }
-long MGL_EXPORT mgl_parser_num_const_(uintptr_t* p)
+long MGL_EXPORT_PURE mgl_parser_num_const_(uintptr_t* p)
{ return mgl_parser_num_const(_PR_); }
-MGL_EXPORT mglNum *mgl_parser_get_const(HMPR p, unsigned long id)
+MGL_EXPORT_PURE mglNum *mgl_parser_get_const(HMPR p, unsigned long id)
{ return id<p->NumList.size()?p->NumList[id]:0; }
-uintptr_t MGL_EXPORT mgl_parser_get_const_(uintptr_t* p, unsigned long *id)
+uintptr_t MGL_EXPORT_PURE mgl_parser_get_const_(uintptr_t* p, unsigned long *id)
{ return uintptr_t(mgl_parser_get_const(_PR_,*id)); }
//---------------------------------------------------------------------------
-int MGL_EXPORT mgl_parser_cmd_type(HMPR pr, const char *name)
+int MGL_EXPORT_PURE mgl_parser_cmd_type(HMPR pr, const char *name)
{
const mglCommand *cmd = pr->FindCommand(name);
return cmd ? cmd->type + 1 : 0;
}
-int MGL_EXPORT mgl_parser_cmd_type_(uintptr_t* p, const char *str, int l)
+int MGL_EXPORT_PURE mgl_parser_cmd_type_(uintptr_t* p, const char *str, int l)
{ char *s=new char[l+1]; memcpy(s,str,l); s[l]=0;
l = mgl_parser_cmd_type(_PR_, s); delete []s; return l; }
//---------------------------------------------------------------------------
-MGL_EXPORT const char *mgl_parser_cmd_desc(HMPR pr, const char *name)
+MGL_EXPORT_PURE const char *mgl_parser_cmd_desc(HMPR pr, const char *name)
{
const mglCommand *cmd = pr->FindCommand(name);
return cmd ? cmd->desc : 0;
}
-MGL_EXPORT const char *mgl_parser_cmd_frmt(HMPR pr, const char *name)
+MGL_EXPORT_PURE const char *mgl_parser_cmd_frmt(HMPR pr, const char *name)
{
const mglCommand *cmd = pr->FindCommand(name);
return cmd ? cmd->form : 0;
}
//---------------------------------------------------------------------------
-MGL_EXPORT const char *mgl_parser_cmd_name(HMPR pr, long id)
+MGL_EXPORT_PURE const char *mgl_parser_cmd_name(HMPR pr, long id)
{ return (id<mgl_parser_cmd_num(pr) && id>=0) ? pr->Cmd[id].name:""; }
-long MGL_EXPORT mgl_parser_cmd_num(HMPR pr)
+long MGL_EXPORT_PURE mgl_parser_cmd_num(HMPR pr)
{ long i=0; while(pr->Cmd[i].name[0]) i++; return i; }
//---------------------------------------------------------------------------
HMDT MGL_EXPORT mgl_parser_calc(HMPR pr, const char *formula)
double cc=gr->NextColor(pal,i);\r
if(i>0 && i<np-1) { nn.x=(pp[i-1].p.y-pp[i+1].p.y)/2; nn.y=(pp[i+1].p.x-pp[i-1].p.x)/2; }\r
else if(i==np-1) { nn.x=pp[np-2].p.y-pp[np-1].p.y; nn.y=pp[np-1].p.x-pp[np-2].p.x; }\r
- gr->AddPntQ(kq+2*i,pp[i].p, sh?cc:c1,nn,-1,27); pp[i].p.z = z0;\r
- gr->AddPntQ(kq+2*i+1,pp[i].p, sh?cc:c2,nn,-1,27);\r
+ bool r1 = gr->AddPntQ(kq+2*i,pp[i].p, sh?cc:c1,nn,-1,27); pp[i].p.z = z0;\r
+ bool r2 = gr->AddPntQ(kq+2*i+1,pp[i].p, sh?cc:c2,nn,-1,27);\r
+ if(!r1 && !r2) { gr->DisablePnt(kq+2*i); gr->DisablePnt(kq+2*i+1); }\r
}\r
for(size_t i=1;i<np;i++)\r
{\r
for(msize i=0;i<np;i++)\r
{\r
double cc=gr->NextColor(pal,i);\r
- gr->AddPntQ(kq+2*i,pp[i].p, sh?cc:c1,nn,-1,27); pp[i].p.y = y0;\r
- gr->AddPntQ(kq+2*i+1,pp[i].p, sh?cc:c2,nn,-1,27);\r
+ bool r1 = gr->AddPntQ(kq+2*i,pp[i].p, sh?cc:c1,nn,-1,27); pp[i].p.y = y0;\r
+ bool r2 = gr->AddPntQ(kq+2*i+1,pp[i].p, sh?cc:c2,nn,-1,27);\r
+ if(!r1 && !r2) { gr->DisablePnt(kq+2*i); gr->DisablePnt(kq+2*i+1); }\r
}\r
if(wire) gr->line_plot(kq,kq+1);\r
for(size_t i=1;i<np;i++)\r
for(msize i=0;i<np;i++)\r
{\r
double cc=gr->NextColor(pal,i);\r
- gr->AddPntQ(kq+2*i,pp[i].p1, sh?cc:c1,nn,-1,27);\r
- gr->AddPntQ(kq+2*i+1,pp[i].p2, sh?cc:c2,nn,-1,27);\r
+ bool r1 = gr->AddPntQ(kq+2*i,pp[i].p1, sh?cc:c1,nn,-1,27);\r
+ bool r2 = gr->AddPntQ(kq+2*i+1,pp[i].p2, sh?cc:c2,nn,-1,27);\r
+ if(!r1 && !r2) { gr->DisablePnt(kq+2*i); gr->DisablePnt(kq+2*i+1); }\r
}\r
if(wire) gr->line_plot(kq,kq+1);\r
for(size_t i=1;i<np;i++)\r
for(msize i=0;i<np;i++)\r
{\r
double cc=gr->NextColor(pal,i);\r
- gr->AddPntQ(kq+2*i,pp[i].p1, sh?cc:c1,nn,-1,27);\r
- gr->AddPntQ(kq+2*i+1,pp[i].p2, sh?cc:c2,nn,-1,27);\r
+ bool r1 = gr->AddPntQ(kq+2*i,pp[i].p1, sh?cc:c1,nn,-1,27);\r
+ bool r2 = gr->AddPntQ(kq+2*i+1,pp[i].p2, sh?cc:c2,nn,-1,27);\r
+ if(!r1 && !r2) { gr->DisablePnt(kq+2*i); gr->DisablePnt(kq+2*i+1); }\r
}\r
if(wire) gr->line_plot(kq,kq+1);\r
for(size_t i=1;i<np;i++)\r
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>(gr);\r
mglPoint p; if(g) p=g->GetMousePos();\r
*x=p.x; *y=p.y; *z=p.z; }\r
+MGL_EXPORT void *mgl_wnd_window(HMGL gr)\r
+{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>(gr); return g?g->Window():NULL; }\r
+MGL_EXPORT void *mgl_wnd_widget(HMGL gr)\r
+{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>(gr); return g?g->Widget():NULL; }\r
+/// Move window to given position\r
+void MGL_EXPORT mgl_wnd_move(HMGL gr, int x, int y)\r
+{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>(gr); if(g) g->WndMove(x,y); }\r
+void MGL_EXPORT mgl_wnd_move_(uintptr_t *gr, int *x, int *y)\r
+{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>((HMGL)(*gr)); if(g) g->WndMove(*x,*y); }\r
+/// Change window sizes\r
+void MGL_EXPORT mgl_wnd_size(HMGL gr, int w, int h)\r
+{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>(gr); if(g) g->WndSize(w,h); }\r
+void MGL_EXPORT mgl_wnd_size_(uintptr_t *gr, int *w, int *h)\r
+{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>((HMGL)(*gr)); if(g) g->WndSize(*w,*h); }\r
//-----------------------------------------------------------------------------\r
void MGL_EXPORT mgl_wnd_toggle_alpha_(uintptr_t *gr)\r
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>((HMGL)(*gr));\r
mgl_parse_comments(text, a1, a2, da, anim, ids, par);\r
}\r
//-----------------------------------------------------------------------------\r
+#undef _GR_\r
+#define _GR_ ((mglCanvas *)(*gr))\r
+void MGL_EXPORT mgl_wnd_set_delay(HMGL gr, double dt)\r
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetDelay(dt); }\r
+double MGL_EXPORT_PURE mgl_wnd_get_delay(HMGL gr)\r
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); return g?g->GetDelay():0; }\r
+void MGL_EXPORT mgl_wnd_set_delay_(uintptr_t *gr, mreal *dt) { _GR_->SetDelay(*dt); }\r
+double MGL_EXPORT_PURE mgl_wnd_get_delay_(uintptr_t *gr) { return _GR_->GetDelay(); }\r
+//-----------------------------------------------------------------------------\r
MGL_EXPORT const char *mgl_hints[] = {\r
_("You can shift axis range by pressing middle button and moving mouse. Also, you can zoom in/out axis range by using mouse wheel."),\r
_("You can rotate/shift/zoom whole plot by mouse. Just press 'Rotate' toolbutton, click image and hold a mouse button: left button for rotation, right button for zoom/perspective, middle button for shift."),\r
#set(MGL_EXTRA light pendelta)
set(MGL_EXTRA )
set(MGL_PNG_ONLY quality0 quality1 quality2 quality4 quality5 quality6 quality8 pendelta fexport)
-set(MGL_PNG 3wave alpha apde area aspect axial axis barh bars belt bifurcation box boxplot boxs candle chart cloud colorbar combined cones cont cont_xyz cont3 contd contf contf_xyz contf3 contv correl curvcoor cut dat_diff dat_extra data1 data2 dens dens_xyz dens3 detect dew diffract dilate dots earth error error2 export fall fit flame2d flow flow3 fog fonts grad hist ifs2d ifs3d indirect inplot iris label lamerey legend light loglog map mark mask mesh mirror molecule ode ohlc param1 param2 param3 paramv parser pde pipe plot pmap primitives projection projection5 pulse qo2d radar refill region scanfile schemes section several_light solve stem step stereo stfa style surf surf3 surf3a surf3c surf3ca surfa surfc surfca table tape tens ternary text text2 textmark ticks tile tiles torus traj triangulation triplot tube type0 type1 type2 vect vect3 venn )
+set(MGL_PNG 3wave alpha apde area aspect axial axis barh bars belt bifurcation box boxplot boxs candle chart cloud colorbar combined cones cont cont_xyz cont3 contd contf contf_xyz contf3 conts contv correl curvcoor cut dat_diff dat_extra data1 data2 dens dens_xyz dens3 detect dew diffract dilate dots earth error error2 export fall fit flame2d flow flow3 fog fonts grad hist ifs2d ifs3d indirect inplot iris label lamerey legend light loglog map mark mask mesh minmax mirror molecule ode ohlc param1 param2 param3 paramv parser pde pipe plot pmap primitives projection projection5 pulse qo2d radar refill region scanfile schemes section several_light solve stem step stereo stfa style surf surf3 surf3a surf3c surf3ca surfa surfc surfca table tape tens ternary text text2 textmark ticks tile tiles torus traj triangulation triplot tube type0 type1 type2 vect vect3 venn )
set(MGL_PNG_N )
set(MGL_PNG_S )
set(MGL_PNG_J )
The same as previous with vector @var{v} of @var{num}-th elements equidistantly distributed in color range. Here @var{num} is equal to parameter @code{value} in options @var{opt} (default is 7). If string @var{sch} contain symbol @samp{.} then only contours at levels with saddle points will be drawn.
@end deftypefn
+@deftypefn {MGL command} {} cont @code{val} adat xdat ydat zdat ['sch'='']
+@ifclear UDAV
+@deftypefnx {Method on @code{mglGraph}} @code{void} ContGen (@code{mreal} val, @code{const mglDataA &}a, @code{const mglDataA &}x, @code{const mglDataA &}y, @code{const mglDataA &}z, @code{const char *}sch=@code{""}, @code{const char *}opt=@code{""})
+@deftypefnx {C function} @code{void} mgl_cont_gen (@code{HMGL} gr, @code{mreal} val, @code{HCDT} a, @code{HCDT} x, @code{HCDT} y, @code{HCDT} z, @code{const char *}sch, @code{const char *}opt)
+@end ifclear
+Draws contour lines for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} at @var{a}[i,j]=@var{val}. If string @var{sch} have symbol @samp{t} or @samp{T} then contour labels @var{v}[k] will be drawn below (or above) the contours.
+@end deftypefn
+
@anchor{contf}
@deftypefn {MGL command} {} contf vdat zdat ['sch'='']
@deftypefnx {MGL command} {} contf vdat xdat ydat zdat ['sch'='']
The same as previous with vector @var{v} of @var{num}-th elements equidistantly distributed in color range. Here @var{num} is equal to parameter @code{value} in options @var{opt} (default is 7).
@end deftypefn
+@deftypefn {MGL command} {} contf @code{v1 v2} adat xdat ydat zdat ['sch'='']
+@ifclear UDAV
+@deftypefnx {Method on @code{mglGraph}} @code{void} ContFGen (@code{mreal} v1, @code{mreal} v2, @code{const mglDataA &}a, @code{const mglDataA &}x, @code{const mglDataA &}y, @code{const mglDataA &}z, @code{const char *}sch=@code{""}, @code{const char *}opt=@code{""})
+@deftypefnx {C function} @code{void} mgl_contf_gen (@code{HMGL} gr, @code{mreal} v1, @code{mreal} v2, @code{HCDT} a, @code{HCDT} x, @code{HCDT} y, @code{HCDT} z, @code{const char *}sch, @code{const char *}opt)
+@end ifclear
+Draws solid (or filled) contour lines for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} between @var{a}[i,j]=@var{v1} and @var{a}[i,j]=@var{v2}.
+@end deftypefn
+
@anchor{contd}
@deftypefn {MGL command} {} contd vdat zdat ['sch'='']
@deftypefnx {MGL command} {} contd vdat xdat ydat zdat ['sch'='']
Как предыдущий с вектором @var{v} из @var{num} элементов равно распределенных в диапазоне изменения цвета. Здесь @var{num} равен значению параметра @code{value} в опциях @var{opt} (по умолчанию 7). Если @var{sch} содержит @samp{.}, то будут строится только контуры по уровням седловых точек.
@end deftypefn
+@deftypefn {Команда MGL} {} cont @code{val} adat xdat ydat zdat ['sch'='']
+@ifclear UDAV
+@deftypefnx {Метод класса @code{mglGraph}} @code{void} ContGen (@code{mreal} val, @code{const mglDataA &}a, @code{const mglDataA &}x, @code{const mglDataA &}y, @code{const mglDataA &}z, @code{const char *}sch=@code{""}, @code{const char *}opt=@code{""})
+@deftypefnx {Функция С} @code{void} mgl_cont_gen (@code{HMGL} gr, @code{mreal} val, @code{HCDT} a, @code{HCDT} x, @code{HCDT} y, @code{HCDT} z, @code{const char *}sch, @code{const char *}opt)
+@end ifclear
+Рисует линии уровня для параметрически заданной поверхности @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} при @var{a}[i,j]=@var{val}. Если @var{sch} содержит @samp{t} или @samp{T}, то значения @var{v}[k] будут выведены вдоль контуров над (или под) кривой.
+@end deftypefn
+
@anchor{contf}
@deftypefn {Команда MGL} {} contf vdat zdat ['sch'='']
@deftypefnx {Команда MGL} {} contf vdat xdat ydat zdat ['sch'='']
Как предыдущий с вектором @var{v} из @var{num} элементов равно распределенных в диапазоне изменения цвета. Здесь @var{num} равен значению параметра @code{value} в опциях @var{opt} (по умолчанию 7).
@end deftypefn
+@deftypefn {Команда MGL} {} contf @code{v1 v2} adat xdat ydat zdat ['sch'='']
+@ifclear UDAV
+@deftypefnx {Метод класса @code{mglGraph}} @code{void} ContFGen (@code{mreal} v1, @code{mreal} v2, @code{const mglDataA &}a, @code{const mglDataA &}x, @code{const mglDataA &}y, @code{const mglDataA &}z, @code{const char *}sch=@code{""}, @code{const char *}opt=@code{""})
+@deftypefnx {Функция С} @code{void} mgl_contf_gen (@code{HMGL} gr, @code{mreal} v1, @code{mreal} v2, @code{HCDT} a, @code{HCDT} x, @code{HCDT} y, @code{HCDT} z, @code{const char *}sch, @code{const char *}opt)
+@end ifclear
+Рисует закрашенные линии (контуры) уровня для параметрически заданной поверхности @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} между @var{a}[i,j]=@var{v1} и @var{a}[i,j]=@var{v2}.
+@end deftypefn
+
@anchor{contd}
@deftypefn {Команда MGL} {} contd vdat zdat ['sch'='']
@deftypefnx {Команда MGL} {} contd vdat xdat ydat zdat ['sch'='']
@end deftypefn
@anchor{flow3}
-@deftypefn {MGL command} {} flow3 udat vdat wdat ['sch'='']
-@deftypefnx {MGL command} {} flow3 xdat ydat zdat udat vdat ['sch'='']
+@deftypefn {Команда MGL} {} flow3 udat vdat wdat ['sch'='']
+@deftypefnx {Команда MGL} {} flow3 xdat ydat zdat udat vdat ['sch'='']
@ifclear UDAV
-@deftypefnx {Method on @code{mglGraph}} @code{void} Flow3 (@code{const mglDataA &}ax, @code{const mglDataA &}ay, @code{const mglDataA &}az, @code{const char *}sch=@code{""}, @code{double} sVal=@code{-1}, @code{const char *}opt=@code{""})
-@deftypefnx {Method on @code{mglGraph}} @code{void} Flow3 (@code{const mglDataA &}x, @code{const mglDataA &}y, @code{const mglDataA &}z, @code{const mglDataA &}ax, @code{const mglDataA &}ay, @code{const mglDataA &}az, @code{const char *}sch=@code{""}, @code{double} sVal=@code{-1}, @code{const char *}opt=@code{""})
-@deftypefnx {C function} @code{void} mgl_flow3 (@code{HMGL} gr, @code{HCDT} ax, @code{HCDT} ay, @code{HCDT} az, @code{const char *}sch, @code{double} sVal, @code{const char *}opt)
-@deftypefnx {C function} @code{void} mgl_flow3_xyz (@code{HMGL} gr, @code{HCDT} x, @code{HCDT} y, @code{HCDT} z, @code{HCDT} ax, @code{HCDT} ay, @code{HCDT} az, @code{const char *}sch, @code{double} sVal, @code{const char *}opt)
+@deftypefnx {Метод класса @code{mglGraph}} @code{void} Flow3 (@code{const mglDataA &}ax, @code{const mglDataA &}ay, @code{const mglDataA &}az, @code{const char *}sch=@code{""}, @code{double} sVal=@code{-1}, @code{const char *}opt=@code{""})
+@deftypefnx {Метод класса @code{mglGraph}} @code{void} Flow3 (@code{const mglDataA &}x, @code{const mglDataA &}y, @code{const mglDataA &}z, @code{const mglDataA &}ax, @code{const mglDataA &}ay, @code{const mglDataA &}az, @code{const char *}sch=@code{""}, @code{double} sVal=@code{-1}, @code{const char *}opt=@code{""})
+@deftypefnx {Функция С} @code{void} mgl_flow3 (@code{HMGL} gr, @code{HCDT} ax, @code{HCDT} ay, @code{HCDT} az, @code{const char *}sch, @code{double} sVal, @code{const char *}opt)
+@deftypefnx {Функция С} @code{void} mgl_flow3_xyz (@code{HMGL} gr, @code{HCDT} x, @code{HCDT} y, @code{HCDT} z, @code{HCDT} ax, @code{HCDT} ay, @code{HCDT} az, @code{const char *}sch, @code{double} sVal, @code{const char *}opt)
@end ifclear
The function draws flow threads for the 3D vector field @{@var{ax}, @var{ay}, @var{az}@} parametrically depending on coordinates @var{x}, @var{y}, @var{z}. Flow threads starts from given plane. Option @code{value} set the approximate number of threads (default is 5). String @var{sch} may contain:
@itemize @bullet
Gets array which is the maximal data values in given direction or direction(s). Function return NULL or create empty data if data cannot be created for given arguments.
@end deftypefn
+@anchor{minmax}
+@deftypefn {MGL command} {} minmax @sc{res} dat
+@ifclear UDAV
+@deftypefnx {Method on @code{mglData}} @code{mglData} MinMax () @code{const}
+@deftypefnx {C function} @code{HMDT} mgl_data_minmax (@code{HCDT} dat)
+@end ifclear
+Gets positions of local maximums and minimums. Function return NULL or create empty data if there is no minimums and maximums.
+@end deftypefn
+
+@anchor{conts}
+@deftypefn {MGL command} {} conts @sc{res} @code{val} dat
+@ifclear UDAV
+@deftypefnx {Method on @code{mglData}} @code{mglData} Conts (@code{mreal} val) @code{const}
+@deftypefnx {C function} @code{HMDT} mgl_data_conts (@code{mreal} val, @code{HCDT} dat)
+@end ifclear
+Gets coordinates of contour lines for dat[i,j]=val. NAN values separate the the curves. Function return NULL or create empty data if there is contour lines.
+@end deftypefn
+
@anchor{combine}
@deftypefn {MGL command} {} combine @sc{res} adat bdat
@ifclear UDAV
Возвращает минимальное значение данных вдоль направления(ий) @var{dir}. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
@end deftypefn
+@anchor{minmax}
+@deftypefn {Команда MGL} {} minmax @sc{res} dat
+@ifclear UDAV
+@deftypefnx {Метод класса @code{mglData}} @code{mglData} MinMax () @code{const}
+@deftypefnx {Функция С} @code{HMDT} mgl_data_minmax (@code{HCDT} dat)
+@end ifclear
+Возвращает положение локальных минимумов и максимумов. Функция возвращает NULL или пустой массив если минимумов и максимумов нет.
+@end deftypefn
+
+@anchor{conts}
+@deftypefn {Команда MGL} {} conts @sc{res} @code{val} dat
+@ifclear UDAV
+@deftypefnx {Метод класса @code{mglData}} @code{mglData} Conts (@code{mreal} val) @code{const}
+@deftypefnx {Функция С} @code{HMDT} mgl_data_conts (@code{mreal} val, @code{HCDT} dat)
+@end ifclear
+Возвращает координаты линий уровня для dat[i,j]=val. Кривые разделяются NAN. Функция возвращает NULL или пустой массив если линий уровня нет.
+@end deftypefn
+
@anchor{combine}
@deftypefn {Команда MGL} {} combine @sc{res} adat bdat
@ifclear UDAV
\input texinfo
-@c @documentencoding UTF-8
+@documentencoding UTF-8
@documentlanguage ru
@setfilename mathgl_ru.info
\input texinfo
@documentencoding UTF-8
-@c @documentlanguage ru
+@documentlanguage ru
@setfilename mgl_ru.info
@documentencoding UTF-8
@set VERSION ${MathGL_VERSION_MAJOR}.${MathGL_VERSION_MINOR}.${MathGL_PATCH_VERSION}
-@c @set MINVER
-@set MINVER .1
+@set MINVER
+@c @set MINVER .1
@set NIGHT ${MGL_NIGHT}
@strong{Latest news}
@itemize
-@item @strong{14 March 2018.}
-New version (v.2.4.3) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are new @ref{clabel} command for drawing colorbar labels, EPS output now may have @ref{mask}, compatibility changes for complex numbers, and many other improvements.
+@item @strong{8 July 2019.}
+New version (v.2.4.4) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are new @ref{minmax} for positions of local minimums and maximums, add @ref{conts} for coordinates of contour lines, extend formula evaluation to read and interpolate data files.
@item @emph{17 May 2017.}
New version (v.2.4) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are @code{mgllab} executable, string manipulation in MGL, new functions, plot types and styles, translation to Russian using @code{gettext} and bugfixes, which denoted @ref{News, here}.
@itemize
+@item @strong{8 July 2019}
+New version (v.2.4.4) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released.
+@itemize @bullet
+@item Add @ref{minmax} for positions of local maximums and minimums.
+@item Add ContGen() and ContFGen() to draw contour lines manually. Correspondingly @ref{cont} and @ref{contf} commands are extended.
+@item Add @ref{conts} for coordinate of contour lines.
+@item Extend @ref{put} for partial filling if data size(s) are smaller as destination.
+@item Classes mglFormula and mglFormulaC now can read file with given sizes if string have the format ":fname:x1:x2:y1:y2:z1:z2". Here data is supposed in range [x1,x2]*[y1,y2]*[z1,z2] (by default [0,1]*[0,1]*[0,1]). Calc() in this case return the interpolated values.
+@item mglData now have operator() which work as SubData() function.
+@item Minor bugfixes.
+@end itemize
+
@item @strong{14 March 2019}
New version (v.2.4.3) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released.
@itemize @bullet
@strong{Latest news}
@itemize
-@item @strong{14 March 2018.}
-New version (v.2.4.3) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are new @ref{clabel} command for drawing colorbar labels, EPS output now may have @ref{mask}, compatibility changes for complex numbers, and many other improvements.
+@item @strong{8 July 2019.}
+New version (v.2.4.4) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are new @ref{minmax} for positions of local minimums and maximums, add @ref{conts} for coordinates of contour lines, extend formula evaluation to read and interpolate data files.
@item @emph{17 May 2017.}
New version (v.2.4) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are @code{mgllab} executable, string manipulation in MGL, new functions, plot types and styles, translation to Russian using @code{gettext} and bugfixes, which denoted @ref{News, here}.
@itemize
+@item @strong{8 July 2019}
+New version (v.2.4.4) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released.
+@itemize @bullet
+
+@item Add @ref{minmax} for positions of local maximums and minimums.
+@item Add ContGen() and ContFGen() to draw contour lines manually. Correspondingly @ref{cont} and @ref{contf} commands are extended.
+@item Add @ref{conts} for coordinate of contour lines.
+@item Extend @ref{put} for partial filling if data size(s) are smaller as destination.
+@item Classes mglFormula and mglFormulaC now can read file with given sizes if string have the format ":fname:x1:x2:y1:y2:z1:z2". Here data is supposed in range [x1,x2]*[y1,y2]*[z1,z2] (by default [0,1]*[0,1]*[0,1]). Calc() in this case return the interpolated values.
+@item mglData now have operator() which work as SubData() function.
+@item Minor bugfixes.
+@end itemize
+
@item @strong{14 March 2019}
New version (v.2.4.3) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released.
@itemize @bullet
4. "latex on" option ?!?
5. Add "text3d x y z lx ly lz nx ny nz 'txt' ['stl'='' depth=0.1 depth2=nan]"
6. Flag to determine discontinuous surfaces in 'fsurf'
-
7. Add PGM|PPM export (see https://en.wikipedia.org/wiki/Netpbm_format)
8. Check title & rasterize
+10. mgltask -- add $3-loop, $R=formula for R=4,...,9,0,A,...,Z
+11. mgl.cgi -- add log-file{IP,time,script}, add file-password (enable I/O if pass is the same as in a file)
+12. Chord diagram
+13. Calendar diagram -- 1D data as dens for 7-row (day) or 12-row (months) + divisions at month or year
+14. Dendrogram ???
+15. Voronoi diagram ??? -- triangulation + coloring by point
+16. Sankey diagram ???
+
+* Add 'connect' for connecting points to set of surfaces
+
+
+
ZZ. Update *.i for new functions {before release!!!}
curve_draw: step?, bifurcation?, flow3d
3. Docs about mgllab (overview, dialogs, ...)
4. Example of Evaluate + ".mx" ???
+8. 'connect'
+
+
ZZ. Update time.texi {before release!!!}
как начать пользоваться (quickstart)
char buf[1024], *ptr;
while ( !feof(fp) )
{
- fgets(buf, 1024, fp);
+ if(!fgets(buf, 1024, fp)) break;
// first filter unwanted strings
if ( buf[0] == 0 || buf[0] == '\n' || buf[1] == '\n' )
{
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<!-- This manual is for MathGL (version 2.4.3), a collection of classes and routines for scientific plotting. Please report any errors in this manual to mathgl.abalakin@gmail.org.
-
-Copyright (C) 2008-2012 Alexey A. Balakin.
-
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
-Texts. A copy of the license is included in the section entitled "GNU
-Free Documentation License."
- -->
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
-<head><link rel="stylesheet" href="styles.css">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>MathGL 2.4.3</title>
-
-<meta name="description" content="MathGL 2.4.3">
-<meta name="keywords" content="MathGL 2.4.3">
-<meta name="resource-type" content="document">
-<meta name="distribution" content="global">
-<meta name="Generator" content="texi2any">
-<link href="#Top" rel="start" title="Top">
-<link href="#Index" rel="index" title="Index">
-<link href="#SEC_Contents" rel="contents" title="Table of Contents">
-<link href="dir.html#Top" rel="up" title="(dir)">
-<style type="text/css">
-<!--
-a.summary-letter {text-decoration: none}
-blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
-div.display {margin-left: 3.2em}
-div.example {margin-left: 3.2em}
-div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
-kbd {font-style: oblique}
-pre.display {font-family: inherit}
-pre.format {font-family: inherit}
-pre.menu-comment {font-family: serif}
-pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
-span.nolinebreak {white-space: nowrap}
-span.roman {font-family: initial; font-weight: normal}
-span.sansserif {font-family: sans-serif; font-weight: normal}
-ul.no-bullet {list-style: none}
--->
-</style>
-
-
-</head>
-
-<body lang="en"><div class="topnav" id="myTopnav"></div><div class="main">
-<h1 class="settitle" align="center">MathGL 2.4.3</h1>
-
-
-
-
-<a name="SEC_Contents"></a>
-<h2 class="contents-heading">Table of Contents</h2>
-
-<div class="contents">
-
-<ul class="no-bullet">
- <li><a name="toc-Overview-1" href="#Overview">1 Overview</a>
- <ul class="no-bullet">
- <li><a name="toc-What-is-MathGL_003f-1" href="#What-is-MathGL_003f">1.1 What is MathGL?</a></li>
- <li><a name="toc-MathGL-features-1" href="#MathGL-features">1.2 MathGL features</a></li>
- <li><a name="toc-Installation-1" href="#Installation">1.3 Installation</a></li>
- <li><a name="toc-Quick-guide-1" href="#Quick-guide">1.4 Quick guide</a></li>
- <li><a name="toc-Changes-from-v_002e1_002e_002a" href="#Changes-from-v_002e1">1.5 Changes from v.1.*</a></li>
- <li><a name="toc-Utilities-for-parsing-MGL" href="#Utilities">1.6 Utilities for parsing MGL</a></li>
- <li><a name="toc-Thanks-1" href="#Thanks">1.7 Thanks</a></li>
- </ul></li>
- <li><a name="toc-MathGL-examples" href="#Examples">2 MathGL examples</a>
- <ul class="no-bullet">
- <li><a name="toc-Basic-usage-1" href="#Basic-usage">2.1 Basic usage</a>
- <ul class="no-bullet">
- <li><a name="toc-Using-MathGL-window-1" href="#Using-MathGL-window">2.1.1 Using MathGL window</a></li>
- <li><a name="toc-Drawing-to-file-1" href="#Drawing-to-file">2.1.2 Drawing to file</a></li>
- <li><a name="toc-Animation-1" href="#Animation">2.1.3 Animation</a></li>
- <li><a name="toc-Drawing-in-memory-1" href="#Drawing-in-memory">2.1.4 Drawing in memory</a></li>
- <li><a name="toc-Draw-and-calculate-1" href="#Draw-and-calculate">2.1.5 Draw and calculate</a></li>
- <li><a name="toc-Using-QMathGL-1" href="#Using-QMathGL">2.1.6 Using QMathGL</a></li>
- <li><a name="toc-OpenGL-output-1" href="#OpenGL-output">2.1.7 OpenGL output</a></li>
- <li><a name="toc-MathGL-and-PyQt-1" href="#MathGL-and-PyQt">2.1.8 MathGL and PyQt</a></li>
- <li><a name="toc-MathGL-and-MPI-1" href="#MathGL-and-MPI">2.1.9 MathGL and MPI</a></li>
- </ul></li>
- <li><a name="toc-Advanced-usage-1" href="#Advanced-usage">2.2 Advanced usage</a>
- <ul class="no-bullet">
- <li><a name="toc-Subplots-1" href="#Subplots">2.2.1 Subplots</a></li>
- <li><a name="toc-Axis-and-ticks-1" href="#Axis-and-ticks">2.2.2 Axis and ticks</a></li>
- <li><a name="toc-Curvilinear-coordinates-1" href="#Curvilinear-coordinates">2.2.3 Curvilinear coordinates</a></li>
- <li><a name="toc-Colorbars-1" href="#Colorbars">2.2.4 Colorbars</a></li>
- <li><a name="toc-Bounding-box-1" href="#Bounding-box">2.2.5 Bounding box</a></li>
- <li><a name="toc-Ternary-axis-1" href="#Ternary-axis">2.2.6 Ternary axis</a></li>
- <li><a name="toc-Text-features-1" href="#Text-features">2.2.7 Text features</a></li>
- <li><a name="toc-Legend-sample-1" href="#Legend-sample">2.2.8 Legend sample</a></li>
- <li><a name="toc-Cutting-sample-1" href="#Cutting-sample">2.2.9 Cutting sample</a></li>
- </ul></li>
- <li><a name="toc-Data-handling-1" href="#Data-handling">2.3 Data handling</a>
- <ul class="no-bullet">
- <li><a name="toc-Array-creation-1" href="#Array-creation">2.3.1 Array creation</a></li>
- <li><a name="toc-Linking-array-1" href="#Linking-array">2.3.2 Linking array</a></li>
- <li><a name="toc-Change-data-1" href="#Change-data">2.3.3 Change data</a></li>
- </ul></li>
- <li><a name="toc-Data-plotting-1" href="#Data-plotting">2.4 Data plotting</a></li>
- <li><a name="toc-Hints-1" href="#Hints">2.5 Hints</a>
- <ul class="no-bullet">
- <li><a name="toc-_0060_0060Compound_0027_0027-graphics-1" href="#g_t_0060_0060Compound_0027_0027-graphics">2.5.1 “Compound” graphics</a></li>
- <li><a name="toc-Transparency-and-lighting-1" href="#Transparency-and-lighting">2.5.2 Transparency and lighting</a></li>
- <li><a name="toc-Types-of-transparency-1" href="#Types-of-transparency">2.5.3 Types of transparency</a></li>
- <li><a name="toc-Axis-projection-1" href="#Axis-projection">2.5.4 Axis projection</a></li>
- <li><a name="toc-Adding-fog-1" href="#Adding-fog">2.5.5 Adding fog</a></li>
- <li><a name="toc-Lighting-sample-1" href="#Lighting-sample">2.5.6 Lighting sample</a></li>
- <li><a name="toc-Using-primitives-1" href="#Using-primitives">2.5.7 Using primitives</a></li>
- <li><a name="toc-STFA-sample-1" href="#STFA-sample">2.5.8 STFA sample</a></li>
- <li><a name="toc-Mapping-visualization-1" href="#Mapping-visualization">2.5.9 Mapping visualization</a></li>
- <li><a name="toc-Data-interpolation-1" href="#Data-interpolation">2.5.10 Data interpolation</a></li>
- <li><a name="toc-Making-regular-data-1" href="#Making-regular-data">2.5.11 Making regular data</a></li>
- <li><a name="toc-Making-histogram-1" href="#Making-histogram">2.5.12 Making histogram</a></li>
- <li><a name="toc-Nonlinear-fitting-hints-1" href="#Nonlinear-fitting-hints">2.5.13 Nonlinear fitting hints</a></li>
- <li><a name="toc-PDE-solving-hints-1" href="#PDE-solving-hints">2.5.14 PDE solving hints</a></li>
- <li><a name="toc-Drawing-phase-plain-1" href="#Drawing-phase-plain">2.5.15 Drawing phase plain</a></li>
- <li><a name="toc-Pulse-properties-1" href="#Pulse-properties">2.5.16 Pulse properties</a></li>
- <li><a name="toc-Using-MGL-parser-1" href="#Using-MGL-parser">2.5.17 Using MGL parser</a></li>
- <li><a name="toc-Using-options-1" href="#Using-options">2.5.18 Using options</a></li>
- <li><a name="toc-_0060_0060Templates_0027_0027-1" href="#g_t_0060_0060Templates_0027_0027">2.5.19 “Templates”</a></li>
- <li><a name="toc-Stereo-image-1" href="#Stereo-image">2.5.20 Stereo image</a></li>
- <li><a name="toc-Reduce-memory-usage-1" href="#Reduce-memory-usage">2.5.21 Reduce memory usage</a></li>
- <li><a name="toc-Scanning-file" href="#Saving-and-scanning-file">2.5.22 Scanning file</a></li>
- <li><a name="toc-Mixing-bitmap-and-vector-output-1" href="#Mixing-bitmap-and-vector-output">2.5.23 Mixing bitmap and vector output</a></li>
- </ul></li>
- <li><a name="toc-FAQ-1" href="#FAQ">2.6 FAQ</a></li>
- </ul></li>
- <li><a name="toc-General-concepts-1" href="#General-concepts">3 General concepts</a>
- <ul class="no-bullet">
- <li><a name="toc-Coordinate-axes-1" href="#Coordinate-axes">3.1 Coordinate axes</a></li>
- <li><a name="toc-Color-styles-1" href="#Color-styles">3.2 Color styles</a></li>
- <li><a name="toc-Line-styles-1" href="#Line-styles">3.3 Line styles</a></li>
- <li><a name="toc-Color-scheme-1" href="#Color-scheme">3.4 Color scheme</a></li>
- <li><a name="toc-Font-styles-1" href="#Font-styles">3.5 Font styles</a></li>
- <li><a name="toc-Textual-formulas-1" href="#Textual-formulas">3.6 Textual formulas</a></li>
- <li><a name="toc-Command-options-1" href="#Command-options">3.7 Command options</a></li>
- <li><a name="toc-Interfaces-1" href="#Interfaces">3.8 Interfaces</a>
- <ul class="no-bullet">
- <li><a name="toc-C_002fFortran-interface" href="#C-interface">3.8.1 C/Fortran interface</a></li>
- <li><a name="toc-C_002b_002b_002fPython-interface" href="#C_002b_002b-interface">3.8.2 C++/Python interface</a></li>
- </ul></li>
- </ul></li>
- <li><a name="toc-MathGL-core-1" href="#MathGL-core">4 MathGL core</a>
- <ul class="no-bullet">
- <li><a name="toc-Create-and-delete-objects" href="#Constructor">4.1 Create and delete objects</a></li>
- <li><a name="toc-Graphics-setup-1" href="#Graphics-setup">4.2 Graphics setup</a>
- <ul class="no-bullet">
- <li><a name="toc-Transparency-1" href="#Transparency">4.2.1 Transparency</a></li>
- <li><a name="toc-Lighting-1" href="#Lighting">4.2.2 Lighting</a></li>
- <li><a name="toc-Fog-1" href="#Fog">4.2.3 Fog</a></li>
- <li><a name="toc-Default-sizes-1" href="#Default-sizes">4.2.4 Default sizes</a></li>
- <li><a name="toc-Cutting-1" href="#Cutting">4.2.5 Cutting</a></li>
- <li><a name="toc-Font-settings-1" href="#Font-settings">4.2.6 Font settings</a></li>
- <li><a name="toc-Palette-and-colors-1" href="#Palette-and-colors">4.2.7 Palette and colors</a></li>
- <li><a name="toc-Masks-1" href="#Masks">4.2.8 Masks</a></li>
- <li><a name="toc-Error-handling-1" href="#Error-handling">4.2.9 Error handling</a></li>
- <li><a name="toc-Stop-drawing-1" href="#Stop-drawing">4.2.10 Stop drawing</a></li>
- </ul></li>
- <li><a name="toc-Axis-settings-1" href="#Axis-settings">4.3 Axis settings</a>
- <ul class="no-bullet">
- <li><a name="toc-Ranges-_0028bounding-box_0029-1" href="#Ranges-_0028bounding-box_0029">4.3.1 Ranges (bounding box)</a></li>
- <li><a name="toc-Curved-coordinates-1" href="#Curved-coordinates">4.3.2 Curved coordinates</a></li>
- <li><a name="toc-Ticks-1" href="#Ticks">4.3.3 Ticks</a></li>
- </ul></li>
- <li><a name="toc-Subplots-and-rotation-1" href="#Subplots-and-rotation">4.4 Subplots and rotation</a></li>
- <li><a name="toc-Export-picture-1" href="#Export-picture">4.5 Export picture</a>
- <ul class="no-bullet">
- <li><a name="toc-Export-to-file-1" href="#Export-to-file">4.5.1 Export to file</a></li>
- <li><a name="toc-Frames_002fAnimation-1" href="#Frames_002fAnimation">4.5.2 Frames/Animation</a></li>
- <li><a name="toc-Bitmap-in-memory-1" href="#Bitmap-in-memory">4.5.3 Bitmap in memory</a></li>
- <li><a name="toc-Parallelization-1" href="#Parallelization">4.5.4 Parallelization</a></li>
- </ul></li>
- <li><a name="toc-Background-1" href="#Background">4.6 Background</a></li>
- <li><a name="toc-Primitives-1" href="#Primitives">4.7 Primitives</a></li>
- <li><a name="toc-Text-printing-1" href="#Text-printing">4.8 Text printing</a></li>
- <li><a name="toc-Axis-and-Colorbar-1" href="#Axis-and-Colorbar">4.9 Axis and Colorbar</a></li>
- <li><a name="toc-Legend-1" href="#Legend">4.10 Legend</a></li>
- <li><a name="toc-1D-plotting-1" href="#g_t1D-plotting">4.11 1D plotting</a></li>
- <li><a name="toc-2D-plotting-1" href="#g_t2D-plotting">4.12 2D plotting</a></li>
- <li><a name="toc-3D-plotting-1" href="#g_t3D-plotting">4.13 3D plotting</a></li>
- <li><a name="toc-Dual-plotting-1" href="#Dual-plotting">4.14 Dual plotting</a></li>
- <li><a name="toc-Vector-fields-1" href="#Vector-fields">4.15 Vector fields</a></li>
- <li><a name="toc-Other-plotting-1" href="#Other-plotting">4.16 Other plotting</a></li>
- <li><a name="toc-Nonlinear-fitting-1" href="#Nonlinear-fitting">4.17 Nonlinear fitting</a></li>
- <li><a name="toc-Data-manipulation-1" href="#Data-manipulation">4.18 Data manipulation</a></li>
- </ul></li>
- <li><a name="toc-Widget-classes-1" href="#Widget-classes">5 Widget classes</a>
- <ul class="no-bullet">
- <li><a name="toc-mglWnd-class-1" href="#mglWnd-class">5.1 mglWnd class</a></li>
- <li><a name="toc-mglDraw-class-1" href="#mglDraw-class">5.2 mglDraw class</a></li>
- <li><a name="toc-Fl_005fMathGL-class-1" href="#Fl_005fMathGL-class">5.3 Fl_MathGL class</a></li>
- <li><a name="toc-QMathGL-class-1" href="#QMathGL-class">5.4 QMathGL class</a></li>
- <li><a name="toc-wxMathGL-class-1" href="#wxMathGL-class">5.5 wxMathGL class</a></li>
- </ul></li>
- <li><a name="toc-Data-processing-1" href="#Data-processing">6 Data processing</a>
- <ul class="no-bullet">
- <li><a name="toc-Public-variables-1" href="#Public-variables">6.1 Public variables</a></li>
- <li><a name="toc-Data-constructor-1" href="#Data-constructor">6.2 Data constructor</a></li>
- <li><a name="toc-Data-resizing-1" href="#Data-resizing">6.3 Data resizing</a></li>
- <li><a name="toc-Data-filling-1" href="#Data-filling">6.4 Data filling</a></li>
- <li><a name="toc-File-I_002fO-1" href="#File-I_002fO">6.5 File I/O</a></li>
- <li><a name="toc-Make-another-data-1" href="#Make-another-data">6.6 Make another data</a></li>
- <li><a name="toc-Data-changing-1" href="#Data-changing">6.7 Data changing</a></li>
- <li><a name="toc-Interpolation-1" href="#Interpolation">6.8 Interpolation</a></li>
- <li><a name="toc-Data-information-1" href="#Data-information">6.9 Data information</a></li>
- <li><a name="toc-Operators-1" href="#Operators">6.10 Operators</a></li>
- <li><a name="toc-Global-functions-1" href="#Global-functions">6.11 Global functions</a></li>
- <li><a name="toc-Evaluate-expression-1" href="#Evaluate-expression">6.12 Evaluate expression</a></li>
- <li><a name="toc-Special-data-classes-1" href="#Special-data-classes">6.13 Special data classes</a></li>
- </ul></li>
- <li><a name="toc-MGL-scripts-1" href="#MGL-scripts">7 MGL scripts</a>
- <ul class="no-bullet">
- <li><a name="toc-MGL-definition-1" href="#MGL-definition">7.1 MGL definition</a></li>
- <li><a name="toc-Program-flow-commands-1" href="#Program-flow-commands">7.2 Program flow commands</a></li>
- <li><a name="toc-Special-comments-1" href="#Special-comments">7.3 Special comments</a></li>
- <li><a name="toc-LaTeX-package-1" href="#LaTeX-package">7.4 LaTeX package</a></li>
- <li><a name="toc-mglParse-class-1" href="#mglParse-class">7.5 mglParse class</a></li>
- </ul></li>
- <li><a name="toc-UDAV-1" href="#UDAV">8 UDAV</a>
- <ul class="no-bullet">
- <li><a name="toc-UDAV-overview-1" href="#UDAV-overview">8.1 UDAV overview</a></li>
- <li><a name="toc-UDAV-dialogs-1" href="#UDAV-dialogs">8.2 UDAV dialogs</a></li>
- <li><a name="toc-UDAV-hints-1" href="#UDAV-hints">8.3 UDAV hints</a></li>
- </ul></li>
- <li><a name="toc-Other-classes-1" href="#Other-classes">9 Other classes</a>
- <ul class="no-bullet">
- <li><a name="toc-Define-new-kind-of-plot-_0028mglBase-class_0029" href="#mglBase-class">9.1 Define new kind of plot (mglBase class)</a></li>
- <li><a name="toc-User-defined-types-_0028mglDataA-class_0029" href="#mglDataA-class">9.2 User defined types (mglDataA class)</a></li>
- <li><a name="toc-mglColor-class-1" href="#mglColor-class">9.3 mglColor class</a></li>
- <li><a name="toc-mglPoint-class-1" href="#mglPoint-class">9.4 mglPoint class</a></li>
- </ul></li>
- <li><a name="toc-All-samples-1" href="#All-samples">10 All samples</a>
- <ul class="no-bullet">
- <li><a name="toc-Functions-for-initialization" href="#initialization-sample">10.1 Functions for initialization</a></li>
- <li><a name="toc-Sample-3wave" href="#g_t3wave-sample">10.2 Sample ‘<samp>3wave</samp>’</a></li>
- <li><a name="toc-Sample-alpha" href="#alpha-sample">10.3 Sample ‘<samp>alpha</samp>’</a></li>
- <li><a name="toc-Sample-apde" href="#apde-sample">10.4 Sample ‘<samp>apde</samp>’</a></li>
- <li><a name="toc-Sample-area" href="#area-sample">10.5 Sample ‘<samp>area</samp>’</a></li>
- <li><a name="toc-Sample-aspect" href="#aspect-sample">10.6 Sample ‘<samp>aspect</samp>’</a></li>
- <li><a name="toc-Sample-axial" href="#axial-sample">10.7 Sample ‘<samp>axial</samp>’</a></li>
- <li><a name="toc-Sample-axis" href="#axis-sample">10.8 Sample ‘<samp>axis</samp>’</a></li>
- <li><a name="toc-Sample-barh" href="#barh-sample">10.9 Sample ‘<samp>barh</samp>’</a></li>
- <li><a name="toc-Sample-bars" href="#bars-sample">10.10 Sample ‘<samp>bars</samp>’</a></li>
- <li><a name="toc-Sample-belt" href="#belt-sample">10.11 Sample ‘<samp>belt</samp>’</a></li>
- <li><a name="toc-Sample-bifurcation" href="#bifurcation-sample">10.12 Sample ‘<samp>bifurcation</samp>’</a></li>
- <li><a name="toc-Sample-box" href="#box-sample">10.13 Sample ‘<samp>box</samp>’</a></li>
- <li><a name="toc-Sample-boxplot" href="#boxplot-sample">10.14 Sample ‘<samp>boxplot</samp>’</a></li>
- <li><a name="toc-Sample-boxs" href="#boxs-sample">10.15 Sample ‘<samp>boxs</samp>’</a></li>
- <li><a name="toc-Sample-candle" href="#candle-sample">10.16 Sample ‘<samp>candle</samp>’</a></li>
- <li><a name="toc-Sample-chart" href="#chart-sample">10.17 Sample ‘<samp>chart</samp>’</a></li>
- <li><a name="toc-Sample-cloud" href="#cloud-sample">10.18 Sample ‘<samp>cloud</samp>’</a></li>
- <li><a name="toc-Sample-colorbar" href="#colorbar-sample">10.19 Sample ‘<samp>colorbar</samp>’</a></li>
- <li><a name="toc-Sample-combined" href="#combined-sample">10.20 Sample ‘<samp>combined</samp>’</a></li>
- <li><a name="toc-Sample-cones" href="#cones-sample">10.21 Sample ‘<samp>cones</samp>’</a></li>
- <li><a name="toc-Sample-cont" href="#cont-sample">10.22 Sample ‘<samp>cont</samp>’</a></li>
- <li><a name="toc-Sample-cont3" href="#cont3-sample">10.23 Sample ‘<samp>cont3</samp>’</a></li>
- <li><a name="toc-Sample-cont_005fxyz" href="#cont_005fxyz-sample">10.24 Sample ‘<samp>cont_xyz</samp>’</a></li>
- <li><a name="toc-Sample-contd" href="#contd-sample">10.25 Sample ‘<samp>contd</samp>’</a></li>
- <li><a name="toc-Sample-contf" href="#contf-sample">10.26 Sample ‘<samp>contf</samp>’</a></li>
- <li><a name="toc-Sample-contf3" href="#contf3-sample">10.27 Sample ‘<samp>contf3</samp>’</a></li>
- <li><a name="toc-Sample-contf_005fxyz" href="#contf_005fxyz-sample">10.28 Sample ‘<samp>contf_xyz</samp>’</a></li>
- <li><a name="toc-Sample-contv" href="#contv-sample">10.29 Sample ‘<samp>contv</samp>’</a></li>
- <li><a name="toc-Sample-correl" href="#correl-sample">10.30 Sample ‘<samp>correl</samp>’</a></li>
- <li><a name="toc-Sample-curvcoor" href="#curvcoor-sample">10.31 Sample ‘<samp>curvcoor</samp>’</a></li>
- <li><a name="toc-Sample-cut" href="#cut-sample">10.32 Sample ‘<samp>cut</samp>’</a></li>
- <li><a name="toc-Sample-dat_005fdiff" href="#dat_005fdiff-sample">10.33 Sample ‘<samp>dat_diff</samp>’</a></li>
- <li><a name="toc-Sample-dat_005fextra" href="#dat_005fextra-sample">10.34 Sample ‘<samp>dat_extra</samp>’</a></li>
- <li><a name="toc-Sample-data1" href="#data1-sample">10.35 Sample ‘<samp>data1</samp>’</a></li>
- <li><a name="toc-Sample-data2" href="#data2-sample">10.36 Sample ‘<samp>data2</samp>’</a></li>
- <li><a name="toc-Sample-dens" href="#dens-sample">10.37 Sample ‘<samp>dens</samp>’</a></li>
- <li><a name="toc-Sample-dens3" href="#dens3-sample">10.38 Sample ‘<samp>dens3</samp>’</a></li>
- <li><a name="toc-Sample-dens_005fxyz" href="#dens_005fxyz-sample">10.39 Sample ‘<samp>dens_xyz</samp>’</a></li>
- <li><a name="toc-Sample-detect" href="#detect-sample">10.40 Sample ‘<samp>detect</samp>’</a></li>
- <li><a name="toc-Sample-dew" href="#dew-sample">10.41 Sample ‘<samp>dew</samp>’</a></li>
- <li><a name="toc-Sample-diffract" href="#diffract-sample">10.42 Sample ‘<samp>diffract</samp>’</a></li>
- <li><a name="toc-Sample-dilate" href="#dilate-sample">10.43 Sample ‘<samp>dilate</samp>’</a></li>
- <li><a name="toc-Sample-dots" href="#dots-sample">10.44 Sample ‘<samp>dots</samp>’</a></li>
- <li><a name="toc-Sample-earth" href="#earth-sample">10.45 Sample ‘<samp>earth</samp>’</a></li>
- <li><a name="toc-Sample-error" href="#error-sample">10.46 Sample ‘<samp>error</samp>’</a></li>
- <li><a name="toc-Sample-error2" href="#error2-sample">10.47 Sample ‘<samp>error2</samp>’</a></li>
- <li><a name="toc-Sample-export" href="#export-sample">10.48 Sample ‘<samp>export</samp>’</a></li>
- <li><a name="toc-Sample-fall" href="#fall-sample">10.49 Sample ‘<samp>fall</samp>’</a></li>
- <li><a name="toc-Sample-fexport" href="#fexport-sample">10.50 Sample ‘<samp>fexport</samp>’</a></li>
- <li><a name="toc-Sample-fit" href="#fit-sample">10.51 Sample ‘<samp>fit</samp>’</a></li>
- <li><a name="toc-Sample-flame2d" href="#flame2d-sample">10.52 Sample ‘<samp>flame2d</samp>’</a></li>
- <li><a name="toc-Sample-flow" href="#flow-sample">10.53 Sample ‘<samp>flow</samp>’</a></li>
- <li><a name="toc-Sample-flow3" href="#flow3-sample">10.54 Sample ‘<samp>flow3</samp>’</a></li>
- <li><a name="toc-Sample-fog" href="#fog-sample">10.55 Sample ‘<samp>fog</samp>’</a></li>
- <li><a name="toc-Sample-fonts" href="#fonts-sample">10.56 Sample ‘<samp>fonts</samp>’</a></li>
- <li><a name="toc-Sample-grad" href="#grad-sample">10.57 Sample ‘<samp>grad</samp>’</a></li>
- <li><a name="toc-Sample-hist" href="#hist-sample">10.58 Sample ‘<samp>hist</samp>’</a></li>
- <li><a name="toc-Sample-ifs2d" href="#ifs2d-sample">10.59 Sample ‘<samp>ifs2d</samp>’</a></li>
- <li><a name="toc-Sample-ifs3d" href="#ifs3d-sample">10.60 Sample ‘<samp>ifs3d</samp>’</a></li>
- <li><a name="toc-Sample-indirect" href="#indirect-sample">10.61 Sample ‘<samp>indirect</samp>’</a></li>
- <li><a name="toc-Sample-inplot" href="#inplot-sample">10.62 Sample ‘<samp>inplot</samp>’</a></li>
- <li><a name="toc-Sample-iris" href="#iris-sample">10.63 Sample ‘<samp>iris</samp>’</a></li>
- <li><a name="toc-Sample-label" href="#label-sample">10.64 Sample ‘<samp>label</samp>’</a></li>
- <li><a name="toc-Sample-lamerey" href="#lamerey-sample">10.65 Sample ‘<samp>lamerey</samp>’</a></li>
- <li><a name="toc-Sample-legend" href="#legend-sample">10.66 Sample ‘<samp>legend</samp>’</a></li>
- <li><a name="toc-Sample-light" href="#light-sample">10.67 Sample ‘<samp>light</samp>’</a></li>
- <li><a name="toc-Sample-loglog" href="#loglog-sample">10.68 Sample ‘<samp>loglog</samp>’</a></li>
- <li><a name="toc-Sample-map" href="#map-sample">10.69 Sample ‘<samp>map</samp>’</a></li>
- <li><a name="toc-Sample-mark" href="#mark-sample">10.70 Sample ‘<samp>mark</samp>’</a></li>
- <li><a name="toc-Sample-mask" href="#mask-sample">10.71 Sample ‘<samp>mask</samp>’</a></li>
- <li><a name="toc-Sample-mesh" href="#mesh-sample">10.72 Sample ‘<samp>mesh</samp>’</a></li>
- <li><a name="toc-Sample-mirror" href="#mirror-sample">10.73 Sample ‘<samp>mirror</samp>’</a></li>
- <li><a name="toc-Sample-molecule" href="#molecule-sample">10.74 Sample ‘<samp>molecule</samp>’</a></li>
- <li><a name="toc-Sample-ode" href="#ode-sample">10.75 Sample ‘<samp>ode</samp>’</a></li>
- <li><a name="toc-Sample-ohlc" href="#ohlc-sample">10.76 Sample ‘<samp>ohlc</samp>’</a></li>
- <li><a name="toc-Sample-param1" href="#param1-sample">10.77 Sample ‘<samp>param1</samp>’</a></li>
- <li><a name="toc-Sample-param2" href="#param2-sample">10.78 Sample ‘<samp>param2</samp>’</a></li>
- <li><a name="toc-Sample-param3" href="#param3-sample">10.79 Sample ‘<samp>param3</samp>’</a></li>
- <li><a name="toc-Sample-paramv" href="#paramv-sample">10.80 Sample ‘<samp>paramv</samp>’</a></li>
- <li><a name="toc-Sample-parser" href="#parser-sample">10.81 Sample ‘<samp>parser</samp>’</a></li>
- <li><a name="toc-Sample-pde" href="#pde-sample">10.82 Sample ‘<samp>pde</samp>’</a></li>
- <li><a name="toc-Sample-pendelta" href="#pendelta-sample">10.83 Sample ‘<samp>pendelta</samp>’</a></li>
- <li><a name="toc-Sample-pipe" href="#pipe-sample">10.84 Sample ‘<samp>pipe</samp>’</a></li>
- <li><a name="toc-Sample-plot" href="#plot-sample">10.85 Sample ‘<samp>plot</samp>’</a></li>
- <li><a name="toc-Sample-pmap" href="#pmap-sample">10.86 Sample ‘<samp>pmap</samp>’</a></li>
- <li><a name="toc-Sample-primitives" href="#primitives-sample">10.87 Sample ‘<samp>primitives</samp>’</a></li>
- <li><a name="toc-Sample-projection" href="#projection-sample">10.88 Sample ‘<samp>projection</samp>’</a></li>
- <li><a name="toc-Sample-projection5" href="#projection5-sample">10.89 Sample ‘<samp>projection5</samp>’</a></li>
- <li><a name="toc-Sample-pulse" href="#pulse-sample">10.90 Sample ‘<samp>pulse</samp>’</a></li>
- <li><a name="toc-Sample-qo2d" href="#qo2d-sample">10.91 Sample ‘<samp>qo2d</samp>’</a></li>
- <li><a name="toc-Sample-quality0" href="#quality0-sample">10.92 Sample ‘<samp>quality0</samp>’</a></li>
- <li><a name="toc-Sample-quality1" href="#quality1-sample">10.93 Sample ‘<samp>quality1</samp>’</a></li>
- <li><a name="toc-Sample-quality2" href="#quality2-sample">10.94 Sample ‘<samp>quality2</samp>’</a></li>
- <li><a name="toc-Sample-quality4" href="#quality4-sample">10.95 Sample ‘<samp>quality4</samp>’</a></li>
- <li><a name="toc-Sample-quality5" href="#quality5-sample">10.96 Sample ‘<samp>quality5</samp>’</a></li>
- <li><a name="toc-Sample-quality6" href="#quality6-sample">10.97 Sample ‘<samp>quality6</samp>’</a></li>
- <li><a name="toc-Sample-quality8" href="#quality8-sample">10.98 Sample ‘<samp>quality8</samp>’</a></li>
- <li><a name="toc-Sample-radar" href="#radar-sample">10.99 Sample ‘<samp>radar</samp>’</a></li>
- <li><a name="toc-Sample-refill" href="#refill-sample">10.100 Sample ‘<samp>refill</samp>’</a></li>
- <li><a name="toc-Sample-region" href="#region-sample">10.101 Sample ‘<samp>region</samp>’</a></li>
- <li><a name="toc-Sample-scanfile" href="#scanfile-sample">10.102 Sample ‘<samp>scanfile</samp>’</a></li>
- <li><a name="toc-Sample-schemes" href="#schemes-sample">10.103 Sample ‘<samp>schemes</samp>’</a></li>
- <li><a name="toc-Sample-section" href="#section-sample">10.104 Sample ‘<samp>section</samp>’</a></li>
- <li><a name="toc-Sample-several_005flight" href="#several_005flight-sample">10.105 Sample ‘<samp>several_light</samp>’</a></li>
- <li><a name="toc-Sample-solve" href="#solve-sample">10.106 Sample ‘<samp>solve</samp>’</a></li>
- <li><a name="toc-Sample-stem" href="#stem-sample">10.107 Sample ‘<samp>stem</samp>’</a></li>
- <li><a name="toc-Sample-step" href="#step-sample">10.108 Sample ‘<samp>step</samp>’</a></li>
- <li><a name="toc-Sample-stereo" href="#stereo-sample">10.109 Sample ‘<samp>stereo</samp>’</a></li>
- <li><a name="toc-Sample-stfa" href="#stfa-sample">10.110 Sample ‘<samp>stfa</samp>’</a></li>
- <li><a name="toc-Sample-style" href="#style-sample">10.111 Sample ‘<samp>style</samp>’</a></li>
- <li><a name="toc-Sample-surf" href="#surf-sample">10.112 Sample ‘<samp>surf</samp>’</a></li>
- <li><a name="toc-Sample-surf3" href="#surf3-sample">10.113 Sample ‘<samp>surf3</samp>’</a></li>
- <li><a name="toc-Sample-surf3a" href="#surf3a-sample">10.114 Sample ‘<samp>surf3a</samp>’</a></li>
- <li><a name="toc-Sample-surf3c" href="#surf3c-sample">10.115 Sample ‘<samp>surf3c</samp>’</a></li>
- <li><a name="toc-Sample-surf3ca" href="#surf3ca-sample">10.116 Sample ‘<samp>surf3ca</samp>’</a></li>
- <li><a name="toc-Sample-surfa" href="#surfa-sample">10.117 Sample ‘<samp>surfa</samp>’</a></li>
- <li><a name="toc-Sample-surfc" href="#surfc-sample">10.118 Sample ‘<samp>surfc</samp>’</a></li>
- <li><a name="toc-Sample-surfca" href="#surfca-sample">10.119 Sample ‘<samp>surfca</samp>’</a></li>
- <li><a name="toc-Sample-table" href="#table-sample">10.120 Sample ‘<samp>table</samp>’</a></li>
- <li><a name="toc-Sample-tape" href="#tape-sample">10.121 Sample ‘<samp>tape</samp>’</a></li>
- <li><a name="toc-Sample-tens" href="#tens-sample">10.122 Sample ‘<samp>tens</samp>’</a></li>
- <li><a name="toc-Sample-ternary" href="#ternary-sample">10.123 Sample ‘<samp>ternary</samp>’</a></li>
- <li><a name="toc-Sample-text" href="#text-sample">10.124 Sample ‘<samp>text</samp>’</a></li>
- <li><a name="toc-Sample-text2" href="#text2-sample">10.125 Sample ‘<samp>text2</samp>’</a></li>
- <li><a name="toc-Sample-textmark" href="#textmark-sample">10.126 Sample ‘<samp>textmark</samp>’</a></li>
- <li><a name="toc-Sample-ticks" href="#ticks-sample">10.127 Sample ‘<samp>ticks</samp>’</a></li>
- <li><a name="toc-Sample-tile" href="#tile-sample">10.128 Sample ‘<samp>tile</samp>’</a></li>
- <li><a name="toc-Sample-tiles" href="#tiles-sample">10.129 Sample ‘<samp>tiles</samp>’</a></li>
- <li><a name="toc-Sample-torus" href="#torus-sample">10.130 Sample ‘<samp>torus</samp>’</a></li>
- <li><a name="toc-Sample-traj" href="#traj-sample">10.131 Sample ‘<samp>traj</samp>’</a></li>
- <li><a name="toc-Sample-triangulation" href="#triangulation-sample">10.132 Sample ‘<samp>triangulation</samp>’</a></li>
- <li><a name="toc-Sample-triplot" href="#triplot-sample">10.133 Sample ‘<samp>triplot</samp>’</a></li>
- <li><a name="toc-Sample-tube" href="#tube-sample">10.134 Sample ‘<samp>tube</samp>’</a></li>
- <li><a name="toc-Sample-type0" href="#type0-sample">10.135 Sample ‘<samp>type0</samp>’</a></li>
- <li><a name="toc-Sample-type1" href="#type1-sample">10.136 Sample ‘<samp>type1</samp>’</a></li>
- <li><a name="toc-Sample-type2" href="#type2-sample">10.137 Sample ‘<samp>type2</samp>’</a></li>
- <li><a name="toc-Sample-vect" href="#vect-sample">10.138 Sample ‘<samp>vect</samp>’</a></li>
- <li><a name="toc-Sample-vect3" href="#vect3-sample">10.139 Sample ‘<samp>vect3</samp>’</a></li>
- <li><a name="toc-Sample-_0027venn_0027" href="#venn-sample">10.140 Sample ’venn’</a></li>
- </ul></li>
- <li><a name="toc-Symbols-and-hot_002dkeys-1" href="#Symbols-and-hot_002dkeys">Appendix A Symbols and hot-keys</a>
- <ul class="no-bullet">
- <li><a name="toc-Symbols-for-styles-1" href="#Symbols-for-styles">A.1 Symbols for styles</a></li>
- <li><a name="toc-Hot_002dkeys-for-mglview-1" href="#Hot_002dkeys-for-mglview">A.2 Hot-keys for mglview</a></li>
- <li><a name="toc-Hot_002dkeys-for-UDAV-1" href="#Hot_002dkeys-for-UDAV">A.3 Hot-keys for UDAV</a></li>
- </ul></li>
- <li><a name="toc-File-formats-1" href="#File-formats">Appendix B File formats</a>
- <ul class="no-bullet">
- <li><a name="toc-Font-files-1" href="#Font-files">B.1 Font files</a></li>
- <li><a name="toc-MGLD-format-1" href="#MGLD-format">B.2 MGLD format</a></li>
- <li><a name="toc-JSON-format-1" href="#JSON-format">B.3 JSON format</a></li>
- <li><a name="toc-IFS-format-1" href="#IFS-format">B.4 IFS format</a></li>
- </ul></li>
- <li><a name="toc-Plotting-time-1" href="#Plotting-time">Appendix C Plotting time</a></li>
- <li><a name="toc-TeX_002dlike-symbols-1" href="#TeX_002dlike-symbols">Appendix D TeX-like symbols</a></li>
- <li><a name="toc-GNU-Free-Documentation-License" href="#Copying-This-Manual">Appendix E GNU Free Documentation License</a></li>
- <li><a name="toc-Index-1" href="#Index">Index</a></li>
-</ul>
-</div>
-
-
-<a name="Top"></a>
-<div class="header">
-<p>
-Next: <a href="#Overview" accesskey="n" rel="next">Overview</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="MathGL"></a>
-<h1 class="top">MathGL</h1>
-
-<p>This file documents the Mathematical Graphic Library (MathGL), a collection of classes and routines for scientific plotting. It corresponds to release 2.4.3 of the library. Please report any errors in this manual to <a href="mailto:mathgl.abalakin@gmail.org">mathgl.abalakin@gmail.org</a>. More information about MathGL can be found at the project homepage, <a href="http://mathgl.sourceforge.net/">http://mathgl.sourceforge.net/</a>.
-</p>
-<p>Copyright © 2008-2012 Alexey A. Balakin.
-</p>
-<blockquote>
-<p>Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
-Texts. A copy of the license is included in the section entitled “GNU
-Free Documentation License.”
-</p></blockquote>
-
-
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Overview" accesskey="1">Overview</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Examples" accesskey="2">Examples</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#General-concepts" accesskey="3">General concepts</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#MathGL-core" accesskey="4">MathGL core</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Widget-classes" accesskey="5">Widget classes</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-processing" accesskey="6">Data processing</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#MGL-scripts" accesskey="7">MGL scripts</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#UDAV" accesskey="8">UDAV</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Other-classes" accesskey="9">Other classes</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#All-samples">All samples</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Symbols-and-hot_002dkeys">Symbols and hot-keys</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#File-formats">File formats</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#TeX_002dlike-symbols">TeX-like symbols</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Plotting-time">Plotting time</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Copying-This-Manual">Copying This Manual</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Index">Index</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-
-
-<hr>
-<a name="Overview"></a>
-<div class="header">
-<p>
-Next: <a href="#Examples" accesskey="n" rel="next">Examples</a>, Previous: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Overview-1"></a>
-<h2 class="chapter">1 Overview</h2>
-
-
-<a name="index-MathGL-overview"></a>
-
-<p>MathGL is ...
-</p><ul>
-<li> a library for making high-quality scientific graphics under Linux and Windows;
-</li><li> a library for the fast data plotting and handling of large data arrays;
-</li><li> a library for working in window and console modes and for easy embedding into other programs;
-</li><li> a library with large and growing set of graphics.
-</li></ul>
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#What-is-MathGL_003f" accesskey="1">What is MathGL?</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#MathGL-features" accesskey="2">MathGL features</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Installation" accesskey="3">Installation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Quick-guide" accesskey="4">Quick guide</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Changes-from-v_002e1" accesskey="5">Changes from v.1</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Utilities" accesskey="6">Utilities</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Thanks" accesskey="7">Thanks</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="What-is-MathGL_003f"></a>
-<div class="header">
-<p>
-Next: <a href="#MathGL-features" accesskey="n" rel="next">MathGL features</a>, Up: <a href="#Overview" accesskey="u" rel="up">Overview</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="What-is-MathGL_003f-1"></a>
-<h3 class="section">1.1 What is MathGL?</h3>
-
-
-<p>A code for making high-quality scientific graphics under Linux and Windows. A code for the fast handling and plotting of large data arrays. A code for working in window and console regimes and for easy including into another program. A code with large and renewal set of graphics. Exactly such a code I tried to put in MathGL library.
-</p>
-<p>At this version (2.4.3) MathGL has more than 50 general types of graphics for 1d, 2d and 3d data arrays. It can export graphics to bitmap and vector (EPS or SVG) files. It has OpenGL interface and can be used from console programs. It has functions for data handling and script MGL language for simplification of data plotting. It also has several types of transparency and smoothed lighting, vector fonts and TeX-like symbol parsing, arbitrary curvilinear coordinate system and many other useful things (see pictures section at <a href="http://mathgl.sf.net/">homepage</a>). Finally it is platform-independent and free (under GPL v.2.0 or later license).
-</p>
-
-<hr>
-<a name="MathGL-features"></a>
-<div class="header">
-<p>
-Next: <a href="#Installation" accesskey="n" rel="next">Installation</a>, Previous: <a href="#What-is-MathGL_003f" accesskey="p" rel="prev">What is MathGL?</a>, Up: <a href="#Overview" accesskey="u" rel="up">Overview</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="MathGL-features-1"></a>
-<h3 class="section">1.2 MathGL features</h3>
-
-
-<p>MathGL can plot a wide range of graphics. It includes:
-</p><ul>
-<li> one-dimensional (Plot, Area, Bars, Step, Stem, Torus, Chart, Error, Tube, Mark, see <a href="#g_t1D-plotting">1D plotting</a>);
-
-</li><li> two-dimensional plots (Mesh, Surf, Dens, Cont, ContF, Boxs, Axial, Fall, Belt, Tile, see <a href="#g_t2D-plotting">2D plotting</a>);
-
-</li><li> three-dimensional plots (Surf3, Dens3, Cont3, ContF3, Cloud-like, see <a href="#g_t3D-plotting">3D plotting</a>);
-
-</li><li> dual data plots: vector fields Vect, flow threads Flow, mapping chart Map, surfaces and isosurfaces, transparent or colored (i.e. with transparency or color varied) by other data SurfA, SurfC, Surf3A, Surf3C (see <a href="#Dual-plotting">Dual plotting</a>);
-
-</li><li> and so on. For details see see <a href="#MathGL-core">MathGL core</a>.
-</li></ul>
-
-<p>In fact, I created the functions for drawing of all the types of scientific plots that I know. The list of plots is growing; if you need some special type of a plot then please email me <a href="mailto:mathgl.abalakin@gmail.com">e-mail</a> and it will appear in the new version.
-</p>
-<p>I tried to make plots as nice looking as possible: e.g., a surface can be transparent and highlighted by several (up to 10) light sources. Most of the drawing functions have 2 variants: simple one for the fast plotting of data, complex one for specifying of the exact position of the plot (including parametric representation). Resulting image can be saved in bitmap PNG, JPEG, GIF, TGA, BMP format, or in vector EPS, SVG or TeX format, or in 3D formats OBJ, OFF, STL, or in PRC format which can be converted into U3D.
-</p>
-<p>All texts are drawn by vector fonts, which allows for high scalability and portability. Texts may contain commands for: some of the TeX-like symbols, changing index (upper or lower indexes) and the style of font inside the text string (see <a href="#Font-styles">Font styles</a>). Texts of ticks are rotated with axis rotation. It is possible to create a legend of plot and put text in an arbitrary position on the plot. Arbitrary text encoding (by the help of function <code>setlocale()</code>) and UTF-16 encoding are supported.
-</p>
-<p>Special class mglData is used for data encapsulation (see <a href="#Data-processing">Data processing</a>). In addition to a safe creation and deletion of data arrays it includes functions for data processing (smoothing, differentiating, integrating, interpolating and so on) and reading of data files with automatic size determination. Class mglData can handle arrays with up to three dimensions (arrays which depend on up to 3 independent indexes <em>a_{ijk}</em>). Using an array with higher number of dimensions is not meaningful, because I do not know how it can be plotted. Data filling and modification may be done manually or by textual formulas.
-</p>
-<p>There is fast evaluation of a textual mathematical expression (see <a href="#Textual-formulas">Textual formulas</a>). It is based on string precompilation to tree-like code at the creation of class instance. At evaluation stage code performs only fast tree-walk and returns the value of the expression. In addition to changing data values, textual formulas are also used for drawing in <em>arbitrary</em> curvilinear coordinates. A set of such curvilinear coordinates is limited only by user’s imagination rather than a fixed list like: polar, parabolic, spherical, and so on.
-</p>
-
-<hr>
-<a name="Installation"></a>
-<div class="header">
-<p>
-Next: <a href="#Quick-guide" accesskey="n" rel="next">Quick guide</a>, Previous: <a href="#MathGL-features" accesskey="p" rel="prev">MathGL features</a>, Up: <a href="#Overview" accesskey="u" rel="up">Overview</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Installation-1"></a>
-<h3 class="section">1.3 Installation</h3>
-
-
-<p>MathGL can be installed in 4 different ways.
-</p><ol>
-<li> Compile from sources. The cmake build system is useded in the library. To run it, one should execute commands: <code>cmake .</code> twice, after it <code>make</code> and <code>make install</code> with root/sudo rights. Sometimes after installation you may need to update the library list – just execute <code>ldconfig</code> with root/sudo rights.
-
-<p>There are several additional options which are switched off by default. They are: <code>enable-fltk, enable-glut, enable-qt4, enable-qt5</code> for ebabling FLTK, GLUT and/or Qt windows; <code>enable-jpeg, enable-gif, enable-hdf5</code> and so on for enabling corresponding file formats; <code>enable-all</code> for enabling all additional features. For using <code>double</code> as base internal data type use option <code>enable-double</code>. For enabling language interfaces use <code>enable-python, enable-octave</code> or <code>enable-all-swig</code> for all languages. You can use WYSIWYG tool (<code>cmake-gui</code>) to view all of them, or type <code>cmake -D enable-all=on -D enable-all-widgets=on -D enable-all-swig=on .</code> in command line for enabling all features.
-</p>
-<p>There is known bug for building in MinGW – you need to manually add linker option <code>-fopenmp</code> (i.e. <code>CMAKE_EXE_LINKER_FLAGS:STRING='-fopenmp'</code> and <code>CMAKE_SHARED_LINKER_FLAGS:STRING='-fopenmp'</code>) if you enable OpenMP support (i.e. if <code>enable-openmp=ON</code>).
-</p>
-</li><li> Use a precompiled binary. There are binaries for MinGW (platform Win32). For a precompiled variant one needs only to unpack the archive to the location of the compiler (i.e. mathgl/lib in mingw/lib, mathgl/include in mingw/include and so on) or in arbitrary other folder and setup paths in compiler. By default, precompiled versions include the support of GSL (www.gsl.org) and PNG. So, one needs to have these libraries installed on system (it can be found, for example, at <a href="http://gnuwin32.sourceforge.net/packages.html">http://gnuwin32.sourceforge.net/packages.html</a>).
-
-</li><li> Install precompiled versions from standard packages (RPM, deb, DevPak and so on).
-</li></ol>
-
-<p>Note, you can download the latest sources (which can be not stable) from sourceforge.net SVN by command
-</p><pre class="verbatim">svn checkout http://svn.code.sf.net/p/mathgl/code/mathgl-2x mathgl-code
-</pre>
-<p><strong>IMPORTANT!</strong> MathGL use a set of defines, which were determined at configure stage and may differ if used with non-default compiler (like using MathGL binaries compiled by MinGW in VisualStudio). There are <code>MGL_SYS_NAN, MGL_HAVE_TYPEOF, MGL_HAVE_PTHREAD, MGL_HAVE_ATTRIBUTE, MGL_HAVE_C99_COMPLEX, MGL_HAVE_RVAL</code>. I specially set them to <code>0</code> for Borland and Microsoft compilers due to compatibility reasons. Also default setting are good for GNU (gcc, mingw) and clang compilers. However, for another compiler you may need to manually set this defines to <code>0</code> in file <code>include/mgl2/config.h</code> if you are using precompiled binaries.
-</p>
-
-
-<hr>
-<a name="Quick-guide"></a>
-<div class="header">
-<p>
-Next: <a href="#Changes-from-v_002e1" accesskey="n" rel="next">Changes from v.1</a>, Previous: <a href="#Installation" accesskey="p" rel="prev">Installation</a>, Up: <a href="#Overview" accesskey="u" rel="up">Overview</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Quick-guide-1"></a>
-<h3 class="section">1.4 Quick guide</h3>
-
-
-<p>There are 3 steps to prepare the plot in MathGL: (1) prepare data to be plotted, (2) setup plot, (3) plot data. Let me show this on the example of surface plotting.
-</p>
-<p>First we need the data. MathGL use its own class <code>mglData</code> to handle data arrays (see <a href="#Data-processing">Data processing</a>). This class give ability to handle data arrays by more or less format independent way. So, create it
-</p><pre class="verbatim"> int main()
- {
- mglData dat(30,40); // data to for plotting
- for(long i=0;i<30;i++) for(long j=0;j<40;j++)
- dat.a[i+30*j] = 1/(1+(i-15)*(i-15)/225.+(j-20)*(j-20)/400.);
-</pre><p>Here I create matrix 30*40 and initialize it by formula. Note, that I use <code>long</code> type for indexes <var>i</var>, <var>j</var> because data arrays can be really large and <code>long</code> type will automatically provide proper indexing.
-</p>
-<p>Next step is setup of the plot. The only setup I need is axis rotation and lighting.
-</p><pre class="verbatim"> mglGraph gr; // class for plot drawing
- gr.Rotate(50,60); // rotate axis
- gr.Light(true); // enable lighting
-</pre>
-<p>Everything is ready. And surface can be plotted.
-</p><pre class="verbatim"> gr.Surf(dat); // plot surface
-</pre><p>Basically plot is done. But I decide to add yellow (‘<samp>y</samp>’ color, see <a href="#Color-styles">Color styles</a>) contour lines on the surface. To do it I can just add:
-</p><pre class="verbatim"> gr.Cont(dat,"y"); // plot yellow contour lines
-</pre><p>This demonstrate one of base MathGL concept (see, <a href="#General-concepts">General concepts</a>) – “new drawing never clears things drawn already”. So, you can just consequently call different plotting functions to obtain “combined” plot. For example, if one need to draw axis then he can just call one more plotting function
-</p><pre class="verbatim"> gr.Axis(); // draw axis
-</pre>
-<p>Now picture is ready and we can save it in a file.
-</p><pre class="verbatim"> gr.WriteFrame("sample.png"); // save it
- }
-</pre>
-<p>To compile your program, you need to specify the linker option <code>-lmgl</code>.
-</p>
-<p>This is enough for a compilation of console program or with external (non-MathGL) window library. If you want to use FLTK or Qt windows provided by MathGL then you need to add the option <code>-lmgl-wnd</code>.
-</p>
-<p>Fortran users also should add C++ library by the option <code>-lstdc++</code>. If library was built with <code>enable-double=ON</code> (this default for v.2.1 and later) then all real numbers must be real*8. You can make it automatic if use option <code>-fdefault-real-8</code>.
-</p>
-
-<hr>
-<a name="Changes-from-v_002e1"></a>
-<div class="header">
-<p>
-Next: <a href="#Utilities" accesskey="n" rel="next">Utilities</a>, Previous: <a href="#Quick-guide" accesskey="p" rel="prev">Quick guide</a>, Up: <a href="#Overview" accesskey="u" rel="up">Overview</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Changes-from-v_002e1_002e_002a"></a>
-<h3 class="section">1.5 Changes from v.1.*</h3>
-
-
-<p>There are a lot of changes for v.2. Here I denote only main of them.
-</p><ul>
-<li> mglGraph class is single plotter class instead of mglGraphZB, mglGraphPS and so on.
-</li><li> Text style and text color positions are swapped. I.e. text style ‘<samp>r:C</samp>’ give red centered text, but not roman dark cyan text as for v.1.*.
-</li><li> ColumnPlot() indexing is reverted.
-</li><li> Move most of arguments of plotting functions into the string parameter and/or options.
-</li><li> “Bright” colors (like {b8}) can be used in color schemes and line styles.
-</li><li> Intensively use pthread internally for parallelization of drawing and data processing.
-</li><li> Add tick labels rotation and skipping. Add ticks in time/date format.
-</li><li> New kinds of plots (Tape(), Label(), Cones(), ContV()). Extend existing plots. New primitives (Circle(), Ellipse(), Rhomb(), ...). New plot positioning (MultiPlot(), GridPlot())
-</li><li> Improve MGL scripts. Add ’ask’ command and allow string concatenation from different lines.
-</li><li> Export to LaTeX and to 3D formats (OBJ, OFF, STL).
-</li><li> Add pipes support in utilities (<code>mglconv, mglview</code>).
-</li></ul>
-
-
-<hr>
-<a name="Utilities"></a>
-<div class="header">
-<p>
-Next: <a href="#Thanks" accesskey="n" rel="next">Thanks</a>, Previous: <a href="#Changes-from-v_002e1" accesskey="p" rel="prev">Changes from v.1</a>, Up: <a href="#Overview" accesskey="u" rel="up">Overview</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Utilities-for-parsing-MGL"></a>
-<h3 class="section">1.6 Utilities for parsing MGL</h3>
-
-
-<p>MathGL library provides several tools for parsing MGL scripts. There is tools saving it to bitmap or vectorial images (<code>mglconv</code>). Tool <code>mglview</code> show MGL script and allow to rotate and setup the image. Another feature of <code>mglview</code> is loading *.mgld files (see <code>ExportMGLD()</code>) for quick viewing 3d pictures.
-</p>
-<p>Both tools have similar set of arguments. They can be name of script file or options. You can use ‘<samp>-</samp>’ as script name for using standard input (i.e. pipes). Options are:
-</p><ul>
-<li> <strong>-1</strong> <var>str</var>
-set <var>str</var> as argument $1 for script;
-</li><li> ...
-...
-</li><li> <strong>-9</strong> <var>str</var>
-set <var>str</var> as argument $9 for script;
-</li><li> <strong>-L</strong> <var>loc</var>
-set locale to <var>loc</var>;
-</li><li> <strong>-s</strong> <var>fname</var>
-set MGL script for setting up the plot;
-</li><li> <strong>-h</strong>
-print help message.
-</li></ul>
-<p>Additionally <code>mglconv</code> have following options:
-</p><ul>
-<li> <strong>-A</strong> <var>val</var>
-add <var>val</var> into the list of animation parameters;
-</li><li> <strong>-C</strong> <var>v1</var>:<var>v2</var>[:<var>dv</var>]
-add values from <var>v1</var> ot <var>v2</var> with step <var>dv</var> (default is 1) into the list of animation parameters;
-</li><li> <strong>-o</strong> <var>name</var>
-set output file name;
-</li><li> <strong>-n</strong>
-disable default output (script should save results by itself);
-</li><li> <strong>-S</strong> <var>val</var>
-set set scaling factor for <a href="#setsize">setsize</a>;
-</li><li> <strong>-q</strong> <var>val</var>
-set <a href="#quality">quality</a> for output (val=0...9).
-</li></ul>
-
-<p>Also you can create animated GIF file or a set of JPEG files with names ‘<samp>frameNNNN.jpg</samp>’ (here ‘<samp>NNNN</samp>’ is frame index). Values of the parameter <code>$0</code> for making animation can be specified inside the script by comment <code>##a val</code> for each value <code>val</code> (one comment for one value) or by option(s) ‘<samp>-A val</samp>’. Also you can specify a cycle for animation by comment <code>##c v1 v2 dv</code> or by option <code>-C v1:v2:dv</code>. In the case of found/specified animation parameters, tool will execute script several times – once for each value of <code>$0</code>.
-</p>
-
-<p>MathGL also provide another simple tool <code>mgl.cgi</code> which parse MGL script from CGI request and send back produced PNG file. Usually this program should be placed in <code>/usr/lib/cgi-bin/</code>. But you need to put this program by yourself due to possible security issues and difference of Apache server settings.
-</p>
-
-<hr>
-<a name="Thanks"></a>
-<div class="header">
-<p>
-Previous: <a href="#Utilities" accesskey="p" rel="prev">Utilities</a>, Up: <a href="#Overview" accesskey="u" rel="up">Overview</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Thanks-1"></a>
-<h3 class="section">1.7 Thanks</h3>
-
-
-<ul>
-<li> My special thanks to my wife for the patience during the writing of this library and for the help in documentation writing and spelling.
-</li><li> I’m thankful to my coauthors D. Kulagin and M. Vidassov for help in developing MathGL.
-</li><li> I’m thankful to Diego Sejas Viscarra for developing mgltex, contribution to fractal generation and fruitful suggestions.
-</li><li> I’m thankful to D. Eftaxiopoulos, D. Haley, V. Lipatov and S.M. Plis for making binary packages for Linux.
-</li><li> I’m thankful to S. Skobelev, C. Mikhailenko, M. Veysman, A. Prokhorov, A. Korotkevich, V. Onuchin, S.M. Plis, R. Kiselev, A. Ivanov, N. Troickiy and V. Lipatov for fruitful comments.
-</li><li> I’m thankful to sponsors M. Veysman (<a href="http://jiht.ru/en/about/structure.php?set_filter_structure=Y&structure_UF_DEPARTMENT=241&filter=Y&set_filter=Y">IHED RAS</a>) and A. Prokhorov (<a href="www.datadvance.net">DATADVANCE</a>).
-</li></ul>
-
-<p>Javascript interface was developed with support of <a href="www.datadvance.net">DATADVANCE</a> company.
-</p>
-
-
-<hr>
-<a name="Examples"></a>
-<div class="header">
-<p>
-Next: <a href="#General-concepts" accesskey="n" rel="next">General concepts</a>, Previous: <a href="#Overview" accesskey="p" rel="prev">Overview</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="MathGL-examples"></a>
-<h2 class="chapter">2 MathGL examples</h2>
-
-
-<p>This chapter contain information about basic and advanced MathGL, hints and samples for all types of graphics. I recommend you read first 2 sections one after another and at least look on <a href="#Hints">Hints</a> section. Also I recommend you to look at <a href="#General-concepts">General concepts</a> and <a href="#FAQ">FAQ</a>.
-</p>
-<p>Note, that MathGL v.2.* have only 2 end-user interfaces: one for C/Fortran and similar languages which don’t support classes, another one for C++/Python/Octave and similar languages which support classes. So, most of samples placed in this chapter can be run as is (after minor changes due to different syntaxes for different languages). For example, the C++ code
-</p><pre class="verbatim">#include <mgl2/mgl.h>
-int main()
-{
- mglGraph gr;
- gr.FPlot("sin(pi*x)");
- gr.WriteFrame("test.png");
-}
-</pre><p>in Python will be as
-</p><pre class="verbatim">from mathgl import *
-gr = mglGraph();
-gr.FPlot("sin(pi*x)");
-gr.WriteFrame("test.png");
-</pre><p>in Octave will be as (you need first execute <code>mathgl;</code> in newer Octave versions)
-</p><pre class="verbatim">gr = mglGraph();
-gr.FPlot("sin(pi*x)");
-gr.WriteFrame("test.png");
-</pre><p>in C will be as
-</p><pre class="verbatim">#include <mgl2/mgl_cf.h>
-int main()
-{
- HMGL gr = mgl_create_graph(600,400);
- mgl_fplot(gr,"sin(pi*x)","","");
- mgl_write_frame(gr,"test.png","");
- mgl_delete_graph(gr);
-}
-</pre><p>in Fortran will be as
-</p><pre class="verbatim">integer gr, mgl_create_graph
-gr = mgl_create_graph(600,400);
-call mgl_fplot(gr,'sin(pi*x)','','');
-call mgl_write_frame(gr,'test.png','');
-call mgl_delete_graph(gr);
-</pre><p>and so on.
-</p>
-
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Basic-usage" accesskey="1">Basic usage</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Advanced-usage" accesskey="2">Advanced usage</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-handling" accesskey="3">Data handling</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-plotting" accesskey="4">Data plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Hints" accesskey="5">Hints</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#FAQ" accesskey="6">FAQ</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Basic-usage"></a>
-<div class="header">
-<p>
-Next: <a href="#Advanced-usage" accesskey="n" rel="next">Advanced usage</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Basic-usage-1"></a>
-<h3 class="section">2.1 Basic usage</h3>
-
-
-<p>MathGL library can be used by several manners. Each has positive and negative sides:
-</p><ul>
-<li> <em>Using of MathGL library features for creating graphical window (requires FLTK, Qt or GLUT libraries).</em>
-
-<p>Positive side is the possibility to view the plot at once and to modify it (rotate, zoom or switch on transparency or lighting) by hand or by mouse. Negative sides are: the need of X-terminal and limitation consisting in working with the only one set of data at a time.
-</p>
-</li><li> <em>Direct writing to file in bitmap or vector format without creation of graphical window.</em>
-
-<p>Positive aspects are: batch processing of similar data set (for example, a set of resulting data files for different calculation parameters), running from the console program (including the cluster calculation), fast and automated drawing, saving pictures for further analysis (or demonstration). Negative sides are: the usage of the external program for picture viewing. Also, the data plotting is non-visual. So, you have to imagine the picture (view angles, lighting and so on) before the plotting. I recommend to use graphical window for determining the optimal parameters of plotting on the base of some typical data set. And later use these parameters for batch processing in console program.
-</p>
-</li><li> <em>Drawing in memory with the following displaying by other graphical program.</em>
-
-<p>In this case the programmer has more freedom in selecting the window libraries (not only FLTK, Qt or GLUT), in positioning and surroundings control and so on. I recommend to use such way for “stand alone” programs.
-</p>
-</li><li> <em>Using FLTK or Qt widgets provided by MathGL</em>
-
-<p>Here one can use a set of standard widgets which support export to many file formats, copying to clipboard, handle mouse and so on.
-</p></li></ul>
-
-<p>MathGL drawing can be created not only by object oriented languages (like, C++ or Python), but also by pure C or Fortran-like languages. The usage of last one is mostly identical to usage of classes (except the different function names). But there are some differences. C functions must have argument HMGL (for graphics) and/or HMDT (for data arrays) which specifies the object for drawing or manipulating (changing). Fortran users may regard these variables as integer. So, firstly the user has to create this object by function mgl_create_*() and has to delete it after the using by function mgl_delete_*().
-</p>
-<p>Let me consider the aforesaid in more detail.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Using-MathGL-window" accesskey="1">Using MathGL window</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Drawing-to-file" accesskey="2">Drawing to file</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Animation" accesskey="3">Animation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Drawing-in-memory" accesskey="4">Drawing in memory</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Draw-and-calculate" accesskey="5">Draw and calculate</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Using-QMathGL" accesskey="6">Using QMathGL</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#OpenGL-output" accesskey="7">OpenGL output</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#MathGL-and-PyQt" accesskey="8">MathGL and PyQt</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#MathGL-and-MPI" accesskey="9">MathGL and MPI</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-
-<hr>
-<a name="Using-MathGL-window"></a>
-<div class="header">
-<p>
-Next: <a href="#Drawing-to-file" accesskey="n" rel="next">Drawing to file</a>, Up: <a href="#Basic-usage" accesskey="u" rel="up">Basic usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Using-MathGL-window-1"></a>
-<h4 class="subsection">2.1.1 Using MathGL window</h4>
-
-<a name="index-window"></a>
-<a name="index-widgets"></a>
-
-<p>The “interactive” way of drawing in MathGL consists in window creation with help of class <code>mglQT</code>, <code>mglFLTK</code> or <code>mglGLUT</code> (see <a href="#Widget-classes">Widget classes</a>) and the following drawing in this window. There is a corresponding code:
-</p><pre class="verbatim">#include <mgl2/qt.h>
-int sample(mglGraph *gr)
-{
- gr->Rotate(60,40);
- gr->Box();
- return 0;
-}
-//-----------------------------------------------------
-int main(int argc,char **argv)
-{
- mglQT gr(sample,"MathGL examples");
- return gr.Run();
-}
-</pre><p>Here callback function <code>sample</code> is defined. This function does all drawing. Other function <code>main</code> is entry point function for console program. For compilation, just execute the command
-</p><pre class="verbatim">gcc test.cpp -lmgl-qt5 -lmgl
-</pre><p>You can use "-lmgl-qt4" instead of "-lmgl-qt5", if Qt4 is installed.
-</p>
-<p>Alternatively you can create yours own class inherited from <a href="#mglDraw-class">mglDraw class</a> and re-implement the function <code>Draw()</code> in it:
-</p><pre class="verbatim">#include <mgl2/qt.h>
-class Foo : public mglDraw
-{
-public:
- int Draw(mglGraph *gr);
-};
-//-----------------------------------------------------
-int Foo::Draw(mglGraph *gr)
-{
- gr->Rotate(60,40);
- gr->Box();
- return 0;
-}
-//-----------------------------------------------------
-int main(int argc,char **argv)
-{
- Foo foo;
- mglQT gr(&foo,"MathGL examples");
- return gr.Run();
-}
-</pre><p>Or use pure C-functions:
-</p><pre class="verbatim">#include <mgl2/mgl_cf.h>
-int sample(HMGL gr, void *)
-{
- mgl_rotate(gr,60,40,0);
- mgl_box(gr);
-}
-int main(int argc,char **argv)
-{
- HMGL gr;
- gr = mgl_create_graph_qt(sample,"MathGL examples",0,0);
- return mgl_qt_run();
-/* generally I should call mgl_delete_graph() here,
- * but I omit it in main() function. */
-}
-</pre>
-<p>The similar code can be written for <code>mglGLUT</code> window (function <code>sample()</code> is the same):
-</p><pre class="verbatim">#include <mgl2/glut.h>
-int main(int argc,char **argv)
-{
- mglGLUT gr(sample,"MathGL examples");
- return 0;
-}
-</pre>
-<p>The rotation, shift, zooming, switching on/off transparency and lighting can be done with help of tool-buttons (for <code>mglQT, mglFLTK</code>) or by hot-keys: ‘<samp>a</samp>’, ‘<samp>d</samp>’, ‘<samp>w</samp>’, ‘<samp>s</samp>’ for plot rotation, ‘<samp>r</samp>’ and ‘<samp>f</samp>’ switching on/off transparency and lighting. Press ‘<samp>x</samp>’ for exit (or closing the window).
-</p>
-<p>In this example function <code>sample</code> rotates axes (<code>Rotate()</code>, see <a href="#Subplots-and-rotation">Subplots and rotation</a>) and draws the bounding box (<code>Box()</code>). Drawing is placed in separate function since it will be used on demand when window canvas needs to be redrawn.
-</p>
-
-<hr>
-<a name="Drawing-to-file"></a>
-<div class="header">
-<p>
-Next: <a href="#Animation" accesskey="n" rel="next">Animation</a>, Previous: <a href="#Using-MathGL-window" accesskey="p" rel="prev">Using MathGL window</a>, Up: <a href="#Basic-usage" accesskey="u" rel="up">Basic usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Drawing-to-file-1"></a>
-<h4 class="subsection">2.1.2 Drawing to file</h4>
-
-
-<p>Another way of using MathGL library is the direct writing of the picture to the file. It is most usable for plot creation during long calculation or for using of small programs (like Matlab or Scilab scripts) for visualizing repetitive sets of data. But the speed of drawing is much higher in comparison with a script language.
-</p>
-<p>The following code produces a bitmap PNG picture:
-</p><pre class="verbatim">#include <mgl2/mgl.h>
-int main(int ,char **)
-{
- mglGraph gr;
- gr.Alpha(true); gr.Light(true);
- sample(&gr); // The same drawing function.
- gr.WritePNG("test.png"); // Don't forget to save the result!
- return 0;
-}
-</pre><p>For compilation, you need only libmgl library not the one with widgets
-</p><pre class="verbatim">gcc test.cpp -lmgl
-</pre><p>This can be important if you create a console program in computer/cluster where X-server (and widgets) is inaccessible.
-</p>
-<p>The only difference from the previous variant (using windows) is manual switching on the transparency <code>Alpha</code> and lightning <code>Light</code>, if you need it. The usage of frames (see <a href="#Animation">Animation</a>) is not advisable since the whole image is prepared each time. If function <code>sample</code> contains frames then only last one will be saved to the file. In principle, one does not need to separate drawing functions in case of direct file writing in consequence of the single calling of this function for each picture. However, one may use the same drawing procedure to create a plot with changeable parameters, to export in different file types, to emphasize the drawing code and so on. So, in future I will put the drawing in the separate function.
-</p>
-<p>The code for export into other formats (for example, into vector EPS file) looks the same:
-</p><pre class="verbatim">#include <mgl2/mgl.h>
-int main(int ,char **)
-{
- mglGraph gr;
- gr.Light(true);
- sample(&gr); // The same drawing function.
- gr.WriteEPS("test.eps"); // Don't forget to save the result!
- return 0;
-}
-</pre><p>The difference from the previous one is using other function <code>WriteEPS()</code> for EPS format instead of function <code>WritePNG()</code>. Also, there is no switching on of the plot transparency <code>Alpha</code> since EPS format does not support it.
-</p>
-
-<hr>
-<a name="Animation"></a>
-<div class="header">
-<p>
-Next: <a href="#Drawing-in-memory" accesskey="n" rel="next">Drawing in memory</a>, Previous: <a href="#Drawing-to-file" accesskey="p" rel="prev">Drawing to file</a>, Up: <a href="#Basic-usage" accesskey="u" rel="up">Basic usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Animation-1"></a>
-<h4 class="subsection">2.1.3 Animation</h4>
-
-
-<p>Widget classes (<code>mglWindow</code>, <code>mglGLUT</code>) support a delayed drawing, when all plotting functions are called once at the beginning of writing to memory lists. Further program displays the saved lists faster. Resulting redrawing will be faster but it requires sufficient memory. Several lists (frames) can be displayed one after another (by pressing ‘<samp>,</samp>’, ‘<samp>.</samp>’) or run as cinema. To switch these feature on one needs to modify function <code>sample</code>:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->NewFrame(); // the first frame
- gr->Rotate(60,40);
- gr->Box();
- gr->EndFrame(); // end of the first frame
- gr->NewFrame(); // the second frame
- gr->Box();
- gr->Axis("xy");
- gr->EndFrame(); // end of the second frame
- return gr->GetNumFrame(); // returns the frame number
-}
-</pre><p>First, the function creates a frame by calling <code>NewFrame()</code> for rotated axes and draws the bounding box. The function <code>EndFrame()</code> <strong>must be</strong> called after the frame drawing! The second frame contains the bounding box and axes <code>Axis("xy")</code> in the initial (unrotated) coordinates. Function <code>sample</code> returns the number of created frames <code>GetNumFrame()</code>.
-</p>
-<p>Note, that animation can be also done as visualization of running calculations (see <a href="#Draw-and-calculate">Draw and calculate</a>).
-</p>
-<p>Pictures with <strong>animation can be saved in file(s)</strong> as well. You can: export in animated GIF, or save each frame in separate file (usually JPEG) and convert these files into the movie (for example, by help of ImageMagic). Let me show both methods.
-</p>
-<a name="GIF"></a><p>The simplest methods is making animated GIF. There are 3 steps: (1) open GIF file by <code>StartGIF()</code> function; (2) create the frames by calling <code>NewFrame()</code> before and <code>EndFrame()</code> after plotting; (3) close GIF by <code>CloseGIF()</code> function. So the simplest code for “running” sinusoid will look like this:
-</p><pre class="verbatim">#include <mgl2/mgl.h>
-int main(int ,char **)
-{
- mglGraph gr;
- mglData dat(100);
- char str[32];
- gr.StartGIF("sample.gif");
- for(int i=0;i<40;i++)
- {
- gr.NewFrame(); // start frame
- gr.Box(); // some plotting
- for(int j=0;j<dat.nx;j++)
- dat.a[j]=sin(M_PI*j/dat.nx+M_PI*0.05*i);
- gr.Plot(dat,"b");
- gr.EndFrame(); // end frame
- }
- gr.CloseGIF();
- return 0;
-}
-</pre>
-<a name="MPEG"></a><p>The second way is saving each frame in separate file (usually JPEG) and later make the movie from them. MathGL have special function for saving frames – it is <code>WriteFrame()</code>. This function save each frame with automatic name ‘<samp>frame0001.jpg, frame0002.jpg</samp>’ and so on. Here prefix ‘<samp>frame</samp>’ is defined by <var>PlotId</var> variable of <code>mglGraph</code> class. So the similar code will look like this:
-</p><pre class="verbatim">#include <mgl2/mgl.h>
-int main(int ,char **)
-{
- mglGraph gr;
- mglData dat(100);
- char str[32];
- for(int i=0;i<40;i++)
- {
- gr.NewFrame(); // start frame
- gr.Box(); // some plotting
- for(int j=0;j<dat.nx;j++)
- dat.a[j]=sin(M_PI*j/dat.nx+M_PI*0.05*i);
- gr.Plot(dat,"b");
- gr.EndFrame(); // end frame
- gr.WriteFrame(); // save frame
- }
- return 0;
-}
-</pre>
-<p>Created files can be converted to movie by help of a lot of programs. For example, you can use ImageMagic (command ‘<samp>convert frame*.jpg movie.mpg</samp>’), MPEG library, GIMP and so on.
-</p>
-<p>Finally, you can use <code>mglconv</code> tool for doing the same with MGL scripts (see <a href="#Utilities">Utilities</a>).
-</p>
-
-<hr>
-<a name="Drawing-in-memory"></a>
-<div class="header">
-<p>
-Next: <a href="#Draw-and-calculate" accesskey="n" rel="next">Draw and calculate</a>, Previous: <a href="#Animation" accesskey="p" rel="prev">Animation</a>, Up: <a href="#Basic-usage" accesskey="u" rel="up">Basic usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Drawing-in-memory-1"></a>
-<h4 class="subsection">2.1.4 Drawing in memory</h4>
-
-
-<p>The last way of MathGL using is the drawing in memory. Class <code>mglGraph</code> allows one to create a bitmap picture in memory. Further this picture can be displayed in window by some window libraries (like wxWidgets, FLTK, Windows GDI and so on). For example, the code for drawing in wxWidget library looks like:
-</p><pre class="verbatim">void MyForm::OnPaint(wxPaintEvent& event)
-{
- int w,h,x,y;
- GetClientSize(&w,&h); // size of the picture
- mglGraph gr(w,h);
-
- gr.Alpha(true); // draws something using MathGL
- gr.Light(true);
- sample(&gr,NULL);
-
- wxImage img(w,h,gr.GetRGB(),true);
- ToolBar->GetSize(&x,&y); // gets a height of the toolbar if any
- wxPaintDC dc(this); // and draws it
- dc.DrawBitmap(wxBitmap(img),0,y);
-}
-</pre><p>The drawing in other libraries is most the same.
-</p>
-<p>For example, FLTK code will look like
-</p><pre class="verbatim">void Fl_MyWidget::draw()
-{
- mglGraph gr(w(),h());
- gr.Alpha(true); // draws something using MathGL
- gr.Light(true);
- sample(&gr,NULL);
- fl_draw_image(gr.GetRGB(), x(), y(), gr.GetWidth(), gr.GetHeight(), 3);
-}
-</pre><p>Qt code will look like
-</p><pre class="verbatim">void MyWidget::paintEvent(QPaintEvent *)
-{
- mglGraph gr(w(),h());
-
- gr.Alpha(true); // draws something using MathGL
- gr.Light(true); gr.Light(0,mglPoint(1,0,-1));
- sample(&gr,NULL);
-
- // Qt don't support RGB format as is. So, let convert it to BGRN.
- long w=gr.GetWidth(), h=gr.GetHeight();
- unsigned char *buf = new uchar[4*w*h];
- gr.GetBGRN(buf, 4*w*h)
- QPixmap pic = QPixmap::fromImage(QImage(*buf, w, h, QImage::Format_RGB32));
-
- QPainter paint;
- paint.begin(this); paint.drawPixmap(0,0,pic); paint.end();
- delete []buf;
-}
-</pre>
-
-<hr>
-<a name="Draw-and-calculate"></a>
-<div class="header">
-<p>
-Next: <a href="#Using-QMathGL" accesskey="n" rel="next">Using QMathGL</a>, Previous: <a href="#Drawing-in-memory" accesskey="p" rel="prev">Drawing in memory</a>, Up: <a href="#Basic-usage" accesskey="u" rel="up">Basic usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Draw-and-calculate-1"></a>
-<h4 class="subsection">2.1.5 Draw and calculate</h4>
-
-
-<p>MathGL can be used to draw plots in parallel with some external calculations. The simplest way for this is the usage of <a href="#mglDraw-class">mglDraw class</a>. At this you should enable pthread for widgets by setting <code>enable-pthr-widget=ON</code> at configure stage (it is set by default).
-First, you need to inherit you class from <code>mglDraw</code> class, define virtual members <code>Draw()</code> and <code>Calc()</code> which will draw the plot and proceed calculations. You may want to add the pointer <code>mglWnd *wnd;</code> to window with plot for interacting with them. Finally, you may add any other data or member functions. The sample class is shown below
-</p><pre class="verbatim">class myDraw : public mglDraw
-{
- mglPoint pnt; // some variable for changeable data
- long i; // another variable to be shown
- mglWnd *wnd; // external window for plotting
-public:
- myDraw(mglWnd *w=0) : mglDraw() { wnd=w; }
- void SetWnd(mglWnd *w) { wnd=w; }
- int Draw(mglGraph *gr)
- {
- gr->Line(mglPoint(),pnt,"Ar2");
- char str[16]; snprintf(str,15,"i=%ld",i);
- gr->Puts(mglPoint(),str);
- return 0;
- }
- void Calc()
- {
- for(i=0;;i++) // do calculation
- {
- long_calculations();// which can be very long
- Check(); // check if need pause
- pnt.Set(2*mgl_rnd()-1,2*mgl_rnd()-1);
- if(wnd) wnd->Update();
- }
- }
-} dr;
-</pre><p>There is only one issue here. Sometimes you may want to pause calculations to view result carefully, or save state, or change something. So, you need to provide a mechanism for pausing. Class <code>mglDraw</code> provide function <code>Check();</code> which check if toolbutton with pause is pressed and wait until it will be released. This function should be called in a "safety" places, where you can pause the calculation (for example, at the end of time step). Also you may add call <code>exit(0);</code> at the end of <code>Calc();</code> function for closing window and exit after finishing calculations.
-Finally, you need to create a window itself and run calculations.
-</p><pre class="verbatim">int main(int argc,char **argv)
-{
- mglFLTK gr(&dr,"Multi-threading test"); // create window
- dr.SetWnd(&gr); // pass window pointer to yours class
- dr.Run(); // run calculations
- gr.Run(); // run event loop for window
- return 0;
-}
-</pre>
-<p>Note, that you can reach the similar functionality without using <code>mglDraw</code> class (i.e. even for pure C code).
-</p><pre class="verbatim">mglFLTK *gr=NULL; // pointer to window
-void *calc(void *) // function with calculations
-{
- mglPoint pnt; // some data for plot
- for(long i=0;;i++) // do calculation
- {
- long_calculations(); // which can be very long
- pnt.Set(2*mgl_rnd()-1,2*mgl_rnd()-1);
- if(gr)
- {
- gr->Clf(); // make new drawing
- // draw something
- gr->Line(mglPoint(),pnt,"Ar2");
- char str[16]; snprintf(str,15,"i=%ld",i);
- gr->Puts(mglPoint(),str);
- // don't forgot to update window
- gr->Update();
- }
- }
-}
-int main(int argc,char **argv)
-{
- static pthread_t thr;
- pthread_create(&thr,0,calc,0); // create separate thread for calculations
- pthread_detach(thr); // and detach it
- gr = new mglFLTK; // now create window
- gr->Run(); // and run event loop
- return 0;
-}
-</pre><p>This sample is exactly the same as one with <code>mglDraw</code> class, but it don’t have functionality for pausing calculations. If you need it then you have to create global mutex (like <code>pthread_mutex_t *mutex = pthread_mutex_init(&mutex,NULL);</code>), set it to window (like <code>gr->SetMutex(mutex);</code>) and periodically check it at calculations (like <code>pthread_mutex_lock(&mutex); pthread_mutex_unlock(&mutex);</code>).
-</p>
-<p>Finally, you can put the event-handling loop in separate instead of yours code by using <code>RunThr()</code> function instead of <code>Run()</code> one. Unfortunately, such method work well only for FLTK windows and only if pthread support was enabled. Such limitation come from the Qt requirement to be run in the primary thread only. The sample code will be:
-</p><pre class="verbatim">int main(int argc,char **argv)
-{
- mglFLTK gr("test");
- gr.RunThr(); // <-- need MathGL version which use pthread for widgets
- mglPoint pnt; // some data
- for(int i=0;i<10;i++) // do calculation
- {
- long_calculations();// which can be very long
- pnt.Set(2*mgl_rnd()-1,2*mgl_rnd()-1);
- gr.Clf(); // make new drawing
- gr.Line(mglPoint(),pnt,"Ar2");
- char str[10] = "i=0"; str[3] = '0'+i;
- gr->Puts(mglPoint(),str);
- gr.Update(); // update window
- }
- return 0; // finish calculations and close the window
-}
-</pre>
-
-<hr>
-<a name="Using-QMathGL"></a>
-<div class="header">
-<p>
-Next: <a href="#OpenGL-output" accesskey="n" rel="next">OpenGL output</a>, Previous: <a href="#Draw-and-calculate" accesskey="p" rel="prev">Draw and calculate</a>, Up: <a href="#Basic-usage" accesskey="u" rel="up">Basic usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Using-QMathGL-1"></a>
-<h4 class="subsection">2.1.6 Using QMathGL</h4>
-
-
-<p>MathGL have several interface widgets for different widget libraries. There are QMathGL for Qt, Fl_MathGL for FLTK. These classes provide control which display MathGL graphics. Unfortunately there is no uniform interface for widget classes because all libraries have slightly different set of functions, features and so on. However the usage of MathGL widgets is rather simple. Let me show it on the example of QMathGL.
-</p>
-<p>First of all you have to define the drawing function or inherit a class from <code>mglDraw</code> class. After it just create a window and setup QMathGL instance as any other Qt widget:
-</p><pre class="verbatim">#include <QApplication>
-#include <QMainWindow>
-#include <QScrollArea>
-#include <mgl2/qmathgl.h>
-int main(int argc,char **argv)
-{
- QApplication a(argc,argv);
- QMainWindow *Wnd = new QMainWindow;
- Wnd->resize(810,610); // for fill up the QMGL, menu and toolbars
- Wnd->setWindowTitle("QMathGL sample");
- // here I allow to scroll QMathGL -- the case
- // then user want to prepare huge picture
- QScrollArea *scroll = new QScrollArea(Wnd);
-
- // Create and setup QMathGL
- QMathGL *QMGL = new QMathGL(Wnd);
-//QMGL->setPopup(popup); // if you want to setup popup menu for QMGL
- QMGL->setDraw(sample);
- // or use QMGL->setDraw(foo); for instance of class Foo:public mglDraw
- QMGL->update();
-
- // continue other setup (menu, toolbar and so on)
- scroll->setWidget(QMGL);
- Wnd->setCentralWidget(scroll);
- Wnd->show();
- return a.exec();
-}
-</pre>
-
-<hr>
-<a name="OpenGL-output"></a>
-<div class="header">
-<p>
-Next: <a href="#MathGL-and-PyQt" accesskey="n" rel="next">MathGL and PyQt</a>, Previous: <a href="#Using-QMathGL" accesskey="p" rel="prev">Using QMathGL</a>, Up: <a href="#Basic-usage" accesskey="u" rel="up">Basic usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="OpenGL-output-1"></a>
-<h4 class="subsection">2.1.7 OpenGL output</h4>
-
-
-<p>MathGL have possibility to draw resulting plot using OpenGL. This produce resulting plot a bit faster, but with some limitations (especially at use of transparency and lighting). Generally, you need to prepare OpenGL window and call MathGL functions to draw it. There is GLUT interface (see <a href="#Widget-classes">Widget classes</a>) to do it by simple way. Below I show example of OpenGL usage basing on Qt libraries (i.e. by using <code>QGLWidget</code> widget).
-</p>
-<p>First, one need to define widget class derived from <code>QGLWidget</code> and implement a few methods: <code>resizeGL()</code> called after each window resize, <code>paintGL()</code> for displaying the image on the screen, and <code>initializeGL()</code> for initializing OpenGL. The header file looks as following.
-</p><pre class="verbatim">#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-
-#include <QGLWidget>
-#include <mgl2/mgl.h>
-
-class MainWindow : public QGLWidget
-{
- Q_OBJECT
-protected:
- mglGraph *gr; // pointer to MathGL core class
- void resizeGL(int nWidth, int nHeight); // Method called after each window resize
- void paintGL(); // Method to display the image on the screen
- void initializeGL(); // Method to initialize OpenGL
-public:
- MainWindow(QWidget *parent = 0);
- ~MainWindow();
-};
-#endif // MAINWINDOW_H
-</pre>
-<p>The class implementation is rather straightforward. One need to recreate the instance of mglGraph at initializing OpenGL, and ask MathGL to use OpenGL output (set argument <code>1</code> in mglGraph constructor). Of course, the mglGraph object should be deleted at destruction. The method <code>resizeGL()</code> just pass new sizes to OpenGL and update viewport sizes. All plotting functions are located in the method <code>paintGL()</code>. At this, one need to add 2 calls: <code>gr->Clf()</code> at beginning for clearing previous OpenGL primitives; and <code>swapBuffers()</code> for showing output on the screen. The source file looks as following.
-</p><pre class="verbatim">#include "qgl_example.h"
-#include <QApplication>
-//#include <QtOpenGL>
-//-----------------------------------------------------------------------------
-MainWindow::MainWindow(QWidget *parent) : QGLWidget(parent) { gr=0; }
-//-----------------------------------------------------------------------------
-MainWindow::~MainWindow() { if(gr) delete gr; }
-//-----------------------------------------------------------------------------
-void MainWindow::initializeGL() // recreate instance of MathGL core
-{
- if(gr) delete gr;
- gr = new mglGraph(1); // use '1' for argument to force OpenGL output in MathGL
-}
-//-----------------------------------------------------------------------------
-void MainWindow::resizeGL(int w, int h) // standard resize replace
-{
- QGLWidget::resizeGL(w, h);
- glViewport (0, 0, w, h);
-}
-//-----------------------------------------------------------------------------
-void MainWindow::paintGL() // main drawing function
-{
- gr->Clf(); // clear previous OpenGL primitives
- gr->SubPlot(1,1,0);
- gr->Rotate(40,60);
- gr->Light(true);
- gr->AddLight(0,mglPoint(0,0,10),mglPoint(0,0,-1));
- gr->Axis();
- gr->Box();
- gr->FPlot("sin(pi*x)","i2");
- gr->FPlot("cos(pi*x)","|");
- gr->FSurf("cos(2*pi*(x^2+y^2))");
- gr->Finish();
- swapBuffers(); // show output on the screen
-}
-//-----------------------------------------------------------------------------
-int main(int argc, char *argv[]) // create application
-{
- mgl_textdomain(argv?argv[0]:NULL,"");
- QApplication a(argc, argv);
- MainWindow w;
- w.show();
- return a.exec();
-}
-//-----------------------------------------------------------------------------
-</pre>
-
-
-<hr>
-<a name="MathGL-and-PyQt"></a>
-<div class="header">
-<p>
-Next: <a href="#MathGL-and-MPI" accesskey="n" rel="next">MathGL and MPI</a>, Previous: <a href="#OpenGL-output" accesskey="p" rel="prev">OpenGL output</a>, Up: <a href="#Basic-usage" accesskey="u" rel="up">Basic usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="MathGL-and-PyQt-1"></a>
-<h4 class="subsection">2.1.8 MathGL and PyQt</h4>
-
-
-<p>Generally SWIG based classes (including the Python one) are the same as C++ classes. However, there are few tips for using MathGL with PyQt. Below I place a very simple python code which demonstrate how MathGL can be used with PyQt. This code is mostly written by Prof. Dr. Heino Falcke. You can just copy it to a file <code>mgl-pyqt-test.py</code> and execute it from python shell by command <code>execfile("mgl-pyqt-test.py")</code>
-</p>
-<pre class="verbatim">from PyQt4 import QtGui,QtCore
-from mathgl import *
-import sys
-app = QtGui.QApplication(sys.argv)
-qpointf=QtCore.QPointF()
-
-class hfQtPlot(QtGui.QWidget):
- def __init__(self, parent=None):
- QtGui.QWidget.__init__(self, parent)
- self.img=(QtGui.QImage())
- def setgraph(self,gr):
- self.buffer='\t'
- self.buffer=self.buffer.expandtabs(4*gr.GetWidth()*gr.GetHeight())
- gr.GetBGRN(self.buffer,len(self.buffer))
- self.img=QtGui.QImage(self.buffer, gr.GetWidth(),gr.GetHeight(),QtGui.QImage.Format_ARGB32)
- self.update()
- def paintEvent(self, event):
- paint = QtGui.QPainter()
- paint.begin(self)
- paint.drawImage(qpointf,self.img)
- paint.end()
-
-BackgroundColor=[1.0,1.0,1.0]
-size=100
-gr=mglGraph()
-y=mglData(size)
-#y.Modify("((0.7*cos(2*pi*(x+.2)*500)+0.3)*(rnd*0.5+0.5)+362.135+10000.)")
-y.Modify("(cos(2*pi*x*10)+1.1)*1000.*rnd-501")
-x=mglData(size)
-x.Modify("x^2");
-
-def plotpanel(gr,x,y,n):
- gr.SubPlot(2,2,n)
- gr.SetXRange(x)
- gr.SetYRange(y)
- gr.AdjustTicks()
- gr.Axis()
- gr.Box()
- gr.Label("x","x-Axis",1)
- gr.Label("y","y-Axis",1)
- gr.ClearLegend()
- gr.AddLegend("Legend: "+str(n),"k")
- gr.Legend()
- gr.Plot(x,y)
-
-
-gr.Clf(BackgroundColor[0],BackgroundColor[1],BackgroundColor[2])
-gr.SetPlotFactor(1.5)
-plotpanel(gr,x,y,0)
-y.Modify("(cos(2*pi*x*10)+1.1)*1000.*rnd-501")
-plotpanel(gr,x,y,1)
-y.Modify("(cos(2*pi*x*10)+1.1)*1000.*rnd-501")
-plotpanel(gr,x,y,2)
-y.Modify("(cos(2*pi*x*10)+1.1)*1000.*rnd-501")
-plotpanel(gr,x,y,3)
-
-gr.WritePNG("test.png","Test Plot")
-
-qw = hfQtPlot()
-qw.show()
-qw.setgraph(gr)
-qw.raise_()
-</pre>
-
-
-<hr>
-<a name="MathGL-and-MPI"></a>
-<div class="header">
-<p>
-Previous: <a href="#MathGL-and-PyQt" accesskey="p" rel="prev">MathGL and PyQt</a>, Up: <a href="#Basic-usage" accesskey="u" rel="up">Basic usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="MathGL-and-MPI-1"></a>
-<h4 class="subsection">2.1.9 MathGL and MPI</h4>
-
-
-<p>For using MathGL in MPI program you just need to: (1) plot its own part of data for each running node; (2) collect resulting graphical information in a single program (for example, at node with rank=0); (3) save it. The sample code below demonstrate this for very simple sample of surface drawing.
-</p>
-<p>First you need to initialize MPI
-</p><pre class="verbatim">#include <stdio.h>
-#include <mgl2/mpi.h>
-#include <mpi.h>
-
-int main(int argc, char *argv[])
-{
- // initialize MPI
- int rank=0, numproc=1;
- MPI_Init(&argc, &argv);
- MPI_Comm_size(MPI_COMM_WORLD,&numproc);
- MPI_Comm_rank(MPI_COMM_WORLD,&rank);
- if(rank==0) printf("Use %d processes.\n", numproc);
-</pre>
-<p>Next step is data creation. For simplicity, I create data arrays with the same sizes for all nodes. At this, you have to create <code>mglGraph</code> object too.
-</p>
-<pre class="verbatim"> // initialize data similarly for all nodes
- mglData a(128,256);
- mglGraphMPI gr;
-</pre>
-<p>Now, data should be filled by numbers. In real case, it should be some kind of calculations. But I just fill it by formula.
-</p>
-<pre class="verbatim"> // do the same plot for its own range
- char buf[64];
- sprintf(buf,"xrange %g %g",2.*rank/numproc-1,2.*(rank+1)/numproc-1);
- gr.Fill(a,"sin(2*pi*x)",buf);
-</pre>
-<p>It is time to plot the data. Don’t forget to set proper axis range(s) by using parametric form or by using options (as in the sample).
-</p>
-<pre class="verbatim"> // plot data in each node
- gr.Clf(); // clear image before making the image
- gr.Rotate(40,60);
- gr.Surf(a,"",buf);
-</pre>
-<p>Finally, let send graphical information to node with rank=0.
-</p>
-<pre class="verbatim"> // collect information
- if(rank!=0) gr.MPI_Send(0);
- else for(int i=1;i<numproc;i++) gr.MPI_Recv(i);
-</pre>
-<p>Now, node with rank=0 have whole image. It is time to save the image to a file. Also, you can add a kind of annotations here – I draw axis and bounding box in the sample.
-</p>
-<pre class="verbatim"> if(rank==0)
- {
- gr.Box(); gr.Axis(); // some post processing
- gr.WritePNG("test.png"); // save result
- }
-</pre>
-<p>In my case the program is done, and I finalize MPI. In real program, you can repeat the loop of data calculation and data plotting as many times as you need.
-</p>
-<pre class="verbatim"> MPI_Finalize();
- return 0;
-}
-</pre>
-<p>You can type ‘<samp>mpic++ test.cpp -lmgl-mpi -lmgl && mpirun -np 8 ./a.out</samp>’ for compilation and running the sample program on 8 nodes. Note, that you have to set enable-mpi=ON at MathGL configure to use this feature.
-</p>
-
-
-<hr>
-<a name="Advanced-usage"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-handling" accesskey="n" rel="next">Data handling</a>, Previous: <a href="#Basic-usage" accesskey="p" rel="prev">Basic usage</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Advanced-usage-1"></a>
-<h3 class="section">2.2 Advanced usage</h3>
-
-
-<p>Now I show several non-obvious features of MathGL: several subplots in a single picture, curvilinear coordinates, text printing and so on. Generally you may miss this section at first reading.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Subplots" accesskey="1">Subplots</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Axis-and-ticks" accesskey="2">Axis and ticks</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Curvilinear-coordinates" accesskey="3">Curvilinear coordinates</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Colorbars" accesskey="4">Colorbars</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Bounding-box" accesskey="5">Bounding box</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Ternary-axis" accesskey="6">Ternary axis</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Text-features" accesskey="7">Text features</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Legend-sample" accesskey="8">Legend sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Cutting-sample" accesskey="9">Cutting sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Subplots"></a>
-<div class="header">
-<p>
-Next: <a href="#Axis-and-ticks" accesskey="n" rel="next">Axis and ticks</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Subplots-1"></a>
-<h4 class="subsection">2.2.1 Subplots</h4>
-
-
-<p>Let me demonstrate possibilities of plot positioning and rotation. MathGL has a set of functions: <a href="#subplot">subplot</a>, <a href="#inplot">inplot</a>, <a href="#title">title</a>, <a href="#aspect">aspect</a> and <a href="#rotate">rotate</a> and so on (see <a href="#Subplots-and-rotation">Subplots and rotation</a>). The order of their calling is strictly determined. First, one changes the position of plot in image area (functions <a href="#subplot">subplot</a>, <a href="#inplot">inplot</a> and <a href="#multiplot">multiplot</a>). Secondly, you can add the title of plot by <a href="#title">title</a> function. After that one may rotate the plot (function <a href="#rotate">rotate</a>). Finally, one may change aspects of axes (function <a href="#aspect">aspect</a>). The following code illustrates the aforesaid it:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(2,2,0); gr->Box();
- gr->Puts(mglPoint(-1,1.1),"Just box",":L");
- gr->InPlot(0.2,0.5,0.7,1,false); gr->Box();
- gr->Puts(mglPoint(0,1.2),"InPlot example");
- gr->SubPlot(2,2,1); gr->Title("Rotate only");
- gr->Rotate(50,60); gr->Box();
- gr->SubPlot(2,2,2); gr->Title("Rotate and Aspect");
- gr->Rotate(50,60); gr->Aspect(1,1,2); gr->Box();
- gr->SubPlot(2,2,3); gr->Title("Shear");
- gr->Box("c"); gr->Shear(0.2,0.1); gr->Box();
- return 0;
-}
-</pre><p>Here I used function <code>Puts</code> for printing the text in arbitrary position of picture (see <a href="#Text-printing">Text printing</a>). Text coordinates and size are connected with axes. However, text coordinates may be everywhere, including the outside the bounding box. I’ll show its features later in <a href="#Text-features">Text features</a>.
-</p>
-<div align="center"><img src="png/aspect.png" alt="Example of several subplots on the single picture.">
-</div>
-<p>More complicated sample show how to use most of positioning functions:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(3,2,0); gr->Title("StickPlot");
- gr->StickPlot(3, 0, 20, 30); gr->Box("r"); gr->Puts(mglPoint(0),"0","r");
- gr->StickPlot(3, 1, 20, 30); gr->Box("g"); gr->Puts(mglPoint(0),"1","g");
- gr->StickPlot(3, 2, 20, 30); gr->Box("b"); gr->Puts(mglPoint(0),"2","b");
- gr->SubPlot(3,2,3,""); gr->Title("ColumnPlot");
- gr->ColumnPlot(3, 0); gr->Box("r"); gr->Puts(mglPoint(0),"0","r");
- gr->ColumnPlot(3, 1); gr->Box("g"); gr->Puts(mglPoint(0),"1","g");
- gr->ColumnPlot(3, 2); gr->Box("b"); gr->Puts(mglPoint(0),"2","b");
- gr->SubPlot(3,2,4,""); gr->Title("GridPlot");
- gr->GridPlot(2, 2, 0); gr->Box("r"); gr->Puts(mglPoint(0),"0","r");
- gr->GridPlot(2, 2, 1); gr->Box("g"); gr->Puts(mglPoint(0),"1","g");
- gr->GridPlot(2, 2, 2); gr->Box("b"); gr->Puts(mglPoint(0),"2","b");
- gr->GridPlot(2, 2, 3); gr->Box("m"); gr->Puts(mglPoint(0),"3","m");
- gr->SubPlot(3,2,5,""); gr->Title("InPlot"); gr->Box();
- gr->InPlot(0.4, 1, 0.6, 1, true); gr->Box("r");
- gr->MultiPlot(3,2,1, 2, 1,""); gr->Title("MultiPlot and ShearPlot"); gr->Box();
- gr->ShearPlot(3, 0, 0.2, 0.1); gr->Box("r"); gr->Puts(mglPoint(0),"0","r");
- gr->ShearPlot(3, 1, 0.2, 0.1); gr->Box("g"); gr->Puts(mglPoint(0),"1","g");
- gr->ShearPlot(3, 2, 0.2, 0.1); gr->Box("b"); gr->Puts(mglPoint(0),"2","b");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/inplot.png" alt="Example for most of positioning functions.">
-</div>
-
-
-<hr>
-<a name="Axis-and-ticks"></a>
-<div class="header">
-<p>
-Next: <a href="#Curvilinear-coordinates" accesskey="n" rel="next">Curvilinear coordinates</a>, Previous: <a href="#Subplots" accesskey="p" rel="prev">Subplots</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Axis-and-ticks-1"></a>
-<h4 class="subsection">2.2.2 Axis and ticks</h4>
-
-
-<p>MathGL library can draw not only the bounding box but also the axes, grids, labels and so on. The ranges of axes and their origin (the point of intersection) are determined by functions <code>SetRange()</code>, <code>SetRanges()</code>, <code>SetOrigin()</code> (see <a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a>). Ticks on axis are specified by function <code>SetTicks</code>, <code>SetTicksVal</code>, <code>SetTicksTime</code> (see <a href="#Ticks">Ticks</a>). But usually
-</p>
-<p>Function <a href="#axis">axis</a> draws axes. Its textual string shows in which directions the axis or axes will be drawn (by default <code>"xyz"</code>, function draws axes in all directions). Function <a href="#grid">grid</a> draws grid perpendicularly to specified directions. Example of axes and grid drawing is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(2,2,0); gr->Title("Axis origin, Grid"); gr->SetOrigin(0,0);
- gr->Axis(); gr->Grid(); gr->FPlot("x^3");
-
- gr->SubPlot(2,2,1); gr->Title("2 axis");
- gr->SetRanges(-1,1,-1,1); gr->SetOrigin(-1,-1,-1); // first axis
- gr->Axis(); gr->Label('y',"axis 1",0); gr->FPlot("sin(pi*x)");
- gr->SetRanges(0,1,0,1); gr->SetOrigin(1,1,1); // second axis
- gr->Axis(); gr->Label('y',"axis 2",0); gr->FPlot("cos(pi*x)");
-
- gr->SubPlot(2,2,3); gr->Title("More axis");
- gr->SetOrigin(NAN,NAN); gr->SetRange('x',-1,1);
- gr->Axis(); gr->Label('x',"x",0); gr->Label('y',"y_1",0);
- gr->FPlot("x^2","k");
- gr->SetRanges(-1,1,-1,1); gr->SetOrigin(-1.3,-1); // second axis
- gr->Axis("y","r"); gr->Label('y',"#r{y_2}",0.2);
- gr->FPlot("x^3","r");
-
- gr->SubPlot(2,2,2); gr->Title("4 segments, inverted axis");
- gr->SetOrigin(0,0);
- gr->InPlot(0.5,1,0.5,1); gr->SetRanges(0,10,0,2); gr->Axis();
- gr->FPlot("sqrt(x/2)"); gr->Label('x',"W",1); gr->Label('y',"U",1);
- gr->InPlot(0,0.5,0.5,1); gr->SetRanges(1,0,0,2); gr->Axis("x");
- gr->FPlot("sqrt(x)+x^3"); gr->Label('x',"\\tau",-1);
- gr->InPlot(0.5,1,0,0.5); gr->SetRanges(0,10,4,0); gr->Axis("y");
- gr->FPlot("x/4"); gr->Label('y',"L",-1);
- gr->InPlot(0,0.5,0,0.5); gr->SetRanges(1,0,4,0); gr->FPlot("4*x^2");
- return 0;
-}
-</pre>
-<p>Note, that MathGL can draw not only single axis (which is default). But also several axis on the plot (see right plots). The idea is that the change of settings does not influence on the already drawn graphics. So, for 2-axes I setup the first axis and draw everything concerning it. Then I setup the second axis and draw things for the second axis. Generally, the similar idea allows one to draw rather complicated plot of 4 axis with different ranges (see bottom left plot).
-</p>
-<p>At this inverted axis can be created by 2 methods. First one is used in this sample – just specify minimal axis value to be large than maximal one. This method work well for 2D axis, but can wrongly place labels in 3D case. Second method is more general and work in 3D case too – just use <a href="#aspect">aspect</a> function with negative arguments. For example, following code will produce exactly the same result for 2D case, but 2nd variant will look better in 3D.
-</p><pre class="verbatim">// variant 1
-gr->SetRanges(0,10,4,0); gr->Axis();
-
-// variant 2
-gr->SetRanges(0,10,0,4); gr->Aspect(1,-1); gr->Axis();
-</pre>
-<div align="center"><img src="png/axis.png" alt="Example of axis.">
-</div>
-<p>Another MathGL feature is fine ticks tunning. By default (if it is not changed by <code>SetTicks</code> function), MathGL try to adjust ticks positioning, so that they looks most human readable. At this, MathGL try to extract common factor for too large or too small axis ranges, as well as for too narrow ranges. Last one is non-common notation and can be disabled by <code>SetTuneTicks</code> function.
-</p>
-<p>Also, one can specify its own ticks with arbitrary labels by help of <code>SetTicksVal</code> function. Or one can set ticks in time format. In last case MathGL will try to select optimal format for labels with automatic switching between years, months/days, hours/minutes/seconds or microseconds. However, you can specify its own time representation using formats described in <a href="http://www.manpagez.com/man/3/strftime/">http://www.manpagez.com/man/3/strftime/</a>. Most common variants are ‘<samp>%X</samp>’ for national representation of time, ‘<samp>%x</samp>’ for national representation of date, ‘<samp>%Y</samp>’ for year with century.
-</p>
-<p>The sample code, demonstrated ticks feature is
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(3,3,0); gr->Title("Usual axis"); gr->Axis();
- gr->SubPlot(3,3,1); gr->Title("Too big/small range");
- gr->SetRanges(-1000,1000,0,0.001); gr->Axis();
- gr->SubPlot(3,3,2); gr->Title("LaTeX-like labels");
- gr->Axis("F!");
- gr->SubPlot(3,3,3); gr->Title("Too narrow range");
- gr->SetRanges(100,100.1,10,10.01); gr->Axis();
- gr->SubPlot(3,3,4); gr->Title("No tuning, manual '+'");
- // for version<2.3 you need first call gr->SetTuneTicks(0);
- gr->Axis("+!");
- gr->SubPlot(3,3,5); gr->Title("Template for ticks");
- gr->SetTickTempl('x',"xxx:%g"); gr->SetTickTempl('y',"y:%g");
- gr->Axis();
- // now switch it off for other plots
- gr->SetTickTempl('x',""); gr->SetTickTempl('y',"");
- gr->SubPlot(3,3,6); gr->Title("No tuning, higher precision");
- gr->Axis("!4");
- gr->SubPlot(3,3,7); gr->Title("Manual ticks"); gr->SetRanges(-M_PI,M_PI, 0, 2);
- gr->SetTicks('x',M_PI,0,0,"\\pi"); gr->AddTick('x',0.886,"x^*");
- // alternatively you can use following lines
- //double val[]={-M_PI, -M_PI/2, 0, 0.886, M_PI/2, M_PI};
- //gr->SetTicksVal('x', mglData(6,val), "-\\pi\n-\\pi/2\n0\nx^*\n\\pi/2\n\\pi");
- gr->Axis(); gr->Grid(); gr->FPlot("2*cos(x^2)^2", "r2");
- gr->SubPlot(3,3,8); gr->Title("Time ticks"); gr->SetRange('x',0,3e5);
- gr->SetTicksTime('x',0); gr->Axis();
-}
-</pre>
-<div align="center"><img src="png/ticks.png" alt="Features of axis ticks.">
-</div>
-<p>The last sample I want to show in this subsection is Log-axis. From MathGL’s point of view, the log-axis is particular case of general curvilinear coordinates. So, we need first define new coordinates (see also <a href="#Curvilinear-coordinates">Curvilinear coordinates</a>) by help of <code>SetFunc</code> or <code>SetCoor</code> functions. At this one should wary about proper axis range. So the code looks as following:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(2,2,0,"<_"); gr->Title("Semi-log axis");
- gr->SetRanges(0.01,100,-1,1); gr->SetFunc("lg(x)","");
- gr->Axis(); gr->Grid("xy","g"); gr->FPlot("sin(1/x)");
- gr->Label('x',"x",0); gr->Label('y', "y = sin 1/x",0);
-
- gr->SubPlot(2,2,1,"<_"); gr->Title("Log-log axis");
- gr->SetRanges(0.01,100,0.1,100); gr->SetFunc("lg(x)","lg(y)");
- gr->Axis(); gr->Grid("!","h="); gr->Grid();
- gr->FPlot("sqrt(1+x^2)"); gr->Label('x',"x",0);
- gr->Label('y', "y = \\sqrt{1+x^2}",0);
-
- gr->SubPlot(2,2,2,"<_"); gr->Title("Minus-log axis");
- gr->SetRanges(-100,-0.01,-100,-0.1); gr->SetFunc("-lg(-x)","-lg(-y)");
- gr->Axis(); gr->FPlot("-sqrt(1+x^2)");
- gr->Label('x',"x",0); gr->Label('y', "y = -\\sqrt{1+x^2}",0);
-
- gr->SubPlot(2,2,3,"<_"); gr->Title("Log-ticks");
- gr->SetRanges(0.1,100,0,100); gr->SetFunc("sqrt(x)","");
- gr->Axis(); gr->FPlot("x");
- gr->Label('x',"x",1); gr->Label('y', "y = x",0);
- return 0;
-}
-</pre>
-<div align="center"><img src="png/loglog.png" alt="Features of axis ticks.">
-</div>
-<p>You can see that MathGL automatically switch to log-ticks as we define log-axis formula (in difference from v.1.*). Moreover, it switch to log-ticks for any formula if axis range will be large enough (see right bottom plot). Another interesting feature is that you not necessary define usual log-axis (i.e. when coordinates are positive), but you can define “minus-log” axis when coordinate is negative (see left bottom plot).
-</p>
-
-<hr>
-<a name="Curvilinear-coordinates"></a>
-<div class="header">
-<p>
-Next: <a href="#Colorbars" accesskey="n" rel="next">Colorbars</a>, Previous: <a href="#Axis-and-ticks" accesskey="p" rel="prev">Axis and ticks</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Curvilinear-coordinates-1"></a>
-<h4 class="subsection">2.2.3 Curvilinear coordinates</h4>
-
-
-<p>As I noted in previous subsection, MathGL support curvilinear coordinates. In difference from other plotting programs and libraries, MathGL uses textual formulas for connection of the old (data) and new (output) coordinates. This allows one to plot in arbitrary coordinates. The following code plots the line <var>y</var>=0, <var>z</var>=0 in Cartesian, polar, parabolic and spiral coordinates:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SetOrigin(-1,1,-1);
-
- gr->SubPlot(2,2,0); gr->Title("Cartesian"); gr->Rotate(50,60);
- gr->FPlot("2*t-1","0.5","0","r2");
- gr->Axis(); gr->Grid();
-
- gr->SetFunc("y*sin(pi*x)","y*cos(pi*x)",0);
- gr->SubPlot(2,2,1); gr->Title("Cylindrical"); gr->Rotate(50,60);
- gr->FPlot("2*t-1","0.5","0","r2");
- gr->Axis(); gr->Grid();
-
- gr->SetFunc("2*y*x","y*y - x*x",0);
- gr->SubPlot(2,2,2); gr->Title("Parabolic"); gr->Rotate(50,60);
- gr->FPlot("2*t-1","0.5","0","r2");
- gr->Axis(); gr->Grid();
-
- gr->SetFunc("y*sin(pi*x)","y*cos(pi*x)","x+z");
- gr->SubPlot(2,2,3); gr->Title("Spiral"); gr->Rotate(50,60);
- gr->FPlot("2*t-1","0.5","0","r2");
- gr->Axis(); gr->Grid();
- gr->SetFunc(0,0,0); // set to default Cartesian
- return 0;
-}
-</pre>
-<div align="center"><img src="png/curvcoor.png" alt="Example of curvilinear coordinates">
-</div>
-
-
-<hr>
-<a name="Colorbars"></a>
-<div class="header">
-<p>
-Next: <a href="#Bounding-box" accesskey="n" rel="next">Bounding box</a>, Previous: <a href="#Curvilinear-coordinates" accesskey="p" rel="prev">Curvilinear coordinates</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Colorbars-1"></a>
-<h4 class="subsection">2.2.4 Colorbars</h4>
-
-
-<p>MathGL handle <a href="#colorbar">colorbar</a> as special kind of axis. So, most of functions for axis and ticks setup will work for colorbar too. Colorbars can be in log-scale, and generally as arbitrary function scale; common factor of colorbar labels can be separated; and so on.
-</p>
-<p>But of course, there are differences – colorbars usually located out of bounding box. At this, colorbars can be at subplot boundaries (by default), or at bounding box (if symbol ‘<samp>I</samp>’ is specified). Colorbars can handle sharp colors. And they can be located at arbitrary position too. The sample code, which demonstrate colorbar features is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(2,2,0); gr->Title("Colorbar out of box"); gr->Box();
- gr->Colorbar("<"); gr->Colorbar(">");
- gr->Colorbar("_"); gr->Colorbar("^");
-
- gr->SubPlot(2,2,1); gr->Title("Colorbar near box"); gr->Box();
- gr->Colorbar("<I"); gr->Colorbar(">I");
- gr->Colorbar("_I"); gr->Colorbar("^I");
-
- gr->SubPlot(2,2,2); gr->Title("manual colors");
- mglData a,v; mgls_prepare2d(&a,0,&v);
- gr->Box(); gr->ContD(v,a);
- gr->Colorbar(v,"<"); gr->Colorbar(v,">");
- gr->Colorbar(v,"_"); gr->Colorbar(v,"^");
-
- gr->SubPlot(2,2,3); gr->Title(" ");
- gr->Puts(mglPoint(-0.5,1.55),"Color positions",":C",-2);
- gr->Colorbar("bwr>",0.25,0); gr->Puts(mglPoint(-0.9,1.2),"Default");
- gr->Colorbar("b{w,0.3}r>",0.5,0); gr->Puts(mglPoint(-0.1,1.2),"Manual");
-
- gr->Puts(mglPoint(1,1.55),"log-scale",":C",-2);
- gr->SetRange('c',0.01,1e3);
- gr->Colorbar(">",0.75,0); gr->Puts(mglPoint(0.65,1.2),"Normal scale");
- gr->SetFunc("","","","lg(c)");
- gr->Colorbar(">"); gr->Puts(mglPoint(1.35,1.2),"Log scale");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/colorbar.png" alt="Example of colorbars">
-</div>
-
-
-<hr>
-<a name="Bounding-box"></a>
-<div class="header">
-<p>
-Next: <a href="#Ternary-axis" accesskey="n" rel="next">Ternary axis</a>, Previous: <a href="#Colorbars" accesskey="p" rel="prev">Colorbars</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Bounding-box-1"></a>
-<h4 class="subsection">2.2.5 Bounding box</h4>
-
-
-<p>Box around the plot is rather useful thing because it allows one to: see the plot boundaries, and better estimate points position since box contain another set of ticks. MathGL provide special function for drawing such box – <a href="#box">box</a> function. By default, it draw black or white box with ticks (color depend on transparency type, see <a href="#Types-of-transparency">Types of transparency</a>). However, you can change the color of box, or add drawing of rectangles at rear faces of box. Also you can disable ticks drawing, but I don’t know why anybody will want it. The sample code, which demonstrate <a href="#box">box</a> features is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(2,2,0); gr->Title("Box (default)"); gr->Rotate(50,60);
- gr->Box();
- gr->SubPlot(2,2,1); gr->Title("colored"); gr->Rotate(50,60);
- gr->Box("r");
- gr->SubPlot(2,2,2); gr->Title("with faces"); gr->Rotate(50,60);
- gr->Box("@");
- gr->SubPlot(2,2,3); gr->Title("both"); gr->Rotate(50,60);
- gr->Box("@cm");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/box.png" alt="Example of Box()">
-</div>
-
-
-<hr>
-<a name="Ternary-axis"></a>
-<div class="header">
-<p>
-Next: <a href="#Text-features" accesskey="n" rel="next">Text features</a>, Previous: <a href="#Bounding-box" accesskey="p" rel="prev">Bounding box</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Ternary-axis-1"></a>
-<h4 class="subsection">2.2.6 Ternary axis</h4>
-
-
-<p>There are another unusual axis types which are supported by MathGL. These are ternary and quaternary axis. Ternary axis is special axis of 3 coordinates <var>a</var>, <var>b</var>, <var>c</var> which satisfy relation <var>a</var>+<var>b</var>+<var>c</var>=1. Correspondingly, quaternary axis is special axis of 4 coordinates <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> which satisfy relation <var>a</var>+<var>b</var>+<var>c</var>+<var>d</var>=1.
-</p>
-<p>Generally speaking, only 2 of coordinates (3 for quaternary) are independent. So, MathGL just introduce some special transformation formulas which treat <var>a</var> as ‘<samp>x</samp>’, <var>b</var> as ‘<samp>y</samp>’ (and <var>c</var> as ‘<samp>z</samp>’ for quaternary). As result, all plotting functions (curves, surfaces, contours and so on) work as usual, but in new axis. You should use <a href="#ternary">ternary</a> function for switching to ternary/quaternary coordinates. The sample code is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SetRanges(0,1,0,1,0,1);
- mglData x(50),y(50),z(50),rx(10),ry(10), a(20,30);
- a.Modify("30*x*y*(1-x-y)^2*(x+y<1)");
- x.Modify("0.25*(1+cos(2*pi*x))");
- y.Modify("0.25*(1+sin(2*pi*x))");
- rx.Modify("rnd"); ry.Modify("(1-v)*rnd",rx);
- z.Modify("x");
-
- gr->SubPlot(2,2,0); gr->Title("Ordinary axis 3D");
- gr->Rotate(50,60); gr->Light(true);
- gr->Plot(x,y,z,"r2"); gr->Surf(a,"BbcyrR#");
- gr->Axis(); gr->Grid(); gr->Box();
- gr->Label('x',"B",1); gr->Label('y',"C",1); gr->Label('z',"Z",1);
-
- gr->SubPlot(2,2,1); gr->Title("Ternary axis (x+y+t=1)");
- gr->Ternary(1);
- gr->Plot(x,y,"r2"); gr->Plot(rx,ry,"q^ "); gr->Cont(a,"BbcyrR");
- gr->Line(mglPoint(0.5,0), mglPoint(0,0.75), "g2");
- gr->Axis(); gr->Grid("xyz","B;");
- gr->Label('x',"B"); gr->Label('y',"C"); gr->Label('t',"A");
-
- gr->SubPlot(2,2,2); gr->Title("Quaternary axis 3D");
- gr->Rotate(50,60); gr->Light(true);
- gr->Ternary(2);
- gr->Plot(x,y,z,"r2"); gr->Surf(a,"BbcyrR#");
- gr->Axis(); gr->Grid(); gr->Box();
- gr->Label('t',"A",1); gr->Label('x',"B",1);
- gr->Label('y',"C",1); gr->Label('z',"D",1);
-
- gr->SubPlot(2,2,3); gr->Title("Ternary axis 3D");
- gr->Rotate(50,60); gr->Light(true);
- gr->Ternary(1);
- gr->Plot(x,y,z,"r2"); gr->Surf(a,"BbcyrR#");
- gr->Axis(); gr->Grid(); gr->Box();
- gr->Label('t',"A",1); gr->Label('x',"B",1);
- gr->Label('y',"C",1); gr->Label('z',"Z",1);
- return 0;
-}
-</pre>
-<div align="center"><img src="png/ternary.png" alt="Example of colorbars">
-</div>
-
-<hr>
-<a name="Text-features"></a>
-<div class="header">
-<p>
-Next: <a href="#Legend-sample" accesskey="n" rel="next">Legend sample</a>, Previous: <a href="#Ternary-axis" accesskey="p" rel="prev">Ternary axis</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Text-features-1"></a>
-<h4 class="subsection">2.2.7 Text features</h4>
-
-
-<p>MathGL prints text by vector font. There are functions for manual specifying of text position (like <code>Puts</code>) and for its automatic selection (like <code>Label</code>, <code>Legend</code> and so on). MathGL prints text always in specified position even if it lies outside the bounding box. The default size of font is specified by functions <var>SetFontSize*</var> (see <a href="#Font-settings">Font settings</a>). However, the actual size of output string depends on subplot size (depends on functions <code>SubPlot</code>, <code>InPlot</code>). The switching of the font style (italic, bold, wire and so on) can be done for the whole string (by function parameter) or inside the string. By default MathGL parses TeX-like commands for symbols and indexes (see <a href="#Font-styles">Font styles</a>).
-</p>
-<p>Text can be printed as usual one (from left to right), along some direction (rotated text), or along a curve. Text can be printed on several lines, divided by new line symbol ‘<samp>\n</samp>’.
-</p>
-<p>Example of MathGL font drawing is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(2,2,0,"");
- gr->Putsw(mglPoint(0,1),L"Text can be in ASCII and in Unicode");
- gr->Puts(mglPoint(0,0.6),"It can be \\wire{wire}, \\big{big} or #r{colored}");
- gr->Puts(mglPoint(0,0.2),"One can change style in string: "
- "\\b{bold}, \\i{italic, \\b{both}}");
- gr->Puts(mglPoint(0,-0.2),"Easy to \\a{overline} or "
- "\\u{underline}");
- gr->Puts(mglPoint(0,-0.6),"Easy to change indexes ^{up} _{down} @{center}");
- gr->Puts(mglPoint(0,-1),"It parse TeX: \\int \\alpha \\cdot "
- "\\sqrt3{sin(\\pi x)^2 + \\gamma_{i_k}} dx");
-
- gr->SubPlot(2,2,1,"");
- gr->Puts(mglPoint(0,0.5), "\\sqrt{\\frac{\\alpha^{\\gamma^2}+\\overset 1{\\big\\infty}}{\\sqrt3{2+b}}}", "@", -4);
- gr->Puts(mglPoint(0,-0.5),"Text can be printed\non several lines");
-
- gr->SubPlot(2,2,2,"");
- mglData y; mgls_prepare1d(&y);
- gr->Box(); gr->Plot(y.SubData(-1,0));
- gr->Text(y,"This is very very long string drawn along a curve",":k");
- gr->Text(y,"Another string drawn under a curve","T:r");
-
- gr->SubPlot(2,2,3,"");
- gr->Line(mglPoint(-1,-1),mglPoint(1,-1),"rA");
- gr->Puts(mglPoint(0,-1),mglPoint(1,-1),"Horizontal");
- gr->Line(mglPoint(-1,-1),mglPoint(1,1),"rA");
- gr->Puts(mglPoint(0,0),mglPoint(1,1),"At angle","@");
- gr->Line(mglPoint(-1,-1),mglPoint(-1,1),"rA");
- gr->Puts(mglPoint(-1,0),mglPoint(-1,1),"Vertical");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/text.png" alt="Example of text printing">
-</div>
-<p>You can change font faces by loading font files by function <a href="#loadfont">loadfont</a>. Note, that this is long-run procedure. Font faces can be downloaded from <a href="http://mathgl.sourceforge.net/download.html">MathGL website</a> or from <a href="http://sourceforge.net/project/showfiles.php?group_id=152187&package_id=267177">here</a>. The sample code is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- double h=1.1, d=0.25;
- gr->LoadFont("STIX"); gr->Puts(mglPoint(0,h), "default font (STIX)");
- gr->LoadFont("adventor"); gr->Puts(mglPoint(0,h-d), "adventor font");
- gr->LoadFont("bonum"); gr->Puts(mglPoint(0,h-2*d), "bonum font");
- gr->LoadFont("chorus"); gr->Puts(mglPoint(0,h-3*d), "chorus font");
- gr->LoadFont("cursor"); gr->Puts(mglPoint(0,h-4*d), "cursor font");
- gr->LoadFont("heros"); gr->Puts(mglPoint(0,h-5*d), "heros font");
- gr->LoadFont("heroscn"); gr->Puts(mglPoint(0,h-6*d), "heroscn font");
- gr->LoadFont("pagella"); gr->Puts(mglPoint(0,h-7*d), "pagella font");
- gr->LoadFont("schola"); gr->Puts(mglPoint(0,h-8*d), "schola font");
- gr->LoadFont("termes"); gr->Puts(mglPoint(0,h-9*d), "termes font");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/fonts.png" alt="Example of font faces">
-</div>
-
-
-<hr>
-<a name="Legend-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#Cutting-sample" accesskey="n" rel="next">Cutting sample</a>, Previous: <a href="#Text-features" accesskey="p" rel="prev">Text features</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Legend-sample-1"></a>
-<h4 class="subsection">2.2.8 Legend sample</h4>
-
-
-<p>Legend is one of standard ways to show plot annotations. Basically you need to connect the plot style (line style, marker and color) with some text. In MathGL, you can do it by 2 methods: manually using <a href="#addlegend">addlegend</a> function; or use ‘<samp>legend</samp>’ option (see <a href="#Command-options">Command options</a>), which will use last plot style. In both cases, legend entries will be added into internal accumulator, which later used for legend drawing itself. <a href="#clearlegend">clearlegend</a> function allow you to remove all saved legend entries.
-</p>
-<p>There are 2 features. If plot style is empty then text will be printed without indent. If you want to plot the text with indent but without plot sample then you need to use space ‘<samp> </samp>’ as plot style. Such style ‘<samp> </samp>’ will draw a plot sample (line with marker(s)) which is invisible line (i.e. nothing) and print the text with indent as usual one.
-</p>
-<p>Function <a href="#legend">legend</a> draw legend on the plot. The position of the legend can be selected automatic or manually. You can change the size and style of text labels, as well as setup the plot sample. The sample code demonstrating legend features is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->AddLegend("sin(\\pi {x^2})","b");
- gr->AddLegend("sin(\\pi x)","g*");
- gr->AddLegend("sin(\\pi \\sqrt{x})","rd");
- gr->AddLegend("just text"," ");
- gr->AddLegend("no indent for this","");
-
- gr->SubPlot(2,2,0,""); gr->Title("Legend (default)");
- gr->Box(); gr->Legend();
-
- gr->Legend(3,"A#");
- gr->Puts(mglPoint(0.75,0.65),"Absolute position","A");
-
- gr->SubPlot(2,2,2,""); gr->Title("coloring"); gr->Box();
- gr->Legend(0,"r#"); gr->Legend(1,"Wb#"); gr->Legend(2,"ygr#");
-
- gr->SubPlot(2,2,3,""); gr->Title("manual position"); gr->Box();
- gr->Legend(0.5,1); gr->Puts(mglPoint(0.5,0.55),"at x=0.5, y=1","a");
- gr->Legend(1,"#-"); gr->Puts(mglPoint(0.75,0.25),"Horizontal legend","a");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/legend.png" alt="Example of legend">
-</div>
-
-<hr>
-<a name="Cutting-sample"></a>
-<div class="header">
-<p>
-Previous: <a href="#Legend-sample" accesskey="p" rel="prev">Legend sample</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Cutting-sample-1"></a>
-<h4 class="subsection">2.2.9 Cutting sample</h4>
-
-
-<p>The last common thing which I want to show in this section is how one can cut off points from plot. There are 4 mechanism for that.
-</p><ul>
-<li> You can set one of coordinate to NAN value. All points with NAN values will be omitted.
-
-</li><li> You can enable cutting at edges by <code>SetCut</code> function. As result all points out of bounding box will be omitted.
-
-</li><li> You can set cutting box by <code>SetCutBox</code> function. All points inside this box will be omitted.
-
-</li><li> You can define cutting formula by <code>SetCutOff</code> function. All points for which the value of formula is nonzero will be omitted. Note, that this is the slowest variant.
-</li></ul>
-
-<p>Below I place the code which demonstrate last 3 possibilities:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData a,c,v(1); mgls_prepare2d(&a); mgls_prepare3d(&c); v.a[0]=0.5;
- gr->SubPlot(2,2,0); gr->Title("Cut on (default)");
- gr->Rotate(50,60); gr->Light(true);
- gr->Box(); gr->Surf(a,"","zrange -1 0.5");
-
- gr->SubPlot(2,2,1); gr->Title("Cut off"); gr->Rotate(50,60);
- gr->Box(); gr->Surf(a,"","zrange -1 0.5; cut off");
-
- gr->SubPlot(2,2,2); gr->Title("Cut in box"); gr->Rotate(50,60);
- gr->SetCutBox(mglPoint(0,-1,-1), mglPoint(1,0,1.1));
- gr->Alpha(true); gr->Box(); gr->Surf3(c);
- gr->SetCutBox(mglPoint(0), mglPoint(0)); // switch it off
-
- gr->SubPlot(2,2,3); gr->Title("Cut by formula"); gr->Rotate(50,60);
- gr->CutOff("(z>(x+0.5*y-1)^2-1) & (z>(x-0.5*y-1)^2-1)");
- gr->Box(); gr->Surf3(c); gr->CutOff(""); // switch it off
- return 0;
-}
-</pre>
-<div align="center"><img src="png/cut.png" alt="Example of point cutting">
-</div>
-
-
-
-<hr>
-<a name="Data-handling"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-plotting" accesskey="n" rel="next">Data plotting</a>, Previous: <a href="#Advanced-usage" accesskey="p" rel="prev">Advanced usage</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-handling-1"></a>
-<h3 class="section">2.3 Data handling</h3>
-
-
-<p>Class <code>mglData</code> contains all functions for the data handling in MathGL (see <a href="#Data-processing">Data processing</a>). There are several matters why I use class <code>mglData</code> but not a single array: it does not depend on type of data (mreal or double), sizes of data arrays are kept with data, memory working is simpler and safer.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Array-creation" accesskey="1">Array creation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Linking-array" accesskey="2">Linking array</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Change-data" accesskey="3">Change data</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Array-creation"></a>
-<div class="header">
-<p>
-Next: <a href="#Linking-array" accesskey="n" rel="next">Linking array</a>, Up: <a href="#Data-handling" accesskey="u" rel="up">Data handling</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Array-creation-1"></a>
-<h4 class="subsection">2.3.1 Array creation</h4>
-
-
-<p>There are many ways in MathGL how data arrays can be created and filled.
-</p>
-<p>One can put the data in <code>mglData</code> instance by several ways. Let us do it for sinus function:
-</p><ul>
-<li> one can create external array, fill it and put to <code>mglData</code> variable
-<pre class="verbatim"> double *a = new double[50];
- for(int i=0;i<50;i++) a[i] = sin(M_PI*i/49.);
-
- mglData y;
- y.Set(a,50);
-</pre>
-</li><li> another way is to create <code>mglData</code> instance of the desired size and then to work directly with data in this variable
-<pre class="verbatim"> mglData y(50);
- for(int i=0;i<50;i++) y.a[i] = sin(M_PI*i/49.);
-</pre>
-</li><li> next way is to fill the data in <code>mglData</code> instance by textual formula with the help of <code>Modify()</code> function
-<pre class="verbatim"> mglData y(50);
- y.Modify("sin(pi*x)");
-</pre>
-</li><li> or one may fill the array in some interval and modify it later
-<pre class="verbatim"> mglData y(50);
- y.Fill(0,M_PI);
- y.Modify("sin(u)");
-</pre>
-</li><li> finally it can be loaded from file
-<pre class="verbatim"> FILE *fp=fopen("sin.dat","wt"); // create file first
- for(int i=0;i<50;i++) fprintf(fp,"%g\n",sin(M_PI*i/49.));
- fclose(fp);
-
- mglData y("sin.dat"); // load it
-</pre><p>At this you can use textual or HDF files, as well as import values from bitmap image (PNG is supported right now).
-</p>
-</li><li> at this one can read only part of data
-<pre class="verbatim"> FILE *fp-fopen("sin.dat","wt"); // create large file first
- for(int i=0;i<70;i++) fprintf(fp,"%g\n",sin(M_PI*i/49.));
- fclose(fp);
-
- mglData y;
- y.Read("sin.dat",50); // load it
-</pre></li></ul>
-
-<p>Creation of 2d- and 3d-arrays is mostly the same. But one should keep in mind that class <code>mglData</code> uses flat data representation. For example, matrix 30*40 is presented as flat (1d-) array with length 30*40=1200 (nx=30, ny=40). The element with indexes {i,j} is a[i+nx*j]. So for 2d array we have:
-</p><pre class="verbatim"> mglData z(30,40);
- for(int i=0;i<30;i++) for(int j=0;j<40;j++)
- z.a[i+30*j] = sin(M_PI*i/29.)*sin(M_PI*j/39.);
-</pre><p>or by using <code>Modify()</code> function
-</p><pre class="verbatim"> mglData z(30,40);
- z.Modify("sin(pi*x)*cos(pi*y)");
-</pre>
-<p>The only non-obvious thing here is using multidimensional arrays in C/C++, i.e. arrays defined like <code>mreal dat[40][30];</code>. Since, formally these elements <code>dat[i]</code> can address the memory in arbitrary place you should use the proper function to convert such arrays to <code>mglData</code> object. For C++ this is functions like <code>mglData::Set(mreal **dat, int N1, int N2);</code>. For C this is functions like <code>mgl_data_set_mreal2(HMDT d, const mreal **dat, int N1, int N2);</code>. At this, you should keep in mind that <code>nx=N2</code> and <code>ny=N1</code> after conversion.
-</p>
-
-<hr>
-<a name="Linking-array"></a>
-<div class="header">
-<p>
-Next: <a href="#Change-data" accesskey="n" rel="next">Change data</a>, Previous: <a href="#Array-creation" accesskey="p" rel="prev">Array creation</a>, Up: <a href="#Data-handling" accesskey="u" rel="up">Data handling</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Linking-array-1"></a>
-<h4 class="subsection">2.3.2 Linking array</h4>
-
-
-<p>Sometimes the data arrays are so large, that one couldn’t’ copy its values to another array (i.e. into mglData). In this case, he can define its own class derived from <code>mglDataA</code> (see <a href="#mglDataA-class">mglDataA class</a>) or can use <code>Link</code> function.
-</p>
-<p>In last case, MathGL just save the link to an external data array, but not copy it. You should provide the existence of this data array for whole time during which MathGL can use it. Another point is that MathGL will automatically create new array if you’ll try to modify data values by any of <code>mglData</code> functions. So, you should use only function with <code>const</code> modifier if you want still using link to the original data array.
-</p>
-<p>Creating the link is rather simple – just the same as using <code>Set</code> function
-</p><pre class="verbatim"> double *a = new double[50];
- for(int i=0;i<50;i++) a[i] = sin(M_PI*i/49.);
-
- mglData y;
- y.Link(a,50);
-</pre>
-
-<hr>
-<a name="Change-data"></a>
-<div class="header">
-<p>
-Previous: <a href="#Linking-array" accesskey="p" rel="prev">Linking array</a>, Up: <a href="#Data-handling" accesskey="u" rel="up">Data handling</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Change-data-1"></a>
-<h4 class="subsection">2.3.3 Change data</h4>
-
-
-<p>MathGL has functions for data processing: differentiating, integrating, smoothing and so on (for more detail, see <a href="#Data-processing">Data processing</a>). Let us consider some examples. The simplest ones are integration and differentiation. The direction in which operation will be performed is specified by textual string, which may contain symbols ‘<samp>x</samp>’, ‘<samp>y</samp>’ or ‘<samp>z</samp>’. For example, the call of <code>Diff("x")</code> will differentiate data along ‘<samp>x</samp>’ direction; the call of <code>Integral("xy")</code> perform the double integration of data along ‘<samp>x</samp>’ and ‘<samp>y</samp>’ directions; the call of <code>Diff2("xyz")</code> will apply 3d Laplace operator to data and so on. Example of this operations on 2d array a=x*y is presented in code:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SetRanges(0,1,0,1,0,1);
- mglData a(30,40); a.Modify("x*y");
- gr->SubPlot(2,2,0); gr->Rotate(60,40);
- gr->Surf(a); gr->Box();
- gr->Puts(mglPoint(0.7,1,1.2),"a(x,y)");
- gr->SubPlot(2,2,1); gr->Rotate(60,40);
- a.Diff("x"); gr->Surf(a); gr->Box();
- gr->Puts(mglPoint(0.7,1,1.2),"da/dx");
- gr->SubPlot(2,2,2); gr->Rotate(60,40);
- a.Integral("xy"); gr->Surf(a); gr->Box();
- gr->Puts(mglPoint(0.7,1,1.2),"\\int da/dx dxdy");
- gr->SubPlot(2,2,3); gr->Rotate(60,40);
- a.Diff2("y"); gr->Surf(a); gr->Box();
- gr->Puts(mglPoint(0.7,1,1.2),"\\int {d^2}a/dxdy dx");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/dat_diff.png" alt="Example of data differentiation and integration">
-</div>
-<p>Data smoothing (function <a href="#smooth">smooth</a>) is more interesting and important. This function has single argument which define type of smoothing and its direction. Now 3 methods are supported: ‘<samp>3</samp>’ – linear averaging by 3 points, ‘<samp>5</samp>’ – linear averaging by 5 points, and default one – quadratic averaging by 5 points.
-</p>
-<p>MathGL also have some amazing functions which is not so important for data processing as useful for data plotting. There are functions for finding envelope (useful for plotting rapidly oscillating data), for data sewing (useful to removing jumps on the phase), for data resizing (interpolation). Let me demonstrate it:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(2,2,0,""); gr->Title("Envelop sample");
- mglData d1(1000); gr->Fill(d1,"exp(-8*x^2)*sin(10*pi*x)");
- gr->Axis(); gr->Plot(d1, "b");
- d1.Envelop('x'); gr->Plot(d1, "r");
-
- gr->SubPlot(2,2,1,""); gr->Title("Smooth sample");
- mglData y0(30),y1,y2,y3;
- gr->SetRanges(0,1,0,1);
- gr->Fill(y0, "0.4*sin(pi*x) + 0.3*cos(1.5*pi*x) - 0.4*sin(2*pi*x)+0.5*rnd");
-
- y1=y0; y1.Smooth("x3");
- y2=y0; y2.Smooth("x5");
- y3=y0; y3.Smooth("x");
-
- gr->Plot(y0,"{m7}:s", "legend 'none'"); //gr->AddLegend("none","k");
- gr->Plot(y1,"r", "legend ''3' style'");
- gr->Plot(y2,"g", "legend ''5' style'");
- gr->Plot(y3,"b", "legend 'default'");
- gr->Legend(); gr->Box();
-
- gr->SubPlot(2,2,2); gr->Title("Sew sample");
- mglData d2(100, 100); gr->Fill(d2, "mod((y^2-(1-x)^2)/2,0.1)");
- gr->Rotate(50, 60); gr->Light(true); gr->Alpha(true);
- gr->Box(); gr->Surf(d2, "b");
- d2.Sew("xy", 0.1); gr->Surf(d2, "r");
-
- gr->SubPlot(2,2,3); gr->Title("Resize sample (interpolation)");
- mglData x0(10), v0(10), x1, v1;
- gr->Fill(x0,"rnd"); gr->Fill(v0,"rnd");
- x1 = x0.Resize(100); v1 = v0.Resize(100);
- gr->Plot(x0,v0,"b+ "); gr->Plot(x1,v1,"r-");
- gr->Label(x0,v0,"%n");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/dat_extra.png" alt="Example of data manipulation">
-</div>
-<p>Also one can create new data arrays on base of the existing one: extract slice, row or column of data (<a href="#subdata">subdata</a>), summarize along a direction(s) (<a href="#sum">sum</a>), find distribution of data elements (<a href="#hist">hist</a>) and so on.
-</p>
-<a name="Solve-sample"></a><p>Another interesting feature of MathGL is interpolation and root-finding. There are several functions for linear and cubic spline interpolation (see <a href="#Interpolation">Interpolation</a>). Also there is a function <a href="#evaluate">evaluate</a> which do interpolation of data array for values of each data element of index data. It look as indirect access to the data elements.
-</p>
-<p>This function have inverse function <a href="#solve">solve</a> which find array of indexes at which data array is equal to given value (i.e. work as root finding). But <a href="#solve">solve</a> function have the issue – usually multidimensional data (2d and 3d ones) have an infinite number of indexes which give some value. This is contour lines for 2d data, or isosurface(s) for 3d data. So, <a href="#solve">solve</a> function will return index only in given direction, assuming that other index(es) are the same as equidistant index(es) of original data. If data have multiple roots then second (and later) branches can be found by consecutive call(s) of <a href="#solve">solve</a> function. Let me demonstrate this on the following sample.
-</p>
-<pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SetRange('z',0,1);
- mglData x(20,30), y(20,30), z(20,30), xx,yy,zz;
- gr->Fill(x,"(x+2)/3*cos(pi*y)");
- gr->Fill(y,"(x+2)/3*sin(pi*y)");
- gr->Fill(z,"exp(-6*x^2-2*sin(pi*y)^2)");
-
- gr->SubPlot(2,1,0); gr->Title("Cartesian space"); gr->Rotate(30,-40);
- gr->Axis("xyzU"); gr->Box(); gr->Label('x',"x"); gr->Label('y',"y");
- gr->SetOrigin(1,1); gr->Grid("xy");
- gr->Mesh(x,y,z);
-
- // section along 'x' direction
- mglData u = x.Solve(0.5,'x');
- mglData v(u.nx); v.Fill(0,1);
- xx = x.Evaluate(u,v); yy = y.Evaluate(u,v); zz = z.Evaluate(u,v);
- gr->Plot(xx,yy,zz,"k2o");
-
- // 1st section along 'y' direction
- mglData u1 = x.Solve(-0.5,'y');
- mglData v1(u1.nx); v1.Fill(0,1);
- xx = x.Evaluate(v1,u1); yy = y.Evaluate(v1,u1); zz = z.Evaluate(v1,u1);
- gr->Plot(xx,yy,zz,"b2^");
-
- // 2nd section along 'y' direction
- mglData u2 = x.Solve(-0.5,'y',u1);
- xx = x.Evaluate(v1,u2); yy = y.Evaluate(v1,u2); zz = z.Evaluate(v1,u2);
- gr->Plot(xx,yy,zz,"r2v");
-
- gr->SubPlot(2,1,1); gr->Title("Accompanied space");
- gr->SetRanges(0,1,0,1); gr->SetOrigin(0,0);
- gr->Axis(); gr->Box(); gr->Label('x',"i"); gr->Label('y',"j");
- gr->Grid(z,"h");
-
- gr->Plot(u,v,"k2o"); gr->Line(mglPoint(0.4,0.5),mglPoint(0.8,0.5),"kA");
- gr->Plot(v1,u1,"b2^"); gr->Line(mglPoint(0.5,0.15),mglPoint(0.5,0.3),"bA");
- gr->Plot(v1,u2,"r2v"); gr->Line(mglPoint(0.5,0.7),mglPoint(0.5,0.85),"rA");
-}
-</pre>
-<div align="center"><img src="png/solve.png" alt="Example of data interpolation and root finding">
-</div>
-
-<hr>
-<a name="Data-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#Hints" accesskey="n" rel="next">Hints</a>, Previous: <a href="#Data-handling" accesskey="p" rel="prev">Data handling</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-plotting-1"></a>
-<h3 class="section">2.4 Data plotting</h3>
-
-
-<p>Let me now show how to plot the data. Next section will give much more examples for all plotting functions. Here I just show some basics. MathGL generally has 2 types of plotting functions. Simple variant requires a single data array for plotting, other data (coordinates) are considered uniformly distributed in axis range. Second variant requires data arrays for all coordinates. It allows one to plot rather complex multivalent curves and surfaces (in case of parametric dependencies). Usually each function have one textual argument for plot style and another textual argument for options (see <a href="#Command-options">Command options</a>).
-</p>
-<p>Note, that the call of drawing function adds something to picture but does not clear the previous plots (as it does in Matlab). Another difference from Matlab is that all setup (like transparency, lightning, axis borders and so on) must be specified <strong>before</strong> plotting functions.
-</p>
-<p>Let start for plots for 1D data. Term “1D data” means that data depend on single index (parameter) like curve in parametric form {x(i),y(i),z(i)}, i=1...n. The textual argument allow you specify styles of line and marks (see <a href="#Line-styles">Line styles</a>). If this parameter is <code>NULL</code> or empty then solid line with color from palette is used (see <a href="#Palette-and-colors">Palette and colors</a>).
-</p>
-<p>Below I shall show the features of 1D plotting on base of <a href="#plot">plot</a> function. Let us start from sinus plot:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData y0(50); y0.Modify("sin(pi*(2*x-1))");
- gr->SubPlot(2,2,0);
- gr->Plot(y0); gr->Box();
-</pre><p>Style of line is not specified in <a href="#plot">plot</a> function. So MathGL uses the solid line with first color of palette (this is blue). Next subplot shows array <var>y1</var> with 2 rows:
-</p><pre class="verbatim"> gr->SubPlot(2,2,1);
- mglData y1(50,2);
- y1.Modify("sin(pi*2*x-pi)");
- y1.Modify("cos(pi*2*x-pi)/2",1);
- gr->Plot(y1); gr->Box();
-</pre><p>As previously I did not specify the style of lines. As a result, MathGL again uses solid line with next colors in palette (there are green and red). Now let us plot a circle on the same subplot. The circle is parametric curve <em>x=cos(\pi t), y=sin(\pi t)</em>. I will set the color of the circle (dark yellow, ‘<samp>Y</samp>’) and put marks ‘<samp>+</samp>’ at point position:
-</p><pre class="verbatim"> mglData x(50); x.Modify("cos(pi*2*x-pi)");
- gr->Plot(x,y0,"Y+");
-</pre><p>Note that solid line is used because I did not specify the type of line. The same picture can be achieved by <a href="#plot">plot</a> and <a href="#subdata">subdata</a> functions. Let us draw ellipse by orange dash line:
-</p><pre class="verbatim"> gr->Plot(y1.SubData(-1,0),y1.SubData(-1,1),"q|");
-</pre>
-<p>Drawing in 3D space is mostly the same. Let us draw spiral with default line style. Now its color is 4-th color from palette (this is cyan):
-</p><pre class="verbatim"> gr->SubPlot(2,2,2); gr->Rotate(60,40);
- mglData z(50); z.Modify("2*x-1");
- gr->Plot(x,y0,z); gr->Box();
-</pre><p>Functions <a href="#plot">plot</a> and <a href="#subdata">subdata</a> make 3D curve plot but for single array. Use it to put circle marks on the previous plot:
-</p><pre class="verbatim"> mglData y2(10,3); y2.Modify("cos(pi*(2*x-1+y))");
- y2.Modify("2*x-1",2);
- gr->Plot(y2.SubData(-1,0),y2.SubData(-1,1),y2.SubData(-1,2),"bo ");
-</pre><p>Note that line style is empty ‘<samp> </samp>’ here. Usage of other 1D plotting functions looks similar:
-</p><pre class="verbatim"> gr->SubPlot(2,2,3); gr->Rotate(60,40);
- gr->Bars(x,y0,z,"r"); gr->Box();
- return 0;
-}
-</pre>
-<p>Surfaces <a href="#surf">surf</a> and other 2D plots (see <a href="#g_t2D-plotting">2D plotting</a>) are drown the same simpler as 1D one. The difference is that the string parameter specifies not the line style but the color scheme of the plot (see <a href="#Color-scheme">Color scheme</a>). Here I draw attention on 4 most interesting color schemes. There is gray scheme where color is changed from black to white (string ‘<samp>kw</samp>’) or from white to black (string ‘<samp>wk</samp>’). Another scheme is useful for accentuation of negative (by blue color) and positive (by red color) regions on plot (string ‘<samp>"BbwrR"</samp>’). Last one is the popular “jet” scheme (string ‘<samp>"BbcyrR"</samp>’).
-</p>
-<p>Now I shall show the example of a surface drawing. At first let us switch lightning on
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->Light(true); gr->Light(0,mglPoint(0,0,1));
-</pre><p>and draw the surface, considering coordinates x,y to be uniformly distributed in axis range
-</p><pre class="verbatim"> mglData a0(50,40);
- a0.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))");
- gr->SubPlot(2,2,0); gr->Rotate(60,40);
- gr->Surf(a0); gr->Box();
-</pre><p>Color scheme was not specified. So previous color scheme is used. In this case it is default color scheme (“jet”) for the first plot. Next example is a sphere. The sphere is parametrically specified surface:
-</p><pre class="verbatim"> mglData x(50,40),y(50,40),z(50,40);
- x.Modify("0.8*sin(2*pi*x)*sin(pi*y)");
- y.Modify("0.8*cos(2*pi*x)*sin(pi*y)");
- z.Modify("0.8*cos(pi*y)");
- gr->SubPlot(2,2,1); gr->Rotate(60,40);
- gr->Surf(x,y,z,"BbwrR");gr->Box();
-</pre><p>I set color scheme to <code>"BbwrR"</code> that corresponds to red top and blue bottom of the sphere.
-</p>
-<p>Surfaces will be plotted for each of slice of the data if <var>nz</var>>1. Next example draws surfaces for data arrays with <var>nz</var>=3:
-</p><pre class="verbatim"> mglData a1(50,40,3);
- a1.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))");
- a1.Modify("0.6*cos(2*pi*x)*cos(3*pi*y)+0.4*sin(3*pi*(x*y))",1);
- a1.Modify("0.6*cos(2*pi*x)*cos(3*pi*y)+0.4*cos(3*pi*(x*y))",2);
- gr->SubPlot(2,2,2); gr->Rotate(60,40);
- gr->Alpha(true);
- gr->Surf(a1); gr->Box();
-</pre><p>Note, that it may entail a confusion. However, if one will use density plot then the picture will look better:
-</p><pre class="verbatim"> gr->SubPlot(2,2,3); gr->Rotate(60,40);
- gr->Dens(a1); gr->Box();
- return 0;
-}
-</pre>
-<p>Drawing of other 2D plots is analogous. The only peculiarity is the usage of flag ‘<samp>#</samp>’. By default this flag switches on the drawing of a grid on plot (<a href="#grid">grid</a> or <a href="#mesh">mesh</a> for plots in plain or in volume). However, for isosurfaces (including surfaces of rotation <a href="#axial">axial</a>) this flag switches the face drawing off and figure becomes wired. The following code gives example of flag ‘<samp>#</samp>’ using (compare with normal function drawing as in its description):
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->Alpha(true); gr->Light(true); gr->Light(0,mglPoint(0,0,1));
- mglData a(30,20);
- a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))");
-
- gr->SubPlot(2,2,0); gr->Rotate(40,60);
- gr->Surf(a,"BbcyrR#"); gr->Box();
- gr->SubPlot(2,2,1); gr->Rotate(40,60);
- gr->Dens(a,"BbcyrR#"); gr->Box();
- gr->SubPlot(2,2,2); gr->Rotate(40,60);
- gr->Cont(a,"BbcyrR#"); gr->Box();
- gr->SubPlot(2,2,3); gr->Rotate(40,60);
- gr->Axial(a,"BbcyrR#"); gr->Box();
- return 0;
-}
-</pre>
-
-<hr>
-<a name="Hints"></a>
-<div class="header">
-<p>
-Next: <a href="#FAQ" accesskey="n" rel="next">FAQ</a>, Previous: <a href="#Data-plotting" accesskey="p" rel="prev">Data plotting</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Hints-1"></a>
-<h3 class="section">2.5 Hints</h3>
-
-
-<p>In this section I’ve included some small hints and advices for the improving of the quality of plots and for the demonstration of some non-trivial features of MathGL library. In contrast to previous examples I showed mostly the idea but not the whole drawing function.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#g_t_0060_0060Compound_0027_0027-graphics" accesskey="1">``Compound'' graphics</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Transparency-and-lighting" accesskey="2">Transparency and lighting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Types-of-transparency" accesskey="3">Types of transparency</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Axis-projection" accesskey="4">Axis projection</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Adding-fog" accesskey="5">Adding fog</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Lighting-sample" accesskey="6">Lighting sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Using-primitives" accesskey="7">Using primitives</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#STFA-sample" accesskey="8">STFA sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Mapping-visualization" accesskey="9">Mapping visualization</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-interpolation">Data interpolation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Making-regular-data">Making regular data</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Making-histogram">Making histogram</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Nonlinear-fitting-hints">Nonlinear fitting hints</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#PDE-solving-hints">PDE solving hints</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Drawing-phase-plain">Drawing phase plain</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Pulse-properties">Pulse properties</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Using-MGL-parser">Using MGL parser</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Using-options">Using options</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#g_t_0060_0060Templates_0027_0027">``Templates''</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Stereo-image">Stereo image</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Reduce-memory-usage">Reduce memory usage</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Saving-and-scanning-file">Saving and scanning file</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Mixing-bitmap-and-vector-output">Mixing bitmap and vector output</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="g_t_0060_0060Compound_0027_0027-graphics"></a>
-<div class="header">
-<p>
-Next: <a href="#Transparency-and-lighting" accesskey="n" rel="next">Transparency and lighting</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="g_t_0060_0060Compound_0027_0027-graphics-1"></a>
-<h4 class="subsection">2.5.1 “Compound” graphics</h4>
-
-
-<p>As I noted above, MathGL functions (except the special one, like Clf()) do not erase the previous plotting but just add the new one. It allows one to draw “compound” plots easily. For example, popular Matlab command <code>surfc</code> can be emulated in MathGL by 2 calls:
-</p><pre class="verbatim"> Surf(a);
- Cont(a, "_"); // draw contours at bottom
-</pre><p>Here <var>a</var> is 2-dimensional data for the plotting, <code>-1</code> is the value of z-coordinate at which the contour should be plotted (at the bottom in this example). Analogously, one can draw density plot instead of contour lines and so on.
-</p>
-<p>Another nice plot is contour lines plotted directly on the surface:
-</p><pre class="verbatim"> Light(true); // switch on light for the surface
- Surf(a, "BbcyrR"); // select 'jet' colormap for the surface
- Cont(a, "y"); // and yellow color for contours
-</pre><p>The possible difficulties arise in black&white case, when the color of the surface can be close to the color of a contour line. In that case I may suggest the following code:
-</p><pre class="verbatim"> Light(true); // switch on light for the surface
- Surf(a, "kw"); // select 'gray' colormap for the surface
- CAxis(-1,0); // first draw for darker surface colors
- Cont(a, "w"); // white contours
- CAxis(0,1); // now draw for brighter surface colors
- Cont(a, "k"); // black contours
- CAxis(-1,1); // return color range to original state
-</pre><p>The idea is to divide the color range on 2 parts (dark and bright) and to select the contrasting color for contour lines for each of part.
-</p>
-<p>Similarly, one can plot flow thread over density plot of vector field amplitude (this is another amusing plot from Matlab) and so on. The list of compound graphics can be prolonged but I hope that the general idea is clear.
-</p>
-<p>Just for illustration I put here following sample code:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData a,b,d; mgls_prepare2v(&a,&b); d = a;
- for(int i=0;i<a.nx*a.ny;i++) d.a[i] = hypot(a.a[i],b.a[i]);
- mglData c; mgls_prepare3d(&c);
- mglData v(10); v.Fill(-0.5,1);
-
- gr->SubPlot(2,2,1,""); gr->Title("Flow + Dens");
- gr->Flow(a,b,"br"); gr->Dens(d,"BbcyrR"); gr->Box();
-
- gr->SubPlot(2,2,0); gr->Title("Surf + Cont"); gr->Rotate(50,60);
- gr->Light(true); gr->Surf(a); gr->Cont(a,"y"); gr->Box();
-
- gr->SubPlot(2,2,2); gr->Title("Mesh + Cont"); gr->Rotate(50,60);
- gr->Box(); gr->Mesh(a); gr->Cont(a,"_");
-
- gr->SubPlot(2,2,3); gr->Title("Surf3 + ContF3");gr->Rotate(50,60);
- gr->Box(); gr->ContF3(v,c,"z",0); gr->ContF3(v,c,"x"); gr->ContF3(v,c);
- gr->SetCutBox(mglPoint(0,-1,-1), mglPoint(1,0,1.1));
- gr->ContF3(v,c,"z",c.nz-1); gr->Surf3(-0.5,c);
- return 0;
-}
-</pre>
-<div align="center"><img src="png/combined.png" alt="Example of “combined” plots">
-</div>
-
-<hr>
-<a name="Transparency-and-lighting"></a>
-<div class="header">
-<p>
-Next: <a href="#Types-of-transparency" accesskey="n" rel="next">Types of transparency</a>, Previous: <a href="#g_t_0060_0060Compound_0027_0027-graphics" accesskey="p" rel="prev">``Compound'' graphics</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Transparency-and-lighting-1"></a>
-<h4 class="subsection">2.5.2 Transparency and lighting</h4>
-
-
-<p>Here I want to show how transparency and lighting both and separately change the look of a surface. So, there is code and picture for that:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- gr->SubPlot(2,2,0); gr->Title("default"); gr->Rotate(50,60);
- gr->Box(); gr->Surf(a);
-
- gr->SubPlot(2,2,1); gr->Title("light on"); gr->Rotate(50,60);
- gr->Box(); gr->Light(true); gr->Surf(a);
-
- gr->SubPlot(2,2,3); gr->Title("alpha on; light on"); gr->Rotate(50,60);
- gr->Box(); gr->Alpha(true); gr->Surf(a);
-
- gr->SubPlot(2,2,2); gr->Title("alpha on"); gr->Rotate(50,60);
- gr->Box(); gr->Light(false); gr->Surf(a);
- return 0;
-}
-</pre>
-<div align="center"><img src="png/alpha.png" alt="Example of transparency and lightings">
-</div>
-
-<hr>
-<a name="Types-of-transparency"></a>
-<div class="header">
-<p>
-Next: <a href="#Axis-projection" accesskey="n" rel="next">Axis projection</a>, Previous: <a href="#Transparency-and-lighting" accesskey="p" rel="prev">Transparency and lighting</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Types-of-transparency-1"></a>
-<h4 class="subsection">2.5.3 Types of transparency</h4>
-
-
-<p>MathGL library has advanced features for setting and handling the surface transparency. The simplest way to add transparency is the using of function <a href="#alpha">alpha</a>. As a result, all further surfaces (and isosurfaces, density plots and so on) become transparent. However, their look can be additionally improved.
-</p>
-<p>The value of transparency can be different from surface to surface. To do it just use <code>SetAlphaDef</code> before the drawing of the surface, or use option <code>alpha</code> (see <a href="#Command-options">Command options</a>). If its value is close to 0 then the surface becomes more and more transparent. Contrary, if its value is close to 1 then the surface becomes practically non-transparent.
-</p>
-<p>Also you can change the way how the light goes through overlapped surfaces. The function <code>SetTranspType</code> defines it. By default the usual transparency is used (‘<samp>0</samp>’) – surfaces below is less visible than the upper ones. A “glass-like” transparency (‘<samp>1</samp>’) has a different look – each surface just decreases the background light (the surfaces are commutable in this case).
-</p>
-<p>A “neon-like” transparency (‘<samp>2</samp>’) has more interesting look. In this case a surface is the light source (like a lamp on the dark background) and just adds some intensity to the color. At this, the library sets automatically the black color for the background and changes the default line color to white.
-</p>
-<p>As example I shall show several plots for different types of transparency. The code is the same except the values of <code>SetTranspType</code> function:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->Alpha(true); gr->Light(true);
- mglData a; mgls_prepare2d(&a);
- gr->SetTranspType(0); gr->Clf();
- gr->SubPlot(2,2,0); gr->Rotate(50,60); gr->Surf(a); gr->Box();
- gr->SubPlot(2,2,1); gr->Rotate(50,60); gr->Dens(a); gr->Box();
- gr->SubPlot(2,2,2); gr->Rotate(50,60); gr->Cont(a); gr->Box();
- gr->SubPlot(2,2,3); gr->Rotate(50,60); gr->Axial(a); gr->Box();
- return 0;
-}
-</pre>
-<div align="center"><img src="png/type0.png" alt="Example of SetTranspType(0).">
-</div><div align="center"><img src="png/type1.png" alt="Example of SetTranspType(1).">
-</div><div align="center"><img src="png/type2.png" alt="Example of SetTranspType(2).">
-</div>
-
-
-<hr>
-<a name="Axis-projection"></a>
-<div class="header">
-<p>
-Next: <a href="#Adding-fog" accesskey="n" rel="next">Adding fog</a>, Previous: <a href="#Types-of-transparency" accesskey="p" rel="prev">Types of transparency</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Axis-projection-1"></a>
-<h4 class="subsection">2.5.4 Axis projection</h4>
-
-
-<p>You can easily make 3D plot and draw its x-,y-,z-projections (like in CAD) by using <a href="#ternary">ternary</a> function with arguments: 4 for Cartesian, 5 for Ternary and 6 for Quaternary coordinates. The sample code is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SetRanges(0,1,0,1,0,1);
- mglData x(50),y(50),z(50),rx(10),ry(10), a(20,30);
- a.Modify("30*x*y*(1-x-y)^2*(x+y<1)");
- x.Modify("0.25*(1+cos(2*pi*x))");
- y.Modify("0.25*(1+sin(2*pi*x))");
- rx.Modify("rnd"); ry.Modify("(1-v)*rnd",rx);
- z.Modify("x");
-
- gr->Title("Projection sample");
- gr->Ternary(4);
- gr->Rotate(50,60); gr->Light(true);
- gr->Plot(x,y,z,"r2"); gr->Surf(a,"#");
- gr->Axis(); gr->Grid(); gr->Box();
- gr->Label('x',"X",1); gr->Label('y',"Y",1); gr->Label('z',"Z",1);
-}
-</pre>
-<div align="center"><img src="png/projection.png" alt="Example of axis projections">
-</div><div align="center"><img src="png/projection5.png" alt="Example of ternary axis projections">
-</div>
-
-<hr>
-<a name="Adding-fog"></a>
-<div class="header">
-<p>
-Next: <a href="#Lighting-sample" accesskey="n" rel="next">Lighting sample</a>, Previous: <a href="#Axis-projection" accesskey="p" rel="prev">Axis projection</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Adding-fog-1"></a>
-<h4 class="subsection">2.5.5 Adding fog</h4>
-
-
-<p>MathGL can add a fog to the image. Its switching on is rather simple – just use <a href="#fog">fog</a> function. There is the only feature – fog is applied for whole image. Not to particular subplot. The sample code is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- gr->Title("Fog sample");
- gr->Light(true); gr->Rotate(50,60); gr->Fog(1); gr->Box();
- gr->Surf(a); gr->Cont(a,"y");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/fog.png" alt="Example of Fog().">
-</div>
-
-<hr>
-<a name="Lighting-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#Using-primitives" accesskey="n" rel="next">Using primitives</a>, Previous: <a href="#Adding-fog" accesskey="p" rel="prev">Adding fog</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Lighting-sample-1"></a>
-<h4 class="subsection">2.5.6 Lighting sample</h4>
-
-
-<p>In contrast to the most of other programs, MathGL supports several (up to 10) light sources. Moreover, the color each of them can be different: white (this is usual), yellow, red, cyan, green and so on. The use of several light sources may be interesting for the highlighting of some peculiarities of the plot or just to make an amusing picture. Note, each light source can be switched on/off individually. The sample code is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- gr->Title("Several light sources");
- gr->Rotate(50,60); gr->Light(true);
- gr->AddLight(1,mglPoint(0,1,0),'c');
- gr->AddLight(2,mglPoint(1,0,0),'y');
- gr->AddLight(3,mglPoint(0,-1,0),'m');
- gr->Box(); gr->Surf(a,"h");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/several_light.png" alt="Example of several light sources.">
-</div>
-<p>Additionally, you can use local light sources and set to use <a href="#diffuse">diffuse</a> reflection instead of specular one (by default) or both kinds. Note, I use <a href="#attachlight">attachlight</a> command to keep light settings relative to subplot.
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->Light(true); gr->AttachLight(true);
- gr->SubPlot(2,2,0); gr->Title("Default"); gr->Rotate(50,60);
- gr->Line(mglPoint(-1,-0.7,1.7),mglPoint(-1,-0.7,0.7),"BA"); gr->Box(); gr->Surf(a);
-
- gr->SubPlot(2,2,1); gr->Title("Local"); gr->Rotate(50,60);
- gr->AddLight(0,mglPoint(1,0,1),mglPoint(-2,-1,-1));
- gr->Line(mglPoint(1,0,1),mglPoint(-1,-1,0),"BAO"); gr->Box(); gr->Surf(a);
-
- gr->SubPlot(2,2,2); gr->Title("no diffuse"); gr->Rotate(50,60);
- gr->SetDiffuse(0);
- gr->Line(mglPoint(1,0,1),mglPoint(-1,-1,0),"BAO"); gr->Box(); gr->Surf(a);
-
- gr->SubPlot(2,2,3); gr->Title("diffusive only"); gr->Rotate(50,60);
- gr->SetDiffuse(0.5);
- gr->AddLight(0,mglPoint(1,0,1),mglPoint(-2,-1,-1),'w',0);
- gr->Line(mglPoint(1,0,1),mglPoint(-1,-1,0),"BAO"); gr->Box(); gr->Surf(a);
-}
-</pre>
-<div align="center"><img src="png/light.png" alt="Example of different types of lighting.">
-</div>
-
-<hr>
-<a name="Using-primitives"></a>
-<div class="header">
-<p>
-Next: <a href="#STFA-sample" accesskey="n" rel="next">STFA sample</a>, Previous: <a href="#Lighting-sample" accesskey="p" rel="prev">Lighting sample</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Using-primitives-1"></a>
-<h4 class="subsection">2.5.7 Using primitives</h4>
-
-
-<p>MathGL provide a set of functions for drawing primitives (see <a href="#Primitives">Primitives</a>). Primitives are low level object, which used by most of plotting functions. Picture below demonstrate some of commonly used primitives.
-</p>
-<div align="center"><img src="png/primitives.png" alt="Primitives in MathGL.">
-</div>
-<p>Generally, you can create arbitrary new kind of plot using primitives. For example, MathGL don’t provide any special functions for drawing molecules. However, you can do it using only one type of primitives <a href="#drop">drop</a>. The sample code is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->Alpha(true); gr->Light(true);
-
- gr->SubPlot(2,2,0,""); gr->Title("Methane, CH_4");
- gr->StartGroup("Methane");
- gr->Rotate(60,120);
- gr->Sphere(mglPoint(0,0,0),0.25,"k");
- gr->Drop(mglPoint(0,0,0),mglPoint(0,0,1),0.35,"h",1,2);
- gr->Sphere(mglPoint(0,0,0.7),0.25,"g");
- gr->Drop(mglPoint(0,0,0),mglPoint(-0.94,0,-0.33),0.35,"h",1,2);
- gr->Sphere(mglPoint(-0.66,0,-0.23),0.25,"g");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.47,0.82,-0.33),0.35,"h",1,2);
- gr->Sphere(mglPoint(0.33,0.57,-0.23),0.25,"g");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.47,-0.82,-0.33),0.35,"h",1,2);
- gr->Sphere(mglPoint(0.33,-0.57,-0.23),0.25,"g");
- gr->EndGroup();
-
- gr->SubPlot(2,2,1,""); gr->Title("Water, H_{2}O");
- gr->StartGroup("Water");
- gr->Rotate(60,100);
- gr->StartGroup("Water_O");
- gr->Sphere(mglPoint(0,0,0),0.25,"r");
- gr->EndGroup();
- gr->StartGroup("Water_Bond_1");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.3,0.5,0),0.3,"m",1,2);
- gr->EndGroup();
- gr->StartGroup("Water_H_1");
- gr->Sphere(mglPoint(0.3,0.5,0),0.25,"g");
- gr->EndGroup();
- gr->StartGroup("Water_Bond_2");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.3,-0.5,0),0.3,"m",1,2);
- gr->EndGroup();
- gr->StartGroup("Water_H_2");
- gr->Sphere(mglPoint(0.3,-0.5,0),0.25,"g");
- gr->EndGroup();
- gr->EndGroup();
-
- gr->SubPlot(2,2,2,""); gr->Title("Oxygen, O_2");
- gr->StartGroup("Oxygen");
- gr->Rotate(60,120);
- gr->Drop(mglPoint(0,0.5,0),mglPoint(0,-0.3,0),0.3,"m",1,2);
- gr->Sphere(mglPoint(0,0.5,0),0.25,"r");
- gr->Drop(mglPoint(0,-0.5,0),mglPoint(0,0.3,0),0.3,"m",1,2);
- gr->Sphere(mglPoint(0,-0.5,0),0.25,"r");
- gr->EndGroup();
-
- gr->SubPlot(2,2,3,""); gr->Title("Ammonia, NH_3");
- gr->StartGroup("Ammonia");
- gr->Rotate(60,120);
- gr->Sphere(mglPoint(0,0,0),0.25,"b");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.33,0.57,0),0.32,"n",1,2);
- gr->Sphere(mglPoint(0.33,0.57,0),0.25,"g");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.33,-0.57,0),0.32,"n",1,2);
- gr->Sphere(mglPoint(0.33,-0.57,0),0.25,"g");
- gr->Drop(mglPoint(0,0,0),mglPoint(-0.65,0,0),0.32,"n",1,2);
- gr->Sphere(mglPoint(-0.65,0,0),0.25,"g");
- gr->EndGroup();
- return 0;
-}
-</pre>
-<div align="center"><img src="png/molecule.png" alt="Example of molecules drawing.">
-</div>
-<p>Moreover, some of special plots can be more easily produced by primitives rather than by specialized function. For example, Venn diagram can be produced by <code>Error</code> plot:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- double xx[3]={-0.3,0,0.3}, yy[3]={0.3,-0.3,0.3}, ee[3]={0.7,0.7,0.7};
- mglData x(3,xx), y(3,yy), e(3,ee);
- gr->Title("Venn-like diagram"); gr->Alpha(true);
- gr->Error(x,y,e,e,"!rgb@#o");
- return 0;
-}
-</pre><p>You see that you have to specify and fill 3 data arrays. The same picture can be produced by just 3 calls of <a href="#circle">circle</a> function:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->Title("Venn-like diagram"); gr->Alpha(true);
- gr->Circle(mglPoint(-0.3,0.3),0.7,"rr@");
- gr->Circle(mglPoint(0,-0.3),0.7,"gg@");
- gr->Circle(mglPoint( 0.3,0.3),0.7,"bb@");
- return 0;
-}
-</pre><p>Of course, the first variant is more suitable if you need to plot a lot of circles. But for few ones the usage of primitives looks easy.
-</p>
-<div align="center"><img src="png/venn.png" alt="Example of Venn diagram.">
-</div>
-
-<hr>
-<a name="STFA-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#Mapping-visualization" accesskey="n" rel="next">Mapping visualization</a>, Previous: <a href="#Using-primitives" accesskey="p" rel="prev">Using primitives</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="STFA-sample-1"></a>
-<h4 class="subsection">2.5.8 STFA sample</h4>
-
-
-<p>Short-time Fourier Analysis (<a href="#stfa">stfa</a>) is one of informative method for analyzing long rapidly oscillating 1D data arrays. It is used to determine the sinusoidal frequency and phase content of local sections of a signal as it changes over time.
-</p>
-<p>MathGL can find and draw STFA result. Just to show this feature I give following sample. Initial data arrays is 1D arrays with step-like frequency. Exactly this you can see at bottom on the STFA plot. The sample code is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData a(2000), b(2000);
- gr->Fill(a,"cos(50*pi*x)*(x<-.5)+cos(100*pi*x)*(x<0)*(x>-.5)+\
- cos(200*pi*x)*(x<.5)*(x>0)+cos(400*pi*x)*(x>.5)");
- gr->SubPlot(1, 2, 0,"<_"); gr->Title("Initial signal");
- gr->Plot(a);
- gr->Axis();
- gr->Label('x', "\\i t");
-
- gr->SubPlot(1, 2, 1,"<_"); gr->Title("STFA plot");
- gr->STFA(a, b, 64);
- gr->Axis();
- gr->Label('x', "\\i t");
- gr->Label('y', "\\omega", 0);
- return 0;
-}
-</pre>
-<div align="center"><img src="png/stfa.png" alt="Example of STFA().">
-</div>
-
-<hr>
-<a name="Mapping-visualization"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-interpolation" accesskey="n" rel="next">Data interpolation</a>, Previous: <a href="#STFA-sample" accesskey="p" rel="prev">STFA sample</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Mapping-visualization-1"></a>
-<h4 class="subsection">2.5.9 Mapping visualization</h4>
-
-
-<p>Sometime ago I worked with mapping and have a question about its visualization. Let me remember you that mapping is some transformation rule for one set of number to another one. The 1d mapping is just an ordinary function – it takes a number and transforms it to another one. The 2d mapping (which I used) is a pair of functions which take 2 numbers and transform them to another 2 ones. Except general plots (like <a href="#surfc">surfc</a>, <a href="#surfa">surfa</a>) there is a special plot – Arnold diagram. It shows the area which is the result of mapping of some initial area (usually square).
-</p>
-<p>I tried to make such plot in <a href="#map">map</a>. It shows the set of points or set of faces, which final position is the result of mapping. At this, the color gives information about their initial position and the height describes Jacobian value of the transformation. Unfortunately, it looks good only for the simplest mapping but for the real multivalent quasi-chaotic mapping it produces a confusion. So, use it if you like :).
-</p>
-<p>The sample code for mapping visualization is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData a(50, 40), b(50, 40);
- gr->Puts(mglPoint(0, 0), "\\to", ":C", -1.4);
- gr->SetRanges(-1,1,-1,1,-2,2);
-
- gr->SubPlot(2, 1, 0);
- gr->Fill(a,"x"); gr->Fill(b,"y");
- gr->Puts(mglPoint(0, 1.1), "\\{x, y\\}", ":C", -2); gr->Box();
- gr->Map(a, b, "brgk");
-
- gr->SubPlot(2, 1, 1);
- gr->Fill(a,"(x^3+y^3)/2"); gr->Fill(b,"(x-y)/2");
- gr->Puts(mglPoint(0, 1.1), "\\{\\frac{x^3+y^3}{2}, \\frac{x-y}{2}\\}", ":C", -2);
- gr->Box();
- gr->Map(a, b, "brgk");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/map.png" alt="Example of Map().">
-</div>
-
-
-
-<hr>
-<a name="Data-interpolation"></a>
-<div class="header">
-<p>
-Next: <a href="#Making-regular-data" accesskey="n" rel="next">Making regular data</a>, Previous: <a href="#Mapping-visualization" accesskey="p" rel="prev">Mapping visualization</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-interpolation-1"></a>
-<h4 class="subsection">2.5.10 Data interpolation</h4>
-
-
-<p>There are many functions to get interpolated values of a data array. Basically all of them can be divided by 3 categories:
-</p><ol>
-<li> functions which return single value at given point (see <a href="#Interpolation">Interpolation</a> and <code>mglGSpline()</code> in <a href="#Global-functions">Global functions</a>);
-</li><li> functions <a href="#subdata">subdata</a> and <a href="#evaluate">evaluate</a> for indirect access to data elements;
-</li><li> functions <a href="#refill">refill</a>, <a href="#gspline">gspline</a> and <a href="#datagrid">datagrid</a> which fill regular (rectangular) data array by interpolated values.
-</li></ol>
-
-<p>The usage of first category is rather straightforward and don’t need any special comments.
-</p>
-<p>There is difference in indirect access functions. Function <a href="#subdata">subdata</a> use use step-like interpolation to handle correctly single <code>nan</code> values in the data array. Contrary, function <a href="#evaluate">evaluate</a> use local spline interpolation, which give smoother output but spread <code>nan</code> values. So, <a href="#subdata">subdata</a> should be used for specific data elements (for example, for given column), and <a href="#evaluate">evaluate</a> should be used for distributed elements (i.e. consider data array as some field). Following sample illustrates this difference:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(1,1,0,""); gr->Title("SubData vs Evaluate");
- mglData in(9), arg(99), e, s;
- gr->Fill(in,"x^3/1.1"); gr->Fill(arg,"4*x+4");
- gr->Plot(in,"ko "); gr->Box();
- e = in.Evaluate(arg,false); gr->Plot(e,"b.","legend 'Evaluate'");
- s = in.SubData(arg); gr->Plot(s,"r.","legend 'SubData'");
- gr->Legend(2);
-}
-</pre>
-<div align="center"><img src="png/indirect.png" alt="Example of indirect data access.">
-</div>
-<p>Example of <a href="#datagrid">datagrid</a> usage is done in <a href="#Making-regular-data">Making regular data</a>. Here I want to show the peculiarities of <a href="#refill">refill</a> and <a href="#gspline">gspline</a> functions. Both functions require argument(s) which provide coordinates of the data values, and return rectangular data array which equidistantly distributed in axis range. So, in opposite to <a href="#evaluate">evaluate</a> function, <a href="#refill">refill</a> and <a href="#gspline">gspline</a> can interpolate non-equidistantly distributed data. At this both functions <a href="#refill">refill</a> and <a href="#gspline">gspline</a> provide continuity of 2nd derivatives along coordinate(s). However, <a href="#refill">refill</a> is slower but give better (from human point of view) result than global spline <a href="#gspline">gspline</a> due to more advanced algorithm. Following sample illustrates this difference:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData x(10), y(10), r(100);
- x.Modify("0.5+rnd"); x.CumSum("x"); x.Norm(-1,1);
- y.Modify("sin(pi*v)/1.5",x);
- gr->SubPlot(2,2,0,"<_"); gr->Title("Refill sample");
- gr->Axis(); gr->Box(); gr->Plot(x,y,"o ");
- gr->Refill(r,x,y); // or you can use r.Refill(x,y,-1,1);
- gr->Plot(r,"r"); gr->FPlot("sin(pi*x)/1.5","B:");
- gr->SubPlot(2,2,1,"<_");gr->Title("Global spline");
- gr->Axis(); gr->Box(); gr->Plot(x,y,"o ");
- r.RefillGS(x,y,-1,1); gr->Plot(r,"r");
- gr->FPlot("sin(pi*x)/1.5","B:");
-
- gr->Alpha(true); gr->Light(true);
- mglData z(10,10), xx(10,10), yy(10,10), rr(100,100);
- y.Modify("0.5+rnd"); y.CumSum("x"); y.Norm(-1,1);
- for(int i=0;i<10;i++) for(int j=0;j<10;j++)
- z.a[i+10*j] = sin(M_PI*x.a[i]*y.a[j])/1.5;
- gr->SubPlot(2,2,2); gr->Title("2d regular"); gr->Rotate(40,60);
- gr->Axis(); gr->Box(); gr->Mesh(x,y,z,"k");
- gr->Refill(rr,x,y,z); gr->Surf(rr);
-
- gr->Fill(xx,"(x+1)/2*cos(y*pi/2-1)");
- gr->Fill(yy,"(x+1)/2*sin(y*pi/2-1)");
- for(int i=0;i<10*10;i++)
- z.a[i] = sin(M_PI*xx.a[i]*yy.a[i])/1.5;
- gr->SubPlot(2,2,3); gr->Title("2d non-regular"); gr->Rotate(40,60);
- gr->Axis(); gr->Box(); gr->Plot(xx,yy,z,"ko ");
- gr->Refill(rr,xx,yy,z); gr->Surf(rr);
-}
-</pre>
-<div align="center"><img src="png/refill.png" alt="Example of non-equidistant data interpolation.">
-</div>
-
-
-<hr>
-<a name="Making-regular-data"></a>
-<div class="header">
-<p>
-Next: <a href="#Making-histogram" accesskey="n" rel="next">Making histogram</a>, Previous: <a href="#Data-interpolation" accesskey="p" rel="prev">Data interpolation</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Making-regular-data-1"></a>
-<h4 class="subsection">2.5.11 Making regular data</h4>
-
-
-<p>Sometimes, one have only unregular data, like as data on triangular grids, or experimental results and so on. Such kind of data cannot be used as simple as regular data (like matrices). Only few functions, like <a href="#dots">dots</a>, can handle unregular data as is.
-</p>
-<p>However, one can use built in triangulation functions for interpolating unregular data points to a regular data grids. There are 2 ways. First way, one can use <a href="#triangulation">triangulation</a> function to obtain list of vertexes for triangles. Later this list can be used in functions like <a href="#triplot">triplot</a> or <a href="#tricont">tricont</a>. Second way consist in usage of <a href="#datagrid">datagrid</a> function, which fill regular data grid by interpolated values, assuming that coordinates of the data grid is equidistantly distributed in axis range. Note, you can use options (see <a href="#Command-options">Command options</a>) to change default axis range as well as in other plotting functions.
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData x(100), y(100), z(100);
- gr->Fill(x,"2*rnd-1"); gr->Fill(y,"2*rnd-1"); gr->Fill(z,"v^2-w^2",x,y);
- // first way - plot triangular surface for points
- mglData d = mglTriangulation(x,y);
- gr->Title("Triangulation");
- gr->Rotate(40,60); gr->Box(); gr->Light(true);
- gr->TriPlot(d,x,y,z); gr->TriPlot(d,x,y,z,"#k");
- // second way - make regular data and plot it
- mglData g(30,30);
- gr->DataGrid(g,x,y,z); gr->Mesh(g,"m");
-}
-</pre>
-<div align="center"><img src="png/triangulation.png" alt="Example of triangulation.">
-</div>
-
-<hr>
-<a name="Making-histogram"></a>
-<div class="header">
-<p>
-Next: <a href="#Nonlinear-fitting-hints" accesskey="n" rel="next">Nonlinear fitting hints</a>, Previous: <a href="#Making-regular-data" accesskey="p" rel="prev">Making regular data</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Making-histogram-1"></a>
-<h4 class="subsection">2.5.12 Making histogram</h4>
-
-
-<p>Using the <a href="#hist">hist</a> function(s) for making regular distributions is one of useful fast methods to process and plot irregular data. <code>Hist</code> can be used to find some momentum of set of points by specifying weight function. It is possible to create not only 1D distributions but also 2D and 3D ones. Below I place the simplest sample code which demonstrate <a href="#hist">hist</a> usage:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData x(10000), y(10000), z(10000); gr->Fill(x,"2*rnd-1");
- gr->Fill(y,"2*rnd-1"); gr->Fill(z,"exp(-6*(v^2+w^2))",x,y);
- mglData xx=gr->Hist(x,z), yy=gr->Hist(y,z); xx.Norm(0,1);
- yy.Norm(0,1);
- gr->MultiPlot(3,3,3,2,2,""); gr->SetRanges(-1,1,-1,1,0,1);
- gr->Box(); gr->Dots(x,y,z,"wyrRk");
- gr->MultiPlot(3,3,0,2,1,""); gr->SetRanges(-1,1,0,1);
- gr->Box(); gr->Bars(xx);
- gr->MultiPlot(3,3,5,1,2,""); gr->SetRanges(0,1,-1,1);
- gr->Box(); gr->Barh(yy);
- gr->SubPlot(3,3,2);
- gr->Puts(mglPoint(0.5,0.5),"Hist and\nMultiPlot\nsample","a",-6);
- return 0;
-}
-</pre>
-<div align="center"><img src="png/hist.png" alt="Example of Hist().">
-</div>
-
-
-<hr>
-<a name="Nonlinear-fitting-hints"></a>
-<div class="header">
-<p>
-Next: <a href="#PDE-solving-hints" accesskey="n" rel="next">PDE solving hints</a>, Previous: <a href="#Making-histogram" accesskey="p" rel="prev">Making histogram</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Nonlinear-fitting-hints-1"></a>
-<h4 class="subsection">2.5.13 Nonlinear fitting hints</h4>
-
-
-<p>Nonlinear fitting is rather simple. All that you need is the data to fit, the approximation formula and the list of coefficients to fit (better with its initial guess values). Let me demonstrate it on the following simple example. First, let us use sin function with some random noise:
-</p><pre class="verbatim"> mglData dat(100), in(100); //data to be fitted and ideal data
- gr->Fill(dat,"0.4*rnd+0.1+sin(2*pi*x)");
- gr->Fill(in,"0.3+sin(2*pi*x)");
-</pre><p>and plot it to see that data we will fit
-</p><pre class="verbatim"> gr->Title("Fitting sample");
- gr->SetRange('y',-2,2); gr->Box(); gr->Plot(dat, "k. ");
- gr->Axis(); gr->Plot(in, "b");
- gr->Puts(mglPoint(0, 2.2), "initial: y = 0.3+sin(2\\pi x)", "b");
-</pre>
-<p>The next step is the fitting itself. For that let me specify an initial values <var>ini</var> for coefficients ‘<samp>abc</samp>’ and do the fitting for approximation formula ‘<samp>a+b*sin(c*x)</samp>’
-</p><pre class="verbatim"> mreal ini[3] = {1,1,3};
- mglData Ini(3,ini);
- mglData res = gr->Fit(dat, "a+b*sin(c*x)", "abc", Ini);
-</pre><p>Now display it
-</p><pre class="verbatim"> gr->Plot(res, "r");
- gr->Puts(mglPoint(-0.9, -1.3), "fitted:", "r:L");
- gr->PutsFit(mglPoint(0, -1.8), "y = ", "r");
-</pre>
-<p>NOTE! the fitting results may have strong dependence on initial values for coefficients due to algorithm features. The problem is that in general case there are several local "optimums" for coefficients and the program returns only first found one! There are no guaranties that it will be the best. Try for example to set <code>ini[3] = {0, 0, 0}</code> in the code above.
-</p>
-<p>The full sample code for nonlinear fitting is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData dat(100), in(100);
- gr->Fill(dat,"0.4*rnd+0.1+sin(2*pi*x)");
- gr->Fill(in,"0.3+sin(2*pi*x)");
- mreal ini[3] = {1,1,3};
- mglData Ini(3,ini);
-
- mglData res = gr->Fit(dat, "a+b*sin(c*x)", "abc", Ini);
-
- gr->Title("Fitting sample");
- gr->SetRange('y',-2,2); gr->Box(); gr->Plot(dat, "k. ");
- gr->Axis(); gr->Plot(res, "r"); gr->Plot(in, "b");
- gr->Puts(mglPoint(-0.9, -1.3), "fitted:", "r:L");
- gr->PutsFit(mglPoint(0, -1.8), "y = ", "r");
- gr->Puts(mglPoint(0, 2.2), "initial: y = 0.3+sin(2\\pi x)", "b");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/fit.png" alt="Example of nonlinear fitting.">
-</div>
-
-<hr>
-<a name="PDE-solving-hints"></a>
-<div class="header">
-<p>
-Next: <a href="#Drawing-phase-plain" accesskey="n" rel="next">Drawing phase plain</a>, Previous: <a href="#Nonlinear-fitting-hints" accesskey="p" rel="prev">Nonlinear fitting hints</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="PDE-solving-hints-1"></a>
-<h4 class="subsection">2.5.14 PDE solving hints</h4>
-
-
-<p>Solving of Partial Differential Equations (PDE, including beam tracing) and ray tracing (or finding particle trajectory) are more or less common task. So, MathGL have several functions for that. There are <a href="#ray">ray</a> for ray tracing, <a href="#pde">pde</a> for PDE solving, <a href="#qo2d">qo2d</a> for beam tracing in 2D case (see <a href="#Global-functions">Global functions</a>). Note, that these functions take “Hamiltonian” or equations as string values. And I don’t plan now to allow one to use user-defined functions. There are 2 reasons: the complexity of corresponding interface; and the basic nature of used methods which are good for samples but may not good for serious scientific calculations.
-</p>
-<p>The ray tracing can be done by <a href="#ray">ray</a> function. Really ray tracing equation is Hamiltonian equation for 3D space. So, the function can be also used for finding a particle trajectory (i.e. solve Hamiltonian ODE) for 1D, 2D or 3D cases. The function have a set of arguments. First of all, it is Hamiltonian which defined the media (or the equation) you are planning to use. The Hamiltonian is defined by string which may depend on coordinates ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’, time ‘<samp>t</samp>’ (for particle dynamics) and momentums ‘<samp>p</samp>’=<em>p_x</em>, ‘<samp>q</samp>’=<em>p_y</em>, ‘<samp>v</samp>’=<em>p_z</em>. Next, you have to define the initial conditions for coordinates and momentums at ‘<samp>t</samp>’=0 and set the integrations step (default is 0.1) and its duration (default is 10). The Runge-Kutta method of 4-th order is used for integration.
-</p><pre class="verbatim"> const char *ham = "p^2+q^2-x-1+i*0.5*(y+x)*(y>-x)";
- mglData r = mglRay(ham, mglPoint(-0.7, -1), mglPoint(0, 0.5), 0.02, 2);
-</pre><p>This example calculate the reflection from linear layer (media with Hamiltonian ‘<samp>p^2+q^2-x-1</samp>’=<em>p_x^2+p_y^2-x-1</em>). This is parabolic curve. The resulting array have 7 columns which contain data for {x,y,z,p,q,v,t}.
-</p>
-<p>The solution of PDE is a bit more complicated. As previous you have to specify the equation as pseudo-differential operator <em>\hat H(x, \nabla)</em> which is called sometime as “Hamiltonian” (for example, in beam tracing). As previously, it is defined by string which may depend on coordinates ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’ (but not time!), momentums ‘<samp>p</samp>’=<em>(d/dx)/i k_0</em>, ‘<samp>q</samp>’=<em>(d/dy)/i k_0</em> and field amplitude ‘<samp>u</samp>’=<em>|u|</em>. The evolutionary coordinate is ‘<samp>z</samp>’ in all cases. So that, the equation look like <em>du/dz = ik_0 H(x,y,\hat p, \hat q, |u|)[u]</em>. Dependence on field amplitude ‘<samp>u</samp>’=<em>|u|</em> allows one to solve nonlinear problems too. For example, for nonlinear Shrodinger equation you may set <code>ham="p^2 + q^2 - u^2"</code>. Also you may specify imaginary part for wave absorption, like <code>ham = "p^2 + i*x*(x>0)"</code> or <code>ham = "p^2 + i1*x*(x>0)"</code>.
-</p>
-<p>Next step is specifying the initial conditions at ‘<samp>z</samp>’ equal to minimal z-axis value. The function need 2 arrays for real and for imaginary part. Note, that coordinates x,y,z are supposed to be in specified axis range. So, the data arrays should have corresponding scales. Finally, you may set the integration step and parameter k0=<em>k_0</em>. Also keep in mind, that internally the 2 times large box is used (for suppressing numerical reflection from boundaries) and the equation should well defined even in this extended range.
-</p>
-<p>Final comment is concerning the possible form of pseudo-differential operator <em>H</em>. At this moment, simplified form of operator <em>H</em> is supported – all “mixed” terms (like ‘<samp>x*p</samp>’->x*d/dx) are excluded. For example, in 2D case this operator is effectively <em>H = f(p,z) + g(x,z,u)</em>. However commutable combinations (like ‘<samp>x*q</samp>’->x*d/dy) are allowed for 3D case.
-</p>
-<p>So, for example let solve the equation for beam deflected from linear layer and absorbed later. The operator will have the form ‘<samp>"p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)"</samp>’ that correspond to equation <em>1/ik_0 * du/dz + d^2 u/dx^2 + d^2 u/dy^2 + x * u + i (x+z)/2 * u = 0</em>. This is typical equation for Electron Cyclotron (EC) absorption in magnetized plasmas. For initial conditions let me select the beam with plane phase front <em>exp(-48*(x+0.7)^2)</em>. The corresponding code looks like this:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData a,re(128),im(128);
- gr->Fill(re,"exp(-48*(x+0.7)^2)");
- a = gr->PDE("p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)", re, im, 0.01, 30);
- a.Transpose("yxz");
- gr->SubPlot(1,1,0,"<_"); gr->Title("PDE solver");
- gr->SetRange('c',0,1); gr->Dens(a,"wyrRk");
- gr->Axis(); gr->Label('x', "\\i x"); gr->Label('y', "\\i z");
- gr->FPlot("-x", "k|");
- gr->Puts(mglPoint(0, 0.85), "absorption: (x+z)/2 for x+z>0");
- gr->Puts(mglPoint(0,1.1),"Equation: ik_0\\partial_zu + \\Delta u + x\\cdot u + i \\frac{x+z}{2}\\cdot u = 0");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/pde.png" alt="Example of PDE solving.">
-</div>
-<p>The next example is the beam tracing. Beam tracing equation is special kind of PDE equation written in coordinates accompanied to a ray. Generally this is the same parameters and limitation as for PDE solving but the coordinates are defined by the ray and by parameter of grid width <var>w</var> in direction transverse the ray. So, you don’t need to specify the range of coordinates. <strong>BUT</strong> there is limitation. The accompanied coordinates are well defined only for smooth enough rays, i.e. then the ray curvature <em>K</em> (which is defined as <em>1/K^2 = (|r''|^2 |r'|^2 - (r'', r'')^2)/|r'|^6</em>) is much large then the grid width: <em>K>>w</em>. So, you may receive incorrect results if this condition will be broken.
-</p>
-<p>You may use following code for obtaining the same solution as in previous example:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData r, xx, yy, a, im(128), re(128);
- const char *ham = "p^2+q^2-x-1+i*0.5*(y+x)*(y>-x)";
- r = mglRay(ham, mglPoint(-0.7, -1), mglPoint(0, 0.5), 0.02, 2);
- gr->SubPlot(1,1,0,"<_"); gr->Title("Beam and ray tracing");
- gr->Plot(r.SubData(0), r.SubData(1), "k");
- gr->Axis(); gr->Label('x', "\\i x"); gr->Label('y', "\\i z");
-
- // now start beam tracing
- gr->Fill(re,"exp(-48*x^2)");
- a = mglQO2d(ham, re, im, r, xx, yy, 1, 30);
- gr->SetRange('c',0, 1);
- gr->Dens(xx, yy, a, "wyrRk");
- gr->FPlot("-x", "k|");
- gr->Puts(mglPoint(0, 0.85), "absorption: (x+y)/2 for x+y>0");
- gr->Puts(mglPoint(0.7, -0.05), "central ray");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/qo2d.png" alt="Example of beam tracing.">
-</div>
-<p>Note, the <a href="#pde">pde</a> is fast enough and suitable for many cases routine. However, there is situations then media have both together: strong spatial dispersion and spatial inhomogeneity. In this, case the <a href="#pde">pde</a> will produce incorrect result and you need to use advanced PDE solver <a href="#apde">apde</a>. For example, a wave beam, propagated in plasma, described by Hamiltonian <em>exp(-x^2-p^2)</em>, will have different solution for using of simplification and advanced PDE solver:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SetRanges(-1,1,0,2,0,2);
- mglData ar(256), ai(256); gr->Fill(ar,"exp(-2*x^2)");
-
- mglData res1(gr->APDE("exp(-x^2-p^2)",ar,ai,0.01)); res1.Transpose();
- gr->SubPlot(1,2,0,"_"); gr->Title("Advanced PDE solver");
- gr->SetRanges(0,2,-1,1); gr->SetRange('c',res1);
- gr->Dens(res1); gr->Axis(); gr->Box();
- gr->Label('x',"\\i z"); gr->Label('y',"\\i x");
- gr->Puts(mglPoint(-0.5,0.2),"i\\partial_z\\i u = exp(-\\i x^2+\\partial_x^2)[\\i u]","y");
-
- mglData res2(gr->PDE("exp(-x^2-p^2)",ar,ai,0.01));
- gr->SubPlot(1,2,1,"_"); gr->Title("Simplified PDE solver");
- gr->Dens(res2); gr->Axis(); gr->Box();
- gr->Label('x',"\\i z"); gr->Label('y',"\\i x");
- gr->Puts(mglPoint(-0.5,0.2),"i\\partial_z\\i u \\approx\\ exp(-\\i x^2)\\i u+exp(\\partial_x^2)[\\i u]","y");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/apde.png" alt="Comparison of simplified and advanced PDE solvers.">
-</div>
-
-<hr>
-<a name="Drawing-phase-plain"></a>
-<div class="header">
-<p>
-Next: <a href="#Pulse-properties" accesskey="n" rel="next">Pulse properties</a>, Previous: <a href="#PDE-solving-hints" accesskey="p" rel="prev">PDE solving hints</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Drawing-phase-plain-1"></a>
-<h4 class="subsection">2.5.15 Drawing phase plain</h4>
-
-
-<p>Here I want say a few words of plotting phase plains. Phase plain is name for system of coordinates <em>x</em>, <em>x'</em>, i.e. a variable and its time derivative. Plot in phase plain is very useful for qualitative analysis of an ODE, because such plot is rude (it topologically the same for a range of ODE parameters). Most often the phase plain {<em>x</em>, <em>x'</em>} is used (due to its simplicity), that allows to analyze up to the 2nd order ODE (i.e. <em>x''+f(x,x')=0</em>).
-</p>
-<p>The simplest way to draw phase plain in MathGL is using <a href="#flow">flow</a> function(s), which automatically select several points and draw flow threads. If the ODE have an integral of motion (like Hamiltonian <em>H(x,x')=const</em> for dissipation-free case) then you can use <a href="#cont">cont</a> function for plotting isolines (contours). In fact. isolines are the same as flow threads, but without arrows on it. Finally, you can directly solve ODE using <a href="#ode">ode</a> function and plot its numerical solution.
-</p>
-<p>Let demonstrate this for ODE equation <em>x''-x+3*x^2=0</em>. This is nonlinear oscillator with square nonlinearity. It has integral <em>H=y^2+2*x^3-x^2=Const</em>. Also it have 2 typical stationary points: saddle at {x=0, y=0} and center at {x=1/3, y=0}. Motion at vicinity of center is just simple oscillations, and is stable to small variation of parameters. In opposite, motion around saddle point is non-stable to small variation of parameters, and is very slow. So, calculation around saddle points are more difficult, but more important. Saddle points are responsible for solitons, stochasticity and so on.
-</p>
-<p>So, let draw this phase plain by 3 different methods. First, draw isolines for <em>H=y^2+2*x^3-x^2=Const</em> – this is simplest for ODE without dissipation. Next, draw flow threads – this is straightforward way, but the automatic choice of starting points is not always optimal. Finally, use <a href="#ode">ode</a> to check the above plots. At this we need to run <a href="#ode">ode</a> in both direction of time (in future and in the past) to draw whole plain. Alternatively, one can put starting points far from (or at the bounding box as done in <a href="#flow">flow</a>) the plot, but this is a more complicated. The sample code is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(2,2,0,"<_"); gr->Title("Cont"); gr->Box();
- gr->Axis(); gr->Label('x',"x"); gr->Label('y',"\\dot{x}");
- mglData f(100,100); gr->Fill(f,"y^2+2*x^3-x^2-0.5");
- gr->Cont(f);
- gr->SubPlot(2,2,1,"<_"); gr->Title("Flow"); gr->Box();
- gr->Axis(); gr->Label('x',"x"); gr->Label('y',"\\dot{x}");
- mglData fx(100,100), fy(100,100);
- gr->Fill(fx,"x-3*x^2"); gr->Fill(fy,"y");
- gr->Flow(fy,fx,"v","value 7");
- gr->SubPlot(2,2,2,"<_"); gr->Title("ODE"); gr->Box();
- gr->Axis(); gr->Label('x',"x"); gr->Label('y',"\\dot{x}");
- for(double x=-1;x<1;x+=0.1)
- {
- mglData in(2), r; in.a[0]=x;
- r = mglODE("y;x-3*x^2","xy",in);
- gr->Plot(r.SubData(0), r.SubData(1));
- r = mglODE("-y;-x+3*x^2","xy",in);
- gr->Plot(r.SubData(0), r.SubData(1));
- }
-}
-</pre>
-<div align="center"><img src="png/ode.png" alt="Example of ODE solving and phase plain drawing.">
-</div>
-
-
-<hr>
-<a name="Pulse-properties"></a>
-<div class="header">
-<p>
-Next: <a href="#Using-MGL-parser" accesskey="n" rel="next">Using MGL parser</a>, Previous: <a href="#Drawing-phase-plain" accesskey="p" rel="prev">Drawing phase plain</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Pulse-properties-1"></a>
-<h4 class="subsection">2.5.16 Pulse properties</h4>
-
-
-<p>There is common task in optics to determine properties of wave pulses or wave beams. MathGL provide special function <a href="#pulse">pulse</a> which return the pulse properties (maximal value, center of mass, width and so on). Its usage is rather simple. Here I just illustrate it on the example of Gaussian pulse, where all parameters are obvious.
-</p><pre class="verbatim">void sample(mglGraph *gr)
-{
- gr->SubPlot(1,1,0,"<_"); gr->Title("Pulse sample");
- // first prepare pulse itself
- mglData a(100); gr->Fill(a,"exp(-6*x^2)");
- // get pulse parameters
- mglData b(a.Pulse('x'));
- // positions and widths are normalized on the number of points. So, set proper axis scale.
- gr->SetRanges(0, a.nx-1, 0, 1);
- gr->Axis(); gr->Plot(a); // draw pulse and axis
- // now visualize found pulse properties
- double m = b[0]; // maximal amplitude
- // approximate position of maximum
- gr->Line(mglPoint(b[1],0), mglPoint(b[1],m),"r=");
- // width at half-maximum (so called FWHM)
- gr->Line(mglPoint(b[1]-b[3]/2,0), mglPoint(b[1]-b[3]/2,m),"m|");
- gr->Line(mglPoint(b[1]+b[3]/2,0), mglPoint(b[1]+b[3]/2,m),"m|");
- gr->Line(mglPoint(0,m/2), mglPoint(a.nx-1,m/2),"h");
- // parabolic approximation near maximum
- char func[128]; sprintf(func,"%g*(1-((x-%g)/%g)^2)",b[0],b[1],b[2]);
- gr->FPlot(func,"g");
-}
-</pre>
-<div align="center"><img src="png/pulse.png" alt="Example of determining of pulse properties.">
-</div>
-
-<hr>
-<a name="Using-MGL-parser"></a>
-<div class="header">
-<p>
-Next: <a href="#Using-options" accesskey="n" rel="next">Using options</a>, Previous: <a href="#Pulse-properties" accesskey="p" rel="prev">Pulse properties</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Using-MGL-parser-1"></a>
-<h4 class="subsection">2.5.17 Using MGL parser</h4>
-
-
-<p>Sometimes you may prefer to use MGL scripts in yours code. It is simpler (especially in comparison with C/Fortran interfaces) and provide faster way to plot the data with annotations, labels and so on. Class <code>mglParse</code> (see <a href="#mglParse-class">mglParse class</a> parse MGL scripts in C++. It have also the corresponding interface for C/Fortran.
-</p>
-<p>The key function here is <code>mglParse::Parse()</code> (or <code>mgl_parse()</code> for C/Fortran) which execute one command per string. At this the detailed information about the possible errors or warnings is passed as function value. Or you may execute the whole script as long string with lines separated by ‘<samp>\n</samp>’. Functions <code>mglParse::Execute()</code> and <code>mgl_parse_text()</code> perform it. Also you may set the values of parameters ‘<samp>$0</samp>’...‘<samp>$9</samp>’ for the script by functions <code>mglParse::AddParam()</code> or <code>mgl_add_param()</code>, allow/disable picture resizing, check “once” status and so on. The usage is rather straight-forward.
-</p>
-<p>The only non-obvious thing is data transition between script and yours program. There are 2 stages: add or find variable; and set data to variable. In C++ you may use functions <code>mglParse::AddVar()</code> and <code>mglParse::FindVar()</code> which return pointer to <code>mglData</code>. In C/Fortran the corresponding functions are <code>mgl_add_var()</code>, <code>mgl_find_var()</code>. This data pointer is valid until next <code>Parse()</code> or <code>Execute()</code> call. Note, you <strong>must not delete or free</strong> the data obtained from these functions!
-</p>
-<p>So, some simple example at the end. Here I define a data array, create variable, put data into it and plot it. The C++ code looks like this:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->Title("MGL parser sample");
- mreal a[100]; // let a_i = sin(4*pi*x), x=0...1
- for(int i=0;i<100;i++)a[i]=sin(4*M_PI*i/99);
- mglParse *parser = new mglParse;
- mglData *d = parser->AddVar("dat");
- d->Set(a,100); // set data to variable
- parser->Execute(gr, "plot dat; xrange 0 1\nbox\naxis");
- // you may break script at any line do something
- // and continue after that
- parser->Execute(gr, "xlabel 'x'\nylabel 'y'\nbox");
- // also you may use cycles or conditions in script
- parser->Execute(gr, "for $0 -1 1 0.1\nif $0<0\n"
- "line 0 0 -1 $0 'r':else:line 0 0 -1 $0 'g'\n"
- "endif\nnext");
- delete parser;
- return 0;
-}
-</pre><p>The code in C/Fortran looks practically the same:
-</p><pre class="verbatim">int sample(HMGL gr)
-{
- mgl_title(gr, "MGL parser sample", "", -2);
- double a[100]; // let a_i = sin(4*pi*x), x=0...1
- int i;
- for(i=0;i<100;i++) a[i]=sin(4*M_PI*i/99);
- HMPR parser = mgl_create_parser();
- HMDT d = mgl_parser_add_var(parser, "dat");
- mgl_data_set_double(d,a,100,1,1); // set data to variable
- mgl_parse_text(gr, parser, "plot dat; xrange 0 1\nbox\naxis");
- // you may break script at any line do something
- // and continue after that
- mgl_parse_text(gr, parser, "xlabel 'x'\nylabel 'y'");
- // also you may use cycles or conditions in script
- mgl_parse_text(gr, parser, "for $0 -1 1 0.1\nif $0<0\n"
- "line 0 0 -1 $0 'r':else:line 0 0 -1 $0 'g'\n"
- "endif\nnext");
- mgl_write_png(gr, "test.png", ""); // don't forgot to save picture
- return 0;
-}
-</pre>
-<div align="center"><img src="png/parser.png" alt="Example of MGL script parsing.">
-</div>
-
-<hr>
-<a name="Using-options"></a>
-<div class="header">
-<p>
-Next: <a href="#g_t_0060_0060Templates_0027_0027" accesskey="n" rel="next">``Templates''</a>, Previous: <a href="#Using-MGL-parser" accesskey="p" rel="prev">Using MGL parser</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Using-options-1"></a>
-<h4 class="subsection">2.5.18 Using options</h4>
-
-
-<p><a href="#Command-options">Command options</a> allow the easy setup of the selected plot by changing global settings only for this plot. Often, options are used for specifying the range of automatic variables (coordinates). However, options allows easily change plot transparency, numbers of line or faces to be drawn, or add legend entries. The sample function for options usage is:
-</p><pre class="verbatim">void template(mglGraph *gr)
-{
- mglData a(31,41);
- gr->Fill(a,"-pi*x*exp(-(y+1)^2-4*x^2)");
-
- gr->SubPlot(2,2,0); gr->Title("Options for coordinates");
- gr->Alpha(true); gr->Light(true);
- gr->Rotate(40,60); gr->Box();
- gr->Surf(a,"r","yrange 0 1"); gr->Surf(a,"b","yrange 0 -1");
- if(mini) return;
- gr->SubPlot(2,2,1); gr->Title("Option 'meshnum'");
- gr->Rotate(40,60); gr->Box();
- gr->Mesh(a,"r","yrange 0 1"); gr->Mesh(a,"b","yrange 0 -1; meshnum 5");
- gr->SubPlot(2,2,2); gr->Title("Option 'alpha'");
- gr->Rotate(40,60); gr->Box();
- gr->Surf(a,"r","yrange 0 1; alpha 0.7");
- gr->Surf(a,"b","yrange 0 -1; alpha 0.3");
- gr->SubPlot(2,2,3,"<_"); gr->Title("Option 'legend'");
- gr->FPlot("x^3","r","legend 'y = x^3'");
- gr->FPlot("cos(pi*x)","b","legend 'y = cos \\pi x'");
- gr->Box(); gr->Axis(); gr->Legend(2,"");
-}
-</pre>
-<div align="center"><img src="png/mirror.png" alt="Example of options usage.">
-</div>
-
-<hr>
-<a name="g_t_0060_0060Templates_0027_0027"></a>
-<div class="header">
-<p>
-Next: <a href="#Stereo-image" accesskey="n" rel="next">Stereo image</a>, Previous: <a href="#Using-options" accesskey="p" rel="prev">Using options</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="g_t_0060_0060Templates_0027_0027-1"></a>
-<h4 class="subsection">2.5.19 “Templates”</h4>
-
-
-<p>As I have noted before, the change of settings will influence only for the further plotting commands. This allows one to create “template” function which will contain settings and primitive drawing for often used plots. Correspondingly one may call this template-function for drawing simplification.
-</p>
-<p>For example, let one has a set of points (experimental or numerical) and wants to compare it with theoretical law (for example, with exponent law <em>\exp(-x/2), x \in [0, 20]</em>). The template-function for this task is:
-</p><pre class="verbatim">void template(mglGraph *gr)
-{
- mglData law(100); // create the law
- law.Modify("exp(-10*x)");
- gr->SetRanges(0,20, 0.0001,1);
- gr->SetFunc(0,"lg(y)",0);
- gr->Plot(law,"r2");
- gr->Puts(mglPoint(10,0.2),"Theoretical law: e^x","r:L");
- gr->Label('x',"x val."); gr->Label('y',"y val.");
- gr->Axis(); gr->Grid("xy","g;"); gr->Box();
-}
-</pre><p>At this, one will only write a few lines for data drawing:
-</p><pre class="verbatim"> template(gr); // apply settings and default drawing from template
- mglData dat("fname.dat"); // load the data
- // and draw it (suppose that data file have 2 columns)
- gr->Plot(dat.SubData(0),dat.SubData(1),"bx ");
-</pre><p>A template-function can also contain settings for font, transparency, lightning, color scheme and so on.
-</p>
-<p>I understand that this is obvious thing for any professional programmer, but I several times receive suggestion about “templates” ... So, I decide to point out it here.
-</p>
-
-<hr>
-<a name="Stereo-image"></a>
-<div class="header">
-<p>
-Next: <a href="#Reduce-memory-usage" accesskey="n" rel="next">Reduce memory usage</a>, Previous: <a href="#g_t_0060_0060Templates_0027_0027" accesskey="p" rel="prev">``Templates''</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Stereo-image-1"></a>
-<h4 class="subsection">2.5.20 Stereo image</h4>
-
-
-<p>One can easily create stereo image in MathGL. Stereo image can be produced by making two subplots with slightly different rotation angles. The corresponding code looks like this:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- gr->Light(true);
-
- gr->SubPlot(2,1,0); gr->Rotate(50,60+1);
- gr->Box(); gr->Surf(a);
-
- gr->SubPlot(2,1,1); gr->Rotate(50,60-1);
- gr->Box(); gr->Surf(a);
- return 0;
-}
-</pre>
-<div align="center"><img src="png/stereo.png" alt="Example of stereo image.">
-</div>
-
-<hr>
-<a name="Reduce-memory-usage"></a>
-<div class="header">
-<p>
-Next: <a href="#Saving-and-scanning-file" accesskey="n" rel="next">Saving and scanning file</a>, Previous: <a href="#Stereo-image" accesskey="p" rel="prev">Stereo image</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Reduce-memory-usage-1"></a>
-<h4 class="subsection">2.5.21 Reduce memory usage</h4>
-
-
-<p>By default MathGL save all primitives in memory, rearrange it and only later draw them on bitmaps. Usually, this speed up drawing, but may require a lot of memory for plots which contain a lot of faces (like <a href="#cloud">cloud</a>, <a href="#dew">dew</a>). You can use <a href="#quality">quality</a> function for setting to use direct drawing on bitmap and bypassing keeping any primitives in memory. This function also allow you to decrease the quality of the resulting image but increase the speed of the drawing.
-</p>
-<p>The code for lowest memory usage looks like this:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SetQuality(6); // firstly, set to draw directly on bitmap
- for(i=0;i<1000;i++)
- gr->Sphere(mglPoint(mgl_rnd()*2-1,mgl_rnd()*2-1),0.05);
- return 0;
-}
-</pre>
-
-
-<hr>
-<a name="Saving-and-scanning-file"></a>
-<div class="header">
-<p>
-Next: <a href="#Mixing-bitmap-and-vector-output" accesskey="n" rel="next">Mixing bitmap and vector output</a>, Previous: <a href="#Reduce-memory-usage" accesskey="p" rel="prev">Reduce memory usage</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Scanning-file"></a>
-<h4 class="subsection">2.5.22 Scanning file</h4>
-
-
-<p>MathGL have possibilities to write textual information into file with variable values. In MGL script you can use <a href="#save">save</a> command for that. However, the usual <code>printf();</code> is simple in C/C++ code. For example, lets create some textual file
-</p><pre class="verbatim">FILE *fp=fopen("test.txt","w");
-fprintf(fp,"This is test: 0 -> 1 q\n");
-fprintf(fp,"This is test: 1 -> -1 q\n");
-fprintf(fp,"This is test: 2 -> 0 q\n");
-fclose(fp);
-</pre><p>It contents look like
-</p><pre class="verbatim">This is test: 0 -> 1 q
-This is test: 1 -> -1 q
-This is test: 2 -> 0 q
-</pre>
-<p>Let assume now that you want to read this values (i.e. [[0,1],[1,-1],[2,0]]) from the file. You can use <a href="#scanfile">scanfile</a> for that. The desired values was written using template "This is test: %g -> %g q\n". So, just use
-</p><pre class="verbatim">mglData a;
-a.ScanFile("test.txt","This is test: %g -> %g");
-</pre><p>and plot it to for assurance
-</p><pre class="verbatim">gr->SetRanges(a.SubData(0), a.SubData(1));
-gr->Axis(); gr->Plot(a.SubData(0),a.SubData(1),"o");
-</pre>
-<p>Note, I keep only the leading part of template (i.e. "This is test: %g -> %g" instead of "This is test: %g -> %g q\n"), because there is no important for us information after the second number in the line.
-</p>
-
-
-<hr>
-<a name="Mixing-bitmap-and-vector-output"></a>
-<div class="header">
-<p>
-Previous: <a href="#Saving-and-scanning-file" accesskey="p" rel="prev">Saving and scanning file</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Mixing-bitmap-and-vector-output-1"></a>
-<h4 class="subsection">2.5.23 Mixing bitmap and vector output</h4>
-
-
-<p>Sometimes output plots contain surfaces with a lot of points, and some vector primitives (like axis, text, curves, etc.). Using vector output formats (like EPS or SVG) will produce huge files with possible loss of smoothed lighting. Contrary, the bitmap output may cause the roughness of text and curves. Hopefully, MathGL have a possibility to combine bitmap output for surfaces and vector one for other primitives in the same EPS file, by using <a href="#rasterize">rasterize</a> command.
-</p>
-<p>The idea is to prepare part of picture with surfaces or other "heavy" plots and produce the background image from them by help of <a href="#rasterize">rasterize</a> command. Next, we draw everything to be saved in vector form (text, curves, axis and etc.). Note, that you need to clear primitives (use <a href="#clf">clf</a> command) after <a href="#rasterize">rasterize</a> if you want to disable duplication of surfaces in output files (like EPS). Note, that some of output formats (like 3D ones, and TeX) don’t support the background bitmap, and use <a href="#clf">clf</a> for them will cause the loss of part of picture.
-</p>
-<p>The sample code is:
-</p><pre class="verbatim">// first draw everything to be in bitmap output
-gr->FSurf("x^2+y^2", "#", "value 10");
-
-gr->Rasterize(); // set above plots as bitmap background
-gr->Clf(); // clear primitives, to exclude them from file
-
-// now draw everything to be in vector output
-gr->Axis(); gr->Box();
-
-// and save file
-gr->WriteFrame("fname.eps");
-</pre>
-
-
-<hr>
-<a name="FAQ"></a>
-<div class="header">
-<p>
-Previous: <a href="#Hints" accesskey="p" rel="prev">Hints</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="FAQ-1"></a>
-<h3 class="section">2.6 FAQ</h3>
-
-
-<dl compact="compact">
-<dt><strong>The plot does not appear</strong></dt>
-<dd><p>Check that points of the plot are located inside the bounding box and resize the bounding box using <a href="#ranges">ranges</a> function. Check that the data have correct dimensions for selected type of plot. Be sure that <code>Finish()</code> is called after the plotting functions (or be sure that the plot is saved to a file). Sometimes the light reflection from flat surfaces (like, <a href="#dens">dens</a>) can look as if the plot were absent.
-</p>
-</dd>
-<dt><strong>I can not find some special kind of plot.</strong></dt>
-<dd><p>Most “new” types of plots can be created by using the existing drawing functions. For example, the surface of curve rotation can be created by a special function <a href="#torus">torus</a>, or as a parametrically specified surface by <a href="#surf">surf</a>. See also, <a href="#Hints">Hints</a>. If you can not find a specific type of plot, please e-mail me and this plot will appear in the next version of MathGL library.
-</p>
-</dd>
-<dt><strong>Should I know some graphical libraries (like OpenGL) before using the MathGL library?</strong></dt>
-<dd><p>No. The MathGL library is self-contained and does not require the knowledge of external libraries.
-</p>
-</dd>
-<dt><strong>In which language is the library written? For which languages does it have an interface?</strong></dt>
-<dd><p>The core of the MathGL library is written in C++. But there are interfaces for: pure C, Fortran, Pascal, Forth, and its own command language MGL. Also there is a large set of interpreted languages, which are supported (Python, Java, ALLEGROCL, CHICKEN, Lisp, CFFI, C#, Guile, Lua, Modula 3, Mzscheme, Ocaml, Octave, Perl, PHP, Pike, R, Ruby, Tcl). These interfaces are written using SWIG (both pure C functions and classes) but only the interface for Python and Octave is included in the build system. The reason is that I don’t know any other interpreted languages :(. Note that most other languages can use (link to) the pure C functions.
-</p>
-</dd>
-<dt><strong>How can I use MathGL with Fortran?</strong></dt>
-<dd><p>You can use MathGL as is with <code>gfortran</code> because it uses by default the AT&T notation for external functions. For other compilers (like Visual Fortran) you have to switch on the AT&T notation manually. The AT&T notation requires that the symbol ‘<samp>_</samp>’ is added at the end of each function name, function argument(s) is passed by pointers and the string length(s) is passed at the end of the argument list. For example:
-</p>
-<p><em>C function</em> – <code>void mgl_fplot(HMGL graph, const char *fy, const char *stl, int n);</code>
-</p>
-<p><em>AT&T function</em> – <code>void mgl_fplot_(uintptr_t *graph, const char *fy, const char *stl, int *n, int ly, int ls);</code>
-</p>
-<p>Fortran users also should add C++ library by the option <code>-lstdc++</code>. If library was built with <code>enable-double=ON</code> (this default for v.2.1 and later) then all real numbers must be <code>real*8</code>. You can make it automatic if use option <code>-fdefault-real-8</code>.
-</p>
-</dd>
-<dt><strong>How can I print in Russian/Spanish/Arabic/Japanese, and so on?</strong></dt>
-<dd><p>The standard way is to use Unicode encoding for the text output. But the MathGL library also has interface for 8-bit (char *) strings with internal conversion to Unicode. This conversion depends on the current locale OS. You may change it by <code>setlocale()</code> function. For example, for Russian text in CP1251 encoding you may use <code>setlocale(LC_CTYPE, "ru_RU.cp1251");</code> (under MS Windows the name of locale may differ – <code>setlocale(LC_CTYPE, "russian_russia.1251")</code>). I strongly recommend not to use the constant <code>LC_ALL</code> in the conversion. Since it also changes the number format, it may lead to mistakes in formula writing and reading of the text in data files. For example, the program will await a ‘<samp>,</samp>’ as a decimal point but the user will enter ‘<samp>.</samp>’.
-</p>
-</dd>
-<dt><strong>How can I exclude a point or a region of plot from the drawing?</strong></dt>
-<dd><p>There are 3 general ways. First, the point with <code>NAN</code> value as one of the coordinates (including color/alpha range) will never be plotted. Second, special functions <code>SetCutBox</code>() and <code>CutOff</code>() define the condition when the points should be omitted (see <a href="#Cutting">Cutting</a>). Last, you may change the transparency of a part of the plot by the help of functions <a href="#surfa">surfa</a>, <a href="#surf3a">surf3a</a> (see <a href="#Dual-plotting">Dual plotting</a>). In last case the transparency is switched on smoothly.
-</p>
-</dd>
-<dt><strong>I use VisualStudio, CBuilder or some other compiler (not MinGW/gcc). How can I link the MathGL library?</strong></dt>
-<dd><p>In version 2.0, main classes (<code>mglGraph</code> and <code>mglData</code>) contains only <code>inline</code> functions and are acceptable for any compiler with the same binary files. However, if you plan to use widget classes (QMathGL, Fl_MathGL, ...) or to access low-level features (mglBase, mglCanvas, ...) then you have to recompile MathGL by yours compiler.
-</p>
-<p>Note, that you have to make import library(-ies) *.lib for provided binary *.dll. This procedure depend on used compiler – please read documentation for yours compiler. For VisualStudio, it can be done by command <code>lib.exe /DEF:libmgl.def /OUT:libmgl.lib</code>.
-</p>
-</dd>
-<dt><strong>How make FLTK/GLUT/Qt window which will display result of my calculations?</strong></dt>
-<dd>
-<p>You need to put yours calculations or main event-handling loop in the separate thread. For static image you can give <code>NULL</code> as drawing function and call <code>Update()</code> function when you need to redraw it. For more details see <a href="#Animation">Animation</a>.
-</p>
-</dd>
-<dt><strong>How I can build MathGL under Windows?</strong></dt>
-<dd><p>Generally, it is the same procedure as for Linux or MacOS – see section <a href="#Installation">Installation</a>. The simplest way is using the combination CMake+MinGW. Also you may need some extra libraries like GSL, PNG, JPEG and so on. All of them can be found at <a href="http://gnuwin32.sourceforge.net/packages.html">http://gnuwin32.sourceforge.net/packages.html</a>. After installing all components, just run <a href="http://www.cmake.org/cmake/help/runningcmake.html">cmake-gui</a> configurator and build the MathGL itself.
-</p>
-</dd>
-<dt><strong>How many people write this library?</strong></dt>
-<dd><p>Most of the library was written by one person. This is a result of nearly a year of work (mostly in the evening and on holidays): I spent half a year to write the kernel and half a year to a year on extending, improving the library and writing documentation. This process continues now :). The build system (cmake files) was written mostly by D.Kulagin, and the export to PRC/PDF was written mostly by M.Vidassov.
-</p>
-</dd>
-<dt><strong>How can I display a bitmap on the figure?</strong></dt>
-<dd><p>You can import data into a <code>mglData</code> instance by function <a href="#import">import</a> and display it by <a href="#dens">dens</a> function. For example, for black-and-white bitmap you can use the code: <code>mglData bmp; bmp.Import("fname.png","wk"); gr->Dens(bmp,"wk");</code>.
-</p>
-</dd>
-<dt><strong>How can I use MathGL in Qt, FLTK, wxWidgets etc.?</strong></dt>
-<dd><p>There are special classes (widgets) for these libraries: QMathGL for Qt, Fl_MathGL for FLTK and so on. If you don’t find the appropriate class then you can create your own widget that displays a bitmap using mglCanvas::GetRGB().
-</p>
-</dd>
-<dt><strong>How can I create 3D in PDF?</strong></dt>
-<dd><p>Just use <code>WritePRC</code>() method which also create PDF file if enable-pdf=ON at MathGL configure.
-</p>
-</dd>
-<dt><strong>How can I create TeX figure?</strong></dt>
-<dd><p>Just use <code>WriteTEX</code>() method which create LaTeX files with figure itself ‘<samp><var>fname</var>.tex</samp>’, with MathGL colors ‘<samp>mglcolors.tex</samp>’ and main file ‘<samp>mglmain.tex</samp>’. Last one can be used for viewing image by command like <code>pdflatex mglmain.tex</code>.
-</p>
-</dd>
-<dt><strong>Can I use MathGL in JavaScript?</strong></dt>
-<dd><p>Yes, sample JavaScript file is located in texinfo/ folder of sources. You should provide JSON data with 3d image for it (can be created by <code>WriteJSON</code>() method). Script allows basic manipulation with plot: zoom, rotation, shift. Sample of JavaScript pictures can be found in <a href="http://mathgl.sf.net/json.html">http://mathgl.sf.net/json.html</a>.
-</p>
-
-
-
-</dd>
-<dt><strong>How I can change the font family?</strong></dt>
-<dd><p>First, you should download new font files from <a href="http://mathgl.sourceforge.net/download.html">here</a> or from <a href="http://sourceforge.net/project/showfiles.php?group_id=152187&package_id=267177">here</a>. Next, you should load the font files into mglGraph class instance <var>gr</var> by the following command: <code>gr->LoadFont(fontname,path);</code>. Here <var>fontname</var> is the base font name like ‘<samp>STIX</samp>’ and <var>path</var> sets the location of font files. Use <code>gr->RestoreFont();</code> to start using the default font.
-</p>
-</dd>
-<dt><strong>How can I draw tick out of a bounding box?</strong></dt>
-<dd><p>Just set a negative value in <a href="#ticklen">ticklen</a>. For example, use <code>gr->SetTickLen(-0.1);</code>.
-</p>
-</dd>
-<dt><strong>How can I prevent text rotation?</strong></dt>
-<dd><p>Just use <code>SetRotatedText(false)</code>. Also you can use axis style ‘<samp>U</samp>’ for disable only tick labels rotation.
-</p>
-</dd>
-<dt><strong>What is <code>*.so</code>? What is <code>gcc</code>? How I can use <code>make</code>?</strong></dt>
-<dd><p>They are standard GNU tools. There is special FAQ about its usage under Windows – <a href="http://www.mingw.org/wiki/FAQ">http://www.mingw.org/wiki/FAQ</a>.
-</p>
-</dd>
-<dt><strong>How can I draw equal axis range even for rectangular image?</strong></dt>
-<dd><p>Just use <code>Aspect(NAN,NAN)</code> for each subplot, or at the beginning of the drawing.
-</p>
-</dd>
-<dt><strong>How I can set transparent background?</strong></dt>
-<dd><p>Just use code like <code>Clf("r{A5}");</code> or prepare PNG file and set it as background image by call <code>LoadBackground("fname.png");</code>.
-</p>
-</dd>
-<dt><strong>How I can reduce "white" edges around bounding box?</strong></dt>
-<dd><p>The simplest way is to use <a href="#subplot">subplot</a> style. However, you should be careful if you plan to add <a href="#colorbar">colorbar</a> or rotate plot – part of plot can be invisible if you will use non-default <a href="#subplot">subplot</a> style.
-</p>
-</dd>
-<dt><strong>Can I combine bitmap and vector output in EPS?</strong></dt>
-<dd><p>Yes. Sometimes you may have huge surface and a small set of curves and/or text on the plot. You can use function <a href="#rasterize">rasterize</a> just after making surface plot. This will put all plot to bitmap background. At this later plotting will be in vector format. For example, you can do something like following:
-</p><pre class="verbatim">gr->Surf(x, y, z);
-gr->Rasterize(); // make surface as bitmap
-gr->Axis();
-gr->WriteFrame("fname.eps");
-</pre>
-</dd>
-<dt><strong>Why I couldn’t use name ‘<samp>I</samp>’ for variable?</strong></dt>
-<dd><p>MathGL support C99 standard, where ‘<samp>I</samp>’ is reserved for imaginary unit. If you still need this name, then just use
-</p><pre class="verbatim">#undef I
-</pre><p>after including MathGL header files.
-</p>
-</dd>
-<dt><strong>How I can create MPEG video from plots?</strong></dt>
-<dd><p>You can save each frame into JPEG with names like ‘<samp>frame0001.jpg</samp>’, ‘<samp>frame0002.jpg</samp>’, ... Later you can use ImageMagic to convert them into MPEG video by command <code>convert frame*.jpg movie.mpg</code>. See also <a href="#MPEG">MPEG</a>.
-</p>
-</dd>
-</dl>
-
-
-
-<hr>
-<a name="General-concepts"></a>
-<div class="header">
-<p>
-Next: <a href="#MathGL-core" accesskey="n" rel="next">MathGL core</a>, Previous: <a href="#Examples" accesskey="p" rel="prev">Examples</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="General-concepts-1"></a>
-<h2 class="chapter">3 General concepts</h2>
-
-
-<p>The set of MathGL features is rather rich – just the number of basic graphics types
-is larger than 50. Also there are functions for data handling, plot setup and so on. In spite of it I tried to keep a similar style in function names and in the order of arguments. Mostly it is
-used for different drawing functions.
-</p>
-<p>There are six most general (base) concepts:
-</p><ol>
-<li> <strong>Any picture is created in memory first.</strong> The internal (memory) representation can be different: bitmap picture (for <code>SetQuality(MGL_DRAW_LMEM)</code> or <code><a href="#quality">quality</a> 6</code>) or the list of vector primitives (default). After that the user may decide what he/she want: save to file, display on the screen, run animation, do additional editing and so on. This approach assures a high portability of the program – the source code will produce exactly the same picture in <em>any</em> OS. Another big positive consequence is the ability to create the picture in the console program (using command line, without creating a window)!
-</li><li> <strong>Every plot settings (style of lines, font, color scheme) are specified by a string.</strong> It provides convenience for user/programmer – short string with parameters is more comprehensible than a large set of parameters. Also it provides portability – the strings are the same in any OS so that it is not necessary to think about argument types.
-</li><li> <strong>All functions have “simplified” and “advanced” forms.</strong> It is done for user’s convenience. One needs to specify only one data array in the “simplified” form in order to see the result. But one may set parametric dependence of coordinates and produce rather complex curves and surfaces in the “advanced” form. In both cases the order of function arguments is the same: first data arrays, second the string with style, and later string with options for additional plot tuning.
-</li><li> <strong>All data arrays for plotting are encapsulated in mglData(A) class.</strong> This reduces the number of errors while working with memory and provides a uniform interface for data of different types (mreal, double and so on) or for formula plotting.
-</li><li> <strong>All plots are vector plots.</strong> The MathGL library is intended for handling scientific data which have vector nature (lines, faces, matrices and so on). As a result, vector representation is used in all cases! In addition, the vector representation allows one to scale the plot easily – change the canvas size by a factor of 2, and the picture will be proportionally scaled.
-</li><li> <strong>New drawing never clears things drawn already.</strong> This, in some sense, unexpected, idea allows to create a lot of “combined” graphics. For example, to make a surface with contour lines one needs to call the function for surface plotting and the function for contour lines plotting (in any order). Thus the special functions for making this “combined” plots (as it is done in Matlab and some other plotting systems) are superfluous.
-</li></ol>
-
-<p>In addition to the general concepts I want to comment on some non-trivial or less commonly used general ideas – plot positioning, axis specification and curvilinear coordinates, styles for lines, text and color scheme.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Coordinate-axes" accesskey="1">Coordinate axes</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Color-styles" accesskey="2">Color styles</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Line-styles" accesskey="3">Line styles</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Color-scheme" accesskey="4">Color scheme</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Font-styles" accesskey="5">Font styles</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Textual-formulas" accesskey="6">Textual formulas</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Command-options" accesskey="7">Command options</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Interfaces" accesskey="8">Interfaces</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Coordinate-axes"></a>
-<div class="header">
-<p>
-Next: <a href="#Color-styles" accesskey="n" rel="next">Color styles</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Coordinate-axes-1"></a>
-<h3 class="section">3.1 Coordinate axes</h3>
-
-
-<p>Two axis representations are used in MathGL. The first one consists of normalizing coordinates of data points in axis range (see <a href="#Axis-settings">Axis settings</a>). If <code>SetCut()</code> is <code>true</code> then the outlier points are omitted, otherwise they are projected to the bounding box (see <a href="#Cutting">Cutting</a>). Also, the point will be omitted if it lies inside the box defined by <code>SetCutBox()</code> or if the value of formula <code>CutOff()</code> is nonzero for its coordinates. After that, transformation formulas defined by <code>SetFunc()</code> or <code>SetCoor()</code> are applied to the data point (see <a href="#Curved-coordinates">Curved coordinates</a>). Finally, the data point is plotted by one of the functions.
-</p>
-<p>The range of <em>x, y, z</em>-axis can be specified by <code>SetRange()</code> or <a href="#ranges">ranges</a> functions. Its origin is specified by <a href="#origin">origin</a> function. At this you can you can use <code>NAN</code> values for selecting axis origin automatically.
-</p>
-<p>There is 4-th axis <em>c</em> (color axis or colorbar) in addition to the usual axes <em>x, y, z</em>. It sets the range of values for the surface coloring. Its borders are automatically set to values of z-range during the call of <a href="#ranges">ranges</a> function. Also, one can directly set it by call <code>SetRange('c', ...)</code>. Use <a href="#colorbar">colorbar</a> function for drawing the colorbar.
-</p>
-<p>The form (appearence) of tick labels is controlled by <code>SetTicks()</code> function (see <a href="#Ticks">Ticks</a>). Function <var>SetTuneTicks</var> switches on/off tick enhancing by factoring out acommon multiplier (for small coordinate values, like 0.001 to 0.002, or large, like from 1000 to 2000) or common component (for narrow range, like from 0.999 to 1.000). Finally, you may use functions <code>SetTickTempl()</code> for setting templates for tick labels (it supports TeX symbols). Also, there is a possibility to print arbitrary text as tick labels the by help of <code>SetTicksVal()</code> function.
-</p>
-
-<hr>
-<a name="Color-styles"></a>
-<div class="header">
-<p>
-Next: <a href="#Line-styles" accesskey="n" rel="next">Line styles</a>, Previous: <a href="#Coordinate-axes" accesskey="p" rel="prev">Coordinate axes</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Color-styles-1"></a>
-<h3 class="section">3.2 Color styles</h3>
-
-
-<p>Base colors are defined by one of symbol ‘<samp>wkrgbcymhRGBCYMHWlenupqLENUPQ</samp>’.
-<p>The color types are: ‘<samp>k</samp>’ – black, ‘<samp>r</samp>’ – <span style="color: rgb(255, 0, 0);">red</span>, ‘<samp>R</samp>’ – <span style="color: rgb(127, 0, 0);">dark red</span>, ‘<samp>g</samp>’ – <span style="color: rgb(0, 255, 0);">green</span>, ‘<samp>G</samp>’ – <span style="color: rgb(0, 127, 0);">dark green</span>, ‘<samp>b</samp>’ – <span style="color: rgb(0, 0, 255);">blue</span>, ‘<samp>B</samp>’ – <span style="color: rgb(0, 0, 127);">dark blue</span>, ‘<samp>c</samp>’ – <span style="color: rgb(0, 255, 255);">cyan</span>, ‘<samp>C</samp>’ – <span style="color: rgb(0, 127, 127);">dark cyan</span>, ‘<samp>m</samp>’ – <span style="color: rgb(255, 0, 255);">magenta</span>, ‘<samp>M</samp>’ – <span style="color: rgb(127, 0, 127);">dark magenta</span>, ‘<samp>y</samp>’ – <span style="color: rgb(255, 255, 0);">yellow</span>, ‘<samp>Y</samp>’ – <span style="color: rgb(127, 127, 0);">dark yellow (gold)</span>, ‘<samp>h</samp>’ – <span style="color: rgb(127, 127, 127);">gray</span>, ‘<samp>H</samp>’ – <span style="color: rgb(76, 76, 76);">dark gray</span>, ‘<samp>w</samp>’ – white, ‘<samp>W</samp>’ – <span style="color: rgb(178, 178, 178);">bright gray</span>, ‘<samp>l</samp>’ – <span style="color: rgb(0, 255, 127);">green-blue</span>, ‘<samp>L</samp>’ – <span style="color: rgb(0, 127, 63);">dark green-blue</span>, ‘<samp>e</samp>’ – <span style="color: rgb(127, 255, 0);">green-yellow</span>, ‘<samp>E</samp>’ – <span style="color: rgb(63, 127, 0);">dark green-yellow</span>, ‘<samp>n</samp>’ – <span style="color: rgb(0, 127, 255);">sky-blue</span>, ‘<samp>N</samp>’ – <span style="color: rgb(0, 63, 127);">dark sky-blue</span>, ‘<samp>u</samp>’ – <span style="color: rgb(127, 0, 255);">blue-violet</span>, ‘<samp>U</samp>’ – <span style="color: rgb(63, 0, 127);">dark blue-violet</span>, ‘<samp>p</samp>’ – <span style="color: rgb(255, 0, 127);">purple</span>, ‘<samp>P</samp>’ – <span style="color: rgb(127, 0, 63);">dark purple</span>, ‘<samp>q</samp>’ – <span style="color: rgb(255, 127, 0);">orange</span>, ‘<samp>Q</samp>’ – <span style="color: rgb(127, 63, 0);">dark orange (brown)</span>.</p>
-</p>
-<p>You can also use “bright” colors. The “bright” color contain 2 symbols in brackets ‘<samp>{cN}</samp>’: first one is the usual symbol for color id, the second one is a digit for its brightness. The digit can be in range ‘<samp>1</samp>’...‘<samp>9</samp>’. Number ‘<samp>5</samp>’ corresponds to a normal color, ‘<samp>1</samp>’ is a very dark version of the color (practically black), and ‘<samp>9</samp>’ is a very bright version of the color (practically white). For example, the colors can be ‘<samp>{b2}</samp>’ ‘<samp>{b7}</samp>’ ‘<samp>{r7}</samp>’ and so on.
-</p>
-<p>Finally, you can specify RGB or RGBA values of a color using format ‘<samp>{xRRGGBB}</samp>’ or ‘<samp>{xRRGGBBAA}</samp>’ correspondingly. For example, ‘<samp>{xFF9966}</samp>’ give you
-<span style="color: rgb(255, 153, 102);">melone</span> color.
-</p>
-
-<hr>
-<a name="Line-styles"></a>
-<div class="header">
-<p>
-Next: <a href="#Color-scheme" accesskey="n" rel="next">Color scheme</a>, Previous: <a href="#Color-styles" accesskey="p" rel="prev">Color styles</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Line-styles-1"></a>
-<h3 class="section">3.3 Line styles</h3>
-
-
-<a name="index-Line-style"></a>
-<a name="index-Mark-style"></a>
-<a name="index-Arrows"></a>
-
-<p>The line style is defined by the string which may contain specifications for color (‘<samp>wkrgbcymhRGBCYMHWlenupqLENUPQ</samp>’), dashing style (‘<samp>-|;:ji=</samp>’ or space), width (‘<samp>123456789</samp>’) and marks (‘<samp>*o+xsd.^v<></samp>’ and ‘<samp>#</samp>’ modifier). If one of the type of information is omitted then default values used with next color from palette (see <a href="#Palette-and-colors">Palette and colors</a>). Note, that internal color counter will be nullified by any change of palette. This includes even hidden change (for example, by <a href="#box">box</a> or <a href="#axis">axis</a> functions).
-By default palette contain following colors: <span style="color: rgb(76, 76, 76);">dark gray</span> ‘<samp>H</samp>’, <span style="color: rgb(0, 0, 255);">blue</span> ‘<samp>b</samp>’, <span style="color: rgb(0, 255, 0);">green</span> ‘<samp>g</samp>’, <span style="color: rgb(255, 0, 0);">red</span> ‘<samp>r</samp>’, <span style="color: rgb(0, 255, 255);">cyan</span> ‘<samp>c</samp>’, <span style="color: rgb(255, 0, 255);">magenta</span> ‘<samp>m</samp>’, <span style="color: rgb(255, 255, 0);">yellow</span> ‘<samp>y</samp>’, <span style="color: rgb(127, 127, 127);">gray</span> ‘<samp>h</samp>’, <span style="color: rgb(0, 255, 127);">green-blue</span> ‘<samp>l</samp>’, <span style="color: rgb(0, 127, 255);">sky-blue</span> ‘<samp>n</samp>’, <span style="color: rgb(255, 127, 0);">orange</span> ‘<samp>q</samp>’, <span style="color: rgb(127, 255, 0);">green-yellow</span> ‘<samp>e</samp>’, <span style="color: rgb(127, 0, 255);">blue-violet</span> ‘<samp>u</samp>’, <span style="color: rgb(255, 0, 127);">purple</span> ‘<samp>p</samp>’.
-
-<p>Dashing style has the following meaning: space – no line (usable for plotting only marks), ‘<samp>-</samp>’ – solid line (■■■■■■■■■■■■■■■■), ‘<samp>|</samp>’ – long dashed line (■■■■■■■■□□□□□□□□), ‘<samp>;</samp>’ – dashed line (■■■■□□□□■■■■□□□□), ‘<samp>=</samp>’ – small dashed line (■■□□■■□□■■□□■■□□), ‘<samp>:</samp>’ – dotted line (■□□□■□□□■□□□■□□□), ‘<samp>j</samp>’ – dash-dotted line (■■■■■■■□□□□■□□□□), ‘<samp>i</samp>’ – small dash-dotted line (■■■□□■□□■■■□□■□□), ‘<samp>{dNNNN}</samp>’ – manual mask style (for v.2.3 and later, like ‘<samp>{df090}</samp>’ for (■■■■□□□□■□□■□□□□)).</p>
-</p>
-<p>Marker types are: ‘<samp>o</samp>’ – circle, ‘<samp>+</samp>’ – cross, ‘<samp>x</samp>’ – skew cross, ‘<samp>s</samp>’ – square, ‘<samp>d</samp>’ – rhomb (or diamond), ‘<samp>.</samp>’ – dot (point), ‘<samp>^</samp>’ – triangle up, ‘<samp>v</samp>’ – triangle down, ‘<samp><</samp>’ – triangle left, ‘<samp>></samp>’ – triangle right, ‘<samp>#*</samp>’ – Y sign, ‘<samp>#+</samp>’ – squared cross, ‘<samp>#x</samp>’ – squared skew cross, ‘<samp>#.</samp>’ – circled dot. If string contain symbol ‘<samp>#</samp>’ then the solid versions of markers are used.
-</p>
-<p>You can provide user-defined symbols (see <a href="#addsymbol">addsymbol</a>) to draw it as marker by using ‘<samp>&</samp>’ style. In particular, ‘<samp>&*</samp>’, ‘<samp>&o</samp>’, ‘<samp>&+</samp>’, ‘<samp>&x</samp>’, ‘<samp>&s</samp>’, ‘<samp>&d</samp>’, ‘<samp>&.</samp>’, ‘<samp>&^</samp>’, ‘<samp>&v</samp>’, ‘<samp>&<</samp>’, ‘<samp>&></samp>’ will draw user-defined symbol ‘<samp>*o+xsd.^v<></samp>’ correspondingly; and
-‘<samp>&#o</samp>’, ‘<samp>&#+</samp>’, ‘<samp>&#x</samp>’, ‘<samp>&#s</samp>’, ‘<samp>&#d</samp>’, ‘<samp>&#.</samp>’, ‘<samp>&#^</samp>’, ‘<samp>&#v</samp>’, ‘<samp>&#<</samp>’, ‘<samp>&#></samp>’ will draw user-defined symbols ‘<samp>YOPXSDCTVLR</samp>’ correspondingly. Note, that wired version of user-defined symbols will be drawn if you set negative marker size (see <a href="#marksize">marksize</a> or <code>size</code> in <a href="#Command-options">Command options</a>).
-</p>
-<p>One may specify to draw a special symbol (an arrow) at the beginning and at the end of line. This is done if the specification string contains one of the following symbols: ‘<samp>A</samp>’ – outer arrow, ‘<samp>V</samp>’ – inner arrow, ‘<samp>I</samp>’ – transverse hatches, ‘<samp>K</samp>’ – arrow with hatches, ‘<samp>T</samp>’ – triangle, ‘<samp>S</samp>’ – square, ‘<samp>D</samp>’ – rhombus, ‘<samp>O</samp>’ – circle, ‘<samp>X</samp>’ – skew cross, ‘<samp>_</samp>’ – nothing (the default). The following rule applies: the first symbol specifies the arrow at the end of line, the second specifies the arrow at the beginning of the line. For example, ‘<samp>r-A</samp>’ defines a red solid line with usual arrow at the end, ‘<samp>b|AI</samp>’ defines a blue dash line with an arrow at the end and with hatches at the beginning, ‘<samp>_O</samp>’ defines a line with the current style and with a circle at the beginning. These styles are applicable during the graphics plotting as well (for example, <a href="#g_t1D-plotting">1D plotting</a>).
-</p>
-<div align="center"><img src="png/style.png" alt="Color and line styles.">
-</div>
-
-<hr>
-<a name="Color-scheme"></a>
-<div class="header">
-<p>
-Next: <a href="#Font-styles" accesskey="n" rel="next">Font styles</a>, Previous: <a href="#Line-styles" accesskey="p" rel="prev">Line styles</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Color-scheme-1"></a>
-<h3 class="section">3.4 Color scheme</h3>
-
-
-<a name="index-Color-scheme"></a>
-
-<p>The color scheme is used for determining the color of surfaces, isolines, isosurfaces and so on. The color scheme is defined by the string, which may contain several characters that are color id (see <a href="#Line-styles">Line styles</a>) or characters ‘<samp>#:|</samp>’. Symbol ‘<samp>#</samp>’ switches to mesh drawing or to a wire plot. Symbol ‘<samp>|</samp>’ disables color interpolation in color scheme, which can be useful, for example, for sharp colors during matrix plotting. Symbol ‘<samp>:</samp>’ terminate the color scheme parsing. Following it, the user may put styles for the text, rotation axis for curves/isocontours, and so on. Color scheme may contain up to 32 color values.
-</p>
-<p>The final color is a linear interpolation of color array. The color array is constructed from the string ids (including “bright” colors, see <a href="#Color-styles">Color styles</a>). The argument is the amplitude normalized in color range (see <a href="#Axis-settings">Axis settings</a>). For example, string containing 4 characters ‘<samp>bcyr</samp>’ corresponds to a colorbar from blue (lowest value) through cyan (next value) through yellow (next value) to the red (highest value). String ‘<samp>kw</samp>’ corresponds to a colorbar from black (lowest value) to white (highest value). String ‘<samp>m</samp>’ corresponds to a simple magenta color.
-</p>
-<p>The special 2-axis color scheme (like in <a href="#map">map</a> plot) can be used if it contain symbol ‘<samp>%</samp>’. In this case the second direction (alpha channel) is used as second coordinate for colors. At this, up to 4 colors can be specified for corners: {c1,a1}, {c2,a1}, {c1,a2}, {c2,a2}. Here color and alpha ranges are {c1,c2} and {a1,a2} correspondingly. If one specify less than 4 colors then black color is used for corner {c1,a1}. If only 2 colors are specified then the color of their sum is used for corner {c2,a2}.
-</p>
-<p>There are several useful combinations. String ‘<samp>kw</samp>’ corresponds to the simplest gray color scheme where higher values are brighter. String ‘<samp>wk</samp>’ presents the inverse gray color scheme where higher value is darker. Strings ‘<samp>kRryw</samp>’, ‘<samp>kGgw</samp>’, ‘<samp>kBbcw</samp>’ present the well-known <em>hot</em>, <em>summer</em> and <em>winter</em> color schemes. Strings ‘<samp>BbwrR</samp>’ and ‘<samp>bBkRr</samp>’ allow to view bi-color figure on white or black background, where negative values are blue and positive values are red. String ‘<samp>BbcyrR</samp>’ gives a color scheme similar to the well-known <em>jet</em> color scheme.
-</p>
-<p>For more precise coloring, you can change default (equidistant) position of colors in color scheme. The format is ‘<samp>{CN,pos}</samp>’, ‘<samp>{CN,pos}</samp>’ or ‘<samp>{xRRGGBB,pos}</samp>’. The position value <var>pos</var> should be in range [0, 1]. Note, that alternative method for fine tuning of the color scheme is using the formula for coloring (see <a href="#Curved-coordinates">Curved coordinates</a>).
-</p>
-<div align="center"><img src="png/schemes.png" alt="Most popular color schemes.">
-</div>
-<p>When coloring by <em>coordinate</em> (used in <a href="#map">map</a>), the final color is determined by the position of the point in 3d space and is calculated from formula c=x*c[1] + y*c[2]. Here, c[1], c[2] are the first two elements of color array; x, y are normalized to axis range coordinates of the point.
-</p>
-<p>Additionally, MathGL can apply mask to face filling at bitmap rendering. The kind of mask is specified by one of symbols ‘<samp>-+=;oOsS~<>jdD*^</samp>’ in color scheme. Mask can be rotated by arbitrary angle by command <a href="#mask">mask</a> or by three predefined values +45, -45 and 90 degree by symbols ‘<samp>\/I</samp>’ correspondingly. Examples of predefined masks are shown on the figure below.
-</p>
-<div align="center"><img src="png/mask.png" alt="Example of masks for face coloring.">
-</div>
-<p>However, you can redefine mask for one symbol by specifying new matrix of size 8*8 as second argument for <a href="#mask">mask</a> command. For example, the right-down subplot on the figure above is produced by code<br>
-<code>gr->SetMask('+', "ff00182424f800"); gr->Dens(a,"3+");</code><br>
-or just use manual mask style (for v.2.3 and later)<br>
-<code>gr->Dens(a,"3{s00ff00182424f800}");</code>
-</p>
-
-<hr>
-<a name="Font-styles"></a>
-<div class="header">
-<p>
-Next: <a href="#Textual-formulas" accesskey="n" rel="next">Textual formulas</a>, Previous: <a href="#Color-scheme" accesskey="p" rel="prev">Color scheme</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Font-styles-1"></a>
-<h3 class="section">3.5 Font styles</h3>
-
-
-<a name="index-Font-styles"></a>
-
-<p>Text style is specified by the string which may contain: color id characters ‘<samp>wkrgbcymhRGBCYMHW</samp>’ (see <a href="#Color-styles">Color styles</a>), and font style (‘<samp>ribwou</samp>’) and/or alignment (‘<samp>LRC</samp>’) specifications. At this, font style and alignment begin after the separator ‘<samp>:</samp>’. For example, ‘<samp>r:iCb</samp>’ sets the bold (‘<samp>b</samp>’) italic (‘<samp>i</samp>’) font text aligned at the center (‘<samp>C</samp>’) and with red color (‘<samp>r</samp>’). Starting from MathGL v.2.3, you can set not single color for whole text, but use color gradient for printed text (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-<p>The font styles are: ‘<samp>r</samp>’ – roman (or regular) font, ‘<samp>i</samp>’ – italic style, ‘<samp>b</samp>’ – bold style. By default roman roman font is used. The align types are: ‘<samp>L</samp>’ – align left (default), ‘<samp>C</samp>’ – align center, ‘<samp>R</samp>’ – align right, ‘<samp>T</samp>’ – align under, ‘<samp>V</samp>’ – align center vertical. Additional font effects are: ‘<samp>w</samp>’ – wired, ‘<samp>o</samp>’ – over-lined, ‘<samp>u</samp>’ – underlined.
-</p>
-<p>Also a parsing of the LaTeX-like syntax is provided. There are commands for the font style changing inside the string (for example, use \b for bold font): \a or \overline – over-lined, \b or \textbf – bold, \i or \textit – italic, \r or \textrm – roman (disable bold and italic attributes), \u or \underline – underlined, \w or \wire – wired, \big – bigger size, @ – smaller size. The lower and upper indexes are specified by ‘<samp>_</samp>’ and ‘<samp>^</samp>’ symbols. At this the changed font style is applied only on next symbol or symbols in braces {}. The text in braces {} are treated as single symbol that allow one to print the index of index. For example, compare the strings ‘<samp>sin (x^{2^3})</samp>’ and ‘<samp>sin (x^2^3)</samp>’. You may also change text color inside string by command #? or by \color? where ‘<samp>?</samp>’ is symbolic id of the color (see <a href="#Color-styles">Color styles</a>). For example, words ‘<samp>blue</samp>’ and ‘<samp>red</samp>’ will be colored in the string ‘<samp>#b{blue} and \colorr{red} text</samp>’. The most of functions understand the newline symbol ‘<samp>\n</samp>’ and allows to print multi-line text. Finally, you can use arbitrary (if it was defined in font-face) UTF codes by command <code>\utf0x????</code>. For example, <code>\utf0x3b1</code> will produce
- α symbol.
-</p>
-<p>The most of commands for special TeX or AMSTeX symbols, the commands for font style changing (\textrm, \textbf, \textit, \textsc, \overline, \underline), accents (\hat, \tilde, \dot, \ddot, \acute, \check, \grave, \bar, \breve) and roots (\sqrt, \sqrt3, \sqrt4) are recognized. The full list contain approximately 2000 commands. Note that first space symbol after the command is ignored, but second one is printed as normal symbol (space). For example, the following strings produce the same result <em>\tilde a</em>: ‘<samp>\tilde{a}</samp>’; ‘<samp>\tilde a</samp>’; ‘<samp>\tilde{}a</samp>’.
-</p>
-In particular, the Greek letters are recognizable special symbols: α – \alpha, β – \beta, γ – \gamma, δ – \delta, ε – \epsilon, η – \eta, ι – \iota, χ – \chi, κ – \kappa, λ – \lambda, μ – \mu, ν – \nu, o – \o, ω – \omega, ϕ – \phi, π – \pi, ψ – \psi, ρ – \rho, σ – \sigma, θ – \theta, τ – \tau, υ – \upsilon, ξ – \xi, ζ – \zeta, ς – \varsigma, ɛ – \varepsilon, ϑ – \vartheta, φ – \varphi, ϰ – \varkappa; A – \Alpha, B – \Beta, Γ – \Gamma, Δ – \Delta, E – \Epsilon, H – \Eta, I – \Iota, C – \Chi, K – \Kappa, Λ – \Lambda, M – \Mu, N – \Nu, O – \O, Ω – \Omega, Φ – \Phi, Π – \Pi, Ψ – \Psi, R – \Rho, Σ – \Sigma, Θ – \Theta, T – \Tau, Υ – \Upsilon, Ξ – \Xi, Z – \Zeta.
-
-<p>The small part of most common special TeX symbols are: ∠ – \angle, ⋅ – \cdot, ♣ – \clubsuit, ✓ – \checkmark, ∪ – \cup, ∩ – \cap, ♢ – \diamondsuit, ◇ – \diamond, ÷
- – \div,
-↓ – \downarrow, † – \dag, ‡ – \ddag, ≡ – \equiv, ∃ – \exists, ⌢ – \frown, ♭ – \flat, ≥ – \ge, ≥ – \geq, ≧ – \geqq, ← – \gets, ♡ – \heartsuit, ∞ – \infty, ∫ – \int, \Int, ℑ – \Im, ♢ – \lozenge, ⟨ – \langle, ≤ – \le, ≤ – \leq, ≦ – \leqq, ← – \leftarrow, ∓ – \mp, ∇ – \nabla, ≠ – \ne, ≠ – \neq, ♮ – \natural, ∮ – \oint, ⊙ – \odot, ⊕ – \oplus, ∂ – \partial, ∥ – \parallel, ⊥ –\perp, ± – \pm, ∝ – \propto, ∏ – \prod, ℜ – \Re, → – \rightarrow, ⟩ – \rangle, ♠ – \spadesuit, ~ – \sim, ⌣ – \smile, ⊂ – \subset, ⊃ – \supset, √ – \sqrt or \surd, § – \S, ♯ – \sharp, ∑ – \sum, × – \times, → – \to, ∴ – \therefore, ↑ – \uparrow, ℘ – \wp. </p>
-
-<p>The font size can be defined explicitly (if <var>size</var>>0) or relatively to a base font size as |<var>size</var>|*<var>FontSize</var> (if <var>size</var><0). The value <var>size</var>=0 specifies that the string will not be printed. The base font size is measured in internal “MathGL” units. Special functions <code>SetFontSizePT(), SetFontSizeCM(), SetFontSizeIN()</code> (see <a href="#Font-settings">Font settings</a>) allow one to set it in more “common” variables for a given dpi value of the picture.
-</p>
-
-<hr>
-<a name="Textual-formulas"></a>
-<div class="header">
-<p>
-Next: <a href="#Command-options" accesskey="n" rel="next">Command options</a>, Previous: <a href="#Font-styles" accesskey="p" rel="prev">Font styles</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Textual-formulas-1"></a>
-<h3 class="section">3.6 Textual formulas</h3>
-
-
-<a name="index-Textual-formulas"></a>
-
-<p>MathGL have the fast variant of textual formula evaluation
-(see <a href="#Evaluate-expression">Evaluate expression</a>)
-. There are a lot of functions and operators available. The operators are: ‘<samp>+</samp>’ – addition, ‘<samp>-</samp>’ – subtraction, ‘<samp>*</samp>’ – multiplication, ‘<samp>/</samp>’ – division, ‘<samp>%</samp>’ – modulo, ‘<samp>^</samp>’ – integer power. Also there are logical “operators”: ‘<samp><</samp>’ – true if x<y, ‘<samp>></samp>’ – true if x>y, ‘<samp>=</samp>’ – true if x=y, ‘<samp>&</samp>’ – true if x and y both nonzero, ‘<samp>|</samp>’ – true if x or y nonzero. These logical operators have lowest priority and return 1 if true or 0 if false.
-</p>
-<p>The basic functions are: ‘<samp>sqrt(x)</samp>’ – square root of <var>x</var>, ‘<samp>pow(x,y)</samp>’ – power <var>x</var> in <var>y</var>, ‘<samp>ln(x)</samp>’ – natural logarithm of <var>x</var>, ‘<samp>lg(x)</samp>’ – decimal logarithm of <var>x</var>, ‘<samp>log(a,x)</samp>’ – logarithm base <var>a</var> of <var>x</var>, ‘<samp>abs(x)</samp>’ – absolute value of <var>x</var>, ‘<samp>sign(x)</samp>’ – sign of <var>x</var>, ‘<samp>mod(x,y)</samp>’ – <var>x</var> modulo <var>y</var>, ‘<samp>step(x)</samp>’ – step function, ‘<samp>int(x)</samp>’ – integer part of <var>x</var>, ‘<samp>rnd</samp>’ – random number, ‘<samp>random(x)</samp>’ – random data of size as in <var>x</var>, ‘<samp>hypot(x,y)</samp>’=sqrt(x^2+y^2) – hypotenuse, ‘<samp>cmplx(x,y)</samp>’=x+i*y – complex number, ‘<samp>pi</samp>’ – number
-π = 3.1415926…, inf=∞
-</p>
-<p>Functions for complex numbers ‘<samp>real(x)</samp>’, ‘<samp>imag(x)</samp>’, ‘<samp>abs(x)</samp>’, ‘<samp>arg(x)</samp>’, ‘<samp>conj(x)</samp>’.
-</p>
-<p>Trigonometric functions are: ‘<samp>sin(x)</samp>’, ‘<samp>cos(x)</samp>’, ‘<samp>tan(x)</samp>’ (or ‘<samp>tg(x)</samp>’). Inverse trigonometric functions are: ‘<samp>asin(x)</samp>’, ‘<samp>acos(x)</samp>’, ‘<samp>atan(x)</samp>’. Hyperbolic functions are: ‘<samp>sinh(x)</samp>’ (or ‘<samp>sh(x)</samp>’), ‘<samp>cosh(x)</samp>’ (or ‘<samp>ch(x)</samp>’), ‘<samp>tanh(x)</samp>’ (or ‘<samp>th(x)</samp>’). Inverse hyperbolic functions are: ‘<samp>asinh(x)</samp>’, ‘<samp>acosh(x)</samp>’, ‘<samp>atanh(x)</samp>’.
-</p>
-<p>There are a set of special functions: ‘<samp>gamma(x)</samp>’ – Gamma function Γ(x) = ∫<sub>0</sub><sup>∞</sup> t<sup>x-1</sup> exp(-t) dt, ‘<samp>gamma_inc(x,y)</samp>’ – incomplete Gamma function Γ(x,y) = ∫<sub>y</sub><sup>∞</sup> t<sup>x-1</sup> exp(-t) dt, ‘<samp>psi(x)</samp>’ – digamma function ψ(x) = Γ′(x)/Γ(x) for x≠0, ‘<samp>ai(x)</samp>’ – Airy function Ai(x), ‘<samp>bi(x)</samp>’ – Airy function Bi(x), ‘<samp>cl(x)</samp>’ – Clausen function, ‘<samp>li2(x)</samp>’ (or ‘<samp>dilog(x)</samp>’) – dilogarithm Li<sub>2</sub>(x) = -ℜ∫<sub>0</sub><sup>x</sup>ds log(1-s)/s, ‘<samp>sinc(x)</samp>’ – compute sinc(x) = sin(πx)/(πx) for any value of x, ‘<samp>zeta(x)</samp>’ – Riemann zeta function ζ(s) = ∑<sub>k=1</sub><sup>∞</sup>k<sup>-s</sup> for arbitrary s≠1, ‘<samp>eta(x)</samp>’ – eta function η(s) = (1 - 2<sup>1-s</sup>)ζ(s) for arbitrary s, ‘<samp>lp(l,x)</samp>’ – Legendre polynomial P<sub>l</sub>(x), (|x|≤1, l≥0), ‘<samp>w0(x)</samp>’ – principal branch of the Lambert W function, ‘<samp>w1(x)</samp>’ – principal branch of the Lambert W function. Function W(x) is defined to be solution of the equation: W exp(W) = x. </p>
-
-<p>The exponent integrals are: ‘<samp>ci(x)</samp>’ – Cosine integral Ci(x) = ∫<sub>0</sub><sup>x</sup>dt cos(t)/t, ‘<samp>si(x)</samp>’ – Sine integral Si(x) = ∫<sub>0</sub><sup>x</sup>dt sin(t)/t, ‘<samp>erf(x)</samp>’ – error function erf(x) = (2/√π) ∫<sub>0</sub><sup>x</sup>dt exp(-t<sup>2</sup>) , ‘<samp>ei(x)</samp>’ – exponential integral Ei(x) = -PV(∫<sub>-x</sub><sup>∞</sup>dt exp(-t)/t) (where PV denotes the principal value of the integral), ‘<samp>e1(x)</samp>’ – exponential integral E<sub>1</sub>(x) = ℜ∫<sub>1</sub><sup>∞</sup>dt exp(-xt)/t, ‘<samp>e2(x)</samp>’ – exponential integral E<sub>2</sub>(x) = ℜ∫<sub>1</sub>∞</sup>dt exp(-xt)/t<sup>2</sup>, ‘<samp>ei3(x)</samp>’ – exponential integral Ei<sub>3</sub>(x) = ∫<sub>0</sub><sup>x</sup>dt exp(-t<sup>3</sup>) for x≥0. </p>
-
-<p>Bessel functions are: ‘<samp>j(nu,x)</samp>’ – regular cylindrical Bessel function of fractional order <em>nu</em>, ‘<samp>y(nu,x)</samp>’ – irregular cylindrical Bessel function of fractional order <em>nu</em>, ‘<samp>i(nu,x)</samp>’ – regular modified Bessel function of fractional order <em>nu</em>, ‘<samp>k(nu,x)</samp>’ – irregular modified Bessel function of fractional order <em>nu</em>. </p>
-
-<p>Elliptic integrals are: ‘<samp>ee(k)</samp>’ – complete elliptic integral is denoted by E(k) = E(π/2,k), ‘<samp>ek(k)</samp>’ – complete elliptic integral is denoted by K(k) = F(π/2,k), ‘<samp>e(phi,k)</samp>’ – elliptic integral E(φ,k) = ∫<sub>0</sub><sup>φ</sup>dt √(1 - k<sup>2</sup>sin<sup>2</sup>(t)), ‘<samp>f(phi,k)</samp>’ – elliptic integral F(φ,k) = ∫<sub>0</sub><sup>φ</sup>dt 1/√(1 - k<sup>2</sup>sin<sup>2</sup>(t))</p>
-
-<p>Jacobi elliptic functions are: ‘<samp>sn(u,m)</samp>’, ‘<samp>cn(u,m)</samp>’, ‘<samp>dn(u,m)</samp>’, ‘<samp>sc(u,m)</samp>’, ‘<samp>sd(u,m)</samp>’, ‘<samp>ns(u,m)</samp>’, ‘<samp>cs(u,m)</samp>’, ‘<samp>cd(u,m)</samp>’, ‘<samp>nc(u,m)</samp>’, ‘<samp>ds(u,m)</samp>’, ‘<samp>dc(u,m)</samp>’, ‘<samp>nd(u,m)</samp>’.
-</p>
-<p>Note, some of these functions are unavailable if MathGL was compiled without GSL support.
-</p>
-<p>There is no difference between lower or upper case in formulas. If argument value lie outside the range of function definition then function returns NaN.
-</p>
-
-<hr>
-<a name="Command-options"></a>
-<div class="header">
-<p>
-Next: <a href="#Interfaces" accesskey="n" rel="next">Interfaces</a>, Previous: <a href="#Textual-formulas" accesskey="p" rel="prev">Textual formulas</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Command-options-1"></a>
-<h3 class="section">3.7 Command options</h3>
-
-
-<p>Command options allow the easy setup of the selected plot by changing global settings only for this plot. Each option start from symbol ‘<samp>;</samp>’. Options work so that MathGL remember the current settings, change settings as it being set in the option, execute function and return the original settings back. So, the options are most usable for plotting functions.
-</p>
-<p>The most useful options are <code>xrange, yrange, zrange</code>. They sets the boundaries for data change. This boundaries are used for automatically filled variables. So, these options allow one to change the position of some plots. For example, in command <code>Plot(y,"","xrange 0.1 0.9");</code> or <code>plot y; xrange 0.1 0.9</code> the x coordinate will be equidistantly distributed in range 0.1 ... 0.9. See <a href="#Using-options">Using options</a>, for sample code and picture.
-</p>
-<p>The full list of options are:
-<a name="index-alpha"></a>
-<a name="index-alphadef"></a>
-</p><dl>
-<dt><a name="index-alpha-1"></a>MGL option: <strong>alpha</strong> <em><code>val</code></em></dt>
-<dd><p>Sets alpha value (transparency) of the plot. The value should be in range [0, 1]. See also <a href="#alphadef">alphadef</a>.
-</p></dd></dl>
-
-<a name="index-xrange"></a>
-<dl>
-<dt><a name="index-xrange-1"></a>MGL option: <strong>xrange</strong> <em><code>val1 val2</code></em></dt>
-<dd><p>Sets boundaries of x coordinate change for the plot. See also <a href="#xrange">xrange</a>.
-</p></dd></dl>
-<a name="index-yrange"></a>
-<dl>
-<dt><a name="index-yrange-1"></a>MGL option: <strong>yrange</strong> <em><code>val1 val2</code></em></dt>
-<dd><p>Sets boundaries of y coordinate change for the plot. See also <a href="#yrange">yrange</a>.
-</p></dd></dl>
-<a name="index-zrange"></a>
-<dl>
-<dt><a name="index-zrange-1"></a>MGL option: <strong>zrange</strong> <em><code>val1 val2</code></em></dt>
-<dd><p>Sets boundaries of z coordinate change for the plot. See also <a href="#zrange">zrange</a>.
-</p></dd></dl>
-
-<a name="index-cut"></a>
-<dl>
-<dt><a name="index-cut-1"></a>MGL option: <strong>cut</strong> <em><code>val</code></em></dt>
-<dd><p>Sets whether to cut or to project the plot points lying outside the bounding box. See also <a href="#cut">cut</a>.
-</p></dd></dl>
-<a name="index-fontsize"></a>
-<dl>
-<dt><a name="index-size"></a>MGL option: <strong>size</strong> <em><code>val</code></em></dt>
-<dd><p>Sets the size of text, marks and arrows. See also <a href="#font">font</a>, <a href="#marksize">marksize</a>, <a href="#arrowsize">arrowsize</a>.
-</p></dd></dl>
-<a name="index-meshnum"></a>
-<dl>
-<dt><a name="index-meshnum-1"></a>MGL option: <strong>meshnum</strong> <em><code>val</code></em></dt>
-<dd><p>Work like <a href="#meshnum">meshnum</a> command.
-</p></dd></dl>
-
-<a name="index-legend"></a>
-<dl>
-<dt><a name="index-legend-1"></a>MGL option: <strong>legend</strong> <em>'txt'</em></dt>
-<dd><p>Adds string ’txt’ to internal legend accumulator. The style of described line and mark is taken from arguments of the last <a href="#g_t1D-plotting">1D plotting</a> command. See also <a href="#legend">legend</a>.
-</p></dd></dl>
-<a name="index-value"></a>
-<dl>
-<dt><a name="index-value-1"></a>MGL option: <strong>value</strong> <em><code>val</code></em></dt>
-<dd><p>Set the value to be used as additional numeric parameter in plotting command.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Interfaces"></a>
-<div class="header">
-<p>
-Previous: <a href="#Command-options" accesskey="p" rel="prev">Command options</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Interfaces-1"></a>
-<h3 class="section">3.8 Interfaces</h3>
-
-
-
-
-<p>The MathGL library has interfaces for a set of languages. Most of them are based on the C interface via SWIG tool. There are Python, Java, Octave, Lisp, C#, Guile, Lua, Modula 3, Ocaml, Perl, PHP, Pike, R, Ruby, and Tcl interfaces. Also there is a Fortran interface which has a similar set of functions, but slightly different types of arguments (integers instead of pointers). These functions are marked as [C function].
-</p>
-<p>Some of the languages listed above support classes (like C++ or Python). The name of functions for them is the same as in C++ (see <a href="#MathGL-core">MathGL core</a> and <a href="#Data-processing">Data processing</a>) and marked like [Method on mglGraph].
-</p>
-<p>Finally, a special command language MGL (see <a href="#MGL-scripts">MGL scripts</a>) was written for a faster access to plotting functions. Corresponding scripts can be executed separately (by UDAV, mglconv, mglview and so on) or from the C/C++/Python/... code (see <a href="#mglParse-class">mglParse class</a>).
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#C-interface" accesskey="1">C interface</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#C_002b_002b-interface" accesskey="2">C++ interface</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="C-interface"></a>
-<div class="header">
-<p>
-Next: <a href="#C_002b_002b-interface" accesskey="n" rel="next">C++ interface</a>, Up: <a href="#Interfaces" accesskey="u" rel="up">Interfaces</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="C_002fFortran-interface"></a>
-<h4 class="subsection">3.8.1 C/Fortran interface</h4>
-
-
-<p>The C interface is a base for many other interfaces. It contains the pure C functions for most of the methods of MathGL classes. In distinction to C++ classes, C functions must have an argument HMGL (for graphics) and/or HMDT (for data arrays), which specifies the object for drawing or manipulating (changing). So, firstly, the user has to create this object by the function <code>mgl_create_*()</code> and has to delete it after the use by function <code>mgl_delete_*()</code>.
-</p>
-<p>All C functions are described in the header file <code>#include <mgl2/mgl_cf.h></code> and use variables of the following types:
-</p><ul>
-<li> <code>HMGL</code> — Pointer to class <code>mglGraph</code> (see <a href="#MathGL-core">MathGL core</a>).
-</li><li> <code>HCDT</code> — Pointer to class <code>const mglDataA</code> (see <a href="#Data-processing">Data processing</a>) — constant data array.
-</li><li> <code>HMDT</code> — Pointer to class <code>mglData</code> (see <a href="#Data-processing">Data processing</a>) — data array of real numbers.
-</li><li> <code>HADT</code> — Pointer to class <code>mglDataC</code> (see <a href="#Data-processing">Data processing</a>) — data array of complex numbers.
-</li><li> <code>HMPR</code> — Pointer to class <code>mglParse</code> (see <a href="#mglParse-class">mglParse class</a>) — MGL script parsing.
-</li><li> <code>HMEX</code> — Pointer to class <code>mglExpr</code> (see <a href="#Evaluate-expression">Evaluate expression</a>) — textual formulas for real numbers.
-</li><li> <code>HMAX</code> — Pointer to class <code>mglExprC</code> (see <a href="#Evaluate-expression">Evaluate expression</a>) — textual formulas for complex numbers.
-</li></ul>
-<p>These variables contain identifiers for graphics drawing objects and for the data objects.
-</p>
-<p>Fortran functions/subroutines have the same names as C functions. However, there is a difference. Variable of type <code>HMGL, HMDT</code> must be an integer with sufficient size (<code>integer*4</code> in the 32-bit operating system or <code>integer*8</code> in the 64-bit operating system). All C functions of type <code>void</code> are subroutines in Fortran, which are called by operator <code>call</code>. The exceptions are functions, which return variables of types <code>HMGL</code> or <code>HMDT</code>. These functions should be declared as integer in Fortran code. Also, one should keep in mind that strings in Fortran are denoted by <code>'</code> symbol, not the <code>"</code> symbol.
-</p>
-
-<hr>
-<a name="C_002b_002b-interface"></a>
-<div class="header">
-<p>
-Previous: <a href="#C-interface" accesskey="p" rel="prev">C interface</a>, Up: <a href="#Interfaces" accesskey="u" rel="up">Interfaces</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="C_002b_002b_002fPython-interface"></a>
-<h4 class="subsection">3.8.2 C++/Python interface</h4>
-
-
-<p>MathGL provides the interface to a set of languages via SWIG library. Some of these languages support classes. The typical example is Python – which is named in this chapter’s title. Exactly the same classes are used for high-level C++ API. Its feature is using only inline member-functions what make high-level API to be independent on compiler even for binary build.
-</p>
-<p>There are 3 main classes in:
-</p><ul>
-<li> <code>mglGraph</code>
-– provide most plotting functions (see <a href="#MathGL-core">MathGL core</a>).
-</li><li> <code>mglData</code>
-– provide base data processing (see <a href="#Data-processing">Data processing</a>). It have an additional feature to access data values. You can use a construct like this: <code>dat[i]=sth;</code> or <code>sth=dat[i]</code> where flat representation of data is used (i.e., <var>i</var> can be in range 0...nx*nx*nz-1). You can also import NumPy arrays as input arguments in Python: <code>mgl_dat = mglData(numpy_dat);</code>.
-</li><li> <code>mglParse</code>
-– provide functions for parsing MGL scripts (see <a href="#MGL-scripts">MGL scripts</a>).
-</li></ul>
-
-
-<p>To use Python classes just execute ‘<samp>import mathgl</samp>’. The simplest example will be:
-</p><pre class="verbatim">import mathgl
-a=mathgl.mglGraph()
-a.Box()
-a.WritePNG("test.png")
-</pre><p>Alternatively you can import all classes from <code>mathgl</code> module and easily access MathGL classes like this:
-</p><pre class="verbatim">from mathgl import *
-a=mglGraph()
-a.Box()
-a.WritePNG("test.png")
-</pre><p>This becomes useful if you create many <code>mglData</code> objects, for example.
-</p>
-
-
-
-<hr>
-<a name="MathGL-core"></a>
-<div class="header">
-<p>
-Next: <a href="#Widget-classes" accesskey="n" rel="next">Widget classes</a>, Previous: <a href="#General-concepts" accesskey="p" rel="prev">General concepts</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="MathGL-core-1"></a>
-<h2 class="chapter">4 MathGL core</h2>
-
-<a name="index-mglGraph"></a>
-
-
-<p>The core of MathGL is <strong>mglGraph</strong> class defined in <code>#include <mgl2/mgl.h></code>. It contains a lot of plotting functions for 1D, 2D and 3D data. It also encapsulates parameters for axes drawing. Moreover an arbitrary coordinate transformation can be used for each axis. All plotting functions use data encapsulated in mglData class (see <a href="#Data-processing">Data processing</a>) that allows to check sizes of used arrays easily. Also it have many functions for data handling: modify it by formulas, find momentums and distribution (histogram), apply operator (differentiate, integrate, transpose, Fourier and so on), change data sizes (interpolate, squeeze, crop and so on). Additional information about colors, fonts, formula parsing can be found in <a href="#General-concepts">General concepts</a> and <a href="#Other-classes">Other classes</a>.
-</p>
-<p>Some of MathGL features will appear only in novel versions. To test used MathGL version you can use following function.
-<a name="version"></a></p><dl>
-<dt><a name="index-version"></a>MGL command: <em></em> <strong>version</strong> <em>'ver'</em></dt>
-<dt><a name="index-CheckVersion"></a>Method on <code>mglGraph</code>: <em><code>bool</code></em> <strong>CheckVersion</strong> <em>(<code>const char *</code>ver) static</em></dt>
-<dt><a name="index-mgl_005fcheck_005fversion"></a>C function: <em><code>int</code></em> <strong>mgl_check_version</strong> <em>(<code>const char *</code>ver)</em></dt>
-<dd><p>Return zero if MathGL version is appropriate for required by <var>ver</var>, i.e. if major version is the same and minor version is greater or equal to one in <var>ver</var>.
-</p></dd></dl>
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Constructor" accesskey="1">Constructor</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Graphics-setup" accesskey="2">Graphics setup</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Axis-settings" accesskey="3">Axis settings</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Subplots-and-rotation" accesskey="4">Subplots and rotation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Export-picture" accesskey="5">Export picture</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Background" accesskey="6">Background</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Primitives" accesskey="7">Primitives</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Text-printing" accesskey="8">Text printing</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Axis-and-Colorbar" accesskey="9">Axis and Colorbar</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Legend">Legend</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#g_t1D-plotting">1D plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#g_t2D-plotting">2D plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#g_t3D-plotting">3D plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Dual-plotting">Dual plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Vector-fields">Vector fields</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Other-plotting">Other plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Nonlinear-fitting">Nonlinear fitting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-manipulation">Data manipulation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Constructor"></a>
-<div class="header">
-<p>
-Next: <a href="#Graphics-setup" accesskey="n" rel="next">Graphics setup</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Create-and-delete-objects"></a>
-<h3 class="section">4.1 Create and delete objects</h3>
-
-
-<dl>
-<dt><a name="index-mglGraph-1"></a>Constructor on <code>mglGraph</code>: <em></em> <strong>mglGraph</strong> <em>(<code>int</code> kind=<code>0</code>, <code>int</code> width=<code>600</code>, <code>int</code> height=<code>400</code>)</em></dt>
-<dt><a name="index-mglGraph-2"></a>Constructor on <code>mglGraph</code>: <em></em> <strong>mglGraph</strong> <em>(<code>const mglGraph &</code>gr)</em></dt>
-<dt><a name="index-mglGraph-3"></a>Constructor on <code>mglGraph</code>: <em></em> <strong>mglGraph</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fgraph"></a>C function: <em><code>HMGL</code></em> <strong>mgl_create_graph</strong> <em>(<code>int</code> width, <code>int</code> height)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fgraph_005fgl"></a>C function: <em><code>HMGL</code></em> <strong>mgl_create_graph_gl</strong> <em>()</em></dt>
-<dd><p>Creates the instance of class mglGraph with specified sizes <var>width</var> and <var>height</var>. Parameter <var>kind</var> may have following values: ‘<samp>0</samp>’ – use default plotter, ‘<samp>1</samp>’ – use OpenGL plotter.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-_007emglGraph"></a>Destructor on <code>mglGraph</code>: <em></em> <strong>~mglGraph</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fdelete_005fgraph"></a>C function: <em><code>HMGL</code></em> <strong>mgl_delete_graph</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Deletes the instance of class mglGraph.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Self"></a>Method on <code>mglGraph</code>: <em><code>HMGL</code></em> <strong>Self</strong> <em>()</em></dt>
-<dd><p>Returns the pointer to internal object of type <code>HMGL</code>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Graphics-setup"></a>
-<div class="header">
-<p>
-Next: <a href="#Axis-settings" accesskey="n" rel="next">Axis settings</a>, Previous: <a href="#Constructor" accesskey="p" rel="prev">Constructor</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Graphics-setup-1"></a>
-<h3 class="section">4.2 Graphics setup</h3>
-
-<a name="index-MathGL-setup"></a>
-
-<p>Functions and variables in this group influences on overall graphics appearance. So all of them should be placed <em>before</em> any actual plotting function calls.
-</p>
-<a name="reset"></a><dl>
-<dt><a name="index-reset"></a>MGL command: <em></em> <strong>reset</strong></dt>
-<dt><a name="index-DefaultPlotParam"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>DefaultPlotParam</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fset_005fdef_005fparam"></a>C function: <em><code>void</code></em> <strong>mgl_set_def_param</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Restore initial values for all of parameters and clear the image.
-</p></dd></dl>
-
-<a name="setup"></a><dl>
-<dt><a name="index-setup"></a>MGL command: <em></em> <strong>setup</strong> <em><code>val flag</code></em></dt>
-<dt><a name="index-SetFlagAdv"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetFlagAdv</strong> <em>(<code>int</code> val, <code>uint32_t</code> flag)</em></dt>
-<dt><a name="index-mgl_005fset_005fflag"></a>C function: <em><code>void</code></em> <strong>mgl_set_flag</strong> <em>(<code>HMGL</code> gr, <code>int</code> val, <code>uint32_t</code> flag)</em></dt>
-<dd><p>Sets the value of internal binary <var>flag</var> to <var>val</var>. The list of flags can be found at <a href="https://sourceforge.net/p/mathgl/code/HEAD/tree/mathgl-2x/include/mgl2/define.h#l267">define.h</a>. The current list of flags are:
-</p><pre class="verbatim">#define MGL_ENABLE_CUT 0x00000004 ///< Flag which determines how points outside bounding box are drown.
-#define MGL_ENABLE_RTEXT 0x00000008 ///< Use text rotation along axis
-#define MGL_AUTO_FACTOR 0x00000010 ///< Enable autochange PlotFactor
-#define MGL_ENABLE_ALPHA 0x00000020 ///< Flag that Alpha is used
-#define MGL_ENABLE_LIGHT 0x00000040 ///< Flag of using lightning
-#define MGL_TICKS_ROTATE 0x00000080 ///< Allow ticks rotation
-#define MGL_TICKS_SKIP 0x00000100 ///< Allow ticks rotation
-#define MGL_DISABLE_SCALE 0x00000200 ///< Temporary flag for disable scaling (used for axis)
-#define MGL_FINISHED 0x00000400 ///< Flag that final picture (i.e. mglCanvas::G) is ready
-#define MGL_USE_GMTIME 0x00000800 ///< Use gmtime instead of localtime
-#define MGL_SHOW_POS 0x00001000 ///< Switch to show or not mouse click position
-#define MGL_CLF_ON_UPD 0x00002000 ///< Clear plot before Update()
-#define MGL_NOSUBTICKS 0x00004000 ///< Disable subticks drawing (for bounding box)
-#define MGL_LOCAL_LIGHT 0x00008000 ///< Keep light sources for each inplot
-#define MGL_VECT_FRAME 0x00010000 ///< Use DrwDat to remember all data of frames
-#define MGL_REDUCEACC 0x00020000 ///< Reduce accuracy of points (to reduce size of output files)
-#define MGL_PREFERVC 0x00040000 ///< Prefer vertex color instead of texture if output format supports
-#define MGL_ONESIDED 0x00080000 ///< Render only front side of surfaces if output format supports (for debugging)
-#define MGL_NO_ORIGIN 0x00100000 ///< Don't draw tick labels at axis origin
-#define MGL_GRAY_MODE 0x00200000 ///< Convert all colors to gray ones
-#define MGL_FULL_CURV 0x00400000 ///< Disable omitting points in straight-line part(s)
-#define MGL_NO_SCALE_REL 0x00800000 ///< Disable font scaling in relative inplots
-</pre></dd></dl>
-
-<dl>
-<dt><a name="index-mgl_005fbsize"></a>C function: <em><code>void</code></em> <strong>mgl_bsize</strong> <em>(<code>unsigned</code> bsize)</em></dt>
-<dd><p>Set buffer size for number of primitives as (1<<bsize)^2. I.e. as 10^12 for bsize=20 or 4*10^9 for bsize=16 (default). NOTE: you set it only once before any plotting. The current value is returned.
-</p></dd></dl>
-
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Transparency" accesskey="1">Transparency</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Lighting" accesskey="2">Lighting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Fog" accesskey="3">Fog</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Default-sizes" accesskey="4">Default sizes</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Cutting" accesskey="5">Cutting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Font-settings" accesskey="6">Font settings</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Palette-and-colors" accesskey="7">Palette and colors</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Masks" accesskey="8">Masks</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Error-handling" accesskey="9">Error handling</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Stop-drawing">Stop drawing</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Transparency"></a>
-<div class="header">
-<p>
-Next: <a href="#Lighting" accesskey="n" rel="next">Lighting</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Transparency-1"></a>
-<h4 class="subsection">4.2.1 Transparency</h4>
-
-<a name="index-Alpha"></a>
-<a name="index-SetAlphaDef"></a>
-<a name="index-SetTranspType"></a>
-<a name="index-AlphaDef"></a>
-<a name="index-TranspType"></a>
-
-<p>There are several functions and variables for setup transparency. The general function is <a href="#alpha">alpha</a> which switch on/off the transparency for overall plot. It influence only for graphics which created after <a href="#alpha">alpha</a> call (with one exception, OpenGL). Function <a href="#alphadef">alphadef</a> specify the default value of alpha-channel. Finally, function <a href="#transptype">transptype</a> set the kind of transparency. See <a href="#Transparency-and-lighting">Transparency and lighting</a>, for sample code and picture.
-</p>
-<a name="alpha"></a><dl>
-<dt><a name="index-alpha-2"></a>MGL command: <em></em> <strong>alpha</strong> <em><code>[val=on]</code></em></dt>
-<dt><a name="index-Alpha-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Alpha</strong> <em>(<code>bool</code> enable)</em></dt>
-<dt><a name="index-mgl_005fset_005falpha"></a>C function: <em><code>void</code></em> <strong>mgl_set_alpha</strong> <em>(<code>HMGL</code> gr, <code>int</code> enable)</em></dt>
-<dd><p>Sets the transparency on/off and returns previous value of transparency. It is recommended to call this function before any plotting command. Default value is transparency off.
-</p></dd></dl>
-
-<a name="alphadef"></a><dl>
-<dt><a name="index-alphadef-1"></a>MGL command: <em></em> <strong>alphadef</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetAlphaDef-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetAlphaDef</strong> <em>(<code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005falpha_005fdefault"></a>C function: <em><code>void</code></em> <strong>mgl_set_alpha_default</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> alpha)</em></dt>
-<dd><p>Sets default value of alpha channel (transparency) for all plotting functions. Initial value is 0.5.
-</p></dd></dl>
-
-<a name="transptype"></a><dl>
-<dt><a name="index-transptype"></a>MGL command: <em></em> <strong>transptype</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetTranspType-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTranspType</strong> <em>(<code>int</code> type)</em></dt>
-<dt><a name="index-mgl_005fset_005ftransp_005ftype"></a>C function: <em><code>void</code></em> <strong>mgl_set_transp_type</strong> <em>(<code>HMGL</code> gr, <code>int</code> type)</em></dt>
-<dd><p>Set the type of transparency. Possible values are:
-</p><ul>
-<li> Normal transparency (‘<samp>0</samp>’) – below things is less visible than upper ones. It does not look well in OpenGL mode (mglGraphGL) for several surfaces.
-</li><li> Glass-like transparency (‘<samp>1</samp>’) – below and upper things are commutable and just decrease intensity of light by RGB channel.
-</li><li> Lamp-like transparency (‘<samp>2</samp>’) – below and upper things are commutable and are the source of some additional light. I recommend to set <code>SetAlphaDef(0.3)</code> or less for lamp-like transparency.
-</li></ul>
-<p>See <a href="#Types-of-transparency">Types of transparency</a>, for sample code and picture..
-</p></dd></dl>
-
-
-<hr>
-<a name="Lighting"></a>
-<div class="header">
-<p>
-Next: <a href="#Fog" accesskey="n" rel="next">Fog</a>, Previous: <a href="#Transparency" accesskey="p" rel="prev">Transparency</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Lighting-1"></a>
-<h4 class="subsection">4.2.2 Lighting</h4>
-
-
-<a name="index-SetAmbient"></a>
-<a name="index-AddLight"></a>
-<a name="index-Light"></a>
-<a name="index-Ambient"></a>
-
-<p>There are several functions for setup lighting. The general function is <a href="#light">light</a> which switch on/off the lighting for overall plot. It influence only for graphics which created after <a href="#light">light</a> call (with one exception, OpenGL). Generally MathGL support up to 10 independent light sources. But in OpenGL mode only 8 of light sources is used due to OpenGL limitations. The position, color, brightness of each light source can be set separately. By default only one light source is active. It is source number <code>0</code> with white color, located at top of the plot. See <a href="#Lighting-sample">Lighting sample</a>, for sample code and picture.
-</p>
-<a name="light"></a><dl>
-<dt><a name="index-light"></a>MGL command: <em></em> <strong>light</strong> <em><code>[val=on]</code></em></dt>
-<dt><a name="index-Light-1"></a>Method on <code>mglGraph</code>: <em><code>bool</code></em> <strong>Light</strong> <em>(<code>bool</code> enable)</em></dt>
-<dt><a name="index-mgl_005fset_005flight"></a>C function: <em><code>void</code></em> <strong>mgl_set_light</strong> <em>(<code>HMGL</code> gr, <code>int</code> enable)</em></dt>
-<dd><p>Sets the using of light on/off for overall plot. Function returns previous value of lighting. Default value is lightning off.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-light-1"></a>MGL command: <em></em> <strong>light</strong> <em><code>num</code> <code>val</code></em></dt>
-<dt><a name="index-Light-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Light</strong> <em>(<code>int</code> n, <code>bool</code> enable)</em></dt>
-<dt><a name="index-mgl_005fset_005flight_005fn"></a>C function: <em><code>void</code></em> <strong>mgl_set_light_n</strong> <em>(<code>HMGL</code> gr, <code>int</code> n, <code>int</code> enable)</em></dt>
-<dd><p>Switch on/off <var>n</var>-th light source separately.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-light-2"></a>MGL command: <em></em> <strong>light</strong> <em><code>num xdir ydir zdir</code> ['col'='w' <code>br=0.5</code>]</em></dt>
-<dt><a name="index-light-3"></a>MGL command: <em></em> <strong>light</strong> <em><code>num xdir ydir zdir xpos ypos zpos</code> ['col'='w' <code>br=0.5 ap=0</code>]</em></dt>
-<dt><a name="index-AddLight-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>AddLight</strong> <em>(<code>int</code> n, <code>mglPoint</code> d, <code>char</code> c=<code>'w'</code>, <code>mreal</code> bright=<code>0.5</code>, <code>mreal</code> ap=<code>0</code>)</em></dt>
-<dt><a name="index-AddLight-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>AddLight</strong> <em>(<code>int</code> n, <code>mglPoint</code> r, <code>mglPoint</code> d, <code>char</code> c=<code>'w'</code>, <code>mreal</code> bright=<code>0.5</code>, <code>mreal</code> ap=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fadd_005flight"></a>C function: <em><code>void</code></em> <strong>mgl_add_light</strong> <em>(<code>HMGL</code> gr, <code>int</code> n, <code>mreal</code> dx, <code>mreal</code> dy, <code>mreal</code> dz)</em></dt>
-<dt><a name="index-mgl_005fadd_005flight_005fext"></a>C function: <em><code>void</code></em> <strong>mgl_add_light_ext</strong> <em>(<code>HMGL</code> gr, <code>int</code> n, <code>mreal</code> dx, <code>mreal</code> dy, <code>mreal</code> dz, <code>char</code> c, <code>mreal</code> bright, <code>mreal</code> ap)</em></dt>
-<dt><a name="index-mgl_005fadd_005flight_005floc"></a>C function: <em><code>void</code></em> <strong>mgl_add_light_loc</strong> <em>(<code>HMGL</code> gr, <code>int</code> n, <code>mreal</code> rx, <code>mreal</code> ry, <code>mreal</code> rz, <code>mreal</code> dx, <code>mreal</code> dy, <code>mreal</code> dz, <code>char</code> c, <code>mreal</code> bright, <code>mreal</code> ap)</em></dt>
-<dd><p>The function adds a light source with identification <var>n</var> in direction <var>d</var> with color <var>c</var> and with brightness <var>bright</var> (which must be in range [0,1]). If position <var>r</var> is specified and isn’t NAN then light source is supposed to be local otherwise light source is supposed to be placed at infinity.
-</p></dd></dl>
-
-<a name="diffuse"></a><dl>
-<dt><a name="index-diffuse"></a>MGL command: <em></em> <strong>diffuse</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetDiffuse"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetDiffuse</strong> <em>(<code>mreal</code> bright)</em></dt>
-<dt><a name="index-mgl_005fset_005fdifbr"></a>C function: <em><code>void</code></em> <strong>mgl_set_difbr</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> bright)</em></dt>
-<dd><p>Set brightness of diffusive light (only for local light sources).
-</p></dd></dl>
-
-<a name="ambient"></a><dl>
-<dt><a name="index-ambient"></a>MGL command: <em></em> <strong>ambient</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetAmbient-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetAmbient</strong> <em>(<code>mreal</code> bright=<code>0.5</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005fambbr"></a>C function: <em><code>void</code></em> <strong>mgl_set_ambbr</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> bright)</em></dt>
-<dd><p>Sets the brightness of ambient light. The value should be in range [0,1].
-</p></dd></dl>
-
-<a name="attachlight"></a><dl>
-<dt><a name="index-attachlight"></a>MGL command: <em></em> <strong>attachlight</strong> <em><code>val</code></em></dt>
-<dt><a name="index-AttachLight"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>AttachLight</strong> <em>(<code>bool</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005fattach_005flight"></a>C function: <em><code>void</code></em> <strong>mgl_set_attach_light</strong> <em>(<code>HMGL</code> gr, <code>int</code> val)</em></dt>
-<dd><p>Set to attach light settings to <a href="#inplot">inplot</a>/<a href="#subplot">subplot</a>. Note, OpenGL and some output formats don’t support this feature.
-</p></dd></dl>
-
-
-<hr>
-<a name="Fog"></a>
-<div class="header">
-<p>
-Next: <a href="#Default-sizes" accesskey="n" rel="next">Default sizes</a>, Previous: <a href="#Lighting" accesskey="p" rel="prev">Lighting</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Fog-1"></a>
-<h4 class="subsection">4.2.3 Fog</h4>
-
-<a name="index-Fog"></a>
-
-<a name="fog"></a><dl>
-<dt><a name="index-fog"></a>MGL command: <em></em> <strong>fog</strong> <em><code>val [dz=0.25]</code></em></dt>
-<dt><a name="index-Fog-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Fog</strong> <em>(<code>mreal</code> d, <code>mreal</code> dz=<code>0.25</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005ffog"></a>C function: <em><code>void</code></em> <strong>mgl_set_fog</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> d, <code>mreal</code> dz)</em></dt>
-<dd><p>Function imitate a fog in the plot. Fog start from relative distance <var>dz</var> from view point and its density growths exponentially in depth. So that the fog influence is determined by law ~ 1-exp(-<em>d*z</em>). Here <em>z</em> is normalized to 1 depth of the plot. If value <var>d</var>=<code>0</code> then the fog is absent. Note, that fog was applied at stage of image creation, not at stage of drawing. See <a href="#Adding-fog">Adding fog</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<hr>
-<a name="Default-sizes"></a>
-<div class="header">
-<p>
-Next: <a href="#Cutting" accesskey="n" rel="next">Cutting</a>, Previous: <a href="#Fog" accesskey="p" rel="prev">Fog</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Default-sizes-1"></a>
-<h4 class="subsection">4.2.4 Default sizes</h4>
-
-<a name="index-SetBarWidth"></a>
-<a name="index-SetMarkSize"></a>
-<a name="index-SetArrowSize"></a>
-<a name="index-SetMeshNum"></a>
-<a name="index-SetPlotId"></a>
-<a name="index-BarWidth"></a>
-<a name="index-MarkSize"></a>
-<a name="index-ArrowSize"></a>
-<a name="index-MeshNum"></a>
-
-<p>These variables control the default (initial) values for most graphics parameters including sizes of markers, arrows, line width and so on. As any other settings these ones will influence only on plots created after the settings change.
-</p>
-<a name="barwidth"></a><dl>
-<dt><a name="index-barwidth"></a>MGL command: <em></em> <strong>barwidth</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetBarWidth-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetBarWidth</strong> <em>( <code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005fbar_005fwidth"></a>C function: <em><code>void</code></em> <strong>mgl_set_bar_width</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val)</em></dt>
-<dd><p>Sets relative width of rectangles in <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#boxplot">boxplot</a>, <a href="#candle">candle</a>, <a href="#ohlc">ohlc</a>. Default value is <code>0.7</code>.
-</p></dd></dl>
-
-<a name="marksize"></a><dl>
-<dt><a name="index-marksize"></a>MGL command: <em></em> <strong>marksize</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetMarkSize-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetMarkSize</strong> <em>(<code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005fmark_005fsize"></a>C function: <em><code>void</code></em> <strong>mgl_set_mark_size</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val)</em></dt>
-<dd><p>Sets size of marks for <a href="#g_t1D-plotting">1D plotting</a>. Default value is <code>1</code>.
-</p></dd></dl>
-
-<a name="arrowsize"></a><dl>
-<dt><a name="index-arrowsize"></a>MGL command: <em></em> <strong>arrowsize</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetArrowSize-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetArrowSize</strong> <em>(<code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005farrow_005fsize"></a>C function: <em><code>void</code></em> <strong>mgl_set_arrow_size</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val)</em></dt>
-<dd><p>Sets size of arrows for <a href="#g_t1D-plotting">1D plotting</a>, lines and curves (see <a href="#Primitives">Primitives</a>). Default value is <code>1</code>.
-</p></dd></dl>
-
-<a name="meshnum"></a><a name="MeshNum"></a><dl>
-<dt><a name="index-meshnum-2"></a>MGL command: <em></em> <strong>meshnum</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetMeshNum-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetMeshNum</strong> <em>(<code>int</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005fmeshnum"></a>C function: <em><code>void</code></em> <strong>mgl_set_meshnum</strong> <em>(<code>HMGL</code> gr, <code>int</code> num)</em></dt>
-<dd><p>Sets approximate number of lines in <a href="#mesh">mesh</a>, <a href="#fall">fall</a>, <a href="#grid2">grid2</a>, and also the number of hachures in <a href="#vect">vect</a>, <a href="#dew">dew</a>, and the number of cells in <a href="#cloud">cloud</a>, and the number of markers in <a href="#plot">plot</a>, <a href="#tens">tens</a>, <a href="#step">step</a>, <a href="#mark">mark</a>, <a href="#textmark">textmark</a>. By default (=0) it draws all lines/hachures/cells/markers.
-</p></dd></dl>
-
-<a name="facenum"></a><dl>
-<dt><a name="index-facenum"></a>MGL command: <em></em> <strong>facenum</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetFaceNum"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetFaceNum</strong> <em>(<code>int</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005ffacenum"></a>C function: <em><code>void</code></em> <strong>mgl_set_facenum</strong> <em>(<code>HMGL</code> gr, <code>int</code> num)</em></dt>
-<dd><p>Sets approximate number of visible faces. Can be used for speeding up drawing by cost of lower quality. By default (=0) it draws all of them.
-</p></dd></dl>
-
-<a name="plotid"></a><dl>
-<dt><a name="index-plotid"></a>MGL command: <em></em> <strong>plotid</strong> <em>'id'</em></dt>
-<dt><a name="index-SetPlotId-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetPlotId</strong> <em>(<code>const char *</code>id)</em></dt>
-<dt><a name="index-mgl_005fset_005fplotid"></a>C function: <em><code>void</code></em> <strong>mgl_set_plotid</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>id)</em></dt>
-<dd><p>Sets default name <var>id</var> as filename for saving (in FLTK window for example).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetPlotId"></a>Method on <code>mglGraph</code>: <em><code>const char *</code></em> <strong>GetPlotId</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fget_005fplotid"></a>C function only: <em><code>const char *</code></em> <strong>mgl_get_plotid</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dt><a name="index-mgl_005fget_005fplotid-1"></a>Fortran subroutine: <em><code></code></em> <strong>mgl_get_plotid</strong> <em>(<code>long</code> gr, <code>char *</code>out, <code>int</code> len)</em></dt>
-<dd><p>Gets default name <var>id</var> as filename for saving (in FLTK window for example).
-</p></dd></dl>
-
-<a name="pendelta"></a><dl>
-<dt><a name="index-pendelta"></a>MGL command: <em></em> <strong>pendelta</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetPenDelta"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetPenDelta</strong> <em>(<code>double</code> val)</em></dt>
-<dt><a name="index-mgl_005fpen_005fdelta"></a>C function: <em><code>void</code></em> <strong>mgl_pen_delta</strong> <em>(<code>HMGL</code> gr, <code>double</code> val)</em></dt>
-<dd><p>Changes the blur around lines and text (default is 1). For <var>val</var>>1 the text and lines are more sharped. For <var>val</var><1 the text and lines are more blurred.
-</p></dd></dl>
-
-
-<hr>
-<a name="Cutting"></a>
-<div class="header">
-<p>
-Next: <a href="#Font-settings" accesskey="n" rel="next">Font settings</a>, Previous: <a href="#Default-sizes" accesskey="p" rel="prev">Default sizes</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Cutting-1"></a>
-<h4 class="subsection">4.2.5 Cutting</h4>
-
-<a name="index-SetCut"></a>
-<a name="index-SetCutBox"></a>
-<a name="index-CutOff"></a>
-<a name="index-Cut"></a>
-
-<p>These variables and functions set the condition when the points are excluded (cutted) from the drawing. Note, that a point with NAN value(s) of coordinate or amplitude will be automatically excluded from the drawing. See <a href="#Cutting-sample">Cutting sample</a>, for sample code and picture.
-</p>
-<a name="cut"></a><dl>
-<dt><a name="index-cut-2"></a>MGL command: <em></em> <strong>cut</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetCut-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetCut</strong> <em>(<code>bool</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005fcut"></a>C function: <em><code>void</code></em> <strong>mgl_set_cut</strong> <em>(<code>HMGL</code> gr, <code>int</code> val)</em></dt>
-<dd><p>Flag which determines how points outside bounding box are drawn. If it is <code>true</code> then points are excluded from plot (it is default) otherwise the points are projected to edges of bounding box.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-cut-3"></a>MGL command: <em></em> <strong>cut</strong> <em><code>x1 y1 z1 x2 y2 z2</code></em></dt>
-<dt><a name="index-SetCutBox-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetCutBox</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> p1)</em></dt>
-<dt><a name="index-mgl_005fset_005fcut_005fbox"></a>C function: <em><code>void</code></em> <strong>mgl_set_cut_box</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> z1, <code>mreal</code> x2, <code>mreal</code> y2, <code>mreal</code> z2)</em></dt>
-<dd><p>Lower and upper edge of the box in which never points are drawn. If both edges are the same (the variables are equal) then the cutting box is empty.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-cut-4"></a>MGL command: <em></em> <strong>cut</strong> <em>'cond'</em></dt>
-<dt><a name="index-CutOff-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>CutOff</strong> <em>(<code>const char *</code>cond)</em></dt>
-<dt><a name="index-mgl_005fset_005fcutoff"></a>C function: <em><code>void</code></em> <strong>mgl_set_cutoff</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>cond)</em></dt>
-<dd><p>Sets the cutting off condition by formula <var>cond</var>. This condition determine will point be plotted or not. If value of formula is nonzero then point is omitted, otherwise it plotted. Set argument as <code>""</code> to disable cutting off condition.
-</p></dd></dl>
-
-
-<hr>
-<a name="Font-settings"></a>
-<div class="header">
-<p>
-Next: <a href="#Palette-and-colors" accesskey="n" rel="next">Palette and colors</a>, Previous: <a href="#Cutting" accesskey="p" rel="prev">Cutting</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Font-settings-1"></a>
-<h4 class="subsection">4.2.6 Font settings</h4>
-
-<a name="index-SetFontSize"></a>
-<a name="index-SetFontDef"></a>
-<a name="index-SetRotatedText"></a>
-<a name="index-SetFontSizePT"></a>
-<a name="index-SetFontSizeCM"></a>
-<a name="index-SetFontSizeIN"></a>
-<a name="index-LoadFont"></a>
-<a name="index-CopyFont"></a>
-<a name="index-RestoreFont"></a>
-<a name="index-Font"></a>
-<a name="index-RotateText"></a>
-
-<a name="font"></a><dl>
-<dt><a name="index-font"></a>MGL command: <em></em> <strong>font</strong> <em>'fnt' [<code>val=6</code>]</em></dt>
-<dd><p>Font style for text and labels (see text). Initial style is ’fnt’=’:rC’ give Roman font with centering. Parameter <code>val</code> sets the size of font for tick and axis labels. Default font size of axis labels is 1.4 times large than for tick labels. For more detail, see <a href="#Font-styles">Font styles</a>.
-</p></dd></dl>
-
-<a name="rotatetext"></a><dl>
-<dt><a name="index-rotatetext"></a>MGL command: <em></em> <strong>rotatetext</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetRotatedText-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetRotatedText</strong> <em>(<code>bool</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005frotated_005ftext"></a>C function: <em><code>void</code></em> <strong>mgl_set_rotated_text</strong> <em>(<code>HMGL</code> gr, <code>int</code> val)</em></dt>
-<dd><p>Sets to use or not text rotation.
-</p></dd></dl>
-
-<a name="scaletext"></a><dl>
-<dt><a name="index-scaletext"></a>MGL command: <em></em> <strong>scaletext</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetScaleText"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetScaleText</strong> <em>(<code>bool</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005fscale_005ftext"></a>C function: <em><code>void</code></em> <strong>mgl_set_scale_text</strong> <em>(<code>HMGL</code> gr, <code>int</code> val)</em></dt>
-<dd><p>Sets to scale text in relative <a href="#inplot">inplot</a> (including <a href="#columnplot">columnplot</a>, <a href="#gridplot">gridplot</a>, <a href="#stickplot">stickplot</a>, <a href="#shearplot">shearplot</a>) or not.
-</p></dd></dl>
-
-<a name="loadfont"></a><dl>
-<dt><a name="index-loadfont"></a>MGL command: <em></em> <strong>loadfont</strong> <em>['name'='']</em></dt>
-<dt><a name="index-LoadFont-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>LoadFont</strong> <em>(<code>const char *</code>name, <code>const char *</code>path=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fload_005ffont"></a>C function: <em><code>void</code></em> <strong>mgl_load_font</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>name, <code>const char *</code>path)</em></dt>
-<dd><p>Load font typeface from <var>path</var>/<var>name</var>. Empty name will load default font.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetFontDef-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetFontDef</strong> <em>(<code>const char *</code>fnt)</em></dt>
-<dt><a name="index-mgl_005fset_005ffont_005fdef"></a>C function: <em><code>void</code></em> <strong>mgl_set_font_def</strong> <em>(<code>HMGL</code> gr, <code>const char *</code> val)</em></dt>
-<dd><p>Sets the font specification (see <a href="#Text-printing">Text printing</a>). Default is ‘<samp>rC</samp>’ – Roman font centering.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetFontSize-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetFontSize</strong> <em>(<code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005ffont_005fsize"></a>C function: <em><code>void</code></em> <strong>mgl_set_font_size</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val)</em></dt>
-<dd><p>Sets the size of font for tick and axis labels. Default font size of axis labels is 1.4 times large than for tick labels.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetFontSizePT-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetFontSizePT</strong> <em>(<code>mreal</code> cm, <code>int</code> dpi=<code>72</code>)</em></dt>
-<dd><p>Set FontSize by size in pt and picture DPI (default is 16 pt for dpi=72).
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetFontSizeCM-1"></a>Method on <code>mglGraph</code>: <em><code>inline void</code></em> <strong>SetFontSizeCM</strong> <em>(<code>mreal</code> cm, <code>int</code> dpi=<code>72</code>)</em></dt>
-<dd><p>Set FontSize by size in centimeters and picture DPI (default is 0.56 cm = 16 pt).
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetFontSizeIN-1"></a>Method on <code>mglGraph</code>: <em><code>inline void</code></em> <strong>SetFontSizeIN</strong> <em>(<code>mreal</code> cm, <code>int</code> dpi=<code>72</code>)</em></dt>
-<dd><p>Set FontSize by size in inch and picture DPI (default is 0.22 in = 16 pt).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-CopyFont-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>CopyFont</strong> <em>(<code>mglGraph *</code> from)</em></dt>
-<dt><a name="index-mgl_005fcopy_005ffont"></a>C function: <em><code>void</code></em> <strong>mgl_copy_font</strong> <em>(<code>HMGL</code> gr, <code>HMGL</code> gr_from)</em></dt>
-<dd><p>Copy font data from another <code>mglGraph</code> object.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-RestoreFont-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>RestoreFont</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005frestore_005ffont"></a>C function: <em><code>void</code></em> <strong>mgl_restore_font</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Restore font data to default typeface.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetDefFont"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetDefFont</strong> <em>(<code>const char *</code>name, <code>const char *</code>path=<code>""</code>) static</em></dt>
-<dt><a name="index-mgl_005fdef_005ffont"></a>C function: <em><code>void</code></em> <strong>mgl_def_font</strong> <em>(<code>const char *</code>name, <code>const char *</code>path)</em></dt>
-<dd><p>Load default font typeface (for all newly created HMGL/mglGraph objects) from <var>path</var>/<var>name</var>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Palette-and-colors"></a>
-<div class="header">
-<p>
-Next: <a href="#Masks" accesskey="n" rel="next">Masks</a>, Previous: <a href="#Font-settings" accesskey="p" rel="prev">Font settings</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Palette-and-colors-1"></a>
-<h4 class="subsection">4.2.7 Palette and colors</h4>
-
-<a name="index-SetPalette"></a>
-<a name="index-Palette"></a>
-
-<a name="palette"></a><dl>
-<dt><a name="index-palette"></a>MGL command: <em></em> <strong>palette</strong> <em>'colors'</em></dt>
-<dt><a name="index-SetPalette-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetPalette</strong> <em>(<code>const char *</code>colors)</em></dt>
-<dt><a name="index-mgl_005fset_005fpalette"></a>C function: <em><code>void</code></em> <strong>mgl_set_palette</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>colors)</em></dt>
-<dd><p>Sets the palette as selected colors. Default value is <code>"Hbgrcmyhlnqeup"</code> that corresponds to colors: dark gray ‘<samp>H</samp>’, blue ‘<samp>b</samp>’, green ‘<samp>g</samp>’, red ‘<samp>r</samp>’, cyan ‘<samp>c</samp>’, magenta ‘<samp>m</samp>’, yellow ‘<samp>y</samp>’, gray ‘<samp>h</samp>’, blue-green ‘<samp>l</samp>’, sky-blue ‘<samp>n</samp>’, orange ‘<samp>q</samp>’, yellow-green ‘<samp>e</samp>’, blue-violet ‘<samp>u</samp>’, purple ‘<samp>p</samp>’. The palette is used mostly in 1D plots (see <a href="#g_t1D-plotting">1D plotting</a>) for curves which styles are not specified. Internal color counter will be nullified by any change of palette. This includes even hidden change (for example, by <a href="#box">box</a> or <a href="#axis">axis</a> functions).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetDefScheme"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetDefScheme</strong> <em>(<code>const char *</code>sch)</em></dt>
-<dt><a name="index-mgl_005fset_005fdef_005fsch"></a>C function: <em><code>void</code></em> <strong>mgl_set_def_sch</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>sch)</em></dt>
-<dd><p>Sets the <var>sch</var> as default color scheme. Default value is <code>"BbcyrR"</code>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetColor"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetColor</strong> <em>(<code>char</code> id, <code>mreal</code> r, <code>mreal</code> g, <code>mreal</code> b) static</em></dt>
-<dt><a name="index-mgl_005fset_005fcolor"></a>C function: <em><code>void</code></em> <strong>mgl_set_color</strong> <em>(<code>char</code> id, <code>mreal</code> r, <code>mreal</code> g, <code>mreal</code> b)</em></dt>
-<dd><p>Sets RGB values for color with given <var>id</var>. This is global setting which influence on any later usage of symbol <var>id</var>.
-</p></dd></dl>
-
-
-<a name="gray"></a><dl>
-<dt><a name="index-gray"></a>MGL command: <em></em> <strong>gray</strong> <em>[<code>val=on</code>]</em></dt>
-<dt><a name="index-Gray"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Gray</strong> <em>(<code>bool</code> enable)</em></dt>
-<dt><a name="index-mgl_005fset_005fgray"></a>C function: <em><code>void</code></em> <strong>mgl_set_gray</strong> <em>(<code>HMGL</code> gr, <code>int</code> enable)</em></dt>
-<dd><p>Sets the gray-scale mode on/off.
-</p></dd></dl>
-
-
-<hr>
-<a name="Masks"></a>
-<div class="header">
-<p>
-Next: <a href="#Error-handling" accesskey="n" rel="next">Error handling</a>, Previous: <a href="#Palette-and-colors" accesskey="p" rel="prev">Palette and colors</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Masks-1"></a>
-<h4 class="subsection">4.2.8 Masks</h4>
-
-<a name="index-SetMask"></a>
-<a name="index-SetMaskAngle"></a>
-
-<a name="mask"></a><dl>
-<dt><a name="index-mask"></a>MGL command: <em></em> <strong>mask</strong> <em>'id' 'hex' [angle]</em></dt>
-<dt><a name="index-mask-1"></a>Команда MGL: <em></em> <strong>mask</strong> <em>'id' hex [angle]</em></dt>
-<dt><a name="index-SetMask-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetMask</strong> <em>(<code>char</code> id, <code>const char *</code>hex)</em></dt>
-<dt><a name="index-SetMask-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetMask</strong> <em>(<code>char</code> id, <code>uint64_t</code> hex)</em></dt>
-<dt><a name="index-mgl_005fset_005fmask"></a>C function: <em><code>void</code></em> <strong>mgl_set_mask</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>hex)</em></dt>
-<dt><a name="index-mgl_005fset_005fmask_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_set_mask_val</strong> <em>(<code>HMGL</code> gr, <code>uint64_t</code> hex)</em></dt>
-<dd><p>Sets new bit matrix <var>hex</var> of size 8*8 for mask with given <var>id</var>. This is global setting which influence on any later usage of symbol <var>id</var>. The predefined masks are (see <a href="#Color-scheme">Color scheme</a>): ‘<samp>-</samp>’ give lines (<code>0x000000FF00000000</code>), ‘<samp>+</samp>’ give cross-lines (<code>080808FF08080808</code>), ‘<samp>=</samp>’ give double lines (<code>0000FF00FF000000</code>), ‘<samp>;</samp>’ give dash lines (<code>0x0000000F00000000</code>), ‘<samp>o</samp>’ give circles (<code>0000182424180000</code>), ‘<samp>O</samp>’ give filled circles (<code>0000183C3C180000</code>), ‘<samp>s</samp>’ give squares (<code>00003C24243C0000</code>), ‘<samp>S</samp>’ give solid squares (<code>00003C3C3C3C0000</code>), ‘<samp>~</samp>’ give waves (<code>0000060990600000</code>), ‘<samp><</samp>’ give left triangles (<code>0060584658600000</code>), ‘<samp>></samp>’ give right triangles (<code>00061A621A060000</code>), ‘<samp>j</samp>’ give dash-dot lines (<code>0000002700000000</code>), ‘<samp>d</samp>’ give pluses (<code>0x0008083E08080000</code>), ‘<samp>D</samp>’ give tacks (<code>0x0139010010931000</code>), ‘<samp>*</samp>’ give dots (<code>0x0000001818000000</code>), ‘<samp>^</samp>’ give bricks (<code>0x101010FF010101FF</code>). Parameter <var>angle</var> set the rotation angle too. IMPORTANT: the rotation angle will be replaced by a multiple of 45 degrees at export to EPS.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mask-2"></a>MGL command: <em></em> <strong>mask</strong> <em>angle</em></dt>
-<dt><a name="index-SetMaskAngle-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetMaskAngle</strong> <em>(<code>int</code> angle)</em></dt>
-<dt><a name="index-mgl_005fset_005fmask_005fangle"></a>C function: <em><code>void</code></em> <strong>mgl_set_mask_angle</strong> <em>(<code>HMGL</code> gr, <code>int</code> angle)</em></dt>
-<dd><p>Sets the default rotation angle (in degrees) for masks. Note, you can use symbols ‘<samp>\</samp>’, ‘<samp>/</samp>’, ‘<samp>I</samp>’ in color scheme for setting rotation angles as 45, -45 and 90 degrees correspondingly. IMPORTANT: the rotation angle will be replaced by a multiple of 45 degrees at export to EPS.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Error-handling"></a>
-<div class="header">
-<p>
-Next: <a href="#Stop-drawing" accesskey="n" rel="next">Stop drawing</a>, Previous: <a href="#Masks" accesskey="p" rel="prev">Masks</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Error-handling-1"></a>
-<h4 class="subsection">4.2.9 Error handling</h4>
-
-<a name="index-Message"></a>
-<a name="index-SetWarn"></a>
-<a name="index-GetWarn"></a>
-
-<p>Normally user should set it to zero by <code>SetWarn(0);</code> before plotting and check if <code>GetWarn()</code> or <code>Message()</code> return non zero after plotting. Only last warning will be saved. All warnings/errors produced by MathGL is not critical – the plot just will not be drawn. By default, all warnings are printed in stderr. You can disable it by using <code>mgl_suppress_warn(true);</code>.
-</p>
-<dl>
-<dt><a name="index-SetWarn-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetWarn</strong> <em>(<code>int</code> code, <code>const char *</code>info=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005fwarn"></a>C function: <em><code>void</code></em> <strong>mgl_set_warn</strong> <em>(<code>HMGL</code> gr, <code>int</code> code, <code>const char *</code>info)</em></dt>
-<dd><p>Set warning code. Normally you should call this function only for clearing the warning state, i.e. call <code>SetWarn(0);</code>. Text <var>info</var> will be printed as is if <var>code</var><0.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-_0028_0029"></a>Method on <code>mglGraph</code>: <em><code>const char *</code>Message</em> <strong>()</strong></dt>
-<dt><a name="index-_0028HMGL"></a>C function only: <em><code>const char *</code>mgl_get_mess</em> <strong>(<code>HMGL</code></strong> <em>gr)</em></dt>
-<dt><a name="index-mgl_005fget_005fmess"></a>Fortran subroutine: <em><code></code></em> <strong>mgl_get_mess</strong> <em>(<code>long</code> gr, <code>char *</code>out, <code>int</code> len)</em></dt>
-<dd><p>Return messages about matters why some plot are not drawn. If returned string is empty then there are no messages.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetWarn-1"></a>Method on <code>mglGraph</code>: <em><code>int</code></em> <strong>GetWarn</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fget_005fwarn"></a>C function: <em><code>int</code></em> <strong>mgl_get_warn</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Return the numerical ID of warning about the not drawn plot. Possible values are:
-</p><dl compact="compact">
-<dt><code>mglWarnNone=0</code></dt>
-<dd><p>Everything OK
-</p></dd>
-<dt><code>mglWarnDim</code></dt>
-<dd><p>Data dimension(s) is incompatible
-</p></dd>
-<dt><code>mglWarnLow</code></dt>
-<dd><p>Data dimension(s) is too small
-</p></dd>
-<dt><code>mglWarnNeg</code></dt>
-<dd><p>Minimal data value is negative
-</p></dd>
-<dt><code>mglWarnFile</code></dt>
-<dd><p>No file or wrong data dimensions
-</p></dd>
-<dt><code>mglWarnMem</code></dt>
-<dd><p>Not enough memory
-</p></dd>
-<dt><code>mglWarnZero</code></dt>
-<dd><p>Data values are zero
-</p></dd>
-<dt><code>mglWarnLeg</code></dt>
-<dd><p>No legend entries
-</p></dd>
-<dt><code>mglWarnSlc</code></dt>
-<dd><p>Slice value is out of range
-</p></dd>
-<dt><code>mglWarnCnt</code></dt>
-<dd><p>Number of contours is zero or negative
-</p></dd>
-<dt><code>mglWarnOpen</code></dt>
-<dd><p>Couldn’t open file
-</p></dd>
-<dt><code>mglWarnLId</code></dt>
-<dd><p>Light: ID is out of range
-</p></dd>
-<dt><code>mglWarnSize</code></dt>
-<dd><p>Setsize: size(s) is zero or negative
-</p></dd>
-<dt><code>mglWarnFmt</code></dt>
-<dd><p>Format is not supported for that build
-</p></dd>
-<dt><code>mglWarnTern</code></dt>
-<dd><p>Axis ranges are incompatible
-</p></dd>
-<dt><code>mglWarnNull</code></dt>
-<dd><p>Pointer is NULL
-</p></dd>
-<dt><code>mglWarnSpc</code></dt>
-<dd><p>Not enough space for plot
-</p></dd>
-<dt><code>mglScrArg</code></dt>
-<dd><p>Wrong argument(s) of a command in MGL script
-</p></dd>
-<dt><code>mglScrCmd</code></dt>
-<dd><p>Wrong command in MGL script
-</p></dd>
-<dt><code>mglScrLong</code></dt>
-<dd><p>Too long line in MGL script
-</p></dd>
-<dt><code>mglScrStr</code></dt>
-<dd><p>Unbalanced ’ in MGL script
-</p></dd>
-<dt><code>mglScrTemp</code></dt>
-<dd><p>Change temporary data in MGL script
-</p></dd>
-</dl>
-</dd></dl>
-
-<dl>
-<dt><a name="index-SuppressWarn"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SuppressWarn</strong> <em>(<code>bool</code> state) static</em></dt>
-<dt><a name="index-mgl_005fsuppress_005fwarn"></a>C function: <em><code>void</code></em> <strong>mgl_suppress_warn</strong> <em>(<code>int</code> state)</em></dt>
-<dd><p>Disable printing warnings to <code>stderr</code> if <var>state</var> is nonzero.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetGlobalWarn"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetGlobalWarn</strong> <em>(<code>const char *</code>info) static</em></dt>
-<dt><a name="index-mgl_005fset_005fglobal_005fwarn"></a>C function: <em><code>void</code></em> <strong>mgl_set_global_warn</strong> <em>(<code>const char *</code>info)</em></dt>
-<dd><p>Set warning message <var>info</var> for global scope.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GlobalWarn"></a>Method on <code>mglGraph</code>: <em><code>const char *</code></em> <strong>GlobalWarn</strong> <em>() static</em></dt>
-<dt><a name="index-mgl_005fget_005fglobal_005fwarn"></a>C function: <em><code>const char *</code></em> <strong>mgl_get_global_warn</strong> <em>()</em></dt>
-<dd><p>Get warning message(s) for global scope.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Stop-drawing"></a>
-<div class="header">
-<p>
-Previous: <a href="#Error-handling" accesskey="p" rel="prev">Error handling</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Stop-drawing-1"></a>
-<h4 class="subsection">4.2.10 Stop drawing</h4>
-
-<a name="index-Stop"></a>
-<a name="index-NeedStop"></a>
-<a name="index-SetEventFunc"></a>
-
-<dl>
-<dt><a name="index-Stop-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Stop</strong> <em>(<code>bool</code> stop=<code>true</code>)</em></dt>
-<dt><a name="index-mgl_005fask_005fstop"></a>C function only: <em><code>void</code></em> <strong>mgl_ask_stop</strong> <em>(<code>HMGL</code> gr, <code>int</code> stop)</em></dt>
-<dd><p>Ask to stop drawing if <var>stop</var> is non-zero, otherwise reset stop flag.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-NeedStop-1"></a>Method on <code>mglGraph</code>: <em><code>bool</code></em> <strong>NeedStop</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fneed_005fstop"></a>C function only: <em><code>void</code></em> <strong>mgl_need_stop</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Return <code>true</code> if drawing should be terminated. Also it process all events in GUI. User should call this function from time to time inside a long calculation to allow processing events for GUI.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetEventFunc-1"></a>Method on <code>mglGraph</code>: <em><code>bool</code></em> <strong>SetEventFunc</strong> <em>(<code>void (*</code>func<code>)(void *)</code>, <code>void *</code>par=<code>NULL</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005fevent_005ffunc"></a>C function only: <em><code>void</code></em> <strong>mgl_set_event_func</strong> <em>(<code>HMGL</code> gr, <code>void (*</code>func<code>)(void *)</code>, <code>void *</code>par)</em></dt>
-<dd><p>Set callback function which will be called to process events of GUI library.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Axis-settings"></a>
-<div class="header">
-<p>
-Next: <a href="#Subplots-and-rotation" accesskey="n" rel="next">Subplots and rotation</a>, Previous: <a href="#Graphics-setup" accesskey="p" rel="prev">Graphics setup</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Axis-settings-1"></a>
-<h3 class="section">4.3 Axis settings</h3>
-
-
-<p>These large set of variables and functions control how the axis and ticks will be drawn. Note that there is 3-step transformation of data coordinates are performed. Firstly, coordinates are projected if <code>Cut=true</code> (see <a href="#Cutting">Cutting</a>), after it transformation formulas are applied, and finally the data was normalized in bounding box. Note, that MathGL will produce warning if axis range and transformation formulas are not compatible.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Ranges-_0028bounding-box_0029" accesskey="1">Ranges (bounding box)</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Curved-coordinates" accesskey="2">Curved coordinates</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Ticks" accesskey="3">Ticks</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Ranges-_0028bounding-box_0029"></a>
-<div class="header">
-<p>
-Next: <a href="#Curved-coordinates" accesskey="n" rel="next">Curved coordinates</a>, Up: <a href="#Axis-settings" accesskey="u" rel="up">Axis settings</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Ranges-_0028bounding-box_0029-1"></a>
-<h4 class="subsection">4.3.1 Ranges (bounding box)</h4>
-
-<a name="index-CRange"></a>
-<a name="index-XRange"></a>
-<a name="index-YRange"></a>
-<a name="index-ZRange"></a>
-<a name="index-Ranges"></a>
-<a name="index-Origin"></a>
-<a name="index-SetRange"></a>
-<a name="index-SetRanges"></a>
-<a name="index-SetOrigin"></a>
-
-<a name="xrange"></a><a name="yrange"></a><a name="zrange"></a><a name="crange"></a><dl>
-<dt><a name="index-xrange-2"></a>MGL command: <em></em> <strong>xrange</strong> <em><code>v1 v2</code> [<code>add=off</code>]</em></dt>
-<dt><a name="index-yrange-2"></a>MGL command: <em></em> <strong>yrange</strong> <em><code>v1 v2</code> [<code>add=off</code>]</em></dt>
-<dt><a name="index-zrange-2"></a>MGL command: <em></em> <strong>zrange</strong> <em><code>v1 v2</code> [<code>add=off</code>]</em></dt>
-<dt><a name="index-crange"></a>MGL command: <em></em> <strong>crange</strong> <em><code>v1 v2</code> [<code>add=off</code>]</em></dt>
-<dt><a name="index-SetRange-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetRange</strong> <em>(<code>char</code> dir, <code>mreal</code> v1, <code>mreal</code> v2)</em></dt>
-<dt><a name="index-AddRange"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>AddRange</strong> <em>(<code>char</code> dir, <code>mreal</code> v1, <code>mreal</code> v2)</em></dt>
-<dt><a name="index-mgl_005fset_005frange_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_set_range_val</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>mreal</code> v1, <code>mreal</code> v2)</em></dt>
-<dt><a name="index-mgl_005fadd_005frange_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_add_range_val</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>mreal</code> v1, <code>mreal</code> v2)</em></dt>
-<dd><p>Sets or adds the range for ‘<samp>x</samp>’-,‘<samp>y</samp>’-,‘<samp>z</samp>’- coordinate or coloring (‘<samp>c</samp>’). If one of values is <code>NAN</code> then it is ignored. See also <a href="#ranges">ranges</a>.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-xrange-3"></a>MGL command: <em></em> <strong>xrange</strong> <em>dat [<code>add=off</code>]</em></dt>
-<dt><a name="index-yrange-3"></a>MGL command: <em></em> <strong>yrange</strong> <em>dat [<code>add=off</code>]</em></dt>
-<dt><a name="index-zrange-3"></a>MGL command: <em></em> <strong>zrange</strong> <em>dat [<code>add=off</code>]</em></dt>
-<dt><a name="index-crange-1"></a>MGL command: <em></em> <strong>crange</strong> <em>dat [<code>add=off</code>]</em></dt>
-<dt><a name="index-SetRange-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetRange</strong> <em>(<code>char</code> dir, <code>const mglDataA &</code>dat, <code>bool</code> add=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005frange_005fdat"></a>C function: <em><code>void</code></em> <strong>mgl_set_range_dat</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>const HCDT</code> a, <code>int</code> add)</em></dt>
-<dd><p>Sets the range for ‘<samp>x</samp>’-,‘<samp>y</samp>’-,‘<samp>z</samp>’- coordinate or coloring (‘<samp>c</samp>’) as minimal and maximal values of data <var>dat</var>. Parameter <code>add=on</code> shows that the new range will be joined to existed one (not replace it).
-</p></dd></dl>
-
-<a name="ranges"></a><dl>
-<dt><a name="index-ranges"></a>MGL command: <em></em> <strong>ranges</strong> <em><code>x1 x2 y1 y2 [z1=0 z2=0]</code></em></dt>
-<dt><a name="index-SetRanges-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetRanges</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> p2)</em></dt>
-<dt><a name="index-SetRanges-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetRanges</strong> <em>(<code>double</code> x1, <code>double</code> x2, <code>double</code> y1, <code>double</code> y2, <code>double</code> z1=<code>0</code>, <code>double</code> z2=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005franges"></a>C function: <em><code>void</code></em> <strong>mgl_set_ranges</strong> <em>(<code>HMGL</code> gr, <code>double</code> x1, <code>double</code> x2, <code>double</code> y1, <code>double</code> y2, <code>double</code> z1, <code>double</code> z2)</em></dt>
-<dd><p>Sets the ranges of coordinates. If minimal and maximal values of the coordinate are the same then they are ignored. Also it sets the range for coloring (analogous to <code>crange z1 z2</code>). This is default color range for 2d plots. Initial ranges are [-1, 1].
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ranges-1"></a>MGL command: <em></em> <strong>ranges</strong> <em><code>xx yy [zz cc=zz]</code></em></dt>
-<dt><a name="index-SetRanges-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetRanges</strong> <em>(<code>const mglDataA &</code>xx, <code>const mglDataA &</code>yy)</em></dt>
-<dt><a name="index-SetRanges-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetRanges</strong> <em>(<code>const mglDataA &</code>xx, <code>const mglDataA &</code>yy, <code>const mglDataA &</code>zz)</em></dt>
-<dt><a name="index-SetRanges-5"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetRanges</strong> <em>(<code>const mglDataA &</code>xx, <code>const mglDataA &</code>yy, <code>const mglDataA &</code>zz, <code>const mglDataA &</code>cc)</em></dt>
-<dd><p>Sets the ranges of ‘<samp>x</samp>’-,‘<samp>y</samp>’-,‘<samp>z</samp>’-,‘<samp>c</samp>’-coordinates and coloring as minimal and maximal values of data <var>xx</var>, <var>yy</var>, <var>zz</var>, <var>cc</var> correspondingly.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetAutoRanges"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetAutoRanges</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> p2)</em></dt>
-<dt><a name="index-SetAutoRanges-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetAutoRanges</strong> <em>(<code>double</code> x1, <code>double</code> x2, <code>double</code> y1, <code>double</code> y2, <code>double</code> z1=<code>0</code>, <code>double</code> z2=<code>0</code>, <code>double</code> c1=<code>0</code>, <code>double</code> c2=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005fauto_005franges"></a>C function: <em><code>void</code></em> <strong>mgl_set_auto_ranges</strong> <em>(<code>HMGL</code> gr, <code>double</code> x1, <code>double</code> x2, <code>double</code> y1, <code>double</code> y2, <code>double</code> z1, <code>double</code> z2, <code>double</code> z1, <code>double</code> z2)</em></dt>
-<dd><p>Sets the ranges for automatic coordinates. If minimal and maximal values of the coordinate are the same then they are ignored.
-</p></dd></dl>
-
-<a name="origin"></a><dl>
-<dt><a name="index-origin"></a>MGL command: <em></em> <strong>origin</strong> <em><code>x0 y0 [z0=nan]</code></em></dt>
-<dt><a name="index-SetOrigin-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetOrigin</strong> <em>(<code>mglPoint</code> p0)</em></dt>
-<dt><a name="index-SetOrigin-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetOrigin</strong> <em>(<code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0=<code>NAN</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005forigin"></a>C function: <em><code>void</code></em> <strong>mgl_set_origin</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0)</em></dt>
-<dd><p>Sets center of axis cross section. If one of values is NAN then MathGL try to select optimal axis position.
-</p></dd></dl>
-
-<a name="zoomaxis"></a><dl>
-<dt><a name="index-zoomaxis"></a>MGL command: <em></em> <strong>zoomaxis</strong> <em><code>x1 x2</code></em></dt>
-<dt><a name="index-zoomaxis-1"></a>MGL command: <em></em> <strong>zoomaxis</strong> <em><code>x1 y1 x2 y2</code></em></dt>
-<dt><a name="index-zoomaxis-2"></a>MGL command: <em></em> <strong>zoomaxis</strong> <em><code>x1 y1 z1 x2 y2 z2</code></em></dt>
-<dt><a name="index-zoomaxis-3"></a>MGL command: <em></em> <strong>zoomaxis</strong> <em><code>x1 y1 z1 c1 x2 y2 z2 c2</code></em></dt>
-<dt><a name="index-ZoomAxis"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ZoomAxis</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> p2)</em></dt>
-<dt><a name="index-mgl_005fzoom_005faxis"></a>C function: <em><code>void</code></em> <strong>mgl_zoom_axis</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> z1, <code>mreal</code> c1, <code>mreal</code> x2, <code>mreal</code> y2, <code>mreal</code> z2, <code>mreal</code> c2)</em></dt>
-<dd><p>Additionally extend axis range for any settings made by <code>SetRange</code> or <code>SetRanges</code> functions according the formula <em>min += (max-min)*p1</em> and <em>max += (max-min)*p1</em> (or <em>min *= (max/min)^p1</em> and <em>max *= (max/min)^p1</em> for log-axis range when <em>inf>max/min>100</em> or <em>0<max/min<0.01</em>). Initial ranges are [0, 1]. Attention! this settings can not be overwritten by any other functions, including <code>DefaultPlotParam()</code>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Curved-coordinates"></a>
-<div class="header">
-<p>
-Next: <a href="#Ticks" accesskey="n" rel="next">Ticks</a>, Previous: <a href="#Ranges-_0028bounding-box_0029" accesskey="p" rel="prev">Ranges (bounding box)</a>, Up: <a href="#Axis-settings" accesskey="u" rel="up">Axis settings</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Curved-coordinates-1"></a>
-<h4 class="subsection">4.3.2 Curved coordinates</h4>
-
-<a name="index-Axis"></a>
-<a name="index-SetFunc"></a>
-<a name="index-SetCoor"></a>
-<a name="index-Ternary"></a>
-
-<dl>
-<dt><a name="index-axis"></a>MGL command: <em></em> <strong>axis</strong> <em>'fx' 'fy' 'fz' ['fa'='']</em></dt>
-<dt><a name="index-SetFunc-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetFunc</strong> <em>(<code>const char *</code>EqX, <code>const char *</code>EqY, <code>const char *</code>EqZ=<code>""</code>, <code>const char *</code>EqA=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005ffunc"></a>C function: <em><code>void</code></em> <strong>mgl_set_func</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>EqX, <code>const char *</code>EqY, <code>const char *</code>EqZ, <code>const char *</code>EqA)</em></dt>
-<dd><p>Sets transformation formulas for curvilinear coordinate. Each string should contain mathematical expression for real coordinate depending on internal coordinates ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’ and ‘<samp>a</samp>’ or ‘<samp>c</samp>’ for colorbar. For example, the cylindrical coordinates are introduced as <code>SetFunc("x*cos(y)", "x*sin(y)", "z");</code>. For removing of formulas the corresponding parameter should be empty or <code>NULL</code>. Using transformation formulas will slightly slowing the program. Parameter <var>EqA</var> set the similar transformation formula for color scheme. See <a href="#Textual-formulas">Textual formulas</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-axis-1"></a>MGL command: <em></em> <strong>axis</strong> <em><code>how</code></em></dt>
-<dt><a name="index-SetCoor-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetCoor</strong> <em>(<code>int</code> how)</em></dt>
-<dt><a name="index-mgl_005fset_005fcoor"></a>C function: <em><code>void</code></em> <strong>mgl_set_coor</strong> <em>(<code>HMGL</code> gr, <code>int</code> how)</em></dt>
-<dd><p>Sets one of the predefined transformation formulas for curvilinear coordinate. Parameter <var>how</var> define the coordinates:
-</p><dl compact="compact">
-<dt><code>mglCartesian=0</code></dt>
-<dd><p>Cartesian coordinates (no transformation, {x,y,z});
-</p></dd>
-<dt><code>mglPolar=1</code></dt>
-<dd><p>Polar coordinates: {x*cos(y), x*sin(y), z};
-</p></dd>
-<dt><code>mglSpherical=2</code></dt>
-<dd><p>Sperical coordinates: {x*sin(y)*cos(z), x*sin(y)*sin(z), x*cos(y)};
-</p></dd>
-<dt><code>mglParabolic=3</code></dt>
-<dd><p>Parabolic coordinates: {x*y, (x*x-y*y)/2, z}
-</p></dd>
-<dt><code>mglParaboloidal=4</code></dt>
-<dd><p>Paraboloidal coordinates: {(x*x-y*y)*cos(z)/2, (x*x-y*y)*sin(z)/2, x*y};
-</p></dd>
-<dt><code>mglOblate=5</code></dt>
-<dd><p>Oblate coordinates: {cosh(x)*cos(y)*cos(z), cosh(x)*cos(y)*sin(z), sinh(x)*sin(y)};
-</p></dd>
-<dt><code>mglProlate=6</code></dt>
-<dd><p>Prolate coordinates: {sinh(x)*sin(y)*cos(z), sinh(x)*sin(y)*sin(z), cosh(x)*cos(y)};
-</p></dd>
-<dt><code>mglElliptic=7</code></dt>
-<dd><p>Elliptic coordinates: {cosh(x)*cos(y), sinh(x)*sin(y), z};
-</p></dd>
-<dt><code>mglToroidal=8</code></dt>
-<dd><p>Toroidal coordinates: {sinh(x)*cos(z)/(cosh(x)-cos(y)), sinh(x)*sin(z)/(cosh(x)-cos(y)), sin(y)/(cosh(x)-cos(y))};
-</p></dd>
-<dt><code>mglBispherical=9</code></dt>
-<dd><p>Bispherical coordinates: {sin(y)*cos(z)/(cosh(x)-cos(y)), sin(y)*sin(z)/(cosh(x)-cos(y)), sinh(x)/(cosh(x)-cos(y))};
-</p></dd>
-<dt><code>mglBipolar=10</code></dt>
-<dd><p>Bipolar coordinates: {sinh(x)/(cosh(x)-cos(y)), sin(y)/(cosh(x)-cos(y)), z};
-</p></dd>
-<dt><code>mglLogLog=11</code></dt>
-<dd><p>Log-log coordinates: {lg(x), lg(y), lg(z)};
-</p></dd>
-<dt><code>mglLogX=12</code></dt>
-<dd><p>Log-x coordinates: {lg(x), y, z};
-</p></dd>
-<dt><code>mglLogY=13</code></dt>
-<dd><p>Log-y coordinates: {x, lg(y), z}.
-</p></dd>
-</dl>
-</dd></dl>
-
-<a name="ternary"></a><dl>
-<dt><a name="index-ternary"></a>MGL command: <em></em> <strong>ternary</strong> <em><code>val</code></em></dt>
-<dt><a name="index-Ternary-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Ternary</strong> <em>(<code>int</code> tern)</em></dt>
-<dt><a name="index-mgl_005fset_005fternary"></a>C function: <em><code>void</code></em> <strong>mgl_set_ternary</strong> <em>(<code>HMGL</code> gr, <code>int</code> tern)</em></dt>
-<dd><p>The function sets to draws Ternary (<var>tern</var>=<code>1</code>), Quaternary (<var>tern</var>=<code>2</code>) plot or projections (<var>tern</var>=<code>4,5,6</code>).
-</p>
-<p>Ternary plot is special plot for 3 dependent coordinates (components) <var>a</var>, <var>b</var>, <var>c</var> so that <var>a</var>+<var>b</var>+<var>c</var>=1. MathGL uses only 2 independent coordinates <var>a</var>=x and <var>b</var>=y since it is enough to plot everything. At this third coordinate z act as another parameter to produce contour lines, surfaces and so on.
-</p>
-<p>Correspondingly, Quaternary plot is plot for 4 dependent coordinates <var>a</var>, <var>b</var>, <var>c</var> and <var>d</var> so that <var>a</var>+<var>b</var>+<var>c</var>+<var>d</var>=1. MathGL uses only 3 independent coordinates <var>a</var>=x, <var>b</var>=y and <var>d</var>=z since it is enough to plot everything.
-</p>
-<p>Projections can be obtained by adding value <code>4</code> to <var>tern</var> argument. So, that <var>tern</var>=<code>4</code> will draw projections in Cartesian coordinates, <var>tern</var>=<code>5</code> will draw projections in Ternary coordinates, <var>tern</var>=<code>6</code> will draw projections in Quaternary coordinates. If you add <code>8</code> instead of <code>4</code> then all text labels will not be printed on projections.
-</p>
-<p>Use <code>Ternary(0)</code> for returning to usual axis. See <a href="#Ternary-axis">Ternary axis</a>, for sample code and picture. See <a href="#Axis-projection">Axis projection</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<hr>
-<a name="Ticks"></a>
-<div class="header">
-<p>
-Previous: <a href="#Curved-coordinates" accesskey="p" rel="prev">Curved coordinates</a>, Up: <a href="#Axis-settings" accesskey="u" rel="up">Axis settings</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Ticks-1"></a>
-<h4 class="subsection">4.3.3 Ticks</h4>
-
-<a name="index-AxisStl"></a>
-<a name="index-TickLen"></a>
-<a name="index-Adjust"></a>
-<a name="index-XTick"></a>
-<a name="index-YTick"></a>
-<a name="index-ZTick"></a>
-<a name="index-CTick"></a>
-<a name="index-SetAxisStl"></a>
-<a name="index-SetTickLen"></a>
-<a name="index-SetTicks"></a>
-<a name="index-SetTicksVal"></a>
-<a name="index-SetTuneTicks"></a>
-<a name="index-SetTickTime"></a>
-<a name="index-SetTickTempl"></a>
-<a name="index-SetTickRotate"></a>
-<a name="index-SetTickSkip"></a>
-<a name="index-SetOriginTick"></a>
-<a name="index-AddTick"></a>
-
-<a name="adjust"></a><dl>
-<dt><a name="index-adjust"></a>MGL command: <em></em> <strong>adjust</strong> <em>['dir'='xyzc']</em></dt>
-<dt><a name="index-Adjust-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Adjust</strong> <em>(<code>const char *</code>dir=<code>"xyzc"</code>)</em></dt>
-<dt><a name="index-mgl_005fadjust_005fticks"></a>C function: <em><code>void</code></em> <strong>mgl_adjust_ticks</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>dir)</em></dt>
-<dd><p>Set the ticks step, number of sub-ticks and initial ticks position to be the most human readable for the axis along direction(s) <var>dir</var>. Also set <code>SetTuneTicks(true)</code>. Usually you don’t need to call this function except the case of returning to default settings.
-</p></dd></dl>
-
-<a name="xtick"></a><a name="ytick"></a><a name="ztick"></a><a name="ctick"></a><dl>
-<dt><a name="index-xtick"></a>MGL command: <em></em> <strong>xtick</strong> <em><code>val [sub=0 org=nan 'fact'='']</code></em></dt>
-<dt><a name="index-ytick"></a>MGL command: <em></em> <strong>ytick</strong> <em><code>val [sub=0 org=nan 'fact'='']</code></em></dt>
-<dt><a name="index-ztick"></a>MGL command: <em></em> <strong>ztick</strong> <em><code>val [sub=0 org=nan 'fact'='']</code></em></dt>
-<dt><a name="index-xtick-1"></a>MGL command: <em></em> <strong>xtick</strong> <em><code>val sub ['fact'='']</code></em></dt>
-<dt><a name="index-ytick-1"></a>MGL command: <em></em> <strong>ytick</strong> <em><code>val sub ['fact'='']</code></em></dt>
-<dt><a name="index-ztick-1"></a>MGL command: <em></em> <strong>ztick</strong> <em><code>val sub ['fact'='']</code></em></dt>
-<dt><a name="index-ctick"></a>MGL command: <em></em> <strong>ctick</strong> <em><code>val ['fact'='']</code></em></dt>
-<dt><a name="index-SetTicks-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTicks</strong> <em>(<code>char</code> dir, <code>mreal</code> d=<code>0</code>, <code>int</code> ns=<code>0</code>, <code>mreal</code> org=<code>NAN</code>, <code>const char *</code>fact=<code>""</code>)</em></dt>
-<dt><a name="index-SetTicks-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTicks</strong> <em>(<code>char</code> dir, <code>mreal</code> d, <code>int</code> ns, <code>mreal</code> org, <code>const wchar_t *</code>fact)</em></dt>
-<dt><a name="index-mgl_005fset_005fticks"></a>C function: <em><code>void</code></em> <strong>mgl_set_ticks</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>mreal</code> d, <code>int</code> ns, <code>mreal</code> org)</em></dt>
-<dt><a name="index-mgl_005fset_005fticks_005ffact"></a>C function: <em><code>void</code></em> <strong>mgl_set_ticks_fact</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>mreal</code> d, <code>int</code> ns, <code>mreal</code> org, <code>const char *</code>fact)</em></dt>
-<dt><a name="index-mgl_005fset_005fticks_005ffactw"></a>C function: <em><code>void</code></em> <strong>mgl_set_ticks_factw</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>mreal</code> d, <code>int</code> ns, <code>mreal</code> org, <code>const wchar_t *</code>fact)</em></dt>
-<dd><p>Set the ticks step <var>d</var>, number of sub-ticks <var>ns</var> (used for positive <var>d</var>) and initial ticks position <var>org</var> for the axis along direction <var>dir</var> (use ’c’ for colorbar ticks). Variable <var>d</var> set step for axis ticks (if positive) or it’s number on the axis range (if negative). Zero value set automatic ticks. If <var>org</var> value is NAN then axis origin is used. Parameter <var>fact</var> set text which will be printed after tick label (like "\pi" for <var>d</var>=M_PI).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-xtick-2"></a>MGL command: <em></em> <strong>xtick</strong> <em><code>val1</code> 'lbl1' [<code>val2</code> 'lbl2' ...]</em></dt>
-<dt><a name="index-ytick-2"></a>MGL command: <em></em> <strong>ytick</strong> <em><code>val1</code> 'lbl1' [<code>val2</code> 'lbl2' ...]</em></dt>
-<dt><a name="index-ztick-2"></a>MGL command: <em></em> <strong>ztick</strong> <em><code>val1</code> 'lbl1' [<code>val2</code> 'lbl2' ...]</em></dt>
-<dt><a name="index-ctick-1"></a>MGL command: <em></em> <strong>ctick</strong> <em><code>val1</code> 'lbl1' [<code>val2</code> 'lbl2' ...]</em></dt>
-<dt><a name="index-xtick-3"></a>MGL command: <em></em> <strong>xtick</strong> <em>vdat 'lbls' [<code>add=off</code>]</em></dt>
-<dt><a name="index-ytick-3"></a>MGL command: <em></em> <strong>ytick</strong> <em>vdat 'lbls' [<code>add=off</code>]</em></dt>
-<dt><a name="index-ztick-3"></a>MGL command: <em></em> <strong>ztick</strong> <em>vdat 'lbls' [<code>add=off</code>]</em></dt>
-<dt><a name="index-ctick-2"></a>MGL command: <em></em> <strong>ctick</strong> <em>vdat 'lbls' [<code>add=off</code>]</em></dt>
-<dt><a name="index-SetTicksVal-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTicksVal</strong> <em>(<code>char</code> dir, <code>const char *</code>lbl, <code>bool</code> add=<code>false</code>)</em></dt>
-<dt><a name="index-SetTicksVal-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTicksVal</strong> <em>(<code>char</code> dir, <code>const wchar_t *</code>lbl, <code>bool</code> add=<code>false</code>)</em></dt>
-<dt><a name="index-SetTicksVal-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTicksVal</strong> <em>(<code>char</code> dir, <code>const mglDataA &</code>val, <code>const char *</code>lbl, <code>bool</code> add=<code>false</code>)</em></dt>
-<dt><a name="index-SetTicksVal-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTicksVal</strong> <em>(<code>char</code> dir, <code>const mglDataA &</code>val, <code>const wchar_t *</code>lbl, <code>bool</code> add=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005fticks_005fstr"></a>C function: <em><code>void</code></em> <strong>mgl_set_ticks_str</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>const char *</code>lbl, <code>bool</code> add)</em></dt>
-<dt><a name="index-mgl_005fset_005fticks_005fwcs"></a>C function: <em><code>void</code></em> <strong>mgl_set_ticks_wcs</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>const wchar_t *</code>lbl, <code>bool</code> add)</em></dt>
-<dt><a name="index-mgl_005fset_005fticks_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_set_ticks_val</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>HCDT</code> val, <code>const char *</code>lbl, <code>bool</code> add)</em></dt>
-<dt><a name="index-mgl_005fset_005fticks_005fvalw"></a>C function: <em><code>void</code></em> <strong>mgl_set_ticks_valw</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>HCDT</code> val, <code>const wchar_t *</code>lbl, <code>bool</code> add)</em></dt>
-<dd><p>Set the manual positions <var>val</var> and its labels <var>lbl</var> for ticks along axis <var>dir</var>. If array <var>val</var> is absent then values equidistantly distributed in x-axis range are used. Labels are separated by ‘<samp>\n</samp>’ symbol. If only one value is specified in MGL command then the label will be <em>add</em> to the current ones. Use <code>SetTicks()</code> to restore automatic ticks.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-AddTick-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>AddTick</strong> <em>(<code>char</code> dir, <code>double</code> val, <code>const char *</code>lbl)</em></dt>
-<dt><a name="index-AddTick-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>AddTick</strong> <em>(<code>char</code> dir, <code>double</code> val, <code>const wchar_t *</code>lbl)</em></dt>
-<dt><a name="index-mgl_005fadd_005ftick"></a>C function: <em><code>void</code></em> <strong>mgl_add_tick</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>double</code> val, <code>const char *</code>lbl)</em></dt>
-<dt><a name="index-mgl_005fset_005ftickw"></a>C function: <em><code>void</code></em> <strong>mgl_set_tickw</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>double</code> val, <code>const wchar_t *</code>lbl)</em></dt>
-<dd><p>The same as previous but add single tick label <var>lbl</var> at position <var>val</var> to the list of existed ones.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-xtick-4"></a>MGL command: <em></em> <strong>xtick</strong> <em>'templ'</em></dt>
-<dt><a name="index-ytick-4"></a>MGL command: <em></em> <strong>ytick</strong> <em>'templ'</em></dt>
-<dt><a name="index-ztick-4"></a>MGL command: <em></em> <strong>ztick</strong> <em>'templ'</em></dt>
-<dt><a name="index-ctick-3"></a>MGL command: <em></em> <strong>ctick</strong> <em>'templ'</em></dt>
-<dt><a name="index-SetTickTempl-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTickTempl</strong> <em>(<code>char</code> dir, <code>const char *</code>templ)</em></dt>
-<dt><a name="index-SetTickTempl-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTickTempl</strong> <em>(<code>char</code> dir, <code>const wchar_t *</code>templ)</em></dt>
-<dt><a name="index-mgl_005fset_005ftick_005ftempl"></a>C function: <em><code>void</code></em> <strong>mgl_set_tick_templ</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>templ)</em></dt>
-<dt><a name="index-mgl_005fset_005ftick_005ftemplw"></a>C function: <em><code>void</code></em> <strong>mgl_set_tick_templw</strong> <em>(<code>HMGL</code> gr, <code>const wchar_t *</code>templ)</em></dt>
-<dd><p>Set template <var>templ</var> for x-,y-,z-axis ticks or colorbar ticks. It may contain TeX symbols also. If <var>templ</var>=<code>""</code> then default template is used (in simplest case it is ‘<samp>%.2g</samp>’). If template start with ‘<samp>&</samp>’ symbol then <code>long</code> integer value will be passed instead of default type <code>double</code>. Setting on template switch off automatic ticks tuning.
-</p></dd></dl>
-
-<a name="ticktime"></a><dl>
-<dt><a name="index-ticktime"></a>MGL command: <em></em> <strong>ticktime</strong> <em>'dir' [<code>dv=0</code> 'tmpl'='']</em></dt>
-<dt><a name="index-SetTicksTime"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTicksTime</strong> <em>(<code>char</code> dir, <code>mreal</code> val, <code>const char *</code>templ)</em></dt>
-<dt><a name="index-mgl_005fset_005fticks_005ftime"></a>C function: <em><code>void</code></em> <strong>mgl_set_ticks_time</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>const char *</code>templ)</em></dt>
-<dd><p>Sets time labels with step <var>val</var> and template <var>templ</var> for x-,y-,z-axis ticks or colorbar ticks. It may contain TeX symbols also. The format of template <var>templ</var> is the same as described in <a href="http://www.manpagez.com/man/3/strftime/">http://www.manpagez.com/man/3/strftime/</a>. Most common variants are ‘<samp>%X</samp>’ for national representation of time, ‘<samp>%x</samp>’ for national representation of date, ‘<samp>%Y</samp>’ for year with century. If <var>val</var>=0 and/or <var>templ</var>="" then automatic tick step and/or template will be selected. You can use <code>mgl_get_time</code>() function for obtaining number of second for given date/time string. Note, that MS Visual Studio couldn’t handle date before 1970.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mgl_005fget_005ftime"></a>C function: <em><code>double</code></em> <strong>mgl_get_time</strong> <em>(<code>const char*</code>str, <code>const char *</code>templ)</em></dt>
-<dd><p>Gets number of seconds from 1970 year to specified date/time <var>str</var>. The format of string is specified by <var>templ</var>, which is the same as described in <a href="http://www.manpagez.com/man/3/strftime/">http://www.manpagez.com/man/3/strftime/</a>. Most common variants are ‘<samp>%X</samp>’ for national representation of time, ‘<samp>%x</samp>’ for national representation of date, ‘<samp>%Y</samp>’ for year with century. Note, that MS Visual Studio couldn’t handle date before 1970.
-</p></dd></dl>
-
-<a name="tuneticks"></a><dl>
-<dt><a name="index-tuneticks"></a>MGL command: <em></em> <strong>tuneticks</strong> <em><code>val</code> [<code>pos=1.15</code>]</em></dt>
-<dt><a name="index-SetTuneTicks-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTuneTicks</strong> <em>(<code>int</code> tune, <code>mreal</code> pos=<code>1.15</code>)</em></dt>
-<dt><a name="index-mgl_005ftune_005fticks"></a>C function: <em><code>void</code></em> <strong>mgl_tune_ticks</strong> <em>(<code>HMGL</code> gr, <code>int</code> tune, <code>mreal</code> pos)</em></dt>
-<dd><p>Switch on/off ticks enhancing by factoring common multiplier (for small, like from 0.001 to 0.002, or large, like from 1000 to 2000, coordinate values – enabled if <var>tune</var>&1 is nonzero) or common component (for narrow range, like from 0.999 to 1.000 – enabled if <var>tune</var>&2 is nonzero). Also set the position <var>pos</var> of common multiplier/component on the axis: =0 at minimal axis value, =1 at maximal axis value. Default value is 1.15.
-</p></dd></dl>
-
-<a name="tickshift"></a><dl>
-<dt><a name="index-tickshift"></a>MGL command: <em></em> <strong>tickshift</strong> <em><code>dx [dy=0 dz=0 dc=0]</code></em></dt>
-<dt><a name="index-SetTickShift"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTickShift</strong> <em>(<code>mglPoint</code> d)</em></dt>
-<dt><a name="index-mgl_005fset_005ftick_005fshift"></a>C function: <em><code>void</code></em> <strong>mgl_set_tick_shift</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> dx, <code>mreal</code> dy, <code>mreal</code> dz, <code>mreal</code> dc)</em></dt>
-<dd><p>Set value of additional shift for ticks labels.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-SetTickRotate-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTickRotate</strong> <em>(<code>bool</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005ftick_005frotate"></a>C function: <em><code>void</code></em> <strong>mgl_set_tick_rotate</strong> <em>(<code>HMGL</code> gr, <code>bool</code> val)</em></dt>
-<dd><p>Enable/disable ticks rotation if there are too many ticks or ticks labels are too long.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetTickSkip-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTickSkip</strong> <em>(<code>bool</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005ftick_005fskip"></a>C function: <em><code>void</code></em> <strong>mgl_set_tick_skip</strong> <em>(<code>HMGL</code> gr, <code>bool</code> val)</em></dt>
-<dd><p>Enable/disable ticks skipping if there are too many ticks or ticks labels are too long.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetTimeUTC"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTimeUTC</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Enable/disable using UTC time for ticks labels. In C/Fortran you can use <code>mgl_set_flag(gr,val, MGL_USE_GMTIME);</code>.
-</p></dd></dl>
-
-
-<a name="origintick"></a><dl>
-<dt><a name="index-origintick"></a>MGL command: <em></em> <strong>origintick</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetOriginTick-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetOriginTick</strong> <em>(<code>bool</code> val=<code>true</code>)</em></dt>
-<dd><p>Enable/disable drawing of ticks labels at axis origin. In C/Fortran you can use <code>mgl_set_flag(gr,val, MGL_NO_ORIGIN);</code>.
-</p></dd></dl>
-
-<a name="ticklen"></a><dl>
-<dt><a name="index-ticklen"></a>MGL command: <em></em> <strong>ticklen</strong> <em><code>val</code> [<code>stt=1</code>]</em></dt>
-<dt><a name="index-SetTickLen-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTickLen</strong> <em>(<code>mreal</code> val, <code>mreal</code> stt=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005ftick_005flen"></a>C function: <em><code>void</code></em> <strong>mgl_set_tick_len</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>mreal</code> stt)</em></dt>
-<dd><p>The relative length of axis ticks. Default value is <code>0.1</code>. Parameter <var>stt</var>>0 set relative length of subticks which is in <code>sqrt(1+stt)</code> times smaller.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-axisstl"></a>MGL command: <em></em> <strong>axisstl</strong> <em>'stl' ['tck'='' 'sub'='']</em></dt>
-<dt><a name="index-SetAxisStl-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetAxisStl</strong> <em>(<code>const char *</code>stl=<code>"k"</code>, <code>const char *</code>tck=<code>0</code>, <code>const char *</code>sub=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005faxis_005fstl"></a>C function: <em><code>void</code></em> <strong>mgl_set_axis_stl</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>stl, <code>const char *</code>tck, <code>const char *</code>sub)</em></dt>
-<dd><p>The line style of axis (<var>stl</var>), ticks (<var>tck</var>) and subticks (<var>sub</var>). If <var>stl</var> is empty then default style is used (‘<samp>k</samp>’ or ‘<samp>w</samp>’ depending on transparency type). If <var>tck</var> or <var>sub</var> is empty then axis style is used (i.e. <var>stl</var>).
-</p></dd></dl>
-
-
-<hr>
-<a name="Subplots-and-rotation"></a>
-<div class="header">
-<p>
-Next: <a href="#Export-picture" accesskey="n" rel="next">Export picture</a>, Previous: <a href="#Axis-settings" accesskey="p" rel="prev">Axis settings</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Subplots-and-rotation-1"></a>
-<h3 class="section">4.4 Subplots and rotation</h3>
-
-<a name="index-Aspect"></a>
-<a name="index-Rotate"></a>
-<a name="index-RotateN"></a>
-<a name="index-SubPlot"></a>
-<a name="index-MultiPlot"></a>
-<a name="index-StickPlot"></a>
-<a name="index-ColumnPlot"></a>
-<a name="index-InPlot"></a>
-<a name="index-Title"></a>
-<a name="index-Perspective"></a>
-<a name="index-View"></a>
-<a name="index-Push"></a>
-<a name="index-Pop"></a>
-
-<p>These functions control how and where further plotting will be placed. There is a certain calling order of these functions for the better plot appearance. First one should be <a href="#subplot">subplot</a>, <a href="#multiplot">multiplot</a> or <a href="#inplot">inplot</a> for specifying the place. Second one can be <a href="#title">title</a> for adding title for the subplot. After it a <a href="#rotate">rotate</a>, <a href="#shear">shear</a> and <a href="#aspect">aspect</a>. And finally any other plotting functions may be called. Alternatively you can use <a href="#columnplot">columnplot</a>, <a href="#gridplot">gridplot</a>, <a href="#stickplot">stickplot</a>, <a href="#shearplot">shearplot</a> or relative <a href="#inplot">inplot</a> for positioning plots in the column (or grid, or stick) one by another without gap between plot axis (bounding boxes). See <a href="#Subplots">Subplots</a>, for sample code and picture.
-</p>
-<a name="subplot"></a><dl>
-<dt><a name="index-subplot"></a>MGL command: <em></em> <strong>subplot</strong> <em><code>nx ny m</code> ['stl'='<>_^' <code>dx=0 dy=0</code>]</em></dt>
-<dt><a name="index-SubPlot-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SubPlot</strong> <em>(<code>int</code> nx, <code>int</code> ny, <code>int</code> m, <code>const char *</code>stl=<code>"<>_^"</code>, <code>mreal</code> dx=<code>0</code>, <code>mreal</code> dy=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fsubplot"></a>C function: <em><code>void</code></em> <strong>mgl_subplot</strong> <em>(<code>HMGL</code> gr, <code>int</code> nx, <code>int</code> ny, <code>int</code> m, <code>const char *</code>stl)</em></dt>
-<dt><a name="index-mgl_005fsubplot_005fd"></a>C function: <em><code>void</code></em> <strong>mgl_subplot_d</strong> <em>(<code>HMGL</code> gr, <code>int</code> nx, <code>int</code> ny, <code>int</code> m, <code>const char *</code>stl, <code>mreal</code> dx, <code>mreal</code> dy)</em></dt>
-<dd><p>Puts further plotting in a <var>m</var>-th cell of <var>nx</var>*<var>ny</var> grid of the whole frame area. The position of the cell can be shifted from its default position by relative size <var>dx</var>, <var>dy</var>. This function set off any aspects or rotations. So it should be used first for creating the subplot. Extra space will be reserved for axis/colorbar if <var>stl</var> contain:
-</p><ul>
-<li> ‘<samp>L</samp>’ or ‘<samp><</samp>’ – at left side,
-</li><li> ‘<samp>R</samp>’ or ‘<samp>></samp>’ – at right side,
-</li><li> ‘<samp>A</samp>’ or ‘<samp>^</samp>’ – at top side,
-</li><li> ‘<samp>U</samp>’ or ‘<samp>_</samp>’ – at bottom side,
-</li><li> ‘<samp>#</samp>’ – reserve none space (use whole region for axis range) – axis and tick labels will be invisible by default.
-</li></ul>
-<p>From the aesthetical point of view it is not recommended to use this function with different matrices in the same frame. Note, colorbar can be invisible (be out of image borders) if you set empty style ‘<samp></samp>’.
-</p></dd></dl>
-
-<a name="multiplot"></a><dl>
-<dt><a name="index-multiplot"></a>MGL command: <em></em> <strong>multiplot</strong> <em><code>nx ny m dx dy</code> ['style'='<>_^' sx sy]</em></dt>
-<dt><a name="index-MultiPlot-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>MultiPlot</strong> <em>(<code>int</code> nx, <code>int</code> ny, <code>int</code> m, <code>int</code> dx, <code>int</code> dy, <code>const char *</code>stl=<code>"<>_^"</code>)</em></dt>
-<dt><a name="index-mgl_005fmultiplot"></a>C function: <em><code>void</code></em> <strong>mgl_multiplot</strong> <em>(<code>HMGL</code> gr, <code>int</code> nx, <code>int</code> ny, <code>int</code> m, <code>int</code> dx, <code>int</code> dy, <code>const char *</code>stl)</em></dt>
-<dd><p>Puts further plotting in a rectangle of <var>dx</var>*<var>dy</var> cells starting from <var>m</var>-th cell of <var>nx</var>*<var>ny</var> grid of the whole frame area. The position of the rectangular area can be shifted from its default position by relative size <var>sx</var>, <var>sy</var>. This function set off any aspects or rotations. So it should be used first for creating subplot. Extra space will be reserved for axis/colorbar if <var>stl</var> contain:
-</p><ul>
-<li> ‘<samp>L</samp>’ or ‘<samp><</samp>’ – at left side,
-</li><li> ‘<samp>R</samp>’ or ‘<samp>></samp>’ – at right side,
-</li><li> ‘<samp>A</samp>’ or ‘<samp>^</samp>’ – at top side,
-</li><li> ‘<samp>U</samp>’ or ‘<samp>_</samp>’ – at bottom side.
-‘<samp>#</samp>’ – reserve none space (use whole region for axis range) – axis and tick labels will be invisible by default.
-</li></ul>
-</dd></dl>
-
-<a name="inplot"></a><dl>
-<dt><a name="index-inplot"></a>MGL command: <em></em> <strong>inplot</strong> <em><code>x1 x2 y1 y2 [rel=on]</code></em></dt>
-<dt><a name="index-InPlot-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>InPlot</strong> <em>(<code>mreal</code> x1, <code>mreal</code> x2, <code>mreal</code> y1, <code>mreal</code> y2, <code>bool</code> rel=<code>true</code>)</em></dt>
-<dt><a name="index-mgl_005finplot"></a>C function: <em><code>void</code></em> <strong>mgl_inplot</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> x2, <code>mreal</code> y1, <code>mreal</code> y2)</em></dt>
-<dt><a name="index-mgl_005frelplot"></a>C function: <em><code>void</code></em> <strong>mgl_relplot</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> x2, <code>mreal</code> y1, <code>mreal</code> y2)</em></dt>
-<dd><p>Puts further plotting in some region of the whole frame surface. This function allows one to create a plot in arbitrary place of the screen. The position is defined by rectangular coordinates [<var>x1</var>, <var>x2</var>]*[<var>y1</var>, <var>y2</var>]. The coordinates <var>x1</var>, <var>x2</var>, <var>y1</var>, <var>y2</var> are normalized to interval [0, 1]. If parameter <var>rel</var>=<code>true</code> then the relative position to current <a href="#subplot">subplot</a> (or <a href="#inplot">inplot</a> with <var>rel</var>=<code>false</code>) is used. This function set off any aspects or rotations. So it should be used first for creating subplot.
-</p></dd></dl>
-
-<a name="columnplot"></a><dl>
-<dt><a name="index-columnplot"></a>MGL command: <em></em> <strong>columnplot</strong> <em><code>num ind [d=0]</code></em></dt>
-<dt><a name="index-ColumnPlot-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ColumnPlot</strong> <em>(<code>int</code> num, <code>int</code> ind, <code>mreal</code> d=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fcolumnplot"></a>C function: <em><code>void</code></em> <strong>mgl_columnplot</strong> <em>(<code>HMGL</code> gr, <code>int</code> num, <code>int</code> ind)</em></dt>
-<dt><a name="index-mgl_005fcolumnplot_005fd"></a>C function: <em><code>void</code></em> <strong>mgl_columnplot_d</strong> <em>(<code>HMGL</code> gr, <code>int</code> num, <code>int</code> ind, <code>mreal</code> d)</em></dt>
-<dd><p>Puts further plotting in <var>ind</var>-th cell of column with <var>num</var> cells. The position is relative to previous <a href="#subplot">subplot</a> (or <a href="#inplot">inplot</a> with <var>rel</var>=<code>false</code>). Parameter <var>d</var> set extra gap between cells.
-</p></dd></dl>
-
-<a name="gridplot"></a><dl>
-<dt><a name="index-gridplot"></a>MGL command: <em></em> <strong>gridplot</strong> <em><code>nx ny ind [d=0]</code></em></dt>
-<dt><a name="index-GridPlot"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>GridPlot</strong> <em>(<code>int</code> nx, <code>int</code> ny, <code>int</code> ind, <code>mreal</code> d=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fgridplot"></a>C function: <em><code>void</code></em> <strong>mgl_gridplot</strong> <em>(<code>HMGL</code> gr, <code>int</code> nx, <code>int</code> ny, <code>int</code> ind)</em></dt>
-<dt><a name="index-mgl_005fgridplot_005fd"></a>C function: <em><code>void</code></em> <strong>mgl_gridplot_d</strong> <em>(<code>HMGL</code> gr, <code>int</code> nx, <code>int</code> ny, <code>int</code> ind, <code>mreal</code> d)</em></dt>
-<dd><p>Puts further plotting in <var>ind</var>-th cell of <var>nx</var>*<var>ny</var> grid. The position is relative to previous <a href="#subplot">subplot</a> (or <a href="#inplot">inplot</a> with <var>rel</var>=<code>false</code>). Parameter <var>d</var> set extra gap between cells.
-</p></dd></dl>
-
-<a name="stickplot"></a><dl>
-<dt><a name="index-stickplot"></a>MGL command: <em></em> <strong>stickplot</strong> <em><code>num ind tet phi</code></em></dt>
-<dt><a name="index-StickPlot-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>StickPlot</strong> <em>(<code>int</code> num, <code>int</code> ind, <code>mreal</code> tet, <code>mreal</code> phi)</em></dt>
-<dt><a name="index-mgl_005fstickplot"></a>C function: <em><code>void</code></em> <strong>mgl_stickplot</strong> <em>(<code>HMGL</code> gr, <code>int</code> num, <code>int</code> ind, <code>mreal</code> tet, <code>mreal</code> phi)</em></dt>
-<dd><p>Puts further plotting in <var>ind</var>-th cell of stick with <var>num</var> cells. At this, stick is rotated on angles <var>tet</var>, <var>phi</var>. The position is relative to previous <a href="#subplot">subplot</a> (or <a href="#inplot">inplot</a> with <var>rel</var>=<code>false</code>).
-</p></dd></dl>
-
-<a name="shearplot"></a><dl>
-<dt><a name="index-shearplot"></a>MGL command: <em></em> <strong>shearplot</strong> <em><code>num ind sx sy [xd yd]</code></em></dt>
-<dt><a name="index-ShearPlot"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ShearPlot</strong> <em>(<code>int</code> num, <code>int</code> ind, <code>mreal</code> sx, <code>mreal</code> sy, <code>mreal</code> xd=<code>1</code>, <code>mreal</code> yd=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fshearplot"></a>C function: <em><code>void</code></em> <strong>mgl_shearplot</strong> <em>(<code>HMGL</code> gr, <code>int</code> num, <code>int</code> ind, <code>mreal</code> sx, <code>mreal</code> sy, <code>mreal</code> xd, <code>mreal</code> yd)</em></dt>
-<dd><p>Puts further plotting in <var>ind</var>-th cell of stick with <var>num</var> cells. At this, cell is sheared on values <var>sx</var>, <var>sy</var>. Stick direction is specified be <var>xd</var> and <var>yd</var>. The position is relative to previous <a href="#subplot">subplot</a> (or <a href="#inplot">inplot</a> with <var>rel</var>=<code>false</code>).
-</p></dd></dl>
-
-
-<a name="title"></a><dl>
-<dt><a name="index-title"></a>MGL command: <em></em> <strong>title</strong> <em>'title' ['stl'='' <code>size=-2</code>]</em></dt>
-<dt><a name="index-Title-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Title</strong> <em>(<code>const char *</code>txt, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> size=<code>-2</code>)</em></dt>
-<dt><a name="index-Title-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Title</strong> <em>(<code>const wchar_t *</code>txt, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> size=<code>-2</code>)</em></dt>
-<dt><a name="index-mgl_005ftitle"></a>C function: <em><code>void</code></em> <strong>mgl_title</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>txt, <code>const char *</code>stl, <code>mreal</code> size)</em></dt>
-<dt><a name="index-mgl_005ftitlew"></a>C function: <em><code>void</code></em> <strong>mgl_titlew</strong> <em>(<code>HMGL</code> gr, <code>const wchar_t *</code>txt, <code>const char *</code>stl, <code>mreal</code> size)</em></dt>
-<dd><p>Add text <var>title</var> for current subplot/inplot. Parameter <var>stl</var> can contain:
-</p><ul>
-<li> font style (see, <a href="#Font-styles">Font styles</a>);
-</li><li> ‘<samp>#</samp>’ for box around the title.
-</li></ul>
-<p>Parameter <var>size</var> set font size. This function set off any aspects or rotations. So it should be used just after creating subplot.
-</p></dd></dl>
-
-<a name="rotate"></a><dl>
-<dt><a name="index-rotate"></a>MGL command: <em></em> <strong>rotate</strong> <em><code>tetx tetz [tety=0]</code></em></dt>
-<dt><a name="index-Rotate-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Rotate</strong> <em>(<code>mreal</code> TetX, <code>mreal</code> TetZ, <code>mreal</code> TetY=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005frotate"></a>C function: <em><code>void</code></em> <strong>mgl_rotate</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> TetX, <code>mreal</code> TetZ, <code>mreal</code> TetY)</em></dt>
-<dd><p>Rotates a further plotting relative to each axis {x, z, y} consecutively on angles <var>TetX</var>, <var>TetZ</var>, <var>TetY</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-rotate-1"></a>MGL command: <em></em> <strong>rotate</strong> <em><code>tet x y z</code></em></dt>
-<dt><a name="index-RotateN-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>RotateN</strong> <em>(<code>mreal</code> Tet, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z)</em></dt>
-<dt><a name="index-mgl_005frotate_005fvector"></a>C function: <em><code>void</code></em> <strong>mgl_rotate_vector</strong> <em>(<code>HMGL</code> gr, <code>mreal Tet</code>, <code>mreal x</code>, <code>mreal y</code>, <code>mreal z</code>)</em></dt>
-<dd><p>Rotates a further plotting around vector {<var>x</var>, <var>y</var>, <var>z</var>} on angle <var>Tet</var>.
-</p></dd></dl>
-
-<a name="shear"></a><dl>
-<dt><a name="index-shear"></a>MGL command: <em></em> <strong>shear</strong> <em><code>sx sy</code></em></dt>
-<dt><a name="index-Shear"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Shear</strong> <em>(<code>mreal</code> sx, <code>mreal</code> sy)</em></dt>
-<dt><a name="index-mgl_005fshear"></a>C function: <em><code>void</code></em> <strong>mgl_shear</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> sx, <code>mreal</code> sy)</em></dt>
-<dd><p>Shears a further plotting on values <var>sx</var>, <var>sy</var>.
-</p></dd></dl>
-
-<a name="aspect"></a><dl>
-<dt><a name="index-aspect"></a>MGL command: <em></em> <strong>aspect</strong> <em><code>ax ay [az=1]</code></em></dt>
-<dt><a name="index-Aspect-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Aspect</strong> <em>(<code>mreal</code> Ax, <code>mreal</code> Ay, <code>mreal</code> Az=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005faspect"></a>C function: <em><code>void</code></em> <strong>mgl_aspect</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> Ax, <code>mreal</code> Ay, <code>mreal</code> Az)</em></dt>
-<dd><p>Defines aspect ratio for the plot. The viewable axes will be related one to another as the ratio <var>Ax:Ay:Az</var>. For the best effect it should be used after <a href="#rotate">rotate</a> function. If <var>Ax</var> is <code>NAN</code> then function try to select optimal aspect ratio to keep equal ranges for x-y axis. At this, <var>Ay</var> will specify proportionality factor, or set to use automatic one if <var>Ay</var>=<code>NAN</code>.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-Push-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Push</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fmat_005fpush"></a>C function: <em><code>void</code></em> <strong>mgl_mat_push</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Push transformation matrix into stack. Later you can restore its current state by Pop() function.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Pop-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Pop</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fmat_005fpop"></a>C function: <em><code>void</code></em> <strong>mgl_mat_pop</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Pop (restore last ’pushed’) transformation matrix into stack.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetPlotFactor"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetPlotFactor</strong> <em>(<code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005fplotfactor"></a>C function: <em><code>void</code></em> <strong>mgl_set_plotfactor</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val)</em></dt>
-<dd><p>Sets the factor of plot size. It is not recommended to set it lower then 1.5. This is some analogue of function Zoom() but applied not to overall image but for each InPlot. Use negative value or zero to enable automatic selection.
-</p></dd></dl>
-
-
-<p>There are 3 functions <code>View()</code>, <code>Zoom()</code> and <code>Perspective()</code> which transform whole image. I.e. they act as secondary transformation matrix. They were introduced for rotating/zooming the whole plot by mouse. It is not recommended to call them for picture drawing.
-</p>
-<a name="perspective"></a><dl>
-<dt><a name="index-perspective"></a>MGL command: <em></em> <strong>perspective</strong> <em><code>val</code></em></dt>
-<dt><a name="index-Perspective-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Perspective</strong> <em>(<code>mreal</code> a)</em></dt>
-<dt><a name="index-mgl_005fperspective"></a>C function: <em><code>void</code></em> <strong>mgl_perspective</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> a)</em></dt>
-<dd><p>Add (switch on) the perspective to plot. The parameter <em>a = Depth/(Depth+dz) \in [0,1)</em>. By default (<code>a=0</code>) the perspective is off.
-</p></dd></dl>
-
-<a name="view"></a><dl>
-<dt><a name="index-view"></a>MGL command: <em></em> <strong>view</strong> <em><code>tetx tetz [tety=0]</code></em></dt>
-<dt><a name="index-View-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>View</strong> <em>(<code>mreal</code> TetX, <code>mreal</code> TetZ, <code>mreal</code> TetY=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fview"></a>C function: <em><code>void</code></em> <strong>mgl_view</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> TetX, <code>mreal</code> TetZ, <code>mreal</code> TetY)</em></dt>
-<dd><p>Rotates a further plotting relative to each axis {x, z, y} consecutively on angles <var>TetX</var>, <var>TetZ</var>, <var>TetY</var>. Rotation is done independently on <a href="#rotate">rotate</a>. Attention! this settings can not be overwritten by <code>DefaultPlotParam()</code>. Use <code>Zoom(0,0,1,1)</code> to return default view.
-</p></dd></dl>
-
-<a name="zoom"></a><dl>
-<dt><a name="index-zoom"></a>MGL command: <em></em> <strong>zoom</strong> <em><code>x1 y1 x2 y2</code></em></dt>
-<dt><a name="index-Zoom"></a>Method on <code>mglGraph</code> (C++, Python): <em><code>void</code></em> <strong>Zoom</strong> <em>(<code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> x2, <code>mreal</code> y2)</em></dt>
-<dt><a name="index-mgl_005fset_005fzoom"></a>C function: <em><code>void</code></em> <strong>mgl_set_zoom</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> x2, <code>mreal</code> y2)</em></dt>
-<dd><p>The function changes the scale of graphics that correspond to zoom in/out of the picture. After function call the current plot will be cleared and further the picture will contain plotting from its part [x1,x2]*[y1,y2]. Here picture coordinates <var>x1</var>, <var>x2</var>, <var>y1</var>, <var>y2</var> changes from 0 to 1. Attention! this settings can not be overwritten by any other functions, including <code>DefaultPlotParam()</code>. Use <code>Zoom(0,0,1,1)</code> to return default view.
-</p></dd></dl>
-
-
-<hr>
-<a name="Export-picture"></a>
-<div class="header">
-<p>
-Next: <a href="#Background" accesskey="n" rel="next">Background</a>, Previous: <a href="#Subplots-and-rotation" accesskey="p" rel="prev">Subplots and rotation</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Export-picture-1"></a>
-<h3 class="section">4.5 Export picture</h3>
-
-<a name="index-SetSize"></a>
-
-<p>Functions in this group save or give access to produced picture. So, usually they should be called after plotting is done.
-</p>
-<a name="setsize"></a><dl>
-<dt><a name="index-setsize"></a>MGL command: <em></em> <strong>setsize</strong> <em><code>w h</code></em></dt>
-<dt><a name="index-SetSize-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetSize</strong> <em>(<code>int</code> width, <code>int</code> height, <code>bool</code> clear=<code>true</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005fsize"></a>C function: <em><code>void</code></em> <strong>mgl_set_size</strong> <em>(<code>HMGL</code> gr, <code>int</code> width, <code>int</code> height)</em></dt>
-<dt><a name="index-mgl_005fscale_005fsize"></a>C function: <em><code>void</code></em> <strong>mgl_scale_size</strong> <em>(<code>HMGL</code> gr, <code>int</code> width, <code>int</code> height)</em></dt>
-<dd><p>Sets size of picture in pixels. This function <strong>should be</strong> called before any other plotting because it completely remove picture contents if <var>clear</var>=<code>true</code>. Function just clear pixels and scale all primitives if <var>clear</var>=<code>false</code>.
-</p></dd></dl>
-
-<a name="setsizescl"></a><dl>
-<dt><a name="index-setsizescl"></a>MGL command: <em></em> <strong>setsizescl</strong> <em><code>factor</code></em></dt>
-<dt><a name="index-SetSizeScl"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetSizeScl</strong> <em>(<code>double</code> factor)</em></dt>
-<dt><a name="index-mgl_005fset_005fsize_005fscl"></a>C function: <em><code>void</code></em> <strong>mgl_set_size_scl</strong> <em>(<code>HMGL</code> gr, <code>double</code> factor)</em></dt>
-<dd><p>Set factor for width and height in all further calls of <a href="#setsize">setsize</a>. This command is <strong>obsolete</strong> since v.2.4.2.
-</p></dd></dl>
-
-<a name="quality"></a><dl>
-<dt><a name="index-quality"></a>MGL command: <em></em> <strong>quality</strong> <em>[<code>val</code>=2]</em></dt>
-<dt><a name="index-SetQuality"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetQuality</strong> <em>(<code>int</code> val=<code>MGL_DRAW_NORM</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005fquality"></a>C function: <em><code>void</code></em> <strong>mgl_set_quality</strong> <em>(<code>HMGL</code> gr, <code>int</code> val)</em></dt>
-<dd><p>Sets quality of the plot depending on value <var>val</var>: <code>MGL_DRAW_WIRE=0</code> – no face drawing (fastest), <code>MGL_DRAW_FAST=1</code> – no color interpolation (fast), <code>MGL_DRAW_NORM=2</code> – high quality (normal), <code>MGL_DRAW_HIGH=3</code> – high quality with 3d primitives (arrows and marks); <code>MGL_DRAW_LMEM=0x4</code> – direct bitmap drawing (low memory usage); <code>MGL_DRAW_DOTS=0x8</code> – for dots drawing instead of primitives (extremely fast).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetQuality"></a>Method on <code>mglGraph</code>: <em><code>int</code></em> <strong>GetQuality</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fget_005fquality"></a>C function: <em><code>int</code></em> <strong>mgl_get_quality</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Gets quality of the plot: <code>MGL_DRAW_WIRE=0</code> – no face drawing (fastest), <code>MGL_DRAW_FAST=1</code> – no color interpolation (fast), <code>MGL_DRAW_NORM=2</code> – high quality (normal), <code>MGL_DRAW_HIGH=3</code> – high quality with 3d primitives (arrows and marks); <code>MGL_DRAW_LMEM=0x4</code> – direct bitmap drawing (low memory usage); <code>MGL_DRAW_DOTS=0x8</code> – for dots drawing instead of primitives (extremely fast).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-StartGroup"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>StartGroup</strong> <em>(const char *name)</em></dt>
-<dt><a name="index-mgl_005fstart_005fgroup"></a>C function: <em><code>void</code></em> <strong>mgl_start_group</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>name)</em></dt>
-<dd><p>Starts group definition. Groups contain objects and other groups, they are used to select a part of a model to zoom to or to make invisible or to make semitransparent and so on.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-EndGroup"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>EndGroup</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fend_005fgroup"></a>C function: <em><code>void</code></em> <strong>mgl_end_group</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Ends group definition.
-</p></dd></dl>
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Export-to-file" accesskey="1">Export to file</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Frames_002fAnimation" accesskey="2">Frames/Animation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Bitmap-in-memory" accesskey="3">Bitmap in memory</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Parallelization" accesskey="4">Parallelization</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Export-to-file"></a>
-<div class="header">
-<p>
-Next: <a href="#Frames_002fAnimation" accesskey="n" rel="next">Frames/Animation</a>, Up: <a href="#Export-picture" accesskey="u" rel="up">Export picture</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Export-to-file-1"></a>
-<h4 class="subsection">4.5.1 Export to file</h4>
-
-<a name="index-Write"></a>
-<a name="index-WriteFrame"></a>
-<a name="index-WritePNG"></a>
-<a name="index-WriteGIF"></a>
-<a name="index-WriteSVG"></a>
-<a name="index-WriteBMP"></a>
-<a name="index-WriteEPS"></a>
-<a name="index-WriteBPS"></a>
-<a name="index-WriteTGA"></a>
-<a name="index-WriteTEX"></a>
-<a name="index-WritePRC"></a>
-<a name="index-WriteOBJ"></a>
-<a name="index-WriteWGL"></a>
-<a name="index-WriteJPEG"></a>
-<a name="index-ShowImage"></a>
-
-<p>These functions export current view to a graphic file. The filename <var>fname</var> should have appropriate extension. Parameter <var>descr</var> gives the short description of the picture. Just now the transparency is supported in PNG, SVG, OBJ and PRC files.
-</p>
-<a name="write"></a><dl>
-<dt><a name="index-write"></a>MGL command: <em></em> <strong>write</strong> <em>['fname'='']</em></dt>
-<dt><a name="index-WriteFrame-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteFrame</strong> <em>(<code>const char *</code>fname=<code>""</code>, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fframe"></a>C function: <em><code>void</code></em> <strong>mgl_write_frame</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Exports current frame to a file <var>fname</var> which type is determined by the extension. Parameter <var>descr</var> adds description to file (can be <code>""</code>). If <var>fname</var>=<code>""</code> then the file ‘<samp>frame####.jpg</samp>’ is used, where ‘<samp>####</samp>’ is current frame id and name ‘<samp>frame</samp>’ is defined by <a href="#plotid">plotid</a> class property.
-</p></dd></dl>
-
-<a name="bbox"></a><dl>
-<dt><a name="index-bbox"></a>MGL command: <em></em> <strong>bbox</strong> <em>x1 y1 [x2=<code>-1</code> y2=<code>-1</code>]</em></dt>
-<dt><a name="index-SetBBox"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetBBox</strong> <em>(<code>int</code> x1=<code>0</code>, <code>int</code> y1=<code>0</code>, <code>int</code> x2=<code>-1</code>, <code>int</code> y2=<code>-1</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005fbbox"></a>C function: <em><code>void</code></em> <strong>mgl_set_bbox</strong> <em>(<code>HMGL</code> gr, <code>int</code> x1, <code>int</code> y1, <code>int</code> x2, <code>int</code> y2)</em></dt>
-<dd><p>Set boundary box for export graphics into 2D file formats. If <var>x2</var><0 (<var>y2</var><0) then original image width (height) will be used. If <var>x1</var><0 or <var>y1</var><0 or <var>x1</var>>=<var>x2</var>|Width or <var>y1</var>>=<var>y2</var>|Height then cropping will be disabled.
-</p></dd></dl>
-
-
-
-<dl>
-<dt><a name="index-WritePNG-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>WritePNG</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>, <code>int</code> compr=<code>""</code>, <code>bool</code> alpha=<code>true</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fpng"></a>C function: <em><code>void</code></em> <strong>mgl_write_png</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fpng_005fsolid"></a>C function: <em><code>void</code></em> <strong>mgl_write_png_solid</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Exports current frame to PNG file. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file, <var>alpha</var> gives the transparency type. By default there are no description added and semitransparent image used. This function does nothing if HAVE_PNG isn’t defined during compilation of MathGL library.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteJPEG-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteJPEG</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fjpg"></a>C function: <em><code>void</code></em> <strong>mgl_write_jpg</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Exports current frame to JPEG file. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file. By default there is no description added. This function does nothing if HAVE_JPEG isn’t defined during compilation of MathGL library.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteGIF-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteGIF</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fgif"></a>C function: <em><code>void</code></em> <strong>mgl_write_gif</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Exports current frame to GIF file. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file. By default there is no description added. This function does nothing if HAVE_GIF isn’t defined during compilation of MathGL library.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteBMP-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteBMP</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fbmp"></a>C function: <em><code>void</code></em> <strong>mgl_write_bmp</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Exports current frame to BMP file. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file. There is no compression used.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteTGA-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteTGA</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005ftga"></a>C function: <em><code>void</code></em> <strong>mgl_write_tga</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Exports current frame to TGA file. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file. There is no compression used.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteEPS-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteEPS</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005feps"></a>C function: <em><code>void</code></em> <strong>mgl_write_eps</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Exports current frame to EPS file using vector representation. So it is not recommended for the export of large data plot. It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file. By default there is no description added. If file name is terminated by ‘<samp>z</samp>’ (for example, ‘<samp>fname.eps.gz</samp>’) then file will be compressed in gzip format. Note, that EPS format don’t support color interpolation, and the resulting plot will look as you use <a href="#quality">quality</a>=1 for plotting.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteBPS-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteBPS</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005feps-1"></a>C function: <em><code>void</code></em> <strong>mgl_write_eps</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Exports current frame to EPS file using bitmap representation. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file. By default there is no description added. If file name is terminated by ‘<samp>z</samp>’ (for example, ‘<samp>fname.eps.gz</samp>’) then file will be compressed in gzip format.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteSVG-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteSVG</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fsvg"></a>C function: <em><code>void</code></em> <strong>mgl_write_svg</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Exports current frame to SVG (Scalable Vector Graphics) file using vector representation. In difference of EPS format, SVG format support transparency that allows to correctly draw semitransparent plot (like <a href="#surfa">surfa</a>, <a href="#surf3a">surf3a</a> or <a href="#cloud">cloud</a>). Note, the output file may be too large for graphic of large data array (especially for surfaces). It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file (default is file name). If file name is terminated by ‘<samp>z</samp>’ (for example, ‘<samp>fname.svgz</samp>’) then file will be compressed in gzip format. Note, that SVG format don’t support color interpolation, and the resulting plot will look as you use <a href="#quality">quality</a>=1 for plotting.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteTEX-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteTEX</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005ftex"></a>C function: <em><code>void</code></em> <strong>mgl_write_tex</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Exports current frame to LaTeX (package Tikz/PGF) file using vector representation. Note, the output file may be too large for graphic of large data array (especially for surfaces). It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file (default is file name). Note, there is no text scaling now (for example, in subplots), what may produce miss-aligned labels.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WritePRC-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>WritePRC</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>, <code>bool</code> make_pdf=<code>true</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fprc"></a>C function: <em><code>void</code></em> <strong>mgl_write_prc</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr, <code>int</code> make_pdf)</em></dt>
-<dd><p>Exports current frame to PRC file using vector representation (see <a href="http://en.wikipedia.org/wiki/PRC_%28file_format%29">http://en.wikipedia.org/wiki/PRC_%28file_format%29</a>). Note, the output file may be too large for graphic of large data array (especially for surfaces). It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file (default is file name). If parameter <var>make_pdf</var>=<code>true</code> and PDF was enabled at MathGL configure then corresponding PDF file with 3D image will be created.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteOBJ-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteOBJ</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fobj"></a>C function: <em><code>void</code></em> <strong>mgl_write_obj</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Exports current frame to OBJ/MTL file using vector representation (see <a href="http://en.wikipedia.org/wiki/Wavefront_.obj_file">OBJ format</a> for details). Note, the output file may be too large for graphic of large data array (especially for surfaces). It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file (default is file name).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteXYZ"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteXYZ</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_write_xyz</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Exports current frame to XYZ/XYZL/XYZF files using vector representation (see <a href="http://people.sc.fsu.edu/~jburkardt/data/xyz/xyz.html">XYZ format</a> for details). Note, the output file may be too large for graphic of large data array (especially for surfaces). It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file (default is file name).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteSTL"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteSTL</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fstl"></a>C function: <em><code>void</code></em> <strong>mgl_write_stl</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Exports current frame to STL file using vector representation (see <a href="http://en.wikipedia.org/wiki/STL_(file_format)">STL format</a> for details). Note, the output file may be too large for graphic of large data array (especially for surfaces). It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file (default is file name.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteOFF"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteOFF</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>, <code>bool</code> colored=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005foff"></a>C function: <em><code>void</code></em> <strong>mgl_write_off</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr, <code>bool</code> colored)</em></dt>
-<dd><p>Exports current frame to OFF file using vector representation (see <a href="http://people.sc.fsu.edu/~jburkardt/data/off/off.html">OFF format</a> for details). Note, the output file may be too large for graphic of large data array (especially for surfaces). It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file (default is file name).
-</p></dd></dl>
-
-
-
-
-<dl>
-<dt><a name="index-ShowImage-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ShowImage</strong> <em>(<code>const char *</code>viewer, <code>bool</code> nowait=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fshow_005fimage"></a>C function: <em><code>void</code></em> <strong>mgl_show_image</strong> <em>(<code>const char *</code>viewer, <code>int</code> nowait)</em></dt>
-<dd><p>Displays the current picture using external program <var>viewer</var> for viewing. The function save the picture to temporary file and call <var>viewer</var> to display it. If <var>nowait</var>=<code>true</code> then the function return immediately (it will not wait while window will be closed).
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-WriteJSON"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteJSON</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fjson"></a>C function: <em><code>void</code></em> <strong>mgl_write_json</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Exports current frame to textual file using <a href="#JSON-format">JSON format</a>. Later this file can be used for faster loading and viewing by JavaScript script. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ExportMGLD"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ExportMGLD</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fexport_005fmgld"></a>C function: <em><code>void</code></em> <strong>mgl_export_mgld</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Exports points and primitives in file using <a href="#MGLD-format">MGLD format</a>. Later this file can be used for faster loading and viewing by <code>mglview</code> utility. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file (default is file name).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ImportMGLD"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ImportMGLD</strong> <em>(<code>const char *</code>fname, <code>bool</code> add=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fimport_005fmgld"></a>C function: <em><code>void</code></em> <strong>mgl_import_mgld</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>int</code> add)</em></dt>
-<dd><p>Imports points and primitives in file using <a href="#MGLD-format">MGLD format</a>. Later this file can be used for faster loading and viewing by <code>mglview</code> utility. Parameter <var>fname</var> specifies the file name, <var>add</var> sets to append or replace primitives to existed ones.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Frames_002fAnimation"></a>
-<div class="header">
-<p>
-Next: <a href="#Bitmap-in-memory" accesskey="n" rel="next">Bitmap in memory</a>, Previous: <a href="#Export-to-file" accesskey="p" rel="prev">Export to file</a>, Up: <a href="#Export-picture" accesskey="u" rel="up">Export picture</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Frames_002fAnimation-1"></a>
-<h4 class="subsection">4.5.2 Frames/Animation</h4>
-
-
-
-<a name="index-NewFrame"></a>
-<a name="index-EndFrame"></a>
-<a name="index-GetNumFrame"></a>
-<a name="index-ResetFrames"></a>
-<a name="index-StartGIF"></a>
-<a name="index-CloseGIF"></a>
-
-<p>These functions provide ability to create several pictures simultaneously. For most of cases it is useless but for widget classes (see <a href="#Widget-classes">Widget classes</a>) they can provide a way to show animation. Also you can write several frames into animated GIF file.
-</p>
-<dl>
-<dt><a name="index-NewFrame-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>NewFrame</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fnew_005fframe"></a>C function: <em><code>void</code></em> <strong>mgl_new_frame</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Creates new frame. Function returns current frame id. This is not thread safe function in OpenGL mode! Use direct list creation in multi-threading drawing. The function <code>EndFrame()</code> <strong>must</strong> be call after the finishing of the frame drawing for each call of this function.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-EndFrame-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>EndFrame</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fend_005fframe"></a>C function: <em><code>void</code></em> <strong>mgl_end_frame</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Finishes the frame drawing.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetNumFrame-1"></a>Method on <code>mglGraph</code>: <em><code>int</code></em> <strong>GetNumFrame</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fget_005fnum_005fframe"></a>C function: <em><code>int</code></em> <strong>mgl_get_num_frame</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Gets the number of created frames.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetFrame"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetFrame</strong> <em>(<code>int</code> i)</em></dt>
-<dt><a name="index-mgl_005fset_005fframe"></a>C function: <em><code>void</code></em> <strong>mgl_set_frame</strong> <em>(<code>HMGL</code> gr, <code>int</code> i)</em></dt>
-<dd><p>Finishes the frame drawing and sets drawing data to frame <var>i</var>, which should be in range [0, <code>GetNumFrame()</code>-1]. This function is similar to <code>EndFrame()</code> but don’t add frame to the GIF image.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetFrame"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>GetFrame</strong> <em>(<code>int</code> i)</em></dt>
-<dt><a name="index-mgl_005fget_005fframe"></a>C function: <em><code>void</code></em> <strong>mgl_get_frame</strong> <em>(<code>HMGL</code> gr, <code>int</code> i)</em></dt>
-<dd><p>Replaces drawing data by one from frame <var>i</var>. Function work if <code>MGL_VECT_FRAME</code> is set on (by default).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ShowFrame"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ShowFrame</strong> <em>(<code>int</code> i)</em></dt>
-<dt><a name="index-mgl_005fshow_005fframe"></a>C function: <em><code>void</code></em> <strong>mgl_show_frame</strong> <em>(<code>HMGL</code> gr, <code>int</code> i)</em></dt>
-<dd><p>Appends drawing data from frame <var>i</var> to current one. Function work if <code>MGL_VECT_FRAME</code> is set on (by default).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-DelFrame"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>DelFrame</strong> <em>(<code>int</code> i)</em></dt>
-<dt><a name="index-mgl_005fdel_005fframe"></a>C function: <em><code>void</code></em> <strong>mgl_del_frame</strong> <em>(<code>HMGL</code> gr, <code>int</code> i)</em></dt>
-<dd><p>Deletes drawing data for frame <var>i</var> and shift all later frame indexes. Function work if <code>MGL_VECT_FRAME</code> is set on (by default). Do nothing in OpenGL mode.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ResetFrames-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ResetFrames</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005freset_005fframes"></a>C function: <em><code>void</code></em> <strong>mgl_reset_frames</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Reset frames counter (start it from zero).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ClearFrame"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ClearFrame</strong> <em>(<code>int</code> i)</em></dt>
-<dt><a name="index-mgl_005fclear_005fframe"></a>C function: <em><code>void</code></em> <strong>mgl_clear_frame</strong> <em>(<code>HMGL</code> gr, <code>int</code> i)</em></dt>
-<dd><p>Clear list of primitives for current drawing.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-StartGIF-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>StartGIF</strong> <em>(<code>const char *</code>fname, <code>int</code> ms=<code>100</code>)</em></dt>
-<dt><a name="index-mgl_005fstart_005fgif"></a>C function: <em><code>void</code></em> <strong>mgl_start_gif</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>int</code> ms)</em></dt>
-<dd><p>Start writing frames into animated GIF file <var>fname</var>. Parameter <var>ms</var> set the delay between frames in milliseconds. You <strong>should not</strong> change the picture size during writing the cinema. Use <code>CloseGIF()</code> to finalize writing. Note, that this function is disabled in OpenGL mode.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-CloseGIF-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>CloseGIF</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fclose_005fgif"></a>C function: <em><code>void</code></em> <strong>mgl_close_gif</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Finish writing animated GIF and close connected pointers.
-</p></dd></dl>
-
-
-<hr>
-<a name="Bitmap-in-memory"></a>
-<div class="header">
-<p>
-Next: <a href="#Parallelization" accesskey="n" rel="next">Parallelization</a>, Previous: <a href="#Frames_002fAnimation" accesskey="p" rel="prev">Frames/Animation</a>, Up: <a href="#Export-picture" accesskey="u" rel="up">Export picture</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Bitmap-in-memory-1"></a>
-<h4 class="subsection">4.5.3 Bitmap in memory</h4>
-
-
-<p>These functions return the created picture (bitmap), its width and height. You may display it by yourself in any graphical library (see also, <a href="#Widget-classes">Widget classes</a>) or save in file (see also, <a href="#Export-to-file">Export to file</a>).
-</p>
-<dl>
-<dt><a name="index-GetRGB"></a>Method on <code>mglGraph</code>: <em><code>const unsigned char *</code></em> <strong>GetRGB</strong> <em>()</em></dt>
-<dt><a name="index-GetRGB-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>GetRGB</strong> <em>(<code>char *</code>buf, <code>int</code> size)</em></dt>
-<dt><a name="index-GetBGRN"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>GetBGRN</strong> <em>(<code>char *</code>buf, <code>int</code> size)</em></dt>
-<dt><a name="index-mgl_005fget_005frgb"></a>C function: <em><code>const unsigned char *</code></em> <strong>mgl_get_rgb</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Gets RGB bitmap of the current state of the image. Format of each element of bits is: {red, green, blue}. Number of elements is Width*Height. Position of element {i,j} is [3*i + 3*Width*j] (or is [4*i + 4*Width*j] for <code>GetBGRN()</code>). You have to provide the proper <var>size</var> of the buffer, <var>buf</var>, i.e. the code for Python should look like
-</p><pre class="verbatim">from mathgl import *
-gr = mglGraph();
-bits='\t';
-bits=bits.expandtabs(4*gr.GetWidth()*gr.GetHeight());
-gr.GetBGRN(bits, len(bits));
-</pre></dd></dl>
-
-<dl>
-<dt><a name="index-GetRGBA"></a>Method on <code>mglGraph</code>: <em><code>const unsigned char *</code></em> <strong>GetRGBA</strong> <em>()</em></dt>
-<dt><a name="index-GetRGBA-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>GetRGBA</strong> <em>(<code>char *</code>buf, <code>int</code> size)</em></dt>
-<dt><a name="index-mgl_005fget_005frgba"></a>C function: <em><code>const unsigned char *</code></em> <strong>mgl_get_rgba</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Gets RGBA bitmap of the current state of the image. Format of each element of bits is: {red, green, blue, alpha}. Number of elements is Width*Height. Position of element {i,j} is [4*i + 4*Width*j].
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetWidth"></a>Method on <code>mglGraph</code>: <em><code>int</code></em> <strong>GetWidth</strong> <em>()</em></dt>
-<dt><a name="index-GetHeight"></a>Method on <code>mglGraph</code>: <em><code>int</code></em> <strong>GetHeight</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fget_005fwidth"></a>C function: <em><code>int</code></em> <strong>mgl_get_width</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dt><a name="index-mgl_005fget_005fheight"></a>C function: <em><code>int</code></em> <strong>mgl_get_height</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Gets width and height of the image.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-CalcXYZ"></a>Method on <code>mglGraph</code>: <em><code>mglPoint</code></em> <strong>CalcXYZ</strong> <em>(<code>int</code> xs, <code>int</code> ys)</em></dt>
-<dt><a name="index-mgl_005fcalc_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_calc_xyz</strong> <em>(<code>HMGL</code> gr, <code>int</code> xs, <code>int</code> ys, <code>mreal *</code>x, <code>mreal *</code>y, <code>mreal *</code>z)</em></dt>
-<dd><p>Calculate 3D coordinate {x,y,z} for screen point {xs,ys}. At this moment it ignore perspective and transformation formulas (curvilinear coordinates). The calculation are done for the last used InPlot (see <a href="#Subplots-and-rotation">Subplots and rotation</a>).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-CalcScr"></a>Method on <code>mglGraph</code>: <em><code>mglPoint</code></em> <strong>CalcScr</strong> <em>(<code>mglPoint</code> p)</em></dt>
-<dt><a name="index-mgl_005fcalc_005fscr"></a>C function: <em><code>void</code></em> <strong>mgl_calc_scr</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>int *</code>xs, <code>int *</code>ys)</em></dt>
-<dd><p>Calculate screen point {xs,ys} for 3D coordinate {x,y,z}. The calculation are done for the last used InPlot (see <a href="#Subplots-and-rotation">Subplots and rotation</a>).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetObjId"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetObjId</strong> <em>(<code>int</code> id)</em></dt>
-<dt><a name="index-mgl_005fset_005fobj_005fid"></a>C function: <em><code>void</code></em> <strong>mgl_set_obj_id</strong> <em>(<code>HMGL</code> gr, <code>int</code> id)</em></dt>
-<dd><p>Set the numeric id for object or subplot/inplot.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetObjId"></a>Method on <code>mglGraph</code>: <em><code>int</code></em> <strong>GetObjId</strong> <em>(<code>int</code> xs, <code>int</code> ys)</em></dt>
-<dt><a name="index-mgl_005fget_005fobj_005fid"></a>C function: <em><code>int</code></em> <strong>mgl_get_obj_id</strong> <em>(<code>HMGL</code> gr, <code>int</code> xs, <code>int</code> ys)</em></dt>
-<dd><p>Get the numeric id for most upper object at pixel {xs, ys} of the picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetSplId"></a>Method on <code>mglGraph</code>: <em><code>int</code></em> <strong>GetSplId</strong> <em>(<code>int</code> xs, <code>int</code> ys)</em></dt>
-<dt><a name="index-mgl_005fget_005fspl_005fid"></a>C function: <em><code>int</code></em> <strong>mgl_get_spl_id</strong> <em>(<code>HMGL</code> gr, <code>int</code> xs, <code>int</code> ys)</em></dt>
-<dd><p>Get the numeric id for most subplot/inplot at pixel {xs, ys} of the picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Highlight"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Highlight</strong> <em>(<code>int</code> id)</em></dt>
-<dt><a name="index-mgl_005fhighlight"></a>C function: <em><code>void</code></em> <strong>mgl_highlight</strong> <em>(<code>HMGL</code> gr, <code>int</code> id)</em></dt>
-<dd><p>Highlight the object with given <var>id</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-IsActive"></a>Method on <code>mglGraph</code>: <em><code>long</code></em> <strong>IsActive</strong> <em>(<code>int</code> xs, <code>int</code> ys, <code>int</code> d=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fis_005factive"></a>C function: <em><code>long</code></em> <strong>mgl_is_active</strong> <em>(<code>HMGL</code> gr, <code>int</code> xs, <code>int</code> ys, <code>int</code> d)</em></dt>
-<dd><p>Checks if point {<var>xs</var>, <var>ys</var>} is close to one of active point (i.e. mglBase::Act) with accuracy <var>d</var> and return its index or <code>-1</code> if not found. Active points are special points which characterize primitives (like edges and so on). This function for advanced users only.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetDrawReg"></a>Method on <code>mglGraph</code>: <em><code>long</code></em> <strong>SetDrawReg</strong> <em>(<code>int</code> nx=<code>1</code>, <code>int</code> ny=<code>1</code>, <code>int</code> m=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005fdraw_005freg"></a>C function: <em><code>long</code></em> <strong>mgl_set_draw_reg</strong> <em>(<code>HMGL</code> gr, <code>int</code> nx, <code>int</code> ny, <code>int</code> m)</em></dt>
-<dd><p>Limits drawing region by rectangular area of <var>m</var>-th cell of matrix with sizes <var>nx</var>*<var>ny</var> (like in <a href="#subplot">subplot</a>). This function can be used to update only small region of the image for purposes of higher speed. This function for advanced users only.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Parallelization"></a>
-<div class="header">
-<p>
-Previous: <a href="#Bitmap-in-memory" accesskey="p" rel="prev">Bitmap in memory</a>, Up: <a href="#Export-picture" accesskey="u" rel="up">Export picture</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Parallelization-1"></a>
-<h4 class="subsection">4.5.4 Parallelization</h4>
-
-
-<a name="index-Combine"></a>
-<a name="index-MPI_005fSend"></a>
-<a name="index-MPI_005fRecv"></a>
-
-<p>Many of things MathGL do in parallel by default (if MathGL was built with pthread). However, there is function which set the number of threads to be used.
-</p>
-<dl>
-<dt><a name="index-mgl_005fset_005fnum_005fthr"></a>C function: <em><code>int</code></em> <strong>mgl_set_num_thr</strong> <em>(<code>int</code> n)</em></dt>
-<dd><p>Set the number of threads to be used by MathGL. If <var>n</var><1 then the number of threads is set as maximal number of processors (cores). If <var>n</var>=1 then single thread will be used (this is default if pthread was disabled).
-</p></dd></dl>
-
-<p>Another option is combining bitmap image (taking into account Z-ordering) from different instances of <code>mglGraph</code>. This method is most appropriate for computer clusters when the data size is so large that it exceed the memory of single computer node.
-</p>
-<dl>
-<dt><a name="index-Combine-2"></a>Method on <code>mglGraph</code>: <em><code>int</code></em> <strong>Combine</strong> <em>(<code>const mglGraph *</code>g)</em></dt>
-<dt><a name="index-mgl_005fcombine_005fgr"></a>C function: <em><code>int</code></em> <strong>mgl_combine_gr</strong> <em>(<code>HMGL</code> gr, <code>HMGL</code> g)</em></dt>
-<dd><p>Combine drawing from instance <var>g</var> with <var>gr</var> (or with this) taking into account Z-ordering of pixels. The width and height of both instances must be the same.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-MPI_005fSend-1"></a>Method on <code>mglGraph</code>: <em><code>int</code></em> <strong>MPI_Send</strong> <em>(<code>int</code> id)</em></dt>
-<dt><a name="index-mgl_005fmpi_005fsend"></a>C function: <em><code>int</code></em> <strong>mgl_mpi_send</strong> <em>(<code>HMGL</code> gr, <code>int</code> id)</em></dt>
-<dd><p>Send graphical information from node <var>id</var> using MPI. The width and height in both nodes must be the same.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-MPI_005fRecv-1"></a>Method on <code>mglGraph</code>: <em><code>int</code></em> <strong>MPI_Recv</strong> <em>(<code>int</code> id)</em></dt>
-<dt><a name="index-mgl_005fmpi_005fsend-1"></a>C function: <em><code>int</code></em> <strong>mgl_mpi_send</strong> <em>(<code>HMGL</code> gr, <code>int</code> id)</em></dt>
-<dd><p>Receive graphical information from node <var>id</var> using MPI. The width and height in both nodes must be the same.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Background"></a>
-<div class="header">
-<p>
-Next: <a href="#Primitives" accesskey="n" rel="next">Primitives</a>, Previous: <a href="#Export-picture" accesskey="p" rel="prev">Export picture</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Background-1"></a>
-<h3 class="section">4.6 Background</h3>
-
-<a name="index-LoadBackground"></a>
-<a name="index-Clf"></a>
-<a name="index-Rasterize"></a>
-
-<p>These functions change background image.
-</p>
-<a name="clf"></a><dl>
-<dt><a name="index-clf"></a>MGL command: <em></em> <strong>clf</strong> <em>['col']</em></dt>
-<dt><a name="index-clf-1"></a>MGL command: <em></em> <strong>clf</strong> <em>r g b</em></dt>
-<dt><a name="index-Clf-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Clf</strong> <em>()</em></dt>
-<dt><a name="index-Clf-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Clf</strong> <em>(<code>const char *</code> col)</em></dt>
-<dt><a name="index-Clf-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Clf</strong> <em>(<code>char</code> col)</em></dt>
-<dt><a name="index-Clf-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Clf</strong> <em>(<code>mreal</code> r, <code>mreal</code> g, <code>mreal</code> b)</em></dt>
-<dt><a name="index-mgl_005fclf"></a>C function: <em><code>void</code></em> <strong>mgl_clf</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dt><a name="index-mgl_005fclf_005fstr"></a>C function: <em><code>void</code></em> <strong>mgl_clf_str</strong> <em>(<code>HMGL</code> gr, <code>const char *</code> col)</em></dt>
-<dt><a name="index-mgl_005fclf_005fchr"></a>C function: <em><code>void</code></em> <strong>mgl_clf_chr</strong> <em>(<code>HMGL</code> gr, <code>char</code> col)</em></dt>
-<dt><a name="index-mgl_005fclf_005frgb"></a>C function: <em><code>void</code></em> <strong>mgl_clf_rgb</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> r, <code>mreal</code> g, <code>mreal</code> b)</em></dt>
-<dd><p>Clear the picture and fill background by specified color.
-</p></dd></dl>
-
-<a name="rasterize"></a><dl>
-<dt><a name="index-rasterize"></a>MGL command: <em></em> <strong>rasterize</strong></dt>
-<dt><a name="index-Rasterize-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Rasterize</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005frasterize"></a>C function: <em><code>void</code></em> <strong>mgl_rasterize</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Force drawing the plot and use it as background. After it, function clear the list of primitives, like <a href="#clf">clf</a>. This function is useful if you want save part of plot as bitmap one (for example, large surfaces, isosurfaces or vector fields) and keep some parts as vector one (like annotation, curves, axis and so on).
-</p></dd></dl>
-
-<a name="background"></a><dl>
-<dt><a name="index-background"></a>MGL command: <em></em> <strong>background</strong> <em>'fname' [<code>alpha=1</code>]</em></dt>
-<dt><a name="index-LoadBackground-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>LoadBackground</strong> <em>(<code>const char *</code> fname, <code>double</code> alpha=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fload_005fbackground"></a>C function: <em><code>void</code></em> <strong>mgl_load_background</strong> <em>(<code>HMGL</code> gr, <code>const char *</code> fname, <code>double</code> alpha)</em></dt>
-<dd><p>Load PNG or JPEG file <var>fname</var> as background for the plot. Parameter <var>alpha</var> manually set transparency of the background.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Primitives"></a>
-<div class="header">
-<p>
-Next: <a href="#Text-printing" accesskey="n" rel="next">Text printing</a>, Previous: <a href="#Background" accesskey="p" rel="prev">Background</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Primitives-1"></a>
-<h3 class="section">4.7 Primitives</h3>
-
-<a name="index-Ball"></a>
-<a name="index-Line"></a>
-<a name="index-Curve"></a>
-<a name="index-Glyph"></a>
-<a name="index-Face"></a>
-<a name="index-FaceX"></a>
-<a name="index-FaceY"></a>
-<a name="index-FaceZ"></a>
-<a name="index-Cone"></a>
-<a name="index-Drop"></a>
-<a name="index-Sphere"></a>
-
-<a name="index-Mark"></a>
-<a name="index-Error"></a>
-
-<p>These functions draw some simple objects like line, point, sphere, drop, cone and so on. See <a href="#Using-primitives">Using primitives</a>, for sample code and picture.
-</p>
-<a name="ball"></a><dl>
-<dt><a name="index-ball"></a>MGL command: <em></em> <strong>ball</strong> <em><code>x y</code> ['col'='r.']</em></dt>
-<dt><a name="index-ball-1"></a>MGL command: <em></em> <strong>ball</strong> <em><code>x y z</code> ['col'='r.']</em></dt>
-<dt><a name="index-Ball-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Ball</strong> <em>(<code>mglPoint</code> p, <code>char</code> col=<code>'r'</code>)</em></dt>
-<dt><a name="index-Mark-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Mark</strong> <em>(<code>mglPoint</code> p, <code>const char *</code>mark)</em></dt>
-<dt><a name="index-mgl_005fmark"></a>C function: <em><code>void</code></em> <strong>mgl_mark</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>const char *</code>mark)</em></dt>
-<dd><p>Draws a mark (point ‘<samp>.</samp>’ by default) at position <var>p</var>={<var>x</var>, <var>y</var>, <var>z</var>} with color <var>col</var>.
-</p></dd></dl>
-
-<a name="errbox"></a><dl>
-<dt><a name="index-errbox"></a>MGL command: <em></em> <strong>errbox</strong> <em><code>x y ex ey</code> ['stl'='']</em></dt>
-<dt><a name="index-errbox-1"></a>MGL command: <em></em> <strong>errbox</strong> <em><code>x y z ex ey ez</code> ['stl'='']</em></dt>
-<dt><a name="index-Error-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Error</strong> <em>(<code>mglPoint</code> p, <code>mglPoint</code> e, <code>char</code> *stl=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ferror_005fbox"></a>C function: <em><code>void</code></em> <strong>mgl_error_box</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>mreal</code> ex, <code>mreal</code> ey, <code>mreal</code> ez, <code>char *</code>stl)</em></dt>
-<dd><p>Draws a 3d error box at position <var>p</var>={<var>x</var>, <var>y</var>, <var>z</var>} with sizes <var>e</var>={<var>ex</var>, <var>ey</var>, <var>ez</var>} and style <var>stl</var>. Use NAN for component of <var>e</var> to reduce number of drawn elements.
-</p></dd></dl>
-
-<a name="line"></a><dl>
-<dt><a name="index-line"></a>MGL command: <em></em> <strong>line</strong> <em><code>x1 y1 x2 y2</code> ['stl'='']</em></dt>
-<dt><a name="index-line-1"></a>MGL command: <em></em> <strong>line</strong> <em><code>x1 y1 z1 x2 y2 z2</code> ['stl'='']</em></dt>
-<dt><a name="index-Line-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Line</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> p2, <code>char *</code>stl=<code>"B"</code>, <code>int</code> num=<code>2</code>)</em></dt>
-<dt><a name="index-mgl_005fline"></a>C function: <em><code>void</code></em> <strong>mgl_line</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> z1, <code>mreal</code> x2, <code>mreal</code> y2, <code>mreal</code> z2, <code>char *</code>stl, <code>int</code> num)</em></dt>
-<dd><p>Draws a geodesic line (straight line in Cartesian coordinates) from point <var>p1</var> to <var>p2</var> using line style <var>stl</var>. Parameter <var>num</var> define the “quality” of the line. If <var>num</var>=<code>2</code> then the straight line will be drawn in all coordinate system (independently on transformation formulas (see <a href="#Curved-coordinates">Curved coordinates</a>). Contrary, for large values (for example, =<code>100</code>) the geodesic line will be drawn in corresponding coordinate system (straight line in Cartesian coordinates, circle in polar coordinates and so on). Line will be drawn even if it lies out of bounding box.
-</p></dd></dl>
-
-<a name="curve"></a><dl>
-<dt><a name="index-curve"></a>MGL command: <em></em> <strong>curve</strong> <em><code>x1 y1 dx1 dy1 x2 y2 dx2 dy2</code> ['stl'='']</em></dt>
-<dt><a name="index-curve-1"></a>MGL command: <em></em> <strong>curve</strong> <em><code>x1 y1 z1 dx1 dy1 dz1 x2 y2 z2 dx2 dy2 dz2</code> ['stl'='']</em></dt>
-<dt><a name="index-Curve-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Curve</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> d1, <code>mglPoint</code> p2, <code>mglPoint</code> d2, <code>const char *</code>stl=<code>"B"</code>, <code>int</code> num=<code>100</code>)</em></dt>
-<dt><a name="index-mgl_005fcurve"></a>C function: <em><code>void</code></em> <strong>mgl_curve</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> z1, <code>mreal</code> dx1, <code>mreal</code> dy1, <code>mreal</code> dz1, <code>mreal</code> x2, <code>mreal</code> y2, <code>mreal</code> z2, <code>mreal</code> dx2, <code>mreal</code> dy2, <code>mreal</code> dz2, <code>const char *</code>stl, <code>int</code> num)</em></dt>
-<dd><p>Draws Bezier-like curve from point <var>p1</var> to <var>p2</var> using line style <var>stl</var>. At this tangent is codirected with <var>d1</var>, <var>d2</var> and proportional to its amplitude. Parameter <var>num</var> define the “quality” of the curve. If <var>num</var>=<code>2</code> then the straight line will be drawn in all coordinate system (independently on transformation formulas, see <a href="#Curved-coordinates">Curved coordinates</a>). Contrary, for large values (for example, =<code>100</code>) the spline like Bezier curve will be drawn in corresponding coordinate system. Curve will be drawn even if it lies out of bounding box.
-</p></dd></dl>
-
-<a name="face"></a><dl>
-<dt><a name="index-face"></a>MGL command: <em></em> <strong>face</strong> <em><code>x1 y1 x2 y2 x3 y3 x4 y4</code> ['stl'='']</em></dt>
-<dt><a name="index-face-1"></a>MGL command: <em></em> <strong>face</strong> <em><code>x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4</code> ['stl'='']</em></dt>
-<dt><a name="index-Face-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Face</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> p2, <code>mglPoint</code> p3, <code>mglPoint</code> p4, <code>const char *</code>stl=<code>"w"</code>)</em></dt>
-<dt><a name="index-mgl_005fface"></a>C function: <em><code>void</code></em> <strong>mgl_face</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> z1, <code>mreal</code> x2, <code>mreal</code> y2, <code>mreal</code> z2, <code>mreal</code> x3, <code>mreal</code> y3, <code>mreal</code> z3, <code>mreal</code> x4, <code>mreal</code> y4, <code>mreal</code> z4, <code>const char *</code>stl)</em></dt>
-<dd><p>Draws the solid quadrangle (face) with vertexes <var>p1</var>, <var>p2</var>, <var>p3</var>, <var>p4</var> and with color(s) <var>stl</var>. At this colors can be the same for all vertexes or different if all 4 colors are specified for each vertex. Face will be drawn even if it lies out of bounding box.
-</p></dd></dl>
-
-<a name="rect"></a><dl>
-<dt><a name="index-rect"></a>MGL command: <em></em> <strong>rect</strong> <em><code>x1 y1 x2 y2</code> ['stl'='']</em></dt>
-<dt><a name="index-rect-1"></a>MGL command: <em></em> <strong>rect</strong> <em><code>x1 y1 z1 x2 y2 z2</code> ['stl'='']</em></dt>
-<dd><p>Draws the solid rectangle (face) with vertexes {<var>x1</var>, <var>y1</var>, <var>z1</var>} and {<var>x2</var>, <var>y2</var>, <var>z2</var>} with color <var>stl</var>. At this colors can be the same for all vertexes or separately if all 4 colors are specified for each vertex. Face will be drawn even if it lies out of bounding box.
-</p></dd></dl>
-
-<a name="facex"></a><a name="facey"></a><a name="facez"></a><dl>
-<dt><a name="index-facex"></a>MGL command: <em></em> <strong>facex</strong> <em><code>x0 y0 z0 wy wz</code> ['stl'='' <code>d1=0 d2=0</code>]</em></dt>
-<dt><a name="index-facey"></a>MGL command: <em></em> <strong>facey</strong> <em><code>x0 y0 z0 wx wz</code> ['stl'='' <code>d1=0 d2=0</code>]</em></dt>
-<dt><a name="index-facez"></a>MGL command: <em></em> <strong>facez</strong> <em><code>x0 y0 z0 wx wy</code> ['stl'='' <code>d1=0 d2=0</code>]</em></dt>
-<dt><a name="index-FaceX-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>FaceX</strong> <em>(<code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> wy, <code>mreal</code> wz, <code>const char *</code>stl=<code>"w"</code>, <code>mreal</code> d1=<code>0</code>, <code>mreal</code> d2=<code>0</code>)</em></dt>
-<dt><a name="index-FaceY-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>FaceY</strong> <em>(<code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> wx, <code>mreal</code> wz, <code>const char *</code>stl=<code>"w"</code>, <code>mreal</code> d1=<code>0</code>, <code>mreal</code> d2=<code>0</code>)</em></dt>
-<dt><a name="index-FaceZ-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>FaceZ</strong> <em>(<code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> wx, <code>mreal</code> wy, <code>const char *</code>stl=<code>"w"</code>, <code>mreal</code> d1=<code>0</code>, <code>mreal</code> d2=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005ffacex"></a>C function: <em><code>void</code></em> <strong>mgl_facex</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> wy, <code>mreal</code> wz, <code>const char *</code>stl, <code>mreal</code> d1, <code>mreal</code> d2)</em></dt>
-<dt><a name="index-mgl_005ffacey"></a>C function: <em><code>void</code></em> <strong>mgl_facey</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> wx, <code>mreal</code> wz, <code>const char *</code>stl, <code>mreal</code> d1, <code>mreal</code> d2)</em></dt>
-<dt><a name="index-mgl_005ffacez"></a>C function: <em><code>void</code></em> <strong>mgl_facez</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> wx, <code>mreal</code> wy, <code>const char *</code>stl, <code>mreal</code> d1, <code>mreal</code> d2)</em></dt>
-<dd><p>Draws the solid rectangle (face) perpendicular to [x,y,z]-axis correspondingly at position {<var>x0</var>, <var>y0</var>, <var>z0</var>} with color <var>stl</var> and with widths <var>wx</var>, <var>wy</var>, <var>wz</var> along corresponding directions. At this colors can be the same for all vertexes or separately if all 4 colors are specified for each vertex. Parameters <var>d1</var>!=0, <var>d2</var>!=0 set additional shift of the last vertex (i.e. to draw quadrangle). Face will be drawn even if it lies out of bounding box.
-</p></dd></dl>
-
-<a name="sphere"></a><dl>
-<dt><a name="index-sphere"></a>MGL command: <em></em> <strong>sphere</strong> <em><code>x0 y0 r</code> ['col'='r']</em></dt>
-<dt><a name="index-sphere-1"></a>MGL command: <em></em> <strong>sphere</strong> <em><code>x0 y0 z0 r</code> ['col'='r']</em></dt>
-<dt><a name="index-Sphere-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Sphere</strong> <em>(<code>mglPoint</code> p, <code>mreal</code> r, <code>const char *</code>stl=<code>"r"</code>)</em></dt>
-<dt><a name="index-mgl_005fsphere"></a>C function: <em><code>void</code></em> <strong>mgl_sphere</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> r, <code>const char *</code>stl)</em></dt>
-<dd><p>Draw the sphere with radius <var>r</var> and center at point <var>p</var>={<var>x0</var>, <var>y0</var>, <var>z0</var>} and color <var>stl</var>.
-</p></dd></dl>
-
-<a name="drop"></a><dl>
-<dt><a name="index-drop"></a>MGL command: <em></em> <strong>drop</strong> <em><code>x0 y0 dx dy r</code> ['col'='r' <code>sh=1 asp=1</code>]</em></dt>
-<dt><a name="index-drop-1"></a>MGL command: <em></em> <strong>drop</strong> <em><code>x0 y0 z0 dx dy dz r</code> ['col'='r' <code>sh=1 asp=1</code>]</em></dt>
-<dt><a name="index-Drop-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Drop</strong> <em>(<code>mglPoint</code> p, <code>mglPoint</code> d, <code>mreal</code> r, <code>const char *</code>col=<code>"r"</code>, <code>mreal</code> shift=<code>1</code>, <code>mreal</code> ap=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdrop"></a>C function: <em><code>void</code></em> <strong>mgl_drop</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> dx, <code>mreal</code> dy, <code>mreal</code> dz, <code>mreal</code> r, <code>const char *</code>col, <code>mreal</code> shift, <code>mreal</code> ap)</em></dt>
-<dd><p>Draw the drop with radius <var>r</var> at point <var>p</var> elongated in direction <var>d</var> and with color <var>col</var>. Parameter <var>shift</var> set the degree of drop oblongness: ‘<samp>0</samp>’ is sphere, ‘<samp>1</samp>’ is maximally oblongness drop. Parameter <var>ap</var> set relative width of the drop (this is analogue of “ellipticity” for the sphere).
-</p></dd></dl>
-
-<a name="cone"></a><dl>
-<dt><a name="index-cone"></a>MGL command: <em></em> <strong>cone</strong> <em><code>x1 y1 z1 x2 y2 z2 r1</code> [<code>r2=-1</code> 'stl'='']</em></dt>
-<dt><a name="index-Cone-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Cone</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> p2, <code>mreal</code> r1, <code>mreal</code> r2=<code>-1</code>, <code>const char *</code>stl=<code>"B"</code>)</em></dt>
-<dt><a name="index-mgl_005fcone"></a>C function: <em><code>void</code></em> <strong>mgl_cone</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> z1, <code>mreal</code> x2, <code>mreal</code> y2, <code>mreal</code> z2, <code>mreal</code> r1, <code>mreal</code> r2, <code>const char *</code>stl)</em></dt>
-<dd><p>Draw tube (or truncated cone if <var>edge</var>=<code>false</code>) between points <var>p1</var>, <var>p2</var> with radius at the edges <var>r1</var>, <var>r2</var>. If <var>r2</var><0 then it is supposed that <var>r2</var>=<var>r1</var>. The cone color is defined by string <var>stl</var>. Parameter <var>stl</var> can contain:
-</p><ul>
-<li> ‘<samp>@</samp>’ for drawing edges;
-</li><li> ‘<samp>#</samp>’ for wired cones;
-</li><li> ‘<samp>t</samp>’ for drawing tubes/cylinder instead of cones/prisms;
-</li><li> ‘<samp>4</samp>’, ‘<samp>6</samp>’, ‘<samp>8</samp>’ for drawing square, hex- or octo-prism instead of cones.
-</li></ul>
-</dd></dl>
-
-<a name="circle"></a><dl>
-<dt><a name="index-circle"></a>MGL command: <em></em> <strong>circle</strong> <em><code>x0 y0 r</code> ['col'='r']</em></dt>
-<dt><a name="index-circle-1"></a>MGL command: <em></em> <strong>circle</strong> <em><code>x0 y0 z0 r</code> ['col'='r']</em></dt>
-<dt><a name="index-Circle"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Circle</strong> <em>(<code>mglPoint</code> p, <code>mreal</code> r, <code>const char *</code>stl=<code>"r"</code>)</em></dt>
-<dd><p>Draw the circle with radius <var>r</var> and center at point <var>p</var>={<var>x0</var>, <var>y0</var>, <var>z0</var>}. Parameter <var>col</var> may contain
-</p><ul>
-<li> colors for filling and boundary (second one if style ‘<samp>@</samp>’ is used, black color is used by default);
-</li><li> ‘<samp>#</samp>’ for wire figure (boundary only);
-</li><li> ‘<samp>@</samp>’ for filling and boundary.
-</li></ul>
-</dd></dl>
-
-<a name="ellipse"></a><dl>
-<dt><a name="index-ellipse"></a>MGL command: <em></em> <strong>ellipse</strong> <em><code>x1 y1 x2 y2 r</code> ['col'='r']</em></dt>
-<dt><a name="index-ellipse-1"></a>MGL command: <em></em> <strong>ellipse</strong> <em><code>x1 y1 z1 x2 y2 z2 r</code> ['col'='r']</em></dt>
-<dt><a name="index-Ellipse"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Ellipse</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> p2, <code>mreal</code> r, <code>const char *</code>col=<code>"r"</code>)</em></dt>
-<dt><a name="index-mgl_005fellipse"></a>C function: <em><code>void</code></em> <strong>mgl_ellipse</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> z1, <code>mreal</code> x2, <code>mreal</code> y2, <code>mreal</code> z2, <code>mreal</code> r, <code>const char *</code>col)</em></dt>
-<dd><p>Draw the ellipse with radius <var>r</var> and focal points <var>p1</var>, <var>p2</var>. Parameter <var>col</var> may contain
-</p><ul>
-<li> colors for filling and boundary (second one if style ‘<samp>@</samp>’ is used, black color is used by default);
-</li><li> ‘<samp>#</samp>’ for wire figure (boundary only);
-</li><li> ‘<samp>@</samp>’ for filling and boundary.
-</li></ul>
-</dd></dl>
-
-<a name="rhomb"></a><dl>
-<dt><a name="index-rhomb"></a>MGL command: <em></em> <strong>rhomb</strong> <em><code>x1 y1 x2 y2 r</code> ['col'='r']</em></dt>
-<dt><a name="index-rhomb-1"></a>MGL command: <em></em> <strong>rhomb</strong> <em><code>x1 y1 z1 x2 y2 z2 r</code> ['col'='r']</em></dt>
-<dt><a name="index-Rhomb"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Rhomb</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> p2, <code>mreal</code> r, <code>const char *</code>col=<code>"r"</code>)</em></dt>
-<dt><a name="index-mgl_005frhomb"></a>C function: <em><code>void</code></em> <strong>mgl_rhomb</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> z1, <code>mreal</code> x2, <code>mreal</code> y2, <code>mreal</code> z2, <code>mreal</code> r, <code>const char *</code>col)</em></dt>
-<dd><p>Draw the rhombus with width <var>r</var> and edge points <var>p1</var>, <var>p2</var>. Parameter <var>col</var> may contain
-</p><ul>
-<li> colors for filling and boundary (second one if style ‘<samp>@</samp>’ is used, black color is used by default);
-</li><li> ‘<samp>#</samp>’ for wire figure (boundary only);
-</li><li> ‘<samp>@</samp>’ for filling and boundary.
-</li></ul>
-</dd></dl>
-
-<a name="arc"></a><dl>
-<dt><a name="index-arc"></a>MGL command: <em></em> <strong>arc</strong> <em><code>x0 y0 x1 y1 a</code> ['col'='r']</em></dt>
-<dt><a name="index-arc-1"></a>MGL command: <em></em> <strong>arc</strong> <em><code>x0 y0 z0 x1 y1 a</code> ['col'='r']</em></dt>
-<dt><a name="index-arc-2"></a>MGL command: <em></em> <strong>arc</strong> <em><code>x0 y0 z0 xa ya za x1 y1 z1 a</code> ['col'='r']</em></dt>
-<dt><a name="index-Arc"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Arc</strong> <em>(<code>mglPoint</code> p0, <code>mglPoint</code> p1, <code>mreal</code> a, <code>const char *</code>col=<code>"r"</code>)</em></dt>
-<dt><a name="index-Arc-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Arc</strong> <em>(<code>mglPoint</code> p0, <code>mglPoint</code> pa, <code>mglPoint</code> p1, <code>mreal</code> a, <code>const char *</code>col=<code>"r"</code>)</em></dt>
-<dt><a name="index-mgl_005farc"></a>C function: <em><code>void</code></em> <strong>mgl_arc</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> a, <code>const char *</code>col)</em></dt>
-<dt><a name="index-mgl_005farc_005fext"></a>C function: <em><code>void</code></em> <strong>mgl_arc_ext</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> xa, <code>mreal</code> ya, <code>mreal</code> za, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> z1, <code>mreal</code> a, <code>const char *</code>col)</em></dt>
-<dd><p>Draw the arc around axis <var>pa</var> (default is z-axis <var>pa</var>={0,0,1}) with center at <var>p0</var> and starting from point <var>p1</var>. Parameter <var>a</var> set the angle of arc in degree. Parameter <var>col</var> may contain color of the arc and arrow style for arc edges.
-</p></dd></dl>
-
-<a name="polygon"></a><dl>
-<dt><a name="index-polygon"></a>MGL command: <em></em> <strong>polygon</strong> <em><code>x0 y0 x1 y1 num</code> ['col'='r']</em></dt>
-<dt><a name="index-polygon-1"></a>MGL command: <em></em> <strong>polygon</strong> <em><code>x0 y0 z0 x1 y1 z1 num</code> ['col'='r']</em></dt>
-<dt><a name="index-Polygon"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Polygon</strong> <em>(<code>mglPoint</code> p0, <code>mglPoint</code> p1, <code>int</code> num, <code>const char *</code>col=<code>"r"</code>)</em></dt>
-<dt><a name="index-mgl_005fpolygon"></a>C function: <em><code>void</code></em> <strong>mgl_polygon</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> z1, <code>int</code> num, <code>const char *</code>col)</em></dt>
-<dd><p>Draw the polygon with <var>num</var> edges starting from <var>p1</var>. The center of polygon is located in <var>p0</var>. Parameter <var>col</var> may contain
-</p><ul>
-<li> colors for filling and boundary (second one if style ‘<samp>@</samp>’ is used, black color is used by default);
-</li><li> ‘<samp>#</samp>’ for wire figure (boundary only);
-</li><li> ‘<samp>@</samp>’ for filling and boundary.
-</li></ul>
-</dd></dl>
-
-
-<a name="logo"></a><dl>
-<dt><a name="index-logo"></a>MGL command: <em></em> <strong>logo</strong> <em>'fname' [smooth=off]</em></dt>
-<dt><a name="index-Logo"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Logo</strong> <em>(<code>const char *</code>fname, <code>bool</code> smooth=<code>false</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Logo-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Logo</strong> <em>(<code>long</code> w, <code>long</code> h, <code>const unsigned char *</code>rgba, <code>bool</code> smooth=<code>false</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005flogo"></a>C function only: <em><code>void</code></em> <strong>mgl_logo</strong> <em>(<code>HMGL</code> gr, <code>long</code> w, <code>long</code> h, <code>const unsigned char *</code>rgba, <code>bool</code> smooth, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005flogo_005ffile"></a>C function: <em><code>void</code></em> <strong>mgl_logo_file</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>bool</code> smooth, <code>const char *</code>opt)</em></dt>
-<dd><p>Draw bitmap (logo) along whole axis range, which can be changed by <a href="#Command-options">Command options</a>. Bitmap can be loaded from file or specified as RGBA values for pixels. Parameter <var>smooth</var> set to draw bitmap without or with color interpolation.
-</p></dd></dl>
-
-
-<a name="symbol"></a><dl>
-<dt><a name="index-symbol"></a>MGL command: <em></em> <strong>symbol</strong> <em><code>x y</code> 'id' ['fnt'='' <code>size=-1</code>]</em></dt>
-<dt><a name="index-symbol-1"></a>MGL command: <em></em> <strong>symbol</strong> <em><code>x y z</code> 'id' ['fnt'='' <code>size=-1</code>]</em></dt>
-<dt><a name="index-Symbol"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Symbol</strong> <em>(<code>mglPoint</code> p, <code>char</code> id, <code>const char *</code>fnt=<code>""</code>, <code>mreal</code> size=<code>-1</code>)</em></dt>
-<dt><a name="index-mgl_005fsymbol"></a>C function: <em><code>void</code></em> <strong>mgl_symbol</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>char</code> id, <code>const char *</code>fnt, <code>mreal</code> size)</em></dt>
-<dd><p>Draws user-defined symbol with name <var>id</var> at position <var>p</var> with style specifying by <var>fnt</var>. The size of font is set by <var>size</var> parameter (default is <code>-1</code>). The string <var>fnt</var> may contain color specification ended by ‘<samp>:</samp>’ symbol; styles ‘<samp>a</samp>’, ‘<samp>A</samp>’ to draw at absolute position {<var>x</var>, <var>y</var>} (supposed to be in range [0,1]) of picture (for ‘<samp>A</samp>’) or subplot/inplot (for ‘<samp>a</samp>’); and style ‘<samp>w</samp>’ to draw wired symbol.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-symbol-2"></a>MGL command: <em></em> <strong>symbol</strong> <em><code>x y dx dy</code> 'id' ['fnt'=':L' <code>size=-1</code>]</em></dt>
-<dt><a name="index-symbol-3"></a>MGL command: <em></em> <strong>symbol</strong> <em><code>x y z dx dy dz</code> 'id' ['fnt'=':L' <code>size=-1</code>]</em></dt>
-<dt><a name="index-Symbol-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Symbol</strong> <em>(<code>mglPoint</code> p, <code>mglPoint</code> d, <code>char</code> id, <code>const char *</code>fnt=<code>""</code>, <code>mreal</code> size=<code>-1</code>)</em></dt>
-<dt><a name="index-mgl_005fsymbol_005fdir"></a>C function: <em><code>void</code></em> <strong>mgl_symbol_dir</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>mreal</code> dx, <code>mreal</code> dy, <code>mreal</code> dz, <code>const char *</code>text, <code>const char *</code>fnt, <code>mreal</code> size)</em></dt>
-<dd><p>The same as previous but symbol will be drawn rotated along direction <var>d</var>.
-</p></dd></dl>
-
-<a name="addsymbol"></a><dl>
-<dt><a name="index-addsymbol"></a>MGL command: <em></em> <strong>addsymbol</strong> <em>'id' xdat ydat</em></dt>
-<dt><a name="index-DefineSymbol"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>DefineSymbol</strong> <em>(<code>char</code> id, <code>const mglDataA &</code>xdat, <code>const mglDataA &</code>ydat)</em></dt>
-<dt><a name="index-mgl_005fdefine_005fsymbol"></a>C function: <em><code>void</code></em> <strong>mgl_define_symbol</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> xdat, <code>HCDT</code> ydat)</em></dt>
-<dd><p>Add user-defined symbol with name <var>id</var> and contour {<var>xdat</var>, <var>ydat</var>}. You can use <code>NAN</code> values to set break (jump) of contour curve.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Text-printing"></a>
-<div class="header">
-<p>
-Next: <a href="#Axis-and-Colorbar" accesskey="n" rel="next">Axis and Colorbar</a>, Previous: <a href="#Primitives" accesskey="p" rel="prev">Primitives</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Text-printing-1"></a>
-<h3 class="section">4.8 Text printing</h3>
-
-<a name="index-Puts"></a>
-<a name="index-Putsw"></a>
-<a name="index-Text"></a>
-<a name="index-Label"></a>
-<a name="index-fgets"></a>
-
-<p>These functions draw the text. There are functions for drawing text in arbitrary place, in arbitrary direction and along arbitrary curve. MathGL can use arbitrary font-faces and parse many TeX commands (for more details see <a href="#Font-styles">Font styles</a>). All these functions have 2 variant: for printing 8-bit text (<code>char *</code>) and for printing Unicode text (<code>wchar_t *</code>). In first case the conversion into the current locale is used. So sometimes you need to specify it by <code>setlocale()</code> function. The <var>size</var> argument control the size of text: if positive it give the value, if negative it give the value relative to <code>SetFontSize()</code>. The font type (STIX, arial, courier, times and so on) can be selected by function LoadFont(). See <a href="#Font-settings">Font settings</a>.
-</p>
-<p>The font parameters are described by string. This string may set the text color ‘<samp>wkrgbcymhRGBCYMHW</samp>’ (see <a href="#Color-styles">Color styles</a>). Starting from MathGL v.2.3, you can set color gradient for text (see <a href="#Color-scheme">Color scheme</a>). Also, after delimiter symbol ‘<samp>:</samp>’, it can contain characters of font type (‘<samp>rbiwou</samp>’) and/or align (‘<samp>LRCTV</samp>’) specification. The font types are: ‘<samp>r</samp>’ – roman (or regular) font, ‘<samp>i</samp>’ – italic style, ‘<samp>b</samp>’ – bold style, ‘<samp>w</samp>’ – wired style, ‘<samp>o</samp>’ – over-lined text, ‘<samp>u</samp>’ – underlined text. By default roman font is used. The align types are: ‘<samp>L</samp>’ – align left (default), ‘<samp>C</samp>’ – align center, ‘<samp>R</samp>’ – align right, ‘<samp>T</samp>’ – align under, ‘<samp>V</samp>’ – align center vertical. For example, string ‘<samp>b:iC</samp>’ correspond to italic font style for centered text which printed by blue color.
-</p>
-<p>If string contains symbols ‘<samp>aA</samp>’ then text is printed at absolute position {<var>x</var>, <var>y</var>} (supposed to be in range [0,1]) of picture (for ‘<samp>A</samp>’) or subplot/inplot (for ‘<samp>a</samp>’). If string contains symbol ‘<samp>@</samp>’ then box around text is drawn.
-</p>
-<p>See <a href="#Text-features">Text features</a>, for sample code and picture.
-</p>
-<a name="text"></a><dl>
-<dt><a name="index-text"></a>MGL command: <em></em> <strong>text</strong> <em><code>x y</code> 'text' ['fnt'='' <code>size=-1</code>]</em></dt>
-<dt><a name="index-text-1"></a>MGL command: <em></em> <strong>text</strong> <em><code>x y z</code> 'text' ['fnt'='' <code>size=-1</code>]</em></dt>
-<dt><a name="index-Puts-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Puts</strong> <em>(<code>mglPoint</code> p, <code>const char *</code>text, <code>const char *</code>fnt=<code>":C"</code>, <code>mreal</code> size=<code>-1</code>)</em></dt>
-<dt><a name="index-Putsw-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Putsw</strong> <em>(<code>mglPoint</code> p, <code>const wchar_t *</code>text, <code>const char *</code>fnt=<code>":C"</code>, <code>mreal</code> size=<code>-1</code>)</em></dt>
-<dt><a name="index-Puts-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Puts</strong> <em>(<code>mreal</code> x, <code>mreal</code> y, <code>const char *</code>text, <code>const char *</code>fnt=<code>":AC"</code>, <code>mreal</code> size=<code>-1</code>)</em></dt>
-<dt><a name="index-Putsw-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Putsw</strong> <em>(<code>mreal</code> x, <code>mreal</code> y, <code>const wchar_t *</code>text, <code>const char *</code>fnt=<code>":AC"</code>, <code>mreal</code> size=<code>-1</code>)</em></dt>
-<dt><a name="index-mgl_005fputs"></a>C function: <em><code>void</code></em> <strong>mgl_puts</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>const char *</code>text, <code>const char *</code>fnt, <code>mreal</code> size)</em></dt>
-<dt><a name="index-mgl_005fputsw"></a>C function: <em><code>void</code></em> <strong>mgl_putsw</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>const wchar_t *</code>text, <code>const char *</code>fnt, <code>mreal</code> size)</em></dt>
-<dd><p>Draws the string <var>text</var> at position <var>p</var> with fonts specifying by the criteria <var>fnt</var>. The size of font is set by <var>size</var> parameter (default is <code>-1</code>).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-text-2"></a>MGL command: <em></em> <strong>text</strong> <em><code>x y dx dy</code> 'text' ['fnt'=':L' <code>size=-1</code>]</em></dt>
-<dt><a name="index-text-3"></a>MGL command: <em></em> <strong>text</strong> <em><code>x y z dx dy dz</code> 'text' ['fnt'=':L' <code>size=-1</code>]</em></dt>
-<dt><a name="index-Puts-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Puts</strong> <em>(<code>mglPoint</code> p, <code>mglPoint</code> d, <code>const char *</code>text, <code>const char *</code>fnt=<code>":L"</code>, <code>mreal</code> size=<code>-1</code>)</em></dt>
-<dt><a name="index-Putsw-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Putsw</strong> <em>(<code>mglPoint</code> p, <code>mglPoint</code> d, <code>const wchar_t *</code>text, <code>const char *</code>fnt=<code>":L"</code>, <code>mreal</code> size=<code>-1</code>)</em></dt>
-<dt><a name="index-mgl_005fputs_005fdir"></a>C function: <em><code>void</code></em> <strong>mgl_puts_dir</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>mreal</code> dx, <code>mreal</code> dy, <code>mreal</code> dz, <code>const char *</code>text, <code>const char *</code>fnt, <code>mreal</code> size)</em></dt>
-<dt><a name="index-mgl_005fputsw_005fdir"></a>C function: <em><code>void</code></em> <strong>mgl_putsw_dir</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>mreal</code> dx, <code>mreal</code> dy, <code>mreal</code> dz, <code>const wchar_t *</code>text, <code>const char *</code>fnt, <code>mreal</code> size)</em></dt>
-<dd><p>Draws the string <var>text</var> at position <var>p</var> along direction <var>d</var> with specified <var>size</var>. Parameter <var>fnt</var> set text style and text position: under (‘<samp>T</samp>’) or above (‘<samp>t</samp>’) the line.
-</p></dd></dl>
-
-<a name="fgets"></a><dl>
-<dt><a name="index-fgets-1"></a>MGL command: <em></em> <strong>fgets</strong> <em><code>x y</code> 'fname' [<code>n=0</code> 'fnt'='' <code>size=-1.4</code>]</em></dt>
-<dt><a name="index-fgets-2"></a>MGL command: <em></em> <strong>fgets</strong> <em><code>x y z</code> 'fname' [<code>n=0</code> 'fnt'='' <code>size=-1.4</code>]</em></dt>
-<dd><p>Draws unrotated <var>n</var>-th line of file <var>fname</var> at position {<var>x</var>,<var>y</var>,<var>z</var>} with specified <var>size</var>. By default parameters from <a href="#font">font</a> command are used.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-text-4"></a>MGL command: <em></em> <strong>text</strong> <em>ydat 'text' ['fnt'='']</em></dt>
-<dt><a name="index-text-5"></a>MGL command: <em></em> <strong>text</strong> <em>xdat ydat 'text' ['fnt'='']</em></dt>
-<dt><a name="index-text-6"></a>MGL command: <em></em> <strong>text</strong> <em>xdat ydat zdat 'text' ['fnt'='']</em></dt>
-<dt><a name="index-Text-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Text</strong> <em>(<code>const mglDataA &</code>y, <code>const char *</code>text, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Text-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Text</strong> <em>(<code>const mglDataA &</code>y, <code>const wchar_t *</code>text, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Text-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Text</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>text, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Text-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Text</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const wchar_t *</code>text, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Text-5"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Text</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>text, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Text-6"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Text</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const wchar_t *</code>text, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftext_005fy"></a>C function: <em><code>void</code></em> <strong>mgl_text_y</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const char *</code>text, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftextw_005fy"></a>C function: <em><code>void</code></em> <strong>mgl_textw_y</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const wchar_t *</code>text, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftext_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_text_xy</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>text, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftextw_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_textw_xy</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y, <code>const wchar_t *</code>text, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftext_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_text_xyz</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>text, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftextw_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_textw_xyz</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const wchar_t *</code>text, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws <var>text</var> along the curve between points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]} by font style <var>fnt</var>. The string <var>fnt</var> may contain symbols ‘<samp>t</samp>’ for printing the text under the curve (default), or ‘<samp>T</samp>’ for printing the text under the curve. The sizes of 1st dimension must be equal for all arrays <code>x.nx=y.nx=z.nx</code>. If array <var>x</var> is not specified then its an automatic array is used with values equidistantly distributed in x-axis range (see <a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a>). If array <var>z</var> is not specified then <var>z</var>[i] equal to minimal z-axis value is used. String <var>opt</var> contain command options (see <a href="#Command-options">Command options</a>).
-</p></dd></dl>
-
-
-<hr>
-<a name="Axis-and-Colorbar"></a>
-<div class="header">
-<p>
-Next: <a href="#Legend" accesskey="n" rel="next">Legend</a>, Previous: <a href="#Text-printing" accesskey="p" rel="prev">Text printing</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Axis-and-Colorbar-1"></a>
-<h3 class="section">4.9 Axis and Colorbar</h3>
-
-<a name="index-Axis-1"></a>
-<a name="index-Box"></a>
-<a name="index-Grid"></a>
-<a name="index-Colorbar"></a>
-<a name="index-Label-1"></a>
-
-<p>These functions draw the “things for measuring”, like axis with ticks, colorbar with ticks, grid along axis, bounding box and labels for axis. For more information see <a href="#Axis-settings">Axis settings</a>.
-</p>
-<a name="axis"></a><dl>
-<dt><a name="index-axis-2"></a>MGL command: <em></em> <strong>axis</strong> <em>['dir'='xyz' 'stl'='']</em></dt>
-<dt><a name="index-Axis-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Axis</strong> <em>(<code>const char *</code>dir=<code>"xyz"</code>, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005faxis"></a>C function: <em><code>void</code></em> <strong>mgl_axis</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>dir, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dd><p>Draws axes with ticks (see <a href="#Axis-settings">Axis settings</a>). Parameter <var>dir</var> may contain:
-</p><ul>
-<li> ‘<samp>xyz</samp>’ for drawing axis in corresponding direction;
-</li><li> ‘<samp>XYZ</samp>’ for drawing axis in corresponding direction but with inverted positions of labels;
-</li><li> ‘<samp>~</samp>’ or ‘<samp>_</samp>’ for disabling tick labels;
-</li><li> ‘<samp>U</samp>’ for disabling rotation of tick labels;
-</li><li> ‘<samp>^</samp>’ for inverting default axis origin;
-</li><li> ‘<samp>!</samp>’ for disabling ticks tuning (see <a href="#tuneticks">tuneticks</a>);
-</li><li> ‘<samp>AKDTVISO</samp>’ for drawing arrow at the end of axis;
-</li><li> ‘<samp>a</samp>’ for forced adjusting of axis ticks;
-</li><li> ‘<samp>:</samp>’ for drawing lines through point (0,0,0);
-</li><li> ‘<samp>f</samp>’ for printing ticks labels in fixed format;
-</li><li> ‘<samp>E</samp>’ for using ‘<samp>E</samp>’ instead of ‘<samp>e</samp>’ in ticks labels;
-</li><li> ‘<samp>F</samp>’ for printing ticks labels in LaTeX format;
-</li><li> ‘<samp>+</samp>’ for printing ‘<samp>+</samp>’ for positive ticks;
-</li><li> ‘<samp>-</samp>’ for printing usual ‘<samp>-</samp>’ in ticks labels;
-</li><li> ‘<samp>0123456789</samp>’ for precision at printing ticks labels.
-</li></ul>
-<p>Styles of ticks and axis can be overrided by using <var>stl</var> string. Option <code>value</code> set the manual rotation angle for the ticks. See <a href="#Axis-and-ticks">Axis and ticks</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="colorbar"></a><dl>
-<dt><a name="index-colorbar"></a>MGL command: <em></em> <strong>colorbar</strong> <em>['sch'='']</em></dt>
-<dt><a name="index-Colorbar-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Colorbar</strong> <em>(<code>const char *</code>sch=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcolorbar"></a>C function: <em><code>void</code></em> <strong>mgl_colorbar</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>sch)</em></dt>
-<dd><p>Draws colorbar. Parameter <var>sch</var> may contain:
-</p><ul>
-<li> color scheme (see <a href="#Color-scheme">Color scheme</a>);
-</li><li> ‘<samp><>^_</samp>’ for positioning at left, at right, at top or at bottom correspondingly;
-</li><li> ‘<samp>I</samp>’ for positioning near bounding (by default, is positioned at edges of subplot);
-</li><li> ‘<samp>A</samp>’ for using absolute coordinates;
-</li><li> ‘<samp>~</samp>’ for disabling tick labels.
-</li><li> ‘<samp>!</samp>’ for disabling ticks tuning (see <a href="#tuneticks">tuneticks</a>);
-</li><li> ‘<samp>f</samp>’ for printing ticks labels in fixed format;
-</li><li> ‘<samp>E</samp>’ for using ‘<samp>E</samp>’ instead of ‘<samp>e</samp>’ in ticks labels;
-</li><li> ‘<samp>F</samp>’ for printing ticks labels in LaTeX format;
-</li><li> ‘<samp>+</samp>’ for printing ‘<samp>+</samp>’ for positive ticks;
-</li><li> ‘<samp>-</samp>’ for printing usual ‘<samp>-</samp>’ in ticks labels;
-</li><li> ‘<samp>0123456789</samp>’ for precision at printing ticks labels.
-</li></ul>
-<p>See <a href="#Colorbars">Colorbars</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-colorbar-1"></a>MGL command: <em></em> <strong>colorbar</strong> <em>vdat ['sch'='']</em></dt>
-<dt><a name="index-Colorbar-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Colorbar</strong> <em>(<code>const mglDataA &</code>v, <code>const char *</code>sch=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcolorbar_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_colorbar_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>const char *</code>sch)</em></dt>
-<dd><p>The same as previous but with sharp colors <var>sch</var> (current palette if <code>sch=""</code>) for values <var>v</var>. See <a href="#contd-sample">contd sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-colorbar-2"></a>MGL command: <em></em> <strong>colorbar</strong> <em>'sch' <code>x y [w=1 h=1]</code></em></dt>
-<dt><a name="index-Colorbar-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Colorbar</strong> <em>(<code>const char *</code>sch, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> w=<code>1</code>, <code>mreal</code> h=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fcolorbar_005fext"></a>C function: <em><code>void</code></em> <strong>mgl_colorbar_ext</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>sch, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> w, <code>mreal</code> h)</em></dt>
-<dd><p>The same as first one but at arbitrary position of subplot {<var>x</var>, <var>y</var>} (supposed to be in range [0,1]). Parameters <var>w</var>, <var>h</var> set the relative width and height of the colorbar.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-colorbar-3"></a>MGL command: <em></em> <strong>colorbar</strong> <em>vdat 'sch' <code>x y [w=1 h=1]</code></em></dt>
-<dt><a name="index-Colorbar-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Colorbar</strong> <em>(<code>const mglDataA &</code>v, <code>const char *</code>sch, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> w=<code>1</code>, <code>mreal</code> h=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fcolorbar_005fval_005fext"></a>C function: <em><code>void</code></em> <strong>mgl_colorbar_val_ext</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>const char *</code>sch, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> w, <code>mreal</code> h)</em></dt>
-<dd><p>The same as previous but with sharp colors <var>sch</var> (current palette if <code>sch=""</code>) for values <var>v</var>. See <a href="#contd-sample">contd sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="grid"></a><dl>
-<dt><a name="index-grid"></a>MGL command: <em></em> <strong>grid</strong> <em>['dir'='xyz' 'pen'='B']</em></dt>
-<dt><a name="index-Grid-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Grid</strong> <em>(<code>const char *</code>dir=<code>"xyz"</code>, <code>const char *</code>pen=<code>"B"</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005faxis_005fgrid"></a>C function: <em><code>void</code></em> <strong>mgl_axis_grid</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>dir, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Draws grid lines perpendicular to direction determined by string parameter <var>dir</var>. If <var>dir</var> contain ‘<samp>!</samp>’ then grid lines will be drawn at coordinates of subticks also. The step of grid lines is the same as tick step for <a href="#axis">axis</a>. The style of lines is determined by <var>pen</var> parameter (default value is dark blue solid line ‘<samp>B-</samp>’).
-</p></dd></dl>
-
-<a name="box"></a><dl>
-<dt><a name="index-box"></a>MGL command: <em></em> <strong>box</strong> <em>['stl'='k' <code>ticks=on</code>]</em></dt>
-<dt><a name="index-Box-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Box</strong> <em>(<code>const char *</code>col=<code>""</code>, <code>bool</code> ticks=<code>true</code>)</em></dt>
-<dt><a name="index-mgl_005fbox"></a>C function: <em><code>void</code></em> <strong>mgl_box</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dt><a name="index-mgl_005fbox_005fstr"></a>C function: <em><code>void</code></em> <strong>mgl_box_str</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>col, <code>int</code> ticks)</em></dt>
-<dd><p>Draws bounding box outside the plotting volume with color <var>col</var>. If <var>col</var> contain ‘<samp>@</samp>’ then filled faces are drawn. At this first color is used for faces (default is light yellow), last one for edges. See <a href="#Bounding-box">Bounding box</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="xlabel"></a><a name="ylabel"></a><a name="zlabel"></a><a name="tlabel"></a><a name="clabel"></a><dl>
-<dt><a name="index-xlabel"></a>MGL command: <em></em> <strong>xlabel</strong> <em>'text' [<code>pos=1</code>]</em></dt>
-<dt><a name="index-ylabel"></a>MGL command: <em></em> <strong>ylabel</strong> <em>'text' [<code>pos=1</code>]</em></dt>
-<dt><a name="index-zlabel"></a>MGL command: <em></em> <strong>zlabel</strong> <em>'text' [<code>pos=1</code>]</em></dt>
-<dt><a name="index-tlabel"></a>MGL command: <em></em> <strong>tlabel</strong> <em>'text' [<code>pos=1</code>]</em></dt>
-<dt><a name="index-clabel"></a>MGL command: <em></em> <strong>clabel</strong> <em>'text' [<code>pos=1</code>]</em></dt>
-<dt><a name="index-Label-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Label</strong> <em>(<code>char</code> dir, <code>const char *</code>text, <code>mreal</code> pos=<code>1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Label-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Label</strong> <em>(<code>char</code> dir, <code>const wchar_t *</code>text, <code>mreal</code> pos=<code>1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005flabel"></a>C function: <em><code>void</code></em> <strong>mgl_label</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>const char *</code>text, <code>mreal</code> pos, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005flabelw"></a>C function: <em><code>void</code></em> <strong>mgl_labelw</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>const wchar_t *</code>text, <code>mreal</code> pos, <code>const char *</code>opt)</em></dt>
-<dd><p>Prints the label <var>text</var> for axis <var>dir</var>=‘<samp>x</samp>’,‘<samp>y</samp>’,‘<samp>z</samp>’,‘<samp>t</samp>’,‘<samp>c</samp>’, where ‘<samp>t</samp>’ is “ternary” axis <em>t=1-x-y</em>; ‘<samp>c</samp>’ is color axis (should be called after <a href="#colorbar">colorbar</a>). The position of label is determined by <var>pos</var> parameter. If <var>pos</var>=0 then label is printed at the center of axis. If <var>pos</var>>0 then label is printed at the maximum of axis. If <var>pos</var><0 then label is printed at the minimum of axis. Option <code>value</code> set additional shifting of the label. See <a href="#Text-printing">Text printing</a>.
-</p></dd></dl>
-
-
-<hr>
-<a name="Legend"></a>
-<div class="header">
-<p>
-Next: <a href="#g_t1D-plotting" accesskey="n" rel="next">1D plotting</a>, Previous: <a href="#Axis-and-Colorbar" accesskey="p" rel="prev">Axis and Colorbar</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Legend-1"></a>
-<h3 class="section">4.10 Legend</h3>
-
-<a name="index-Legend"></a>
-<a name="index-AddLegend"></a>
-<a name="index-ClearLegend"></a>
-<a name="index-SetLegendBox"></a>
-<a name="index-SetLegendMarks"></a>
-
-<p>These functions draw legend to the graph (useful for <a href="#g_t1D-plotting">1D plotting</a>). Legend entry is a pair of strings: one for style of the line, another one with description text (with included TeX parsing). The arrays of strings may be used directly or by accumulating first to the internal arrays (by function <a href="#addlegend">addlegend</a>) and further plotting it. The position of the legend can be selected automatic or manually (even out of bounding box). Parameters <var>fnt</var> and <var>size</var> specify the font style and size (see <a href="#Font-settings">Font settings</a>). Option <code>value</code> set the relative width of the line sample and the text indent. If line style string for entry is empty then the corresponding text is printed without indent. Parameter <var>fnt</var> may contain:
-</p><ul>
-<li> font style for legend text;
-</li><li> ‘<samp>A</samp>’ for positioning in absolute coordinates;
-</li><li> ‘<samp>^</samp>’ for positioning outside of specified point;
-</li><li> ‘<samp>#</samp>’ for drawing box around legend;
-</li><li> ‘<samp>-</samp>’ for arranging legend entries horizontally;
-</li><li> colors for face (1st one), for border (2nd one) and for text (last one). If less than 3 colors are specified then the color for border is black (for 2 and less colors), and the color for face is white (for 1 or none colors).
-</li></ul>
-<p>See <a href="#Legend-sample">Legend sample</a>, for sample code and picture.
-</p>
-<a name="legend"></a><dl>
-<dt><a name="index-legend-2"></a>MGL command: <em></em> <strong>legend</strong> <em>[<code>pos=3</code> 'fnt'='#']</em></dt>
-<dt><a name="index-Legend-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Legend</strong> <em>(<code>int</code> pos=<code>0x3</code>, <code>const char *</code>fnt=<code>"#"</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005flegend"></a>C function: <em><code>void</code></em> <strong>mgl_legend</strong> <em>(<code>HMGL</code> gr, <code>int</code> pos, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dd><p>Draws legend of accumulated legend entries by font <var>fnt</var> with <var>size</var>. Parameter <var>pos</var> sets the position of the legend: ‘<samp>0</samp>’ is bottom left corner, ‘<samp>1</samp>’ is bottom right corner, ‘<samp>2</samp>’ is top left corner, ‘<samp>3</samp>’ is top right corner (is default). Option <code>value</code> set the space between line samples and text (default is 0.1).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-legend-3"></a>MGL command: <em></em> <strong>legend</strong> <em><code>x y</code> ['fnt'='#']</em></dt>
-<dt><a name="index-Legend-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Legend</strong> <em>(<code>mreal</code> x, <code>mreal</code> y, <code>const char *</code>fnt=<code>"#"</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005flegend_005fpos"></a>C function: <em><code>void</code></em> <strong>mgl_legend_pos</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dd><p>Draws legend of accumulated legend entries by font <var>fnt</var> with <var>size</var>. Position of legend is determined by parameter <var>x</var>, <var>y</var> which supposed to be normalized to interval [0,1]. Option <code>value</code> set the space between line samples and text (default is 0.1).
-</p></dd></dl>
-
-<a name="addlegend"></a><dl>
-<dt><a name="index-addlegend"></a>MGL command: <em></em> <strong>addlegend</strong> <em>'text' 'stl'</em></dt>
-<dt><a name="index-AddLegend-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>AddLegend</strong> <em>(<code>const char *</code>text, <code>const char *</code>style)</em></dt>
-<dt><a name="index-AddLegend-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>AddLegend</strong> <em>(<code>const wchar_t *</code>text, <code>const char *</code>style)</em></dt>
-<dt><a name="index-mgl_005fadd_005flegend"></a>C function: <em><code>void</code></em> <strong>mgl_add_legend</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>text, <code>const char *</code>style)</em></dt>
-<dt><a name="index-mgl_005fadd_005flegendw"></a>C function: <em><code>void</code></em> <strong>mgl_add_legendw</strong> <em>(<code>HMGL</code> gr, <code>const wchar_t *</code>text, <code>const char *</code>style)</em></dt>
-<dd><p>Adds string <var>text</var> to internal legend accumulator. The style of described line and mark is specified in string <var>style</var> (see <a href="#Line-styles">Line styles</a>).
-</p></dd></dl>
-
-<a name="clearlegend"></a><dl>
-<dt><a name="index-clearlegend"></a>MGL command: <em></em> <strong>clearlegend</strong></dt>
-<dt><a name="index-ClearLegend-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ClearLegend</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fclear_005flegend"></a>C function: <em><code>void</code></em> <strong>mgl_clear_legend</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Clears saved legend strings.
-</p></dd></dl>
-
-<a name="legendmarks"></a><dl>
-<dt><a name="index-legendmarks"></a>MGL command: <em></em> <strong>legendmarks</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetLegendMarks-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SetLegendMarks</strong> <em>(<code>int</code> num)</em></dt>
-<dt><a name="index-mgl_005fset_005flegend_005fmarks"></a>C function: <em><code>void</code></em> <strong>mgl_set_legend_marks</strong> <em>(<code>HMGL</code> gr, <code>int</code> num)</em></dt>
-<dd><p>Set the number of marks in the legend. By default 1 mark is used.
-</p></dd></dl>
-
-
-<hr>
-<a name="g_t1D-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#g_t2D-plotting" accesskey="n" rel="next">2D plotting</a>, Previous: <a href="#Legend" accesskey="p" rel="prev">Legend</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="g_t1D-plotting-1"></a>
-<h3 class="section">4.11 1D plotting</h3>
-
-<a name="index-Plot"></a>
-<a name="index-Radar"></a>
-<a name="index-Tens"></a>
-<a name="index-Area"></a>
-<a name="index-Region"></a>
-<a name="index-Stem"></a>
-<a name="index-Bars"></a>
-<a name="index-Barh"></a>
-<a name="index-Chart"></a>
-<a name="index-Step"></a>
-<a name="index-Torus"></a>
-<a name="index-Tube"></a>
-<a name="index-Mark-1"></a>
-<a name="index-TextMark"></a>
-<a name="index-Error-1"></a>
-<a name="index-BoxPlot"></a>
-<a name="index-Candle"></a>
-<a name="index-Tape"></a>
-<a name="index-Label-2"></a>
-<a name="index-Cones"></a>
-
-<p>These functions perform plotting of 1D data. 1D means that data depended from only 1 parameter like parametric curve {x[i],y[i],z[i]}, i=1...n. By default (if absent) values of <var>x</var>[i] are equidistantly distributed in axis range, and <var>z</var>[i] equal to minimal z-axis value. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension <strong>must be equal</strong> for all arrays <code>x.nx=y.nx=z.nx</code>.
-</p>
-<p>String <var>pen</var> specifies the color and style of line and marks (see <a href="#Line-styles">Line styles</a>). By default (<code>pen=""</code>) solid line with color from palette is used (see <a href="#Palette-and-colors">Palette and colors</a>). Symbol ‘<samp>!</samp>’ set to use new color from palette for each point (not for each curve, as default). String <var>opt</var> contain command options (see <a href="#Command-options">Command options</a>).
-</p>
-<a name="plot"></a><dl>
-<dt><a name="index-plot"></a>MGL command: <em></em> <strong>plot</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-plot-1"></a>MGL command: <em></em> <strong>plot</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-plot-2"></a>MGL command: <em></em> <strong>plot</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dt><a name="index-Plot-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Plot</strong> <em>(<code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Plot-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Plot</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Plot-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Plot</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fplot"></a>C function: <em><code>void</code></em> <strong>mgl_plot</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fplot_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_plot_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fplot_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_plot_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw continuous lines between points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. If <var>pen</var> contain ‘<samp>a</samp>’ then segments between points outside of axis range are drawn too. If <var>pen</var> contain ‘<samp>~</samp>’ then number of segments is reduce for quasi-straight curves. See also <a href="#area">area</a>, <a href="#step">step</a>, <a href="#stem">stem</a>, <a href="#tube">tube</a>, <a href="#mark">mark</a>, <a href="#error">error</a>, <a href="#belt">belt</a>, <a href="#tens">tens</a>, <a href="#tape">tape</a>, <a href="#meshnum">meshnum</a>. See <a href="#plot-sample">plot sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="radar"></a><dl>
-<dt><a name="index-radar"></a>MGL command: <em></em> <strong>radar</strong> <em>adat ['stl'='']</em></dt>
-<dt><a name="index-Radar-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Radar</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fradar"></a>C function: <em><code>void</code></em> <strong>mgl_radar</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>This functions draws radar chart which is continuous lines between points located on an radial lines (like plot in Polar coordinates). Option <code>value</code> set the additional shift of data (i.e. the data <var>a</var>+<code>value</code> is used instead of <var>a</var>). If <code>value<0</code> then <code>r=max(0, -min(value)</code>. If <var>pen</var> containt ‘<samp>#</samp>’ symbol then "grid" (radial lines and circle for <var>r</var>) is drawn. If <var>pen</var> contain ‘<samp>a</samp>’ then segments between points outside of axis range are drawn too. See also <a href="#plot">plot</a>, <a href="#meshnum">meshnum</a>. See <a href="#radar-sample">radar sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="step"></a><dl>
-<dt><a name="index-step"></a>MGL command: <em></em> <strong>step</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-step-1"></a>MGL command: <em></em> <strong>step</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-step-2"></a>MGL command: <em></em> <strong>step</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dt><a name="index-Step-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Step</strong> <em>(<code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Step-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Step</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Step-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Step</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fstep"></a>C function: <em><code>void</code></em> <strong>mgl_step</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fstep_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_step_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fstep_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_step_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw continuous stairs for points to axis plane. If <var>x</var>.nx><var>y</var>.nx then <var>x</var> set the edges of bars, rather than its central positions. See also <a href="#plot">plot</a>, <a href="#stem">stem</a>, <a href="#tile">tile</a>, <a href="#boxs">boxs</a>, <a href="#meshnum">meshnum</a>. See <a href="#step-sample">step sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="tens"></a><dl>
-<dt><a name="index-tens"></a>MGL command: <em></em> <strong>tens</strong> <em>ydat cdat ['stl'='']</em></dt>
-<dt><a name="index-tens-1"></a>MGL command: <em></em> <strong>tens</strong> <em>xdat ydat cdat ['stl'='']</em></dt>
-<dt><a name="index-tens-2"></a>MGL command: <em></em> <strong>tens</strong> <em>xdat ydat zdat cdat ['stl'='']</em></dt>
-<dt><a name="index-Tens-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Tens</strong> <em>(<code>const mglDataA &</code>y, <code>const mglDataA &</code>c, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tens-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Tens</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>c, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tens-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Tens</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftens"></a>C function: <em><code>void</code></em> <strong>mgl_tens</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>HCDT</code> c, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftens_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_tens_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> c, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftens_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_tens_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw continuous lines between points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]} with color defined by the special array <var>c</var>[i] (look like tension plot). String <var>pen</var> specifies the color scheme (see <a href="#Color-scheme">Color scheme</a>) and style and/or width of line (see <a href="#Line-styles">Line styles</a>). If <var>pen</var> contain ‘<samp>a</samp>’ then segments between points outside of axis range are drawn too. If <var>pen</var> contain ‘<samp>~</samp>’ then number of segments is reduce for quasi-straight curves. See also <a href="#plot">plot</a>, <a href="#mesh">mesh</a>, <a href="#fall">fall</a>, <a href="#meshnum">meshnum</a>. See <a href="#tens-sample">tens sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="tape"></a><dl>
-<dt><a name="index-tape"></a>MGL command: <em></em> <strong>tape</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-tape-1"></a>MGL command: <em></em> <strong>tape</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-tape-2"></a>MGL command: <em></em> <strong>tape</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dt><a name="index-Tape-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Tape</strong> <em>(<code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tape-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Tape</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tape-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Tape</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftape"></a>C function: <em><code>void</code></em> <strong>mgl_tape</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftape_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_tape_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftape_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_tape_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw tapes of normals for curve between points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Initial tape(s) was selected in x-y plane (for ‘<samp>x</samp>’ in <var>pen</var>) and/or y-z plane (for ‘<samp>x</samp>’ in <var>pen</var>). The width of tape is proportional to <a href="#barwidth">barwidth</a> and can be changed by option <code>value</code>. See also <a href="#plot">plot</a>, <a href="#flow">flow</a>, <a href="#barwidth">barwidth</a>. See <a href="#tape-sample">tape sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="area"></a><dl>
-<dt><a name="index-area"></a>MGL command: <em></em> <strong>area</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-area-1"></a>MGL command: <em></em> <strong>area</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-area-2"></a>MGL command: <em></em> <strong>area</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dt><a name="index-Area-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Area</strong> <em>(<code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Area-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Area</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Area-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Area</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005farea"></a>C function: <em><code>void</code></em> <strong>mgl_area</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005farea_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_area_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005farea_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_area_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw continuous lines between points and fills it to axis plane. Also you can use gradient filling if number of specified colors is equal to 2*number of curves. If <var>pen</var> contain ‘<samp>#</samp>’ then wired plot is drawn. If <var>pen</var> contain ‘<samp>a</samp>’ then segments between points outside of axis range are drawn too. See also <a href="#plot">plot</a>, <a href="#bars">bars</a>, <a href="#stem">stem</a>, <a href="#region">region</a>. See <a href="#area-sample">area sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="region"></a><dl>
-<dt><a name="index-region"></a>MGL command: <em></em> <strong>region</strong> <em>ydat1 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-region-1"></a>MGL command: <em></em> <strong>region</strong> <em>xdat ydat1 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-region-2"></a>MGL command: <em></em> <strong>region</strong> <em>xdat1 ydat1 xdat2 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-region-3"></a>MGL command: <em></em> <strong>region</strong> <em>xdat1 ydat1 zdat1 xdat2 ydat2 zdat2 ['stl'='']</em></dt>
-<dt><a name="index-Region-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Region</strong> <em>(<code>const mglDataA &</code>y1, <code>const mglDataA &</code>y2, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Region-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Region</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y1, <code>const mglDataA &</code>y2, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Region-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Region</strong> <em>(<code>const mglDataA &</code>x1, <code>const mglDataA &</code>y1, <code>const mglDataA &</code>x2, <code>const mglDataA &</code>y2, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Region-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Region</strong> <em>(<code>const mglDataA &</code>x1, <code>const mglDataA &</code>y1, <code>const mglDataA &</code>z1, <code>const mglDataA &</code>x2, <code>const mglDataA &</code>y2, <code>const mglDataA &</code>z2, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fregion"></a>C function: <em><code>void</code></em> <strong>mgl_region</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y1, <code>HCDT</code> y2, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fregion_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_region_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y1, <code>HCDT</code> y2, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fregion_005f3d"></a>C function: <em><code>void</code></em> <strong>mgl_region_3d</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x1, <code>HCDT</code> y1, <code>HCDT</code> z1, <code>HCDT</code> x2, <code>HCDT</code> y2, <code>HCDT</code> z2, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions fill area between 2 curves. Dimensions of arrays <var>y1</var> and <var>y2</var> must be equal. Also you can use gradient filling if number of specified colors is equal to 2*number of curves. If for 2D version <var>pen</var> contain symbol ‘<samp>i</samp>’ then only area with y1<y<y2 will be filled else the area with y2<y<y1 will be filled too. If <var>pen</var> contain ‘<samp>#</samp>’ then wired plot is drawn. If <var>pen</var> contain ‘<samp>a</samp>’ then segments between points outside of axis range are drawn too. See also <a href="#area">area</a>, <a href="#bars">bars</a>, <a href="#stem">stem</a>. See <a href="#region-sample">region sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="stem"></a><dl>
-<dt><a name="index-stem"></a>MGL command: <em></em> <strong>stem</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-stem-1"></a>MGL command: <em></em> <strong>stem</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-stem-2"></a>MGL command: <em></em> <strong>stem</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dt><a name="index-Stem-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Stem</strong> <em>(<code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Stem-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Stem</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Stem-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Stem</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fstem"></a>C function: <em><code>void</code></em> <strong>mgl_stem</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fstem_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_stem_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fstem_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_stem_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw vertical lines from points to axis plane. See also <a href="#area">area</a>, <a href="#bars">bars</a>, <a href="#plot">plot</a>, <a href="#mark">mark</a>. See <a href="#stem-sample">stem sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="bars"></a><dl>
-<dt><a name="index-bars"></a>MGL command: <em></em> <strong>bars</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-bars-1"></a>MGL command: <em></em> <strong>bars</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-bars-2"></a>MGL command: <em></em> <strong>bars</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dt><a name="index-Bars-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Bars</strong> <em>(<code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Bars-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Bars</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Bars-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Bars</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fbars"></a>C function: <em><code>void</code></em> <strong>mgl_bars</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fbars_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_bars_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fbars_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_bars_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw vertical bars from points to axis plane. Parameter <var>pen</var> can contain:
-</p><ul>
-<li> ‘<samp>a</samp>’ for drawing lines one above another (like summation);
-</li><li> ‘<samp>f</samp>’ for drawing waterfall chart, which show the cumulative effect of sequential positive or negative values;
-</li><li> ‘<samp>F</samp>’ for using fixed (minimal) width for all bars;
-</li><li> ‘<samp><</samp>’, ‘<samp>^</samp>’ or ‘<samp>></samp>’ for aligning boxes left, right or centering them at its x-coordinates.
-</li></ul>
-<p>You can give different colors for positive and negative values if number of specified colors is equal to 2*number of curves. If <var>x</var>.nx><var>y</var>.nx then <var>x</var> set the edges of bars, rather than its central positions. See also <a href="#barh">barh</a>, <a href="#cones">cones</a>, <a href="#area">area</a>, <a href="#stem">stem</a>, <a href="#chart">chart</a>, <a href="#barwidth">barwidth</a>. See <a href="#bars-sample">bars sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="barh"></a><dl>
-<dt><a name="index-barh"></a>MGL command: <em></em> <strong>barh</strong> <em>vdat ['stl'='']</em></dt>
-<dt><a name="index-barh-1"></a>MGL command: <em></em> <strong>barh</strong> <em>ydat vdat ['stl'='']</em></dt>
-<dt><a name="index-Barh-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Barh</strong> <em>(<code>const mglDataA &</code>v, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Barh-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Barh</strong> <em>(<code>const mglDataA &</code>y, <code>const mglDataA &</code>v, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fbarh"></a>C function: <em><code>void</code></em> <strong>mgl_barh</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fbarh_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_barh_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>HCDT</code> v, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw horizontal bars from points to axis plane. Parameter <var>pen</var> can contain:
-</p><ul>
-<li> ‘<samp>a</samp>’ for drawing lines one above another (like summation);
-</li><li> ‘<samp>f</samp>’ for drawing waterfall chart, which show the cumulative effect of sequential positive or negative values;
-</li><li> ‘<samp>F</samp>’ for using fixed (minimal) width for all bars;
-</li><li> ‘<samp><</samp>’, ‘<samp>^</samp>’ or ‘<samp>></samp>’ for aligning boxes left, right or centering them at its x-coordinates.
-</li></ul>
-<p>You can give different colors for positive and negative values if number of specified colors is equal to 2*number of curves. If <var>x</var>.nx><var>y</var>.nx then <var>x</var> set the edges of bars, rather than its central positions. See also <a href="#bars">bars</a>, <a href="#barwidth">barwidth</a>. See <a href="#barh-sample">barh sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="cones"></a><dl>
-<dt><a name="index-cones"></a>MGL command: <em></em> <strong>cones</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-cones-1"></a>MGL command: <em></em> <strong>cones</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-cones-2"></a>MGL command: <em></em> <strong>cones</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dt><a name="index-Cones-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Cones</strong> <em>(<code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Cones-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Cones</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Cones-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Cones</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcones"></a>C function: <em><code>void</code></em> <strong>mgl_cones</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcones_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_cones_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcones_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_cones_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw cones from points to axis plane. If string contain symbol ‘<samp>a</samp>’ then cones are drawn one above another (like summation). You can give different colors for positive and negative values if number of specified colors is equal to 2*number of curves. Parameter <var>pen</var> can contain:
-</p><ul>
-<li> ‘<samp>@</samp>’ for drawing edges;
-</li><li> ‘<samp>#</samp>’ for wired cones;
-</li><li> ‘<samp>t</samp>’ for drawing tubes/cylinders instead of cones/prisms;
-</li><li> ‘<samp>4</samp>’, ‘<samp>6</samp>’, ‘<samp>8</samp>’ for drawing square, hex- or octo-prism instead of cones;
-</li><li> ‘<samp><</samp>’, ‘<samp>^</samp>’ or ‘<samp>></samp>’ for aligning boxes left, right or centering them at its x-coordinates.
-</li></ul>
-<p>See also <a href="#bars">bars</a>, <a href="#cone">cone</a>, <a href="#barwidth">barwidth</a>. See <a href="#cones-sample">cones sample</a>, for sample code and picture.
-</p></dd></dl>
-
-
-
-<a name="chart"></a><dl>
-<dt><a name="index-chart"></a>MGL command: <em></em> <strong>chart</strong> <em>adat ['col'='']</em></dt>
-<dt><a name="index-Chart-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Chart</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>col=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fchart"></a>C function: <em><code>void</code></em> <strong>mgl_chart</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>col, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws colored stripes (boxes) for data in array <var>a</var>. The number of stripes is equal to the number of rows in <var>a</var> (equal to <var>a.ny</var>). The color of each next stripe is cyclically changed from colors specified in string <var>col</var> or in palette Pal (see <a href="#Palette-and-colors">Palette and colors</a>). Spaces in colors denote transparent “color” (i.e. corresponding stripe(s) are not drawn). The stripe width is proportional to value of element in <var>a</var>. Chart is plotted only for data with non-negative elements. If string <var>col</var> have symbol ‘<samp>#</samp>’ then black border lines are drawn. The most nice form the chart have in 3d (after rotation of coordinates) or in cylindrical coordinates (becomes so called Pie chart). See <a href="#chart-sample">chart sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="boxplot"></a><dl>
-<dt><a name="index-boxplot"></a>MGL command: <em></em> <strong>boxplot</strong> <em>adat ['stl'='']</em></dt>
-<dt><a name="index-boxplot-1"></a>MGL command: <em></em> <strong>boxplot</strong> <em>xdat adat ['stl'='']</em></dt>
-<dt><a name="index-BoxPlot-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>BoxPlot</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-BoxPlot-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>BoxPlot</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>a, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fboxplot"></a>C function: <em><code>void</code></em> <strong>mgl_boxplot</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fboxplot_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_boxplot_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> a, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw boxplot (also known as a box-and-whisker diagram) at points <var>x</var>[i]. This is five-number summaries of data <var>a</var>[i,j] (minimum, lower quartile (Q1), median (Q2), upper quartile (Q3) and maximum) along second (j-th) direction. If <var>pen</var> contain ‘<samp><</samp>’, ‘<samp>^</samp>’ or ‘<samp>></samp>’ then boxes will be aligned left, right or centered at its x-coordinates. See also <a href="#plot">plot</a>, <a href="#error">error</a>, <a href="#bars">bars</a>, <a href="#barwidth">barwidth</a>. See <a href="#boxplot-sample">boxplot sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="candle"></a><dl>
-<dt><a name="index-candle"></a>MGL command: <em></em> <strong>candle</strong> <em>vdat1 ['stl'='']</em></dt>
-<dt><a name="index-candle-1"></a>MGL command: <em></em> <strong>candle</strong> <em>vdat1 vdat2 ['stl'='']</em></dt>
-<dt><a name="index-candle-2"></a>MGL command: <em></em> <strong>candle</strong> <em>vdat1 ydat1 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-candle-3"></a>MGL command: <em></em> <strong>candle</strong> <em>vdat1 vdat2 ydat1 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-candle-4"></a>MGL command: <em></em> <strong>candle</strong> <em>xdat vdat1 vdat2 ydat1 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-Candle-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Candle</strong> <em>(<code>const mglDataA &</code>v1, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Candle-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Candle</strong> <em>(<code>const mglDataA &</code>v1, <code>const mglDataA &</code>v2, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Candle-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Candle</strong> <em>(<code>const mglDataA &</code>v1, <code>const mglDataA &</code>y1, <code>const mglDataA &</code>y2, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Candle-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Candle</strong> <em>(<code>const mglDataA &</code>v1, <code>const mglDataA &</code>v2, <code>const mglDataA &</code>y1, <code>const mglDataA &</code>y2, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Candle-5"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Candle</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>v1, <code>const mglDataA &</code>v2, <code>const mglDataA &</code>y1, <code>const mglDataA &</code>y2, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcandle"></a>C function: <em><code>void</code></em> <strong>mgl_candle</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v1, <code>HCDT</code> y1, <code>HCDT</code> y2, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcandle_005fyv"></a>C function: <em><code>void</code></em> <strong>mgl_candle_yv</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v1, <code>HCDT</code> v2, <code>HCDT</code> y1, <code>HCDT</code> y2, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcandle_005fxyv"></a>C function: <em><code>void</code></em> <strong>mgl_candle_xyv</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> v1, <code>HCDT</code> v2, <code>HCDT</code> y1, <code>HCDT</code> y2, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw candlestick chart at points <var>x</var>[i]. This is a combination of a line-chart and a bar-chart, in that each bar represents the range of price movement over a given time interval. Wire (or white) candle correspond to price growth <var>v1</var>[i]<<var>v2</var>[i], opposite case – solid (or dark) candle. You can give different colors for growth and decrease values if number of specified colors is equal to 2. If <var>pen</var> contain ‘<samp>#</samp>’ then the wire candle will be used even for 2-color scheme. "Shadows" show the minimal <var>y1</var> and maximal <var>y2</var> prices. If <var>v2</var> is absent then it is determined as <var>v2</var>[i]=<var>v1</var>[i+1]. See also <a href="#plot">plot</a>, <a href="#bars">bars</a>, <a href="#ohlc">ohlc</a>, <a href="#barwidth">barwidth</a>. See <a href="#candle-sample">candle sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="ohlc"></a><dl>
-<dt><a name="index-ohlc"></a>MGL command: <em></em> <strong>ohlc</strong> <em>odat hdat ldat cdat ['stl'='']</em></dt>
-<dt><a name="index-ohlc-1"></a>MGL command: <em></em> <strong>ohlc</strong> <em>xdat odat hdat ldat cdat ['stl'='']</em></dt>
-<dt><a name="index-OHLC"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>OHLC</strong> <em>(<code>const mglDataA &</code>o, <code>const mglDataA &</code>h, <code>const mglDataA &</code>l, <code>const mglDataA &</code>c, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-OHLC-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>OHLC</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>o, <code>const mglDataA &</code>h, <code>const mglDataA &</code>l, <code>const mglDataA &</code>c, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fohlc"></a>C function: <em><code>void</code></em> <strong>mgl_ohlc</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> o, <code>HCDT</code> h, <code>HCDT</code> l, <code>HCDT</code> c, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fohlc_005fx"></a>C function: <em><code>void</code></em> <strong>mgl_ohlc_x</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> o, <code>HCDT</code> h, <code>HCDT</code> l, <code>HCDT</code> c, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw Open-High-Low-Close diagram. This diagram show vertical line for between maximal(high <var>h</var>) and minimal(low <var>l</var>) values, as well as horizontal lines before/after vertical line for initial(open <var>o</var>)/final(close <var>c</var>) values of some process (usually price). You can give different colors for up and down values (when closing values higher or not as in previous point) if number of specified colors is equal to 2*number of curves. See also <a href="#candle">candle</a>, <a href="#plot">plot</a>, <a href="#barwidth">barwidth</a>. See <a href="#ohlc-sample">ohlc sample</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="error"></a><dl>
-<dt><a name="index-error"></a>MGL command: <em></em> <strong>error</strong> <em>ydat yerr ['stl'='']</em></dt>
-<dt><a name="index-error-1"></a>MGL command: <em></em> <strong>error</strong> <em>xdat ydat yerr ['stl'='']</em></dt>
-<dt><a name="index-error-2"></a>MGL command: <em></em> <strong>error</strong> <em>xdat ydat xerr yerr ['stl'='']</em></dt>
-<dt><a name="index-Error-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Error</strong> <em>(<code>const mglDataA &</code>y, <code>const mglDataA &</code>ey, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Error-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Error</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>ey, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Error-5"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Error</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>ex, <code>const mglDataA &</code>ey, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ferror"></a>C function: <em><code>void</code></em> <strong>mgl_error</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>HCDT</code> ey, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ferror_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_error_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> ey, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ferror_005fexy"></a>C function: <em><code>void</code></em> <strong>mgl_error_exy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> ex, <code>HCDT</code> ey, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw error boxes {<var>ex</var>[i], <var>ey</var>[i]} at points {<var>x</var>[i], <var>y</var>[i]}. This can be useful, for example, in experimental points, or to show numeric error or some estimations and so on. If string <var>pen</var> contain symbol ‘<samp>@</samp>’ than large semitransparent mark is used instead of error box. See also <a href="#plot">plot</a>, <a href="#mark">mark</a>. See <a href="#error-sample">error sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="mark"></a><dl>
-<dt><a name="index-mark"></a>MGL command: <em></em> <strong>mark</strong> <em>ydat rdat ['stl'='']</em></dt>
-<dt><a name="index-mark-1"></a>MGL command: <em></em> <strong>mark</strong> <em>xdat ydat rdat ['stl'='']</em></dt>
-<dt><a name="index-mark-2"></a>MGL command: <em></em> <strong>mark</strong> <em>xdat ydat zdat rdat ['stl'='']</em></dt>
-<dt><a name="index-Mark-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Mark</strong> <em>(<code>const mglDataA &</code>y, <code>const mglDataA &</code>r, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Mark-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Mark</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>r, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Mark-5"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Mark</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>r, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fmark_005fy"></a>C function: <em><code>void</code></em> <strong>mgl_mark_y</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>HCDT</code> r, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fmark_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_mark_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> r, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fmark_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_mark_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> r, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw marks with size <var>r</var>[i]*<a href="#marksize">marksize</a> at points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. If you need to draw markers of the same size then you can use <a href="#plot">plot</a> function with empty line style ‘<samp> </samp>’. For markers with size in axis range use <a href="#error">error</a> with style ‘<samp>@</samp>’. See also <a href="#plot">plot</a>, <a href="#textmark">textmark</a>, <a href="#error">error</a>, <a href="#stem">stem</a>, <a href="#meshnum">meshnum</a>. See <a href="#mark-sample">mark sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="textmark"></a><dl>
-<dt><a name="index-textmark"></a>MGL command: <em></em> <strong>textmark</strong> <em>ydat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-textmark-1"></a>MGL command: <em></em> <strong>textmark</strong> <em>ydat rdat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-textmark-2"></a>MGL command: <em></em> <strong>textmark</strong> <em>xdat ydat rdat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-textmark-3"></a>MGL command: <em></em> <strong>textmark</strong> <em>xdat ydat zdat rdat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-TextMark-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>TextMark</strong> <em>(<code>const mglDataA &</code>y, <code>const char *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TextMark-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>TextMark</strong> <em>(<code>const mglDataA &</code>y, <code>const wchar_t *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TextMark-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>TextMark</strong> <em>(<code>const mglDataA &</code>y, <code>const mglDataA &</code>r, <code>const char *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TextMark-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>TextMark</strong> <em>(<code>const mglDataA &</code>y, <code>const mglDataA &</code>r, <code>const wchar_t *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TextMark-5"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>TextMark</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>r, <code>const char *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TextMark-6"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>TextMark</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>r, <code>const wchar_t *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TextMark-7"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>TextMark</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>r, <code>const char *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TextMark-8"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>TextMark</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>r, <code>const wchar_t *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftextmark"></a>C function: <em><code>void</code></em> <strong>mgl_textmark</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const char *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftextmarkw"></a>C function: <em><code>void</code></em> <strong>mgl_textmarkw</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const wchar_t *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftextmark_005fyr"></a>C function: <em><code>void</code></em> <strong>mgl_textmark_yr</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>HCDT</code> r, <code>const char *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftextmarkw_005fyr"></a>C function: <em><code>void</code></em> <strong>mgl_textmarkw_yr</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>HCDT</code> r, <code>const wchar_t *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftextmark_005fxyr"></a>C function: <em><code>void</code></em> <strong>mgl_textmark_xyr</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> r, <code>const char *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftextmarkw_005fxyr"></a>C function: <em><code>void</code></em> <strong>mgl_textmarkw_xyr</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> r, <code>const wchar_t *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftextmark_005fxyzr"></a>C function: <em><code>void</code></em> <strong>mgl_textmark_xyzr</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> r, <code>const char *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftextmarkw_005fxyzr"></a>C function: <em><code>void</code></em> <strong>mgl_textmarkw_xyzr</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> r, <code>const wchar_t *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw string <var>txt</var> as marks with size proportional to <var>r</var>[i]*<var>marksize</var> at points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. By default (if omitted) <var>r</var>[i]=1. See also <a href="#plot">plot</a>, <a href="#mark">mark</a>, <a href="#stem">stem</a>, <a href="#meshnum">meshnum</a>. See <a href="#textmark-sample">textmark sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="label"></a><dl>
-<dt><a name="index-label"></a>MGL command: <em></em> <strong>label</strong> <em>ydat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-label-1"></a>MGL command: <em></em> <strong>label</strong> <em>xdat ydat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-label-2"></a>MGL command: <em></em> <strong>label</strong> <em>xdat ydat zdat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-Label-5"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Label</strong> <em>(<code>const mglDataA &</code>y, <code>const char *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Label-6"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Label</strong> <em>(<code>const mglDataA &</code>y, <code>const wchar_t *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Label-7"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Label</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Label-8"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Label</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const wchar_t *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Label-9"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Label</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Label-10"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Label</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const wchar_t *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005flabel-1"></a>C function: <em><code>void</code></em> <strong>mgl_label</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const char *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005flabelw-1"></a>C function: <em><code>void</code></em> <strong>mgl_labelw</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const wchar_t *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005flabel_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_label_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005flabelw_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_labelw_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>const wchar_t *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005flabel_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_label_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005flabelw_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_labelw_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const wchar_t *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw string <var>txt</var> at points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. If string <var>txt</var> contain ‘<samp>%x</samp>’, ‘<samp>%y</samp>’, ‘<samp>%z</samp>’ or ‘<samp>%n</samp>’ then it will be replaced by the value of x-,y-,z-coordinate of the point or its index. String <var>fnt</var> may contain:
-</p><ul>
-<li> font style <a href="#Font-styles">Font styles</a>;
-</li><li> ‘<samp>f</samp>’ for fixed format of printed numbers;
-</li><li> ‘<samp>E</samp>’ for using ‘<samp>E</samp>’ instead of ‘<samp>e</samp>’;
-</li><li> ‘<samp>F</samp>’ for printing in LaTeX format;
-</li><li> ‘<samp>+</samp>’ for printing ‘<samp>+</samp>’ for positive numbers;
-</li><li> ‘<samp>-</samp>’ for printing usual ‘<samp>-</samp>’;
-</li><li> ‘<samp>0123456789</samp>’ for precision at printing numbers.
-</li></ul>
-<p>See also <a href="#plot">plot</a>, <a href="#mark">mark</a>, <a href="#textmark">textmark</a>, <a href="#table">table</a>. See <a href="#label-sample">label sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="table"></a><dl>
-<dt><a name="index-table"></a>MGL command: <em></em> <strong>table</strong> <em>vdat 'txt' ['stl'='#']</em></dt>
-<dt><a name="index-table-1"></a>MGL command: <em></em> <strong>table</strong> <em>x y vdat 'txt' ['stl'='#']</em></dt>
-<dt><a name="index-Table"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Table</strong> <em>(<code>const mglDataA &</code>val, <code>const char *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Table-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Table</strong> <em>(<code>const mglDataA &</code>val, <code>const wchar_t *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Table-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Table</strong> <em>(<code>mreal</code> x, <code>mreal</code> y, <code>const mglDataA &</code>val, <code>const char *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Table-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Table</strong> <em>(<code>mreal</code> x, <code>mreal</code> y, <code>const mglDataA &</code>val, <code>const wchar_t *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftable"></a>C function: <em><code>void</code></em> <strong>mgl_table</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>HCDT</code> val, <code>const char *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftablew"></a>C function: <em><code>void</code></em> <strong>mgl_tablew</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>HCDT</code> val, <code>const wchar_t *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw table with values of <var>val</var> and captions from string <var>txt</var> (separated by newline symbol ‘<samp>\n</samp>’) at points {<var>x</var>, <var>y</var>} (default at {0,0}) related to current subplot. String <var>fnt</var> may contain:
-</p><ul>
-<li> font style <a href="#Font-styles">Font styles</a>;
-</li><li> ‘<samp>#</samp>’ for drawing cell borders;
-</li><li> ‘<samp>|</samp>’ for limiting table widh by subplot one (equal to option ‘<samp>value 1</samp>’);
-</li><li> ‘<samp>=</samp>’ for equal width of all cells;
-</li><li> ‘<samp>f</samp>’ for fixed format of printed numbers;
-</li><li> ‘<samp>E</samp>’ for using ‘<samp>E</samp>’ instead of ‘<samp>e</samp>’;
-</li><li> ‘<samp>F</samp>’ for printing in LaTeX format;
-</li><li> ‘<samp>+</samp>’ for printing ‘<samp>+</samp>’ for positive numbers;
-</li><li> ‘<samp>-</samp>’ for printing usual ‘<samp>-</samp>’;
-</li><li> ‘<samp>0123456789</samp>’ for precision at printing numbers.
-</li></ul>
-<p>Option <code>value</code> set the width of the table (default is 1). See also <a href="#plot">plot</a>, <a href="#label">label</a>. See <a href="#table-sample">table sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="iris"></a><dl>
-<dt><a name="index-iris"></a>MGL command: <em></em> <strong>iris</strong> <em>dats 'ids' ['stl'='']</em></dt>
-<dt><a name="index-iris-1"></a>MGL command: <em></em> <strong>iris</strong> <em>dats rngs 'ids' ['stl'='']</em></dt>
-<dt><a name="index-Iris"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Iris</strong> <em>(<code>const mglDataA &</code>dats, <code>const char *</code>ids, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Iris-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Iris</strong> <em>(<code>const mglDataA &</code>dats, <code>const wchar_t *</code>ids, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Iris-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Iris</strong> <em>(<code>const mglDataA &</code>dats, <code>const mglDataA &</code>rngs, <code>const char *</code>ids, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Iris-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Iris</strong> <em>(<code>const mglDataA &</code>dats, <code>const mglDataA &</code>rngs, <code>const wchar_t *</code>ids, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005firis_005f1"></a>C function: <em><code>void</code></em> <strong>mgl_iris_1</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> dats, <code>const char *</code>ids, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005firisw_005f1"></a>C function: <em><code>void</code></em> <strong>mgl_irisw_1</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> dats, <code>const wchar_t *</code>ids, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005firis"></a>C function: <em><code>void</code></em> <strong>mgl_iris</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> dats, <code>HCDT</code> rngs, <code>const char *</code>ids, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005firisw"></a>C function: <em><code>void</code></em> <strong>mgl_irisw</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> dats, <code>HCDT</code> rngs, <code>const wchar_t *</code>ids, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dd><p>Draws Iris plots for determining cross-dependences of data arrays <var>dats</var> (see <a href="http://en.wikipedia.org/wiki/Iris_flower_data_set">http://en.wikipedia.org/wiki/Iris_flower_data_set</a>). Data <var>rngs</var> of size 2*<var>dats</var>.nx provide manual axis ranges for each column. String <var>ids</var> contain column names, separated by ‘<samp>;</samp>’ symbol. Option <code>value</code> set the text size for column names. You can add another data set to existing Iris plot by providing the same ranges <var>rngs</var> and empty column names <var>ids</var>. See also <a href="#plot">plot</a>. See <a href="#iris-sample">iris sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="tube"></a><dl>
-<dt><a name="index-tube"></a>MGL command: <em></em> <strong>tube</strong> <em>ydat rdat ['stl'='']</em></dt>
-<dt><a name="index-tube-1"></a>MGL command: <em></em> <strong>tube</strong> <em>ydat <code>rval</code> ['stl'='']</em></dt>
-<dt><a name="index-tube-2"></a>MGL command: <em></em> <strong>tube</strong> <em>xdat ydat rdat ['stl'='']</em></dt>
-<dt><a name="index-tube-3"></a>MGL command: <em></em> <strong>tube</strong> <em>xdat ydat <code>rval</code> ['stl'='']</em></dt>
-<dt><a name="index-tube-4"></a>MGL command: <em></em> <strong>tube</strong> <em>xdat ydat zdat rdat ['stl'='']</em></dt>
-<dt><a name="index-tube-5"></a>MGL command: <em></em> <strong>tube</strong> <em>xdat ydat zdat <code>rval</code> ['stl'='']</em></dt>
-<dt><a name="index-Tube-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Tube</strong> <em>(<code>const mglDataA &</code>y, <code>const mglDataA &</code>r, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tube-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Tube</strong> <em>(<code>const mglDataA &</code>y, <code>mreal</code> r, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tube-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Tube</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>r, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tube-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Tube</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>mreal</code> r, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tube-5"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Tube</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>r, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tube-6"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Tube</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>mreal</code> r, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftube_005fr"></a>C function: <em><code>void</code></em> <strong>mgl_tube_r</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>HCDT</code> r, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftube"></a>C function: <em><code>void</code></em> <strong>mgl_tube</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>mreal</code> r, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftube_005fxyr"></a>C function: <em><code>void</code></em> <strong>mgl_tube_xyr</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> r, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftube_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_tube_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>mreal</code> r, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftube_005fxyzr"></a>C function: <em><code>void</code></em> <strong>mgl_tube_xyzr</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> r, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftube_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_tube_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>mreal</code> r, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw the tube with variable radius <var>r</var>[i] along the curve between points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Option <code>value</code> set the number of segments at cross-section (default is 25). See also <a href="#plot">plot</a>. See <a href="#tube-sample">tube sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="torus"></a><dl>
-<dt><a name="index-torus"></a>MGL command: <em></em> <strong>torus</strong> <em>rdat zdat ['stl'='']</em></dt>
-<dt><a name="index-Torus-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Torus</strong> <em>(<code>const mglDataA &</code>r, <code>const mglDataA &</code>z, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftorus"></a>C function: <em><code>void</code></em> <strong>mgl_torus</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> r, <code>HCDT</code> z, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw surface which is result of curve {<var>r</var>, <var>z</var>} rotation around axis. If string <var>pen</var> contain symbols ‘<samp>x</samp>’ or ‘<samp>z</samp>’ then rotation axis will be set to specified direction (default is ‘<samp>y</samp>’). If string <var>pen</var> have symbol ‘<samp>#</samp>’ then wire plot is produced. If string <var>pen</var> have symbol ‘<samp>.</samp>’ then plot by dots is produced. See also <a href="#plot">plot</a>, <a href="#axial">axial</a>. See <a href="#torus-sample">torus sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="lamerey"></a><dl>
-<dt><a name="index-lamerey"></a>MGL command: <em></em> <strong>lamerey</strong> <em><code>x0</code> ydat ['stl'='']</em></dt>
-<dt><a name="index-lamerey-1"></a>MGL command: <em></em> <strong>lamerey</strong> <em><code>x0</code> 'y(x)' ['stl'='']</em></dt>
-<dt><a name="index-Lamerey"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Lamerey</strong> <em>(<code>double</code> x0, <code>const mglDataA &</code>y, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Lamerey-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Lamerey</strong> <em>(<code>double</code> x0, <code>const char *</code>y, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005flamerey_005fdat"></a>C function: <em><code>void</code></em> <strong>mgl_lamerey_dat</strong> <em>(<code>HMGL</code> gr, <code>double</code> x0, <code>HCDT</code> y, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005flamerey_005fstr"></a>C function: <em><code>void</code></em> <strong>mgl_lamerey_str</strong> <em>(<code>HMGL</code> gr, <code>double</code> x0, <code>const char *</code>y, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw Lamerey diagram for mapping x_new = y(x_old) starting from point <var>x0</var>. String <var>stl</var> may contain line style, symbol ‘<samp>v</samp>’ for drawing arrows, symbol ‘<samp>~</samp>’ for disabling first segment. Option <code>value</code> set the number of segments to be drawn (default is 20). See also <a href="#plot">plot</a>, <a href="#fplot">fplot</a>, <a href="#bifurcation">bifurcation</a>, <a href="#pmap">pmap</a>. See <a href="#lamerey-sample">lamerey sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="bifurcation"></a><dl>
-<dt><a name="index-bifurcation"></a>MGL command: <em></em> <strong>bifurcation</strong> <em><code>dx</code> ydat ['stl'='']</em></dt>
-<dt><a name="index-bifurcation-1"></a>MGL command: <em></em> <strong>bifurcation</strong> <em><code>dx</code> 'y(x)' ['stl'='']</em></dt>
-<dt><a name="index-Bifurcation"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Bifurcation</strong> <em>(<code>double</code> dx, <code>const mglDataA &</code>y, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Bifurcation-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Bifurcation</strong> <em>(<code>double</code> dx, <code>const char *</code>y, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fbifurcation_005fdat"></a>C function: <em><code>void</code></em> <strong>mgl_bifurcation_dat</strong> <em>(<code>HMGL</code> gr, <code>double</code> dx, <code>HCDT</code> y, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fbifurcation_005fstr"></a>C function: <em><code>void</code></em> <strong>mgl_bifurcation_str</strong> <em>(<code>HMGL</code> gr, <code>double</code> dx, <code>const char *</code>y, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw bifurcation diagram for mapping x_new = y(x_old). Parameter <var>dx</var> set the accuracy along x-direction. String <var>stl</var> set color. Option <code>value</code> set the number of stationary points (default is 1024). See also <a href="#plot">plot</a>, <a href="#fplot">fplot</a>, <a href="#lamerey">lamerey</a>. See <a href="#bifurcation-sample">bifurcation sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="pmap"></a><dl>
-<dt><a name="index-pmap"></a>MGL command: <em></em> <strong>pmap</strong> <em>ydat sdat ['stl'='']</em></dt>
-<dt><a name="index-pmap-1"></a>MGL command: <em></em> <strong>pmap</strong> <em>xdat ydat sdat ['stl'='']</em></dt>
-<dt><a name="index-pmap-2"></a>MGL command: <em></em> <strong>pmap</strong> <em>xdat ydat zdat sdat ['stl'='']</em></dt>
-<dt><a name="index-Pmap"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Pmap</strong> <em>(<code>const mglDataA &</code>y, <code>const mglDataA &</code>s, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Pmap-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Pmap</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>s, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Pmap-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Pmap</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>s, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fpmap"></a>C function: <em><code>void</code></em> <strong>mgl_pmap</strong> <em>(<code>HMGL</code> gr, <code>HMDT</code> y, <code>HCDT</code> s, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fpmap_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_pmap_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HMDT</code> y, <code>HCDT</code> s, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fpmap_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_pmap_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HMDT</code> y, <code>HCDT</code> z, <code>HCDT</code> s, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions draw Poincare map for curve {<var>x</var>, <var>y</var>, <var>z</var>} at surface <var>s</var>=0. Basically, it show intersections of the curve and the surface. String <var>stl</var> set the style of marks. See also <a href="#plot">plot</a>, <a href="#mark">mark</a>, <a href="#lamerey">lamerey</a>. See <a href="#pmap-sample">pmap sample</a>, for sample code and picture.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="g_t2D-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#g_t3D-plotting" accesskey="n" rel="next">3D plotting</a>, Previous: <a href="#g_t1D-plotting" accesskey="p" rel="prev">1D plotting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="g_t2D-plotting-1"></a>
-<h3 class="section">4.12 2D plotting</h3>
-
-<a name="index-Mesh"></a>
-<a name="index-Fall"></a>
-<a name="index-Belt"></a>
-<a name="index-Surf"></a>
-<a name="index-Boxs"></a>
-<a name="index-Tile"></a>
-<a name="index-Dens"></a>
-<a name="index-Cont"></a>
-<a name="index-ContF"></a>
-<a name="index-ContD"></a>
-<a name="index-Axial"></a>
-<a name="index-Grad"></a>
-<a name="index-Grid-1"></a>
-
-<p>These functions perform plotting of 2D data. 2D means that data depend from 2 independent parameters like matrix <em>f(x_i,y_j), i=1...n, j=1...m</em>. By default (if absent) values of <var>x</var>, <var>y</var> are equidistantly distributed in axis range. The plots are drawn for each z slice of the data. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> should be equal <code>x.nx=z.nx && y.nx=z.ny</code> or <code>x.nx=y.nx=z.nx && x.ny=y.ny=z.ny</code>. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>z</var>). String <var>sch</var> sets the color scheme (see <a href="#Color-scheme">Color scheme</a>) for plot. String <var>opt</var> contain command options (see <a href="#Command-options">Command options</a>).
-</p>
-<a name="surf"></a><dl>
-<dt><a name="index-surf"></a>MGL command: <em></em> <strong>surf</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-surf-1"></a>MGL command: <em></em> <strong>surf</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Surf-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Surf-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurf"></a>C function: <em><code>void</code></em> <strong>mgl_surf</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurf_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_surf_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. If string <var>sch</var> have symbol ‘<samp>#</samp>’ then grid lines are drawn. If string <var>sch</var> have symbol ‘<samp>.</samp>’ then plot by dots is produced. See also <a href="#mesh">mesh</a>, <a href="#dens">dens</a>, <a href="#belt">belt</a>, <a href="#tile">tile</a>, <a href="#boxs">boxs</a>, <a href="#surfc">surfc</a>, <a href="#surfa">surfa</a>. See <a href="#surf-sample">surf sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="mesh"></a><dl>
-<dt><a name="index-mesh"></a>MGL command: <em></em> <strong>mesh</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-mesh-1"></a>MGL command: <em></em> <strong>mesh</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Mesh-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Mesh</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Mesh-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Mesh</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fmesh"></a>C function: <em><code>void</code></em> <strong>mgl_mesh</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fmesh_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_mesh_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws mesh lines for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. See also <a href="#surf">surf</a>, <a href="#fall">fall</a>, <a href="#meshnum">meshnum</a>, <a href="#cont">cont</a>, <a href="#tens">tens</a>. See <a href="#mesh-sample">mesh sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="fall"></a><dl>
-<dt><a name="index-fall"></a>MGL command: <em></em> <strong>fall</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-fall-1"></a>MGL command: <em></em> <strong>fall</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Fall-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Fall</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fall-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Fall</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ffall"></a>C function: <em><code>void</code></em> <strong>mgl_fall</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ffall_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_fall_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws fall lines for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. This plot can be used for plotting several curves shifted in depth one from another. If <var>sch</var> contain ‘<samp>x</samp>’ then lines are drawn along x-direction else (by default) lines are drawn along y-direction. See also <a href="#belt">belt</a>, <a href="#mesh">mesh</a>, <a href="#tens">tens</a>, <a href="#meshnum">meshnum</a>. See <a href="#fall-sample">fall sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="belt"></a><dl>
-<dt><a name="index-belt"></a>MGL command: <em></em> <strong>belt</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-belt-1"></a>MGL command: <em></em> <strong>belt</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Belt-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Belt</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Belt-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Belt</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fbelt"></a>C function: <em><code>void</code></em> <strong>mgl_belt</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fbelt_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_belt_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws belts for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. This plot can be used as 3d generalization of <a href="#plot">plot</a>). If <var>sch</var> contain ‘<samp>x</samp>’ then belts are drawn along x-direction else (by default) belts are drawn along y-direction. See also <a href="#fall">fall</a>, <a href="#surf">surf</a>, <a href="#beltc">beltc</a>, <a href="#plot">plot</a>, <a href="#meshnum">meshnum</a>. See <a href="#belt-sample">belt sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="boxs"></a><dl>
-<dt><a name="index-boxs"></a>MGL command: <em></em> <strong>boxs</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-boxs-1"></a>MGL command: <em></em> <strong>boxs</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Boxs-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Boxs</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Boxs-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Boxs</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fboxs"></a>C function: <em><code>void</code></em> <strong>mgl_boxs</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fboxs_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_boxs_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws vertical boxes for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. Symbol ‘<samp>@</samp>’ in <var>sch</var> set to draw filled boxes. See also <a href="#surf">surf</a>, <a href="#dens">dens</a>, <a href="#tile">tile</a>, <a href="#step">step</a>. See <a href="#boxs-sample">boxs sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="tile"></a><dl>
-<dt><a name="index-tile"></a>MGL command: <em></em> <strong>tile</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-tile-1"></a>MGL command: <em></em> <strong>tile</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-tile-2"></a>MGL command: <em></em> <strong>tile</strong> <em>xdat ydat zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-Tile-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Tile</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tile-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Tile</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tile-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Tile</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftile"></a>C function: <em><code>void</code></em> <strong>mgl_tile</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftile_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_tile_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftile_005fxyc"></a>C function: <em><code>void</code></em> <strong>mgl_tile_xyc</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws horizontal tiles for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} and color it by matrix <var>c</var>[i,j] (<var>c</var>=<var>z</var> if <var>c</var> is not provided). If string <var>sch</var> contain style ‘<samp>x</samp>’ or ‘<samp>y</samp>’ then tiles will be oriented perpendicular to x- or y-axis. Such plot can be used as 3d generalization of <a href="#step">step</a>. See also <a href="#surf">surf</a>, <a href="#boxs">boxs</a>, <a href="#step">step</a>, <a href="#tiles">tiles</a>. See <a href="#tile-sample">tile sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="dens"></a><dl>
-<dt><a name="index-dens"></a>MGL command: <em></em> <strong>dens</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-dens-1"></a>MGL command: <em></em> <strong>dens</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Dens-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Dens</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>, <code>mreal</code> zVal=<code>NAN</code>)</em></dt>
-<dt><a name="index-Dens-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Dens</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>, <code>mreal</code> zVal=<code>NAN</code>)</em></dt>
-<dt><a name="index-mgl_005fdens"></a>C function: <em><code>void</code></em> <strong>mgl_dens</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fdens_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_dens_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws density plot for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} at <var>z</var> equal to minimal z-axis value. If string <var>sch</var> have symbol ‘<samp>#</samp>’ then grid lines are drawn. If string <var>sch</var> have symbol ‘<samp>.</samp>’ then plot by dots is produced. See also <a href="#surf">surf</a>, <a href="#cont">cont</a>, <a href="#contf">contf</a>, <a href="#boxs">boxs</a>, <a href="#tile">tile</a>, <code>dens[xyz]</code>. See <a href="#dens-sample">dens sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="cont"></a><dl>
-<dt><a name="index-cont"></a>MGL command: <em></em> <strong>cont</strong> <em>vdat zdat ['sch'='']</em></dt>
-<dt><a name="index-cont-1"></a>MGL command: <em></em> <strong>cont</strong> <em>vdat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Cont-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Cont</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Cont-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Cont</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcont_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_cont_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcont_005fxy_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_cont_xy_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws contour lines for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} at <var>z</var>=<var>v</var>[k], or at <var>z</var> equal to minimal z-axis value if <var>sch</var> contain symbol ‘<samp>_</samp>’. Contours are plotted for <var>z</var>[i,j]=<var>v</var>[k] where <var>v</var>[k] are values of data array <var>v</var>. If string <var>sch</var> have symbol ‘<samp>t</samp>’ or ‘<samp>T</samp>’ then contour labels <var>v</var>[k] will be drawn below (or above) the contours. See also <a href="#dens">dens</a>, <a href="#contf">contf</a>, <a href="#contd">contd</a>, <a href="#axial">axial</a>, <code>cont[xyz]</code>. See <a href="#cont-sample">cont sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-cont-2"></a>MGL command: <em></em> <strong>cont</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-cont-3"></a>MGL command: <em></em> <strong>cont</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Cont-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Cont</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Cont-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Cont</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcont"></a>C function: <em><code>void</code></em> <strong>mgl_cont</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcont_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_cont_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The same as previous with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in color range. Here <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 7). If string <var>sch</var> contain symbol ‘<samp>.</samp>’ then only contours at levels with saddle points will be drawn.
-</p></dd></dl>
-
-<a name="contf"></a><dl>
-<dt><a name="index-contf"></a>MGL command: <em></em> <strong>contf</strong> <em>vdat zdat ['sch'='']</em></dt>
-<dt><a name="index-contf-1"></a>MGL command: <em></em> <strong>contf</strong> <em>vdat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-ContF-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContF</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContF-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContF</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontf_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_contf_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontf_005fxy_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_contf_xy_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws solid (or filled) contour lines for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} at <var>z</var>=<var>v</var>[k], or at <var>z</var> equal to minimal z-axis value if <var>sch</var> contain symbol ‘<samp>_</samp>’. Contours are plotted for <var>z</var>[i,j]=<var>v</var>[k] where <var>v</var>[k] are values of data array <var>v</var> (must be <code>v.nx>2</code>). See also <a href="#dens">dens</a>, <a href="#cont">cont</a>, <a href="#contd">contd</a>, <code>contf[xyz]</code>. See <a href="#contf-sample">contf sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-contf-2"></a>MGL command: <em></em> <strong>contf</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-contf-3"></a>MGL command: <em></em> <strong>contf</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-ContF-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContF</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContF-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContF</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontf"></a>C function: <em><code>void</code></em> <strong>mgl_contf</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontf_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_contf_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The same as previous with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in color range. Here <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 7).
-</p></dd></dl>
-
-<a name="contd"></a><dl>
-<dt><a name="index-contd"></a>MGL command: <em></em> <strong>contd</strong> <em>vdat zdat ['sch'='']</em></dt>
-<dt><a name="index-contd-1"></a>MGL command: <em></em> <strong>contd</strong> <em>vdat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-ContD-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContD</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContD-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContD</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontd_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_contd_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontd_005fxy_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_contd_xy_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws solid (or filled) contour lines for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} at <var>z</var>=<var>v</var>[k] (or at <var>z</var> equal to minimal z-axis value if <var>sch</var> contain symbol ‘<samp>_</samp>’) with manual colors. Contours are plotted for <var>z</var>[i,j]=<var>v</var>[k] where <var>v</var>[k] are values of data array <var>v</var> (must be <code>v.nx>2</code>). String <var>sch</var> sets the contour colors: the color of k-th contour is determined by character <code>sch[k%strlen(sch)]</code>. See also <a href="#dens">dens</a>, <a href="#cont">cont</a>, <a href="#contf">contf</a>. See <a href="#contd-sample">contd sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-contd-2"></a>MGL command: <em></em> <strong>contd</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-contd-3"></a>MGL command: <em></em> <strong>contd</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-ContD-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContD</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContD-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContD</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontd"></a>C function: <em><code>void</code></em> <strong>mgl_contd</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontd_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_contd_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The same as previous with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in color range. Here <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 7).
-</p></dd></dl>
-
-<a name="contp"></a><dl>
-<dt><a name="index-contp"></a>MGL command: <em></em> <strong>contp</strong> <em>vdat xdat ydat zdat adat ['sch'='']</em></dt>
-<dt><a name="index-ContP"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContP</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontp_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_contp_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws contour lines on surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. Contours are plotted for <var>a</var>[i,j]=<var>v</var>[k] where <var>v</var>[k] are values of data array <var>v</var>. If string <var>sch</var> have symbol ‘<samp>t</samp>’ or ‘<samp>T</samp>’ then contour labels <var>v</var>[k] will be drawn below (or above) the contours. If string <var>sch</var> have symbol ‘<samp>f</samp>’ then solid contours will be drawn. See also <a href="#cont">cont</a>, <a href="#contf">contf</a>, <a href="#surfc">surfc</a>, <code>cont[xyz]</code>. </p></dd></dl>
-
-<dl>
-<dt><a name="index-contp-1"></a>MGL command: <em></em> <strong>contp</strong> <em>xdat ydat zdat adat ['sch'='']</em></dt>
-<dt><a name="index-ContP-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContP</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontp"></a>C function: <em><code>void</code></em> <strong>mgl_contp</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The same as previous with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in color range. Here <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 7).
-</p></dd></dl>
-
-
-<a name="contv"></a><dl>
-<dt><a name="index-contv"></a>MGL command: <em></em> <strong>contv</strong> <em>vdat zdat ['sch'='']</em></dt>
-<dt><a name="index-contv-1"></a>MGL command: <em></em> <strong>contv</strong> <em>vdat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-ContV"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContV</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContV-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContV</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontv_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_contv_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontv_005fxy_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_contv_xy_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws vertical cylinder (tube) at contour lines for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} at <var>z</var>=<var>v</var>[k], or at <var>z</var> equal to minimal z-axis value if <var>sch</var> contain symbol ‘<samp>_</samp>’. Contours are plotted for <var>z</var>[i,j]=<var>v</var>[k] where <var>v</var>[k] are values of data array <var>v</var>. See also <a href="#cont">cont</a>, <a href="#contf">contf</a>. See <a href="#contv-sample">contv sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-contv-2"></a>MGL command: <em></em> <strong>contv</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-contv-3"></a>MGL command: <em></em> <strong>contv</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-ContV-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContV</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContV-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContV</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontv"></a>C function: <em><code>void</code></em> <strong>mgl_contv</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontv_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_contv_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The same as previous with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in color range. Here <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 7).
-</p></dd></dl>
-
-<a name="axial"></a><dl>
-<dt><a name="index-axial"></a>MGL command: <em></em> <strong>axial</strong> <em>vdat zdat ['sch'='']</em></dt>
-<dt><a name="index-axial-1"></a>MGL command: <em></em> <strong>axial</strong> <em>vdat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Axial-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Axial</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Axial-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Axial</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005faxial_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_axial_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005faxial_005fxy_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_axial_xy_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws surface which is result of contour plot rotation for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. Contours are plotted for <var>z</var>[i,j]=<var>v</var>[k] where <var>v</var>[k] are values of data array <var>v</var>. If string <var>sch</var> have symbol ‘<samp>#</samp>’ then wire plot is produced. If string <var>sch</var> have symbol ‘<samp>.</samp>’ then plot by dots is produced. If string contain symbols ‘<samp>x</samp>’ or ‘<samp>z</samp>’ then rotation axis will be set to specified direction (default is ‘<samp>y</samp>’). See also <a href="#cont">cont</a>, <a href="#contf">contf</a>, <a href="#torus">torus</a>, <a href="#surf3">surf3</a>. See <a href="#axial-sample">axial sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-axial-2"></a>MGL command: <em></em> <strong>axial</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-axial-3"></a>MGL command: <em></em> <strong>axial</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Axial-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Axial</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>, <code>int</code> num=<code>3</code>)</em></dt>
-<dt><a name="index-Axial-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Axial</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>, <code>int</code> num=<code>3</code>)</em></dt>
-<dt><a name="index-mgl_005faxial"></a>C function: <em><code>void</code></em> <strong>mgl_axial</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005faxial_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_axial_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The same as previous with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in color range. Here <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 3).
-</p></dd></dl>
-
-<a name="grid2"></a><dl>
-<dt><a name="index-grid2"></a>MGL command: <em></em> <strong>grid2</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-grid2-1"></a>MGL command: <em></em> <strong>grid2</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Grid-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Grid</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Grid-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Grid</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fgrid"></a>C function: <em><code>void</code></em> <strong>mgl_grid</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fgrid_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_grid_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws grid lines for density plot of surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} at <var>z</var> equal to minimal z-axis value. See also <a href="#dens">dens</a>, <a href="#cont">cont</a>, <a href="#contf">contf</a>, <a href="#grid3">grid3</a>, <a href="#meshnum">meshnum</a>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="g_t3D-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#Dual-plotting" accesskey="n" rel="next">Dual plotting</a>, Previous: <a href="#g_t2D-plotting" accesskey="p" rel="prev">2D plotting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="g_t3D-plotting-1"></a>
-<h3 class="section">4.13 3D plotting</h3>
-
-<a name="index-Surf3"></a>
-<a name="index-Dens3"></a>
-<a name="index-Cont3"></a>
-<a name="index-ContF3"></a>
-<a name="index-Grid3"></a>
-<a name="index-Cloud"></a>
-<a name="index-Beam"></a>
-
-<p>These functions perform plotting of 3D data. 3D means that data depend from 3 independent parameters like matrix <em>f(x_i,y_j,z_k), i=1...n, j=1...m, k=1...l</em>. By default (if absent) values of <var>x</var>, <var>y</var>, <var>z</var> are equidistantly distributed in axis range. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var>, <var>a</var> should be equal <code>x.nx=a.nx && y.nx=a.ny && z.nz=a.nz</code> or <code>x.nx=y.nx=z.nx=a.nx && x.ny=y.ny=z.ny=a.ny && x.nz=y.nz=z.nz=a.nz</code>. Arrays <var>x</var>, <var>y</var> and <var>z</var> can be vectors (not matrices as <var>a</var>). String <var>sch</var> sets the color scheme (see <a href="#Color-scheme">Color scheme</a>) for plot. String <var>opt</var> contain command options (see <a href="#Command-options">Command options</a>).
-</p>
-<a name="surf3"></a><dl>
-<dt><a name="index-surf3"></a>MGL command: <em></em> <strong>surf3</strong> <em>adat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-surf3-1"></a>MGL command: <em></em> <strong>surf3</strong> <em>xdat ydat zdat adat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-Surf3-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3</strong> <em>(<code>mreal</code> val, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Surf3-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3</strong> <em>(<code>mreal</code> val, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurf3_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_surf3_val</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurf3_005fxyz_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_surf3_xyz_val</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws isosurface plot for 3d array specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) at <var>a</var>(x,y,z)=<var>val</var>. If string contain ‘<samp>#</samp>’ then wire plot is produced. If string <var>sch</var> have symbol ‘<samp>.</samp>’ then plot by dots is produced. Note, that there is possibility of incorrect plotting due to uncertainty of cross-section defining if there are two or more isosurface intersections inside one cell. See also <a href="#cloud">cloud</a>, <a href="#dens3">dens3</a>, <a href="#surf3c">surf3c</a>, <a href="#surf3a">surf3a</a>, <a href="#axial">axial</a>. See <a href="#surf3-sample">surf3 sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-surf3-2"></a>MGL command: <em></em> <strong>surf3</strong> <em>adat ['sch'='']</em></dt>
-<dt><a name="index-surf3-3"></a>MGL command: <em></em> <strong>surf3</strong> <em>xdat ydat zdat adat ['sch'='']</em></dt>
-<dt><a name="index-Surf3-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Surf3-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurf3"></a>C function: <em><code>void</code></em> <strong>mgl_surf3</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurf3_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_surf3_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Draws <var>num</var>-th uniformly distributed in color range isosurfaces for 3d data. Here <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 3).
-</p></dd></dl>
-
-<a name="cloud"></a><dl>
-<dt><a name="index-cloud"></a>MGL command: <em></em> <strong>cloud</strong> <em>adat ['sch'='']</em></dt>
-<dt><a name="index-cloud-1"></a>MGL command: <em></em> <strong>cloud</strong> <em>xdat ydat zdat adat ['sch'='']</em></dt>
-<dt><a name="index-Cloud-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Cloud</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Cloud-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Cloud</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcloud"></a>C function: <em><code>void</code></em> <strong>mgl_cloud</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcloud_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_cloud_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws cloud plot for 3d data specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). This plot is a set of cubes with color and transparency proportional to value of <var>a</var>. The resulting plot is like cloud – low value is transparent but higher ones are not. The number of plotting cells depend on <a href="#meshnum">meshnum</a>. If string <var>sch</var> contain symbol ‘<samp>.</samp>’ then lower quality plot will produced with much low memory usage. If string <var>sch</var> contain symbol ‘<samp>i</samp>’ then transparency will be inversed, i.e. higher become transparent and lower become not transparent. See also <a href="#surf3">surf3</a>, <a href="#meshnum">meshnum</a>. See <a href="#cloud-sample">cloud sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="dens3"></a><dl>
-<dt><a name="index-dens3"></a>MGL command: <em></em> <strong>dens3</strong> <em>adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-dens3-1"></a>MGL command: <em></em> <strong>dens3</strong> <em>xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-Dens3-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Dens3</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Dens3-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Dens3</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fdens3"></a>C function: <em><code>void</code></em> <strong>mgl_dens3</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fdens3_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_dens3_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws density plot for 3d data specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). Density is plotted at slice <var>sVal</var> in direction {‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’} if <var>sch</var> contain corresponding symbol (by default, ‘<samp>y</samp>’ direction is used). If string <var>stl</var> have symbol ‘<samp>#</samp>’ then grid lines are drawn. See also <a href="#cont3">cont3</a>, <a href="#contf3">contf3</a>, <a href="#dens">dens</a>, <a href="#grid3">grid3</a>. See <a href="#dens3-sample">dens3 sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="cont3"></a><dl>
-<dt><a name="index-cont3"></a>MGL command: <em></em> <strong>cont3</strong> <em>vdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-cont3-1"></a>MGL command: <em></em> <strong>cont3</strong> <em>vdat xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-Cont3-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Cont3</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Cont3-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Cont3</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcont3_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_cont3_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcont3_005fxyz_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_cont3_xyz_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws contour plot for 3d data specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). Contours are plotted for values specified in array <var>v</var> at slice <var>sVal</var> in direction {‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’} if <var>sch</var> contain corresponding symbol (by default, ‘<samp>y</samp>’ direction is used). If string <var>sch</var> have symbol ‘<samp>#</samp>’ then grid lines are drawn. If string <var>sch</var> have symbol ‘<samp>t</samp>’ or ‘<samp>T</samp>’ then contour labels will be drawn below (or above) the contours. See also <a href="#dens3">dens3</a>, <a href="#contf3">contf3</a>, <a href="#cont">cont</a>, <a href="#grid3">grid3</a>. See <a href="#cont3-sample">cont3 sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-cont3-2"></a>MGL command: <em></em> <strong>cont3</strong> <em>adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-cont3-3"></a>MGL command: <em></em> <strong>cont3</strong> <em>xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-Cont3-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Cont3</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Cont3-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Cont3</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcont3"></a>C function: <em><code>void</code></em> <strong>mgl_cont3</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcont3_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_cont3_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>The same as previous with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in color range. Here <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 7).
-</p></dd></dl>
-
-<a name="contf3"></a><dl>
-<dt><a name="index-contf3"></a>MGL command: <em></em> <strong>contf3</strong> <em>vdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-contf3-1"></a>MGL command: <em></em> <strong>contf3</strong> <em>vdat xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-Contf3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Contf3</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Contf3-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Contf3</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontf3_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_contf3_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontf3_005fxyz_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_contf3_xyz_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws solid (or filled) contour plot for 3d data specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). Contours are plotted for values specified in array <var>v</var> at slice <var>sVal</var> in direction {‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’} if <var>sch</var> contain corresponding symbol (by default, ‘<samp>y</samp>’ direction is used). If string <var>sch</var> have symbol ‘<samp>#</samp>’ then grid lines are drawn. See also <a href="#dens3">dens3</a>, <a href="#cont3">cont3</a>, <a href="#contf">contf</a>, <a href="#grid3">grid3</a>. See <a href="#contf3-sample">contf3 sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-contf3-2"></a>MGL command: <em></em> <strong>contf3</strong> <em>adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-contf3-3"></a>MGL command: <em></em> <strong>contf3</strong> <em>xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-Contf3-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Contf3</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Contf3-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Contf3</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontf3"></a>C function: <em><code>void</code></em> <strong>mgl_contf3</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontf3_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_contf3_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>The same as previous with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in color range. Here <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 7).
-</p></dd></dl>
-
-<a name="grid3"></a><dl>
-<dt><a name="index-grid3"></a>MGL command: <em></em> <strong>grid3</strong> <em>adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-grid3-1"></a>MGL command: <em></em> <strong>grid3</strong> <em>xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-Grid3-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Grid3</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Grid3-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Grid3</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fgrid3"></a>C function: <em><code>void</code></em> <strong>mgl_grid3</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fgrid3_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_grid3_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws grid for 3d data specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). Grid is plotted at slice <var>sVal</var> in direction {‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’} if <var>sch</var> contain corresponding symbol (by default, ‘<samp>y</samp>’ direction is used). See also <a href="#cont3">cont3</a>, <a href="#contf3">contf3</a>, <a href="#dens3">dens3</a>, <a href="#grid2">grid2</a>, <a href="#meshnum">meshnum</a>.
-</p></dd></dl>
-
-<a name="beam"></a><dl>
-<dt><a name="index-beam"></a>MGL command: <em></em> <strong>beam</strong> <em>tr g1 g2 adat <code>rval</code> ['sch'='' <code>flag=0 num=3</code>]</em></dt>
-<dt><a name="index-Beam-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Beam</strong> <em>(<code>const mglDataA &</code>tr, <code>const mglDataA &</code>g1, <code>const mglDataA &</code>g2, <code>const mglDataA &</code>a, <code>mreal</code> r, <code>const char *</code>stl=<code>""</code>, <code>int</code> flag=<code>0</code>, <code>int</code> num=<code>3</code>)</em></dt>
-<dt><a name="index-Beam-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Beam</strong> <em>(<code>mreal</code> val, <code>const mglDataA &</code>tr, <code>const mglDataA &</code>g1, <code>const mglDataA &</code>g2, <code>const mglDataA &</code>a, <code>mreal</code> r, <code>const char *</code>stl=<code>""</code>, <code>int</code> flag=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fbeam"></a>C function: <em><code>void</code></em> <strong>mgl_beam</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> tr, <code>HCDT</code> g1, <code>HCDT</code> g2, <code>HCDT</code> a, <code>mreal</code> r, <code>const char *</code>stl, <code>int</code> flag, <code>int</code> num)</em></dt>
-<dt><a name="index-mgl_005fbeam_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_beam_val</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>HCDT</code> tr, <code>HCDT</code> g1, <code>HCDT</code> g2, <code>HCDT</code> a, <code>mreal</code> r, <code>const char *</code>stl, <code>int</code> flag)</em></dt>
-<dd><p>Draws the isosurface for 3d array <var>a</var> at constant values of <var>a</var>=<var>val</var>. This is special kind of plot for <var>a</var> specified in accompanied coordinates along curve <var>tr</var> with orts <var>g1</var>, <var>g2</var> and with transverse scale <var>r</var>. Variable <var>flag</var> is bitwise: ‘<samp>0x1</samp>’ - draw in accompanied (not laboratory) coordinates; ‘<samp>0x2</samp>’ - draw projection to <em>\rho-z</em> plane; ‘<samp>0x4</samp>’ - draw normalized in each slice field. The x-size of data arrays <var>tr</var>, <var>g1</var>, <var>g2</var> must be nx>2. The y-size of data arrays <var>tr</var>, <var>g1</var>, <var>g2</var> and z-size of the data array <var>a</var> must be equal. See also <a href="#surf3">surf3</a>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Dual-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#Vector-fields" accesskey="n" rel="next">Vector fields</a>, Previous: <a href="#g_t3D-plotting" accesskey="p" rel="prev">3D plotting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Dual-plotting-1"></a>
-<h3 class="section">4.14 Dual plotting</h3>
-
-<a name="index-SurfC"></a>
-<a name="index-SurfA"></a>
-<a name="index-Surf3C"></a>
-<a name="index-Surf3A"></a>
-<a name="index-TileS"></a>
-<a name="index-Map"></a>
-<a name="index-STFA"></a>
-
-<p>These plotting functions draw <em>two matrix</em> simultaneously. There are 5 generally different types of data representations: surface or isosurface colored by other data (SurfC, Surf3C), surface or isosurface transpared by other data (SurfA, Surf3A), tiles with variable size (TileS), mapping diagram (Map), STFA diagram (STFA). By default (if absent) values of <var>x</var>, <var>y</var>, <var>z</var> are equidistantly distributed in axis range. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var>, <var>c</var> should be equal. Arrays <var>x</var>, <var>y</var> (and <var>z</var> for <code>Surf3C, Surf3A</code>) can be vectors (not matrices as <var>c</var>). String <var>sch</var> sets the color scheme (see <a href="#Color-scheme">Color scheme</a>) for plot. String <var>opt</var> contain command options (see <a href="#Command-options">Command options</a>).
-</p>
-<a name="surfc"></a><dl>
-<dt><a name="index-surfc"></a>MGL command: <em></em> <strong>surfc</strong> <em>zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-surfc-1"></a>MGL command: <em></em> <strong>surfc</strong> <em>xdat ydat zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-SurfC-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SurfC</strong> <em>(<code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-SurfC-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SurfC</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurfc"></a>C function: <em><code>void</code></em> <strong>mgl_surfc</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurfc_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_surfc_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} and color it by matrix <var>c</var>[i,j]. If string <var>sch</var> have symbol ‘<samp>#</samp>’ then grid lines are drawn. If string <var>sch</var> have symbol ‘<samp>.</samp>’ then plot by dots is produced. All dimensions of arrays <var>z</var> and <var>c</var> must be equal. Surface is plotted for each z slice of the data. See also <a href="#surf">surf</a>, <a href="#surfa">surfa</a>, <a href="#surfca">surfca</a>, <a href="#beltc">beltc</a>, <a href="#surf3c">surf3c</a>. See <a href="#surfc-sample">surfc sample</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="beltc"></a><dl>
-<dt><a name="index-beltc"></a>MGL command: <em></em> <strong>beltc</strong> <em>zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-beltc-1"></a>MGL command: <em></em> <strong>beltc</strong> <em>xdat ydat zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-BeltC"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>BeltC</strong> <em>(<code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-BeltC-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>BeltC</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fbeltc"></a>C function: <em><code>void</code></em> <strong>mgl_beltc</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fbeltc_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_beltc_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws belts for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} and color it by matrix <var>c</var>[i,j]. This plot can be used as 3d generalization of <a href="#plot">plot</a>). If <var>sch</var> contain ‘<samp>x</samp>’ then belts are drawn along x-direction else (by default) belts are drawn along y-direction. See also <a href="#belt">belt</a>, <a href="#surfc">surfc</a>, <a href="#meshnum">meshnum</a>. </p></dd></dl>
-
-
-
-<a name="surf3c"></a><dl>
-<dt><a name="index-surf3c"></a>MGL command: <em></em> <strong>surf3c</strong> <em>adat cdat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-surf3c-1"></a>MGL command: <em></em> <strong>surf3c</strong> <em>xdat ydat zdat adat cdat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-Surf3C-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3C</strong> <em>(<code>mreal</code> val, <code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Surf3C-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3C</strong> <em>(<code>mreal</code> val, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurf3c_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_surf3c_val</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>HCDT</code> a, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurf3c_005fxyz_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_surf3c_xyz_val</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws isosurface plot for 3d array specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) at <var>a</var>(x,y,z)=<var>val</var>. It is mostly the same as <a href="#surf3">surf3</a> function but the color of isosurface depends on values of array <var>c</var>. If string <var>sch</var> contain ‘<samp>#</samp>’ then wire plot is produced. If string <var>sch</var> have symbol ‘<samp>.</samp>’ then plot by dots is produced. See also <a href="#surf3">surf3</a>, <a href="#surfc">surfc</a>, <a href="#surf3a">surf3a</a>, <a href="#surf3ca">surf3ca</a>. See <a href="#surf3c-sample">surf3c sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-surf3c-2"></a>MGL command: <em></em> <strong>surf3c</strong> <em>adat cdat ['sch'='']</em></dt>
-<dt><a name="index-surf3c-3"></a>MGL command: <em></em> <strong>surf3c</strong> <em>xdat ydat zdat adat cdat ['sch'='']</em></dt>
-<dt><a name="index-Surf3C-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3C</strong> <em>(<code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Surf3C-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3C</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurf3c"></a>C function: <em><code>void</code></em> <strong>mgl_surf3c</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurf3c_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_surf3c_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Draws <var>num</var>-th uniformly distributed in color range isosurfaces for 3d data. Here <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 3).
-</p></dd></dl>
-
-
-<a name="surfa"></a><dl>
-<dt><a name="index-surfa"></a>MGL command: <em></em> <strong>surfa</strong> <em>zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-surfa-1"></a>MGL command: <em></em> <strong>surfa</strong> <em>xdat ydat zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-SurfA-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SurfA</strong> <em>(<code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-SurfA-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SurfA</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurfa"></a>C function: <em><code>void</code></em> <strong>mgl_surfa</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurfa_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_surfa_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} and transparent it by matrix <var>c</var>[i,j]. If string <var>sch</var> have symbol ‘<samp>#</samp>’ then grid lines are drawn. If string <var>sch</var> have symbol ‘<samp>.</samp>’ then plot by dots is produced. All dimensions of arrays <var>z</var> and <var>c</var> must be equal. Surface is plotted for each z slice of the data. See also <a href="#surf">surf</a>, <a href="#surfc">surfc</a>, <a href="#surfca">surfca</a>, <a href="#surf3a">surf3a</a>. See <a href="#surfa-sample">surfa sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="surf3a"></a><dl>
-<dt><a name="index-surf3a"></a>MGL command: <em></em> <strong>surf3a</strong> <em>adat cdat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-surf3a-1"></a>MGL command: <em></em> <strong>surf3a</strong> <em>xdat ydat zdat adat cdat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-Surf3A-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3A</strong> <em>(<code>mreal</code> val, <code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Surf3A-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3A</strong> <em>(<code>mreal</code> val, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurf3a_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_surf3a_val</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>HCDT</code> a, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurf3a_005fxyz_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_surf3a_xyz_val</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws isosurface plot for 3d array specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) at <var>a</var>(x,y,z)=<var>val</var>. It is mostly the same as <a href="#surf3">surf3</a> function but the transparency of isosurface depends on values of array <var>c</var>. If string <var>sch</var> contain ‘<samp>#</samp>’ then wire plot is produced. If string <var>sch</var> have symbol ‘<samp>.</samp>’ then plot by dots is produced. See also <a href="#surf3">surf3</a>, <a href="#surfc">surfc</a>, <a href="#surf3a">surf3a</a>, <a href="#surf3ca">surf3ca</a>. See <a href="#surf3a-sample">surf3a sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-surf3a-2"></a>MGL command: <em></em> <strong>surf3a</strong> <em>adat cdat ['sch'='']</em></dt>
-<dt><a name="index-surf3a-3"></a>MGL command: <em></em> <strong>surf3a</strong> <em>xdat ydat zdat adat cdat ['sch'='']</em></dt>
-<dt><a name="index-Surf3A-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3A</strong> <em>(<code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Surf3A-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3A</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurf3a"></a>C function: <em><code>void</code></em> <strong>mgl_surf3a</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurf3a_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_surf3a_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Draws <var>num</var>-th uniformly distributed in color range isosurfaces for 3d data. At this array <var>c</var> can be vector with values of transparency and <var>num</var>=<var>c</var>.nx. In opposite case <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 3).
-</p></dd></dl>
-
-
-
-<a name="surfca"></a><dl>
-<dt><a name="index-surfca"></a>MGL command: <em></em> <strong>surfca</strong> <em>zdat cdat adat ['sch'='']</em></dt>
-<dt><a name="index-surfca-1"></a>MGL command: <em></em> <strong>surfca</strong> <em>xdat ydat zdat cdat adat ['sch'='']</em></dt>
-<dt><a name="index-SurfCA"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SurfCA</strong> <em>(<code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-SurfCA-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>SurfCA</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurfca"></a>C function: <em><code>void</code></em> <strong>mgl_surfca</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>HCDT</code> c, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurfca_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_surfca_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> c, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}, color it by matrix <var>c</var>[i,j] and transparent it by matrix <var>a</var>[i,j]. If string <var>sch</var> have symbol ‘<samp>#</samp>’ then grid lines are drawn. If string <var>sch</var> have symbol ‘<samp>.</samp>’ then plot by dots is produced. All dimensions of arrays <var>z</var> and <var>c</var> must be equal. Surface is plotted for each z slice of the data. Note, you can use <a href="#map">map</a>-like coloring if use ‘<samp>%</samp>’ in color scheme. See also <a href="#surf">surf</a>, <a href="#surfc">surfc</a>, <a href="#surfa">surfa</a>, <a href="#surf3ca">surf3ca</a>. See <a href="#surfca-sample">surfca sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="surf3ca"></a><dl>
-<dt><a name="index-surf3ca"></a>MGL command: <em></em> <strong>surf3ca</strong> <em>adat cdat bdat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-surf3ca-1"></a>MGL command: <em></em> <strong>surf3ca</strong> <em>xdat ydat zdat adat cdat bdat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-Surf3CA"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3CA</strong> <em>(<code>mreal</code> val, <code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const mglDataA &</code>b, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Surf3CA-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3CA</strong> <em>(<code>mreal</code> val, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const mglDataA &</code>b, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurf3ca_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_surf3ca_val</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>HCDT</code> a, <code>HCDT</code> c, <code>HCDT</code> b, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurf3ca_005fxyz_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_surf3ca_xyz_val</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>HCDT</code> c, <code>HCDT</code> b,<code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws isosurface plot for 3d array specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) at <var>a</var>(x,y,z)=<var>val</var>. It is mostly the same as <a href="#surf3">surf3</a> function but the color and the transparency of isosurface depends on values of array <var>c</var> and <var>b</var> correspondingly. If string <var>sch</var> contain ‘<samp>#</samp>’ then wire plot is produced. If string <var>sch</var> have symbol ‘<samp>.</samp>’ then plot by dots is produced. Note, you can use <a href="#map">map</a>-like coloring if use ‘<samp>%</samp>’ in color scheme. See also <a href="#surf3">surf3</a>, <a href="#surfca">surfca</a>, <a href="#surf3c">surf3c</a>, <a href="#surf3a">surf3a</a>. See <a href="#surf3ca-sample">surf3ca sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-surf3ca-2"></a>MGL command: <em></em> <strong>surf3ca</strong> <em>adat cdat bdat ['sch'='']</em></dt>
-<dt><a name="index-surf3ca-3"></a>MGL command: <em></em> <strong>surf3ca</strong> <em>xdat ydat zdat adat cdat bdat ['sch'='']</em></dt>
-<dt><a name="index-Surf3CA-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3CA</strong> <em>(<code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const mglDataA &</code>b, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Surf3CA-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3CA</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const mglDataA &</code>b, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurf3ca"></a>C function: <em><code>void</code></em> <strong>mgl_surf3ca</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>HCDT</code> c, <code>HCDT</code> b, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurf3ca_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_surf3ca_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>HCDT</code> c, <code>HCDT</code> b, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Draws <var>num</var>-th uniformly distributed in color range isosurfaces for 3d data. Here parameter <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 3).
-</p></dd></dl>
-
-<a name="tiles"></a><dl>
-<dt><a name="index-tiles"></a>MGL command: <em></em> <strong>tiles</strong> <em>zdat rdat ['sch'='']</em></dt>
-<dt><a name="index-tiles-1"></a>MGL command: <em></em> <strong>tiles</strong> <em>xdat ydat zdat rdat ['sch'='']</em></dt>
-<dt><a name="index-tiles-2"></a>MGL command: <em></em> <strong>tiles</strong> <em>xdat ydat zdat rdat cdat ['sch'='']</em></dt>
-<dt><a name="index-TileS-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>TileS</strong> <em>(<code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TileS-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>TileS</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>r, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TileS-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>TileS</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>r, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftiles"></a>C function: <em><code>void</code></em> <strong>mgl_tiles</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftiles_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_tiles_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> r, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftiles_005fxyc"></a>C function: <em><code>void</code></em> <strong>mgl_tiles_xyc</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> r, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws horizontal tiles for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} and color it by matrix <var>c</var>[i,j]. It is mostly the same as <a href="#tile">tile</a> but the size of tiles is determined by <var>r</var> array. If string <var>sch</var> contain style ‘<samp>x</samp>’ or ‘<samp>y</samp>’ then tiles will be oriented perpendicular to x- or y-axis. This is some kind of “transparency” useful for exporting to EPS files. Tiles is plotted for each z slice of the data. See also <a href="#surfa">surfa</a>, <a href="#tile">tile</a>. See <a href="#tiles-sample">tiles sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="map"></a><dl>
-<dt><a name="index-map"></a>MGL command: <em></em> <strong>map</strong> <em>udat vdat ['sch'='']</em></dt>
-<dt><a name="index-map-1"></a>MGL command: <em></em> <strong>map</strong> <em>xdat ydat udat vdat ['sch'='']</em></dt>
-<dt><a name="index-Map-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Map</strong> <em>(<code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Map-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Map</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fmap"></a>C function: <em><code>void</code></em> <strong>mgl_map</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fmap_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_map_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws mapping plot for matrices {<var>ax</var>, <var>ay</var> } which parametrically depend on coordinates <var>x</var>, <var>y</var>. The initial position of the cell (point) is marked by color. Height is proportional to Jacobian(ax,ay). This plot is like Arnold diagram ??? If string <var>sch</var> contain symbol ‘<samp>.</samp>’ then the color ball at matrix knots are drawn otherwise face is drawn. See <a href="#Mapping-visualization">Mapping visualization</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="stfa"></a><dl>
-<dt><a name="index-stfa"></a>MGL command: <em></em> <strong>stfa</strong> <em>re im <code>dn</code> ['sch'='']</em></dt>
-<dt><a name="index-stfa-1"></a>MGL command: <em></em> <strong>stfa</strong> <em>xdat ydat re im <code>dn</code> ['sch'='']</em></dt>
-<dt><a name="index-STFA-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>STFA</strong> <em>(<code>const mglDataA &</code>re, <code>const mglDataA &</code>im, <code>int</code> dn, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-STFA-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>STFA</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>re, <code>const mglDataA &</code>im, <code>int</code> dn, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fstfa"></a>C function: <em><code>void</code></em> <strong>mgl_stfa</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> re, <code>HCDT</code> im, <code>int</code> dn, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fstfa_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_stfa_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> re, <code>HCDT</code> im, <code>int</code> dn, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Draws spectrogram of complex array <var>re</var>+i*<var>im</var> for Fourier size of <var>dn</var> points at plane <var>z</var> equal to minimal z-axis value. For example in 1D case, result is density plot of data <em>res[i,j]=|\sum_d^dn exp(I*j*d)*(re[i*dn+d]+I*im[i*dn+d])|/dn</em> with size {int(nx/dn), dn, ny}. At this array <var>re</var>, <var>im</var> parametrically depend on coordinates <var>x</var>, <var>y</var>. The size of <var>re</var> and <var>im</var> must be the same. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>re</var> should be equal. Arrays <var>x</var>, <var>y</var> can be vectors (not matrix as <var>re</var>). See <a href="#stfa-sample">stfa sample</a>, for sample code and picture.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Vector-fields"></a>
-<div class="header">
-<p>
-Next: <a href="#Other-plotting" accesskey="n" rel="next">Other plotting</a>, Previous: <a href="#Dual-plotting" accesskey="p" rel="prev">Dual plotting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Vector-fields-1"></a>
-<h3 class="section">4.15 Vector fields</h3>
-
-<a name="index-Traj"></a>
-<a name="index-Vect"></a>
-<a name="index-Dew"></a>
-<a name="index-Flow"></a>
-<a name="index-FlowP"></a>
-<a name="index-Pipe"></a>
-
-<p>These functions perform plotting of 2D and 3D vector fields. There are 5 generally different types of vector fields representations: simple vector field (Vect), vectors along the curve (Traj), vector field by dew-drops (Dew), flow threads (Flow, FlowP), flow pipes (Pipe). By default (if absent) values of <var>x</var>, <var>y</var>, <var>z</var> are equidistantly distributed in axis range. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var>, <var>ax</var> should be equal. The size of <var>ax</var>, <var>ay</var> and <var>az</var> must be equal. Arrays <var>x</var>, <var>y</var>, <var>z</var> can be vectors (not matrices as <var>ax</var>). String <var>sch</var> sets the color scheme (see <a href="#Color-scheme">Color scheme</a>) for plot. String <var>opt</var> contain command options (see <a href="#Command-options">Command options</a>).
-</p>
-<a name="traj"></a><dl>
-<dt><a name="index-traj"></a>MGL command: <em></em> <strong>traj</strong> <em>xdat ydat udat vdat ['sch'='']</em></dt>
-<dt><a name="index-traj-1"></a>MGL command: <em></em> <strong>traj</strong> <em>xdat ydat zdat udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-Traj-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Traj</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Traj-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Traj</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftraj_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_traj_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code>x, <code>HCDT</code>y, <code>HCDT</code>z, <code>HCDT</code>ax, <code>HCDT</code>ay, <code>HCDT</code>az, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftraj_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_traj_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code>x, <code>HCDT</code>y, <code>HCDT</code>ax, <code>HCDT</code>ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws vectors {<var>ax</var>, <var>ay</var>, <var>az</var>} along a curve {<var>x</var>, <var>y</var>, <var>z</var>}. The length of arrows are proportional to <em>\sqrt{ax^2+ay^2+az^2}</em>. String <var>pen</var> specifies the color (see <a href="#Line-styles">Line styles</a>). By default (<code>pen=""</code>) color from palette is used (see <a href="#Palette-and-colors">Palette and colors</a>). Option <code>value</code> set the vector length factor (if non-zero) or vector length to be proportional the distance between curve points (if <code>value=0</code>). The minor sizes of all arrays must be equal and large 2. The plots are drawn for each row if one of the data is the matrix. See also <a href="#vect">vect</a>. See <a href="#traj-sample">traj sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="vect"></a><dl>
-<dt><a name="index-vect"></a>MGL command: <em></em> <strong>vect</strong> <em>udat vdat ['sch'='']</em></dt>
-<dt><a name="index-vect-1"></a>MGL command: <em></em> <strong>vect</strong> <em>xdat ydat udat vdat ['sch'='']</em></dt>
-<dt><a name="index-Vect-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Vect</strong> <em>(<code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Vect-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Vect</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fvect_005f2d"></a>C function: <em><code>void</code></em> <strong>mgl_vect_2d</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fvect_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_vect_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws plane vector field plot for the field {<var>ax</var>, <var>ay</var>} depending parametrically on coordinates <var>x</var>, <var>y</var> at level <var>z</var> equal to minimal z-axis value. The length and color of arrows are proportional to <em>\sqrt{ax^2+ay^2}</em>. The number of arrows depend on <a href="#meshnum">meshnum</a>. The appearance of the hachures (arrows) can be changed by symbols:
-</p><ul>
-<li> ‘<samp>f</samp>’ for drawing arrows with fixed lengths,
-</li><li> ‘<samp>></samp>’, ‘<samp><</samp>’ for drawing arrows to or from the cell point (default is centering),
-</li><li> ‘<samp>.</samp>’ for drawing hachures with dots instead of arrows,
-</li><li> ‘<samp>=</samp>’ for enabling color gradient along arrows.
-</li></ul>
-<p>See also <a href="#flow">flow</a>, <a href="#dew">dew</a>. See <a href="#vect-sample">vect sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-vect-2"></a>MGL command: <em></em> <strong>vect</strong> <em>udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-vect-3"></a>MGL command: <em></em> <strong>vect</strong> <em>xdat ydat zdat udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-Vect-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Vect</strong> <em>(<code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Vect-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Vect</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fvect_005f3d"></a>C function: <em><code>void</code></em> <strong>mgl_vect_3d</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fvect_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_vect_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>This is 3D version of the first functions. Here arrays <var>ax</var>, <var>ay</var>, <var>az</var> must be 3-ranged tensors with equal sizes and the length and color of arrows is proportional to <em>\sqrt{ax^2+ay^2+az^2}</em>.
-</p></dd></dl>
-
-<a name="vect3"></a><dl>
-<dt><a name="index-vect3"></a>MGL command: <em></em> <strong>vect3</strong> <em>udat vdat wdat ['sch'='' sval]</em></dt>
-<dt><a name="index-vect3-1"></a>MGL command: <em></em> <strong>vect3</strong> <em>xdat ydat zdat udat vdat wdat ['sch'='' sval]</em></dt>
-<dt><a name="index-Vect3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Vect3</strong> <em>(<code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Vect3-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Vect3</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fvect3"></a>C function: <em><code>void</code></em> <strong>mgl_vect3</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fvect3_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_vect3_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws 3D vector field plot for the field {<var>ax</var>, <var>ay</var>, <var>az</var>} depending parametrically on coordinates <var>x</var>, <var>y</var>, <var>z</var>. Vector field is drawn at slice <var>sVal</var> in direction {‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’} if <var>sch</var> contain corresponding symbol (by default, ‘<samp>y</samp>’ direction is used). The length and color of arrows are proportional to <em>\sqrt{ax^2+ay^2+az^2}</em>. The number of arrows depend on <a href="#meshnum">meshnum</a>. The appearance of the hachures (arrows) can be changed by symbols:
-</p><ul>
-<li> ‘<samp>f</samp>’ for drawing arrows with fixed lengths,
-</li><li> ‘<samp>></samp>’, ‘<samp><</samp>’ for drawing arrows to or from the cell point (default is centering),
-</li><li> ‘<samp>.</samp>’ for drawing hachures with dots instead of arrows,
-</li><li> ‘<samp>=</samp>’ for enabling color gradient along arrows.
-</li></ul>
-<p>See also <a href="#vect">vect</a>, <a href="#flow">flow</a>, <a href="#dew">dew</a>. See <a href="#vect3-sample">vect3 sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="dew"></a><dl>
-<dt><a name="index-dew"></a>MGL command: <em></em> <strong>dew</strong> <em>udat vdat ['sch'='']</em></dt>
-<dt><a name="index-dew-1"></a>MGL command: <em></em> <strong>dew</strong> <em>xdat ydat udat vdat ['sch'='']</em></dt>
-<dt><a name="index-Dew-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Dew</strong> <em>(<code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Dew-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Dew</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fdew"></a>C function: <em><code>void</code></em> <strong>mgl_dew</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fdew_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_dew_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws dew-drops for plane vector field {<var>ax</var>, <var>ay</var>} depending parametrically on coordinates <var>x</var>, <var>y</var> at level <var>z</var> equal to minimal z-axis value. Note that this is very expensive plot in memory usage and creation time! The color of drops is proportional to <em>\sqrt{ax^2+ay^2}</em>. The number of drops depend on <a href="#meshnum">meshnum</a>. See also <a href="#vect">vect</a>. See <a href="#dew-sample">dew sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="flow"></a><dl>
-<dt><a name="index-flow"></a>MGL command: <em></em> <strong>flow</strong> <em>udat vdat ['sch'='']</em></dt>
-<dt><a name="index-flow-1"></a>MGL command: <em></em> <strong>flow</strong> <em>xdat ydat udat vdat ['sch'='']</em></dt>
-<dt><a name="index-Flow-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Flow</strong> <em>(<code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Flow-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Flow</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fflow_005f2d"></a>C function: <em><code>void</code></em> <strong>mgl_flow_2d</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fflow_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_flow_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws flow threads for the plane vector field {<var>ax</var>, <var>ay</var>} parametrically depending on coordinates <var>x</var>, <var>y</var> at level <var>z</var> equal to minimal z-axis value. Option <code>value</code> set the approximate number of threads (default is 5), or accuracy for stationary points (if style ‘<samp>.</samp>’ is used) . String <var>sch</var> may contain:
-</p><ul>
-<li> color scheme – up-half (warm) corresponds to normal flow (like attractor), bottom-half (cold) corresponds to inverse flow (like source);
-</li><li> ‘<samp>#</samp>’ for starting threads from edges only;
-</li><li> ‘<samp>.</samp>’ for drawing separatrices only (flow threads to/from stationary points).
-</li><li> ‘<samp>*</samp>’ for starting threads from a 2D array of points inside the data;
-</li><li> ‘<samp>v</samp>’ for drawing arrows on the threads;
-</li><li> ‘<samp>x</samp>’, ‘<samp>z</samp>’ for drawing tapes of normals in x-y and y-z planes correspondingly.
-</li></ul>
-<p>See also <a href="#pipe">pipe</a>, <a href="#vect">vect</a>, <a href="#tape">tape</a>, <a href="#flow3">flow3</a>, <a href="#barwidth">barwidth</a>. See <a href="#flow-sample">flow sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-flow-2"></a>MGL command: <em></em> <strong>flow</strong> <em>udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-flow-3"></a>MGL command: <em></em> <strong>flow</strong> <em>xdat ydat zdat udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-Flow-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Flow</strong> <em>(<code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Flow-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Flow</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fflow_005f3d"></a>C function: <em><code>void</code></em> <strong>mgl_flow_3d</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fflow_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_flow_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>This is 3D version of the first functions. Here arrays <var>ax</var>, <var>ay</var>, <var>az</var> must be 3-ranged tensors with equal sizes and the color of line is proportional to <em>\sqrt{ax^2+ay^2+az^2}</em>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-flow-4"></a>MGL command: <em></em> <strong>flow</strong> <em><code>x0 y0</code> udat vdat ['sch'='']</em></dt>
-<dt><a name="index-flow-5"></a>MGL command: <em></em> <strong>flow</strong> <em><code>x0 y0</code> xdat ydat udat vdat ['sch'='']</em></dt>
-<dt><a name="index-FlowP-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>FlowP</strong> <em>(<code>mglPoint</code> p0, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-FlowP-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>FlowP</strong> <em>(<code>mglPoint</code> p0, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fflowp_005f2d"></a>C function: <em><code>void</code></em> <strong>mgl_flowp_2d</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fflowp_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_flowp_xy</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The same as first one (<a href="#flow">flow</a>) but draws single flow thread starting from point <var>p0</var>={<var>x0</var>,<var>y0</var>,<var>z0</var>}. String <var>sch</var> may also contain: ‘<samp>></samp>’ or ‘<samp><</samp>’ for drawing in forward or backward direction only (default is both).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-flow-6"></a>MGL command: <em></em> <strong>flow</strong> <em><code>x0 y0 z0</code> udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-flow-7"></a>MGL command: <em></em> <strong>flow</strong> <em><code>x0 y0 z0</code> xdat ydat zdat udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-FlowP-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>FlowP</strong> <em>(<code>mglPoint</code> p0, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-FlowP-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>FlowP</strong> <em>(<code>mglPoint</code> p0, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fflowp_005f3d"></a>C function: <em><code>void</code></em> <strong>mgl_flowp_3d</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fflowp_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_flowp_xyz</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>This is 3D version of the previous functions.
-</p></dd></dl>
-
-<a name="flow3"></a><dl>
-<dt><a name="index-flow3"></a>MGL command: <em></em> <strong>flow3</strong> <em>udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-flow3-1"></a>MGL command: <em></em> <strong>flow3</strong> <em>xdat ydat zdat udat vdat ['sch'='']</em></dt>
-<dt><a name="index-Flow3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Flow3</strong> <em>(<code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>double</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Flow3-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Flow3</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>double</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fflow3"></a>C function: <em><code>void</code></em> <strong>mgl_flow3</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>double</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fflow3_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_flow3_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>double</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws flow threads for the 3D vector field {<var>ax</var>, <var>ay</var>, <var>az</var>} parametrically depending on coordinates <var>x</var>, <var>y</var>, <var>z</var>. Flow threads starts from given plane. Option <code>value</code> set the approximate number of threads (default is 5). String <var>sch</var> may contain:
-</p><ul>
-<li> color scheme – up-half (warm) corresponds to normal flow (like attractor), bottom-half (cold) corresponds to inverse flow (like source);
-</li><li> ‘<samp>x</samp>’, ‘<samp>z</samp>’ for normal of starting plane (default is y-direction);
-</li><li> ‘<samp>v</samp>’ for drawing arrows on the threads;
-</li><li> ‘<samp>t</samp>’ for drawing tapes of normals in x-y and y-z planes.
-</li></ul>
-<p>See also <a href="#flow">flow</a>, <a href="#pipe">pipe</a>, <a href="#vect">vect</a>. See <a href="#flow3-sample">flow3 sample</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="grad"></a><dl>
-<dt><a name="index-grad"></a>MGL command: <em></em> <strong>grad</strong> <em>pdat ['sch'='']</em></dt>
-<dt><a name="index-grad-1"></a>MGL command: <em></em> <strong>grad</strong> <em>xdat ydat pdat ['sch'='']</em></dt>
-<dt><a name="index-grad-2"></a>MGL command: <em></em> <strong>grad</strong> <em>xdat ydat zdat pdat ['sch'='']</em></dt>
-<dt><a name="index-Grad-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Grad</strong> <em>(<code>const mglDataA &</code>phi, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Grad-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Grad</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>phi, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Grad-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Grad</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>phi, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fgrad"></a>C function: <em><code>void</code></em> <strong>mgl_grad</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> phi, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fgrad_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_grad_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> phi, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fgrad_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_grad_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> phi, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws gradient lines for scalar field <var>phi</var>[i,j] (or <var>phi</var>[i,j,k] in 3d case) specified parametrically {<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]}. Number of lines is proportional to <code>value</code> option (default is 5). See also <a href="#dens">dens</a>, <a href="#cont">cont</a>, <a href="#flow">flow</a>.
-</p></dd></dl>
-
-<a name="pipe"></a><dl>
-<dt><a name="index-pipe"></a>MGL command: <em></em> <strong>pipe</strong> <em>udat vdat ['sch'='' <code>r0=0.05</code>]</em></dt>
-<dt><a name="index-pipe-1"></a>MGL command: <em></em> <strong>pipe</strong> <em>xdat ydat udat vdat ['sch'='' <code>r0=0.05</code>]</em></dt>
-<dt><a name="index-Pipe-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Pipe</strong> <em>(<code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> r0=<code>0.05</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Pipe-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Pipe</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> r0=<code>0.05</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fpipe_005f2d"></a>C function: <em><code>void</code></em> <strong>mgl_pipe_2d</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>mreal</code> r0, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fpipe_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_pipe_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>mreal</code> r0, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws flow pipes for the plane vector field {<var>ax</var>, <var>ay</var>} parametrically depending on coordinates <var>x</var>, <var>y</var> at level <var>z</var> equal to minimal z-axis value. Number of pipes is proportional to <code>value</code> option (default is 5). If ‘<samp>#</samp>’ symbol is specified then pipes start only from edges of axis range. The color of lines is proportional to <em>\sqrt{ax^2+ay^2}</em>. Warm color corresponds to normal flow (like attractor). Cold one corresponds to inverse flow (like source). Parameter <var>r0</var> set the base pipe radius. If <var>r0</var><0 or symbol ‘<samp>i</samp>’ is specified then pipe radius is inverse proportional to amplitude. The vector field is plotted for each z slice of <var>ax</var>, <var>ay</var>. See also <a href="#flow">flow</a>, <a href="#vect">vect</a>. See <a href="#pipe-sample">pipe sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-pipe-2"></a>MGL command: <em></em> <strong>pipe</strong> <em>udat vdat wdat ['sch'='' <code>r0=0.05</code>]</em></dt>
-<dt><a name="index-pipe-3"></a>MGL command: <em></em> <strong>pipe</strong> <em>xdat ydat zdat udat vdat wdat ['sch'='' <code>r0=0.05</code>]</em></dt>
-<dt><a name="index-Pipe-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Pipe</strong> <em>(<code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> r0=<code>0.05</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Pipe-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Pipe</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> r0=<code>0.05</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fpipe_005f3d"></a>C function: <em><code>void</code></em> <strong>mgl_pipe_3d</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>mreal</code> r0, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fpipe_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_pipe_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>mreal</code> r0, <code>const char *</code>opt)</em></dt>
-<dd><p>This is 3D version of the first functions. Here arrays <var>ax</var>, <var>ay</var>, <var>az</var> must be 3-ranged tensors with equal sizes and the color of line is proportional to <em>\sqrt{ax^2+ay^2+az^2}</em>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Other-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#Nonlinear-fitting" accesskey="n" rel="next">Nonlinear fitting</a>, Previous: <a href="#Vector-fields" accesskey="p" rel="prev">Vector fields</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Other-plotting-1"></a>
-<h3 class="section">4.16 Other plotting</h3>
-
-<a name="index-DensXYZ"></a>
-<a name="index-ContXYZ"></a>
-<a name="index-ContFXYZ"></a>
-<a name="index-Dots"></a>
-<a name="index-Crust"></a>
-<a name="index-TriPlot"></a>
-<a name="index-TriCont"></a>
-<a name="index-QuadPlot"></a>
-<a name="index-FPlot"></a>
-<a name="index-FSurf"></a>
-
-<p>These functions perform miscellaneous plotting. There is unstructured data points plots (Dots), surface reconstruction (Crust), surfaces on the triangular or quadrangular mesh (TriPlot, TriCont, QuadPlot), textual formula plotting (Plots by formula), data plots at edges (Dens[XYZ], Cont[XYZ], ContF[XYZ]). Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. See <a href="#Color-scheme">Color scheme</a>.
-</p>
-<a name="densz"></a><a name="densy"></a><a name="densx"></a><a name="DensXYZ"></a><dl>
-<dt><a name="index-densx"></a>MGL command: <em></em> <strong>densx</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-densy"></a>MGL command: <em></em> <strong>densy</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-densz"></a>MGL command: <em></em> <strong>densz</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-DensX"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>DensX</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-DensY"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>DensY</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-DensZ"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>DensZ</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fdens_005fx"></a>C function: <em><code>void</code></em> <strong>mgl_dens_x</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fdens_005fy"></a>C function: <em><code>void</code></em> <strong>mgl_dens_y</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fdens_005fz"></a>C function: <em><code>void</code></em> <strong>mgl_dens_z</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>These plotting functions draw density plot in x, y, or z plain. If <var>a</var> is a tensor (3-dimensional data) then interpolation to a given <var>sVal</var> is performed. These functions are useful for creating projections of the 3D data array to the bounding box. See also <a href="#ContXYZ">ContXYZ</a>, <a href="#ContFXYZ">ContFXYZ</a>, <a href="#dens">dens</a>, <a href="#Data-manipulation">Data manipulation</a>. See <a href="#dens_005fxyz-sample">dens_xyz sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="contz"></a><a name="conty"></a><a name="contx"></a><a name="ContXYZ"></a><dl>
-<dt><a name="index-contx"></a>MGL command: <em></em> <strong>contx</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-conty"></a>MGL command: <em></em> <strong>conty</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-contz"></a>MGL command: <em></em> <strong>contz</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-ContX"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContX</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContY"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContY</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContZ"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContZ</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcont_005fx"></a>C function: <em><code>void</code></em> <strong>mgl_cont_x</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcont_005fy"></a>C function: <em><code>void</code></em> <strong>mgl_cont_y</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcont_005fz"></a>C function: <em><code>void</code></em> <strong>mgl_cont_z</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>These plotting functions draw contour lines in x, y, or z plain. If <var>a</var> is a tensor (3-dimensional data) then interpolation to a given <var>sVal</var> is performed. These functions are useful for creating projections of the 3D data array to the bounding box. Option <code>value</code> set the number of contours. See also <a href="#ContFXYZ">ContFXYZ</a>, <a href="#DensXYZ">DensXYZ</a>, <a href="#cont">cont</a>, <a href="#Data-manipulation">Data manipulation</a>. See <a href="#cont_005fxyz-sample">cont_xyz sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ContX-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContX</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContY-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContY</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContZ-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContZ</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcont_005fx_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_cont_x_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcont_005fy_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_cont_y_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcont_005fz_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_cont_z_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>The same as previous with manual contour levels.
-</p></dd></dl>
-
-<a name="contfz"></a><a name="contfy"></a><a name="contfx"></a><a name="ContFXYZ"></a><dl>
-<dt><a name="index-contfx"></a>MGL command: <em></em> <strong>contfx</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-contfy"></a>MGL command: <em></em> <strong>contfy</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-contfz"></a>MGL command: <em></em> <strong>contfz</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-ContFX"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContFX</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContFY"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContFY</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContFZ"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContFZ</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontf_005fx"></a>C function: <em><code>void</code></em> <strong>mgl_contf_x</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontf_005fy"></a>C function: <em><code>void</code></em> <strong>mgl_contf_y</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontf_005fz"></a>C function: <em><code>void</code></em> <strong>mgl_contf_z</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>These plotting functions draw solid contours in x, y, or z plain. If <var>a</var> is a tensor (3-dimensional data) then interpolation to a given <var>sVal</var> is performed. These functions are useful for creating projections of the 3D data array to the bounding box. Option <code>value</code> set the number of contours. See also <a href="#ContFXYZ">ContFXYZ</a>, <a href="#DensXYZ">DensXYZ</a>, <a href="#cont">cont</a>, <a href="#Data-manipulation">Data manipulation</a>. See <a href="#contf_005fxyz-sample">contf_xyz sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ContFX-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContFX</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContFY-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContFY</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContFZ-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>ContFZ</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontf_005fx_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_contf_x_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontf_005fy_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_contf_y_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontf_005fz_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_contf_z_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>The same as previous with manual contour levels.
-</p></dd></dl>
-
-<a name="fplot"></a><dl>
-<dt><a name="index-fplot"></a>MGL command: <em></em> <strong>fplot</strong> <em>'y(x)' ['pen'='']</em></dt>
-<dt><a name="index-FPlot-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>FPlot</strong> <em>(<code>const char *</code>eqY, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ffplot"></a>C function: <em><code>void</code></em> <strong>mgl_fplot</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>eqY, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Draws command function ‘<samp>y(x)</samp>’ at plane <var>z</var> equal to minimal z-axis value, where ‘<samp>x</samp>’ variable is changed in <code>xrange</code>. You do not need to create the data arrays to plot it. Option <code>value</code> set initial number of points. See also <a href="#plot">plot</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-fplot-1"></a>MGL command: <em></em> <strong>fplot</strong> <em>'x(t)' 'y(t)' 'z(t)' ['pen'='']</em></dt>
-<dt><a name="index-FPlot-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>FPlot</strong> <em>(<code>const char *</code>eqX, <code>const char *</code>eqY, <code>const char *</code>eqZ, <code>const char *</code>pen, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ffplot_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_fplot_xyz</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>eqX, <code>const char *</code>eqY, <code>const char *</code>eqZ, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Draws command parametrical curve {‘<samp>x(t)</samp>’, ‘<samp>y(t)</samp>’, ‘<samp>z(t)</samp>’} where ‘<samp>t</samp>’ variable is changed in range [0, 1]. You do not need to create the data arrays to plot it. Option <code>value</code> set number of points. See also <a href="#plot">plot</a>.
-</p></dd></dl>
-
-<a name="fsurf"></a><dl>
-<dt><a name="index-fsurf"></a>MGL command: <em></em> <strong>fsurf</strong> <em>'z(x,y)' ['sch'='']</em></dt>
-<dt><a name="index-FSurf-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>FSurf</strong> <em>(<code>const char *</code>eqZ, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>);</em></dt>
-<dt><a name="index-mgl_005ffsurf"></a>C function: <em><code>void</code></em> <strong>mgl_fsurf</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>eqZ, <code>const char *</code>sch, <code>const char *</code>opt);</em></dt>
-<dd><p>Draws command surface for function ‘<samp>z(x,y)</samp>’ where ‘<samp>x</samp>’, ‘<samp>y</samp>’ variable are changed in <code>xrange, yrange</code>. You do not need to create the data arrays to plot it. Option <code>value</code> set number of points. See also <a href="#surf">surf</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-fsurf-1"></a>MGL command: <em></em> <strong>fsurf</strong> <em>'x(u,v)' 'y(u,v)' 'z(u,v)' ['sch'='']</em></dt>
-<dt><a name="index-FSurf-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>FSurf</strong> <em>(<code>const char *</code>eqX, <code>const char *</code>eqY, <code>const char *</code>eqZ, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ffsurf_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_fsurf_xyz</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>eqX, <code>const char *</code>eqY, <code>const char *</code>eqZ, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Draws command parametrical surface {‘<samp>x(u,v)</samp>’, ‘<samp>y(u,v)</samp>’, ‘<samp>z(u,v)</samp>’} where ‘<samp>u</samp>’, ‘<samp>v</samp>’ variable are changed in range [0, 1]. You do not need to create the data arrays to plot it. Option <code>value</code> set number of points. See also <a href="#surf">surf</a>.
-</p></dd></dl>
-
-<a name="triplot"></a><dl>
-<dt><a name="index-triplot"></a>MGL command: <em></em> <strong>triplot</strong> <em>idat xdat ydat ['sch'='']</em></dt>
-<dt><a name="index-triplot-1"></a>MGL command: <em></em> <strong>triplot</strong> <em>idat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-triplot-2"></a>MGL command: <em></em> <strong>triplot</strong> <em>idat xdat ydat zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-TriPlot-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>TriPlot</strong> <em>(<code>const mglDataA &</code>id, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TriPlot-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>TriPlot</strong> <em>(<code>const mglDataA &</code>id, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TriPlot-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>TriPlot</strong> <em>(<code>const mglDataA &</code>id, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftriplot_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_triplot_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> id, <code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftriplot_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_triplot_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> id, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftriplot_005fxyzc"></a>C function: <em><code>void</code></em> <strong>mgl_triplot_xyzc</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> id, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws the surface of triangles. Triangle vertexes are set by indexes <var>id</var> of data points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. String <var>sch</var> sets the color scheme. If string contain ‘<samp>#</samp>’ then wire plot is produced. First dimensions of <var>id</var> must be 3 or greater. Arrays <var>x</var>, <var>y</var>, <var>z</var> must have equal sizes. Parameter <var>c</var> set the colors of triangles (if <var>id</var>.ny=<var>c</var>.nx) or colors of vertexes (if <var>x</var>.nx=<var>c</var>.nx). See also <a href="#dots">dots</a>, <a href="#crust">crust</a>, <a href="#quadplot">quadplot</a>, <a href="#triangulation">triangulation</a>. See <a href="#triplot-sample">triplot sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="tricont"></a><dl>
-<dt><a name="index-tricont"></a>MGL command: <em></em> <strong>tricont</strong> <em>vdat idat xdat ydat zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-tricont-1"></a>MGL command: <em></em> <strong>tricont</strong> <em>vdat idat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-tricont-2"></a>MGL command: <em></em> <strong>tricont</strong> <em>idat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-TriCont-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>TriCont</strong> <em>(<code>const mglDataA &</code>id, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TriCont-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>TriCont</strong> <em>(<code>const mglDataA &</code>id, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TriContV"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>TriContV</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>id, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TriContV-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>TriContV</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>id, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftricont_005fxyzc"></a>C function: <em><code>void</code></em> <strong>mgl_tricont_xyzc</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> id, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftricont_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_tricont_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> id, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftricont_005fxyzcv"></a>C function: <em><code>void</code></em> <strong>mgl_tricont_xyzcv</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> id, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftricont_005fxyzv"></a>C function: <em><code>void</code></em> <strong>mgl_tricont_xyzv</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> id, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws contour lines for surface of triangles at <var>z</var>=<var>v</var>[k] (or at <var>z</var> equal to minimal z-axis value if <var>sch</var> contain symbol ‘<samp>_</samp>’). Triangle vertexes are set by indexes <var>id</var> of data points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Contours are plotted for <var>z</var>[i,j]=<var>v</var>[k] where <var>v</var>[k] are values of data array <var>v</var>. If <var>v</var> is absent then arrays of option <code>value</code> elements equidistantly distributed in color range is used. String <var>sch</var> sets the color scheme. Array <var>c</var> (if specified) is used for contour coloring. First dimensions of <var>id</var> must be 3 or greater. Arrays <var>x</var>, <var>y</var>, <var>z</var> must have equal sizes. Parameter <var>c</var> set the colors of triangles (if <var>id</var>.ny=<var>c</var>.nx) or colors of vertexes (if <var>x</var>.nx=<var>c</var>.nx). See also <a href="#triplot">triplot</a>, <a href="#cont">cont</a>, <a href="#triangulation">triangulation</a>.
-</p></dd></dl>
-
-<a name="quadplot"></a><dl>
-<dt><a name="index-quadplot"></a>MGL command: <em></em> <strong>quadplot</strong> <em>idat xdat ydat ['sch'='']</em></dt>
-<dt><a name="index-quadplot-1"></a>MGL command: <em></em> <strong>quadplot</strong> <em>idat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-quadplot-2"></a>MGL command: <em></em> <strong>quadplot</strong> <em>idat xdat ydat zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-QuadPlot-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>QuadPlot</strong> <em>(<code>const mglDataA &</code>id, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-QuadPlot-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>QuadPlot</strong> <em>(<code>const mglDataA &</code>id, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-QuadPlot-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>QuadPlot</strong> <em>(<code>const mglDataA &</code>id, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fquadplot_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_quadplot_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> id, <code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fquadplot_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_quadplot_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> id, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fquadplot_005fxyzc"></a>C function: <em><code>void</code></em> <strong>mgl_quadplot_xyzc</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> id, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws the surface of quadrangles. Quadrangles vertexes are set by indexes <var>id</var> of data points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. String <var>sch</var> sets the color scheme. If string contain ‘<samp>#</samp>’ then wire plot is produced. First dimensions of <var>id</var> must be 4 or greater. Arrays <var>x</var>, <var>y</var>, <var>z</var> must have equal sizes. Parameter <var>c</var> set the colors of quadrangles (if <var>id</var>.ny=<var>c</var>.nx) or colors of vertexes (if <var>x</var>.nx=<var>c</var>.nx). See also <a href="#triplot">triplot</a>. See <a href="#triplot-sample">triplot sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="dots"></a><dl>
-<dt><a name="index-dots"></a>MGL command: <em></em> <strong>dots</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-dots-1"></a>MGL command: <em></em> <strong>dots</strong> <em>xdat ydat zdat adat ['sch'='']</em></dt>
-<dt><a name="index-Dots-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Dots</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Dots-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Dots</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Dots-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Dots</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fdots"></a>C function: <em><code>void</code></em> <strong>mgl_dots</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fdots_005fa"></a>C function: <em><code>void</code></em> <strong>mgl_dots_a</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fdots_005fca"></a>C function: <em><code>void</code></em> <strong>mgl_dots_ca</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> c, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws the arbitrary placed points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. String <var>sch</var> sets the color scheme and kind of marks. If arrays <var>c</var>, <var>a</var> are specified then they define colors and transparencies of dots. You can use <a href="#tens">tens</a> plot with style ‘<samp> .</samp>’ to draw non-transparent dots with specified colors. Arrays <var>x</var>, <var>y</var>, <var>z</var>, <var>a</var> must have equal sizes. See also <a href="#crust">crust</a>, <a href="#tens">tens</a>, <a href="#mark">mark</a>, <a href="#plot">plot</a>. See <a href="#dots-sample">dots sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="crust"></a><dl>
-<dt><a name="index-crust"></a>MGL command: <em></em> <strong>crust</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Crust-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Crust</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcrust"></a>C function: <em><code>void</code></em> <strong>mgl_crust</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>The function reconstruct and draws the surface for arbitrary placed points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. String <var>sch</var> sets the color scheme. If string contain ‘<samp>#</samp>’ then wire plot is produced. Arrays <var>x</var>, <var>y</var>, <var>z</var> must have equal sizes. See also <a href="#dots">dots</a>, <a href="#triplot">triplot</a>. </p></dd></dl>
-
-
-<hr>
-<a name="Nonlinear-fitting"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-manipulation" accesskey="n" rel="next">Data manipulation</a>, Previous: <a href="#Other-plotting" accesskey="p" rel="prev">Other plotting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Nonlinear-fitting-1"></a>
-<h3 class="section">4.17 Nonlinear fitting</h3>
-
-<a name="index-Fit"></a>
-<a name="index-FitS"></a>
-<a name="index-PutsFit"></a>
-<a name="index-mglFitPnts"></a>
-<a name="index-Fit2"></a>
-<a name="index-Fit3"></a>
-
-<p>These functions fit data to formula. Fitting goal is to find formula parameters for the best fit the data points, i.e. to minimize the sum <em>\sum_i (f(x_i, y_i, z_i) - a_i)^2/s_i^2</em>. At this, approximation function ‘<samp>f</samp>’ can depend only on one argument ‘<samp>x</samp>’ (1D case), on two arguments ‘<samp>x,y</samp>’ (2D case) and on three arguments ‘<samp>x,y,z</samp>’ (3D case). The function ‘<samp>f</samp>’ also may depend on parameters. Normally the list of fitted parameters is specified by <var>var</var> string (like, ‘<samp>abcd</samp>’). Usually user should supply initial values for fitted parameters by <var>ini</var> variable. But if he/she don’t supply it then the zeros are used. Parameter <var>print</var>=<code>true</code> switch on printing the found coefficients to <var>Message</var> (see <a href="#Error-handling">Error handling</a>).
-</p>
-<p>Functions Fit() and FitS() do not draw the obtained data themselves. They fill the data <var>fit</var> by formula ‘<samp>f</samp>’ with found coefficients and return it. At this, the ‘<samp>x,y,z</samp>’ coordinates are equidistantly distributed in the axis range. Number of points in <var>fit</var> is defined by option <code>value</code> (default is <var>mglFitPnts</var>=100). Note, that this functions use GSL library and do something only if MathGL was compiled with GSL support. See <a href="#Nonlinear-fitting-hints">Nonlinear fitting hints</a>, for sample code and picture.
-</p>
-<a name="fits"></a><dl>
-<dt><a name="index-fits"></a>MGL command: <em></em> <strong>fits</strong> <em>res adat sdat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fits-1"></a>MGL command: <em></em> <strong>fits</strong> <em>res xdat adat sdat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fits-2"></a>MGL command: <em></em> <strong>fits</strong> <em>res xdat ydat adat sdat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fits-3"></a>MGL command: <em></em> <strong>fits</strong> <em>res xdat ydat zdat adat sdat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-FitS-1"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>FitS</strong> <em>(<code>const mglDataA &</code>a, <code>const mglDataA &</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-FitS-2"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>FitS</strong> <em>(<code>const mglDataA &</code>a, <code>const mglDataA &</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &</code>ini, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-FitS-3"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>FitS</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>a, <code>const mglDataA &</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-FitS-4"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>FitS</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>a, <code>const mglDataA &</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &</code>ini, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-FitS-5"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>FitS</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>a, <code>const mglDataA &</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-FitS-6"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>FitS</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>a, <code>const mglDataA &</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &</code>ini, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-FitS-7"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>FitS</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const mglDataA &</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-FitS-8"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>FitS</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const mglDataA &</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &</code>ini, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ffit_005fys"></a>C function: <em><code>HMDT</code></em> <strong>mgl_fit_ys</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>HCDT</code> s, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ffit_005fxys"></a>C function: <em><code>HMDT</code></em> <strong>mgl_fit_xys</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> a, <code>HCDT</code> s, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ffit_005fxyzs"></a>C function: <em><code>HMDT</code></em> <strong>mgl_fit_xyzs</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> a, <code>HCDT</code> s, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ffit_005fxyzas"></a>C function: <em><code>HMDT</code></em> <strong>mgl_fit_xyzas</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>HCDT</code> s, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini, <code>const char *</code>opt)</em></dt>
-<dd><p>Fit data along x-, y- and z-directions for array specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) with weight factor <var>s</var>[i,j,k].
-</p></dd></dl>
-
-<a name="fit"></a><dl>
-<dt><a name="index-fit"></a>MGL command: <em></em> <strong>fit</strong> <em>res adat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fit-1"></a>MGL command: <em></em> <strong>fit</strong> <em>res xdat adat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fit-2"></a>MGL command: <em></em> <strong>fit</strong> <em>res xdat ydat adat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fit-3"></a>MGL command: <em></em> <strong>fit</strong> <em>res xdat ydat zdat adat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-Fit-1"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fit-2"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &</code>ini, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fit-3"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fit-4"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &</code>ini, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fit-5"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fit-6"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &</code>ini, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fit-7"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fit-8"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &</code>ini, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ffit_005fy"></a>C function: <em><code>HMDT</code></em> <strong>mgl_fit_y</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ffit_005fxy"></a>C function: <em><code>HMDT</code></em> <strong>mgl_fit_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ffit_005fxyz"></a>C function: <em><code>HMDT</code></em> <strong>mgl_fit_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ffit_005fxyza"></a>C function: <em><code>HMDT</code></em> <strong>mgl_fit_xyza</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini, <code>const char *</code>opt)</em></dt>
-<dd><p>Fit data along x-, y- and z-directions for array specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) with weight factor 1.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-Fit2-1"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit2</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fit2-2"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit2</strong> <em>(<code>mglData &</code>fit, <code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &</code>ini, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fit3-1"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit3</strong> <em>(<code>mglData &</code>fit, <code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fit3-2"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit3</strong> <em>(<code>mglData &</code>fit, <code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &</code>ini, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ffit_005f2"></a>C function: <em><code>HMDT</code></em> <strong>mgl_fit_2</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ffit_005f3"></a>C function: <em><code>HMDT</code></em> <strong>mgl_fit_3</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini, <code>const char *</code>opt)</em></dt>
-<dd><p>Fit data along all directions for 2d or 3d arrays <var>a</var> with <var>s</var>=1 and <var>x</var>, <var>y</var>, <var>z</var> equidistantly distributed in axis range.
-</p></dd></dl>
-
-<a name="putsfit"></a><dl>
-<dt><a name="index-putsfit"></a>MGL command: <em></em> <strong>putsfit</strong> <em><code>x y</code> ['pre'='' 'fnt'='' <code>size=-1</code>]</em></dt>
-<dt><a name="index-PutsFit-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>PutsFit</strong> <em>(<code>mglPoint</code> p, <code>const char *</code>prefix=<code>""</code>, <code>const char *</code>font=<code>""</code>, <code>mreal</code> size=<code>-1</code>)</em></dt>
-<dt><a name="index-mgl_005fputs_005ffit"></a>C function: <em><code>void</code></em> <strong>mgl_puts_fit</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>const char *</code>prefix, <code>const char *</code>font, <code>mreal</code> size)</em></dt>
-<dd><p>Print last fitted formula with found coefficients (as numbers) at position <var>p0</var>. The string <var>prefix</var> will be printed before formula. All other parameters are the same as in <a href="#Text-printing">Text printing</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-_0028_0029-1"></a>Method on <code>mglGraph</code>: <em><code>const char *</code>GetFit</em> <strong>()</strong></dt>
-<dt><a name="index-mgl_005fget_005ffit"></a>C function only: <em><code>const char *</code></em> <strong>mgl_get_fit</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dt><a name="index-mgl_005fget_005ffit-1"></a>Fortran subroutine: <em><code></code></em> <strong>mgl_get_fit</strong> <em>(<code>long</code> gr, <code>char *</code>out, <code>int</code> len)</em></dt>
-<dd><p>Get last fitted formula with found coefficients (as numbers).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetFitChi"></a>Method on <code>mglGraph</code>: <em><code>mreal</code></em> <strong>GetFitChi</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fget_005ffit_005fchi"></a>C function: <em><code>mreal</code></em> <strong>mgl_get_fit_chi</strong> <em>()</em></dt>
-<dd><p>Get \chi for last fitted formula.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetFitCovar"></a>Method on <code>mglGraph</code>: <em><code>mreal</code></em> <strong>GetFitCovar</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fget_005ffit_005fcovar"></a>C function: <em><code>mreal</code></em> <strong>mgl_get_fit_covar</strong> <em>()</em></dt>
-<dd><p>Get covariance matrix for last fitted formula.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Data-manipulation"></a>
-<div class="header">
-<p>
-Previous: <a href="#Nonlinear-fitting" accesskey="p" rel="prev">Nonlinear fitting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-manipulation-1"></a>
-<h3 class="section">4.18 Data manipulation</h3>
-
-<a name="index-Hist"></a>
-<a name="index-Fill"></a>
-<a name="index-DataGrid"></a>
-
-<dl>
-<dt><a name="index-hist"></a>MGL command: <em></em> <strong>hist</strong> <em><small>RES</small> xdat adat</em></dt>
-<dt><a name="index-hist-1"></a>MGL command: <em></em> <strong>hist</strong> <em><small>RES</small> xdat ydat adat</em></dt>
-<dt><a name="index-hist-2"></a>MGL command: <em></em> <strong>hist</strong> <em><small>RES</small> xdat ydat zdat adat</em></dt>
-<dt><a name="index-Hist-2"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Hist</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>a, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Hist-3"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Hist</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>a, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Hist-4"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Hist</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fhist_005fx"></a>C function: <em><code>HMDT</code></em> <strong>mgl_hist_x</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> a, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fhist_005fxy"></a>C function: <em><code>HMDT</code></em> <strong>mgl_hist_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> a, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fhist_005fxyz"></a>C function: <em><code>HMDT</code></em> <strong>mgl_hist_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>opt)</em></dt>
-<dd><p>These functions make distribution (histogram) of data. They do not draw the obtained data themselves. These functions can be useful if user have data defined for random points (for example, after PIC simulation) and he want to produce a plot which require regular data (defined on grid(s)). The range for grids is always selected as axis range. Arrays <var>x</var>, <var>y</var>, <var>z</var> define the positions (coordinates) of random points. Array <var>a</var> define the data value. Number of points in output array <var>res</var> is defined by option <code>value</code> (default is <var>mglFitPnts</var>=100).
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-fill"></a>MGL command: <em></em> <strong>fill</strong> <em>dat 'eq'</em></dt>
-<dt><a name="index-fill-1"></a>MGL command: <em></em> <strong>fill</strong> <em>dat 'eq' vdat</em></dt>
-<dt><a name="index-fill-2"></a>MGL command: <em></em> <strong>fill</strong> <em>dat 'eq' vdat wdat</em></dt>
-<dt><a name="index-Fill-2"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>mglData &</code>u, <code>const char *</code>eq, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fill-3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>mglData &</code>u, <code>const char *</code>eq, <code>const mglDataA &</code>v, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fill-4"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>mglData &</code>u, <code>const char *</code>eq, <code>const mglDataA &</code>v, <code>const mglDataA &</code>w, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005ffill_005feq"></a>C function: <em><code>void</code></em> <strong>mgl_data_fill_eq</strong> <em>(<code>HMGL</code> gr, <code>HMDT</code> u, <code>const char *</code>eq, <code>HCDT</code>v, <code>HCDT</code>w, <code>const char *</code>opt)</em></dt>
-<dd><p>Fills the value of array ‘<samp>u</samp>’ according to the formula in string <var>eq</var>. Formula is an arbitrary expression depending on variables ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’, ‘<samp>u</samp>’, ‘<samp>v</samp>’, ‘<samp>w</samp>’. Coordinates ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’ are supposed to be normalized in axis range. Variable ‘<samp>u</samp>’ is the original value of the array. Variables ‘<samp>v</samp>’ and ‘<samp>w</samp>’ are values of arrays <var>v</var>, <var>w</var> which can be <code>NULL</code> (i.e. can be omitted).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-datagrid"></a>MGL command: <em></em> <strong>datagrid</strong> <em>dat xdat ydat zdat</em></dt>
-<dt><a name="index-DataGrid-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>DataGrid</strong> <em>(<code>mglData &</code>u, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fgrid"></a>C function: <em><code>void</code></em> <strong>mgl_data_grid</strong> <em>(<code>HMGL</code> gr, <code>HMDT</code> u, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>opt)</em></dt>
-<dd><p>Fills the value of array ‘<samp>u</samp>’ according to the linear interpolation of triangulated surface, found for arbitrary placed points ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’. Interpolation is done at points equidistantly distributed in axis range. NAN value is used for grid points placed outside of triangulated surface. See <a href="#Making-regular-data">Making regular data</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-refill"></a>MGL command: <em></em> <strong>refill</strong> <em>dat xdat vdat [sl=-1]</em></dt>
-<dt><a name="index-refill-1"></a>MGL command: <em></em> <strong>refill</strong> <em>dat xdat ydat vdat [sl=-1]</em></dt>
-<dt><a name="index-refill-2"></a>MGL command: <em></em> <strong>refill</strong> <em>dat xdat ydat zdat vdat</em></dt>
-<dt><a name="index-Refill-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Refill</strong> <em>(<code>mglDataA &</code>dat, <code>const mglDataA &</code>x, <code>const mglDataA &</code>v, <code>long</code> sl=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Refill-2"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Refill</strong> <em>(<code>mglDataA &</code>dat, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>v, <code>long</code> sl=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Refill-3"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Refill</strong> <em>(<code>mglDataA &</code>dat, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>v, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005frefill_005fgr"></a>C function: <em><code>void</code></em> <strong>mgl_data_refill_gr</strong> <em>(<code>HMGL</code> gr, <code>HMDT</code> a, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> v, <code>long</code> sl, <code>const char *</code>opt)</em></dt>
-<dd><p>Fills by interpolated values of array <var>v</var> at the point {<var>x</var>, <var>y</var>, <var>z</var>}={<code>X[i], Y[j], Z[k]</code>} (or {<var>x</var>, <var>y</var>, <var>z</var>}={<code>X[i,j,k], Y[i,j,k], Z[i,j,k]</code>} if <var>x</var>, <var>y</var>, <var>z</var> are not 1d arrays), where <code>X,Y,Z</code> are equidistantly distributed in axis range and have the same sizes as array <var>dat</var>. If parameter <var>sl</var> is 0 or positive then changes will be applied only for slice <var>sl</var>.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-pde"></a>MGL command: <em></em> <strong>pde</strong> <em><small>RES</small> 'ham' ini_re ini_im [<code>dz=0.1 k0=100</code>]</em></dt>
-<dt><a name="index-PDE"></a>Method on <code>mglGraph</code>: <em><code>mglData</code></em> <strong>PDE</strong> <em>(<code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>mreal</code> dz=<code>0.1</code>, <code>mreal</code> k0=<code>100</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fpde_005fsolve"></a>C function: <em><code>HMDT</code></em> <strong>mgl_pde_solve</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>ham, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>mreal</code> dz, <code>mreal</code> k0, <code>const char *</code>opt)</em></dt>
-<dd><p>Solves equation du/dz = i*k0*<var>ham</var>(p,q,x,y,z,|u|)[u], where p=-i/k0*d/dx, q=-i/k0*d/dy are pseudo-differential operators. Parameters <var>ini_re</var>, <var>ini_im</var> specify real and imaginary part of initial field distribution. Coordinates ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’ are supposed to be normalized in axis range. Note, that really this ranges are increased by factor 3/2 for purpose of reducing reflection from boundaries. Parameter <var>dz</var> set the step along evolutionary coordinate z. At this moment, simplified form of function <var>ham</var> is supported – all “mixed” terms (like ‘<samp>x*p</samp>’->x*d/dx) are excluded. For example, in 2D case this function is effectively <em>ham = f(p,z) + g(x,z,u)</em>. However commutable combinations (like ‘<samp>x*q</samp>’->x*d/dy) are allowed. Here variable ‘<samp>u</samp>’ is used for field amplitude |u|. This allow one solve nonlinear problems – for example, for nonlinear Shrodinger equation you may set <code>ham="p^2 + q^2 - u^2"</code>. You may specify imaginary part for wave absorption, like <code>ham = "p^2 + i*x*(x>0)"</code>, but only if dependence on variable ‘<samp>i</samp>’ is linear (i.e. <em>ham = hre+i*him</em>). See <a href="#PDE-solving-hints">PDE solving hints</a>, for sample code and picture.
-</p></dd></dl>
-
-
-
-
-
-
-
-
-
-
-<hr>
-<a name="Widget-classes"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-processing" accesskey="n" rel="next">Data processing</a>, Previous: <a href="#MathGL-core" accesskey="p" rel="prev">MathGL core</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-
-<a name="Widget-classes-1"></a>
-<h2 class="chapter">5 Widget classes</h2>
-
-<a name="index-mglWnd"></a>
-<a name="index-mglGLUT"></a>
-<a name="index-Fl_005fMathGL"></a>
-<a name="index-QMathGL"></a>
-<a name="index-window-1"></a>
-<a name="index-widgets-1"></a>
-
-<p>There are set of “window” classes for making a window with MathGL graphics: <code>mglWindow</code>, <code>mglFLTK</code>, <code>mglQT</code> and <code>mglGLUT</code> for whole window, <code>Fl_MathGL</code> and <code>QMathGL</code> as widgets. All these classes allow user to show, rotate, export, and change view of the plot using keyboard. Most of them (except <code>mglGLUT</code>) also have toolbar and menu for simplifying plot manipulation. All window classes have mostly the same set of functions derived from <a href="#mglWnd-class">mglWnd class</a>.
-</p>
-<p>For drawing you can use: <code>NULL</code> pointer if you’ll update plot manually, global callback function of type <code>int draw(<code>HMGL</code> gr, <code>void *</code>p)</code> or <code>int draw(<code>mglGraph *</code>gr)</code>, or instance of class derived from <a href="#mglDraw-class">mglDraw class</a>. Basically, this class have 2 main virtual methods:
-</p><pre class="verbatim">class mglDraw
-{
-public:
- virtual int Draw(mglGraph *) { return 0; };
- virtual void Reload() {};
-};
-</pre><p>You should inherit yours class from <code>mglDraw</code> and re-implement one or both functions for drawing.
-</p>
-<p>The window can be constructed using one of following classes (see <a href="#Using-MathGL-window">Using MathGL window</a> for examples).
-</p>
-<dl>
-<dt><a name="index-mglFLTK"></a>Constructor on <code>mglFLTK</code>: <em></em> <strong>mglFLTK</strong> <em>(<code>const char *</code>title=<code>"MathGL"</code>)</em></dt>
-<dt><a name="index-mglFLTK-1"></a>Constructor on <code>mglFLTK</code>: <em></em> <strong>mglFLTK</strong> <em>(<code>int</code> (*draw)(<code>HMGL</code> gr, <code>void *</code>p), <code>const char *</code>title=<code>"MathGL"</code>, <code>void *</code>par=<code>NULL</code>, <code>void</code> (*reload)(<code>HMGL</code> gr, <code>void *</code>p)=0)</em></dt>
-<dt><a name="index-mglFLTK-2"></a>Constructor on <code>mglFLTK</code>: <em></em> <strong>mglFLTK</strong> <em>(<code>int</code> (*draw)(<code>mglGraph *</code>gr), <code>const char *</code>title=<code>"MathGL"</code>)</em></dt>
-<dt><a name="index-mglFLTK-3"></a>Constructor on <code>mglFLTK</code>: <em></em> <strong>mglFLTK</strong> <em>(<code>mglDraw *</code>draw, <code>const char *</code>title=<code>"MathGL"</code>)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fgraph_005ffltk"></a>C function: <em><code>HMGL</code></em> <strong>mgl_create_graph_fltk</strong> <em>(<code>int</code> (*draw)(<code>HMGL</code> gr, <code>void *</code>p), <code>const char *</code>title, <code>void *</code>par, <code>void</code> (*reload)(<code>HMGL</code> gr, <code>void *</code>p))</em></dt>
-<dd>
-<p>Creates a FLTK-based window for plotting. Parameter <var>draw</var> sets a pointer to drawing function (this is the name of function) or instance of <a href="#mglDraw-class">mglDraw class</a>. There is support of a list of plots (frames). So as one can prepare a set of frames at first and redraw it fast later (but it requires more memory). Function should return positive number of frames for the list or zero if it will plot directly. Note, that <var>draw</var> can be <code>NULL</code> for displaying static bitmaps only (no animation or slides). Parameter <var>title</var> sets the title of the window. Parameter <var>par</var> contains pointer to data for the plotting function <var>draw</var>. FLTK-based windows is a bit faster than Qt ones, and provide better support of multi-threading.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-RunThr"></a>Method on <code>mglFLTK</code>: <em><code>int</code></em> <strong>RunThr</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005ffltk_005fthr"></a>C function: <em><code>int</code></em> <strong>mgl_fltk_thr</strong> <em>()</em></dt>
-<dd><p>Run main loop for event handling in separate thread. Note, right now it work for FLTK windows only.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-mglQT"></a>Constructor on <code>mglQT</code>: <em></em> <strong>mglQT</strong> <em>(<code>const char *</code>title=<code>"MathGL"</code>)</em></dt>
-<dt><a name="index-mglQT-1"></a>Constructor on <code>mglQT</code>: <em></em> <strong>mglQT</strong> <em>(<code>int</code> (*draw)(<code>HMGL</code> gr, <code>void *</code>p), <code>const char *</code>title=<code>"MathGL"</code>, <code>void *</code>par=<code>NULL</code>, <code>void</code> (*reload)(<code>HMGL</code> gr, <code>void *</code>p)=0)</em></dt>
-<dt><a name="index-mglQT-2"></a>Constructor on <code>mglQT</code>: <em></em> <strong>mglQT</strong> <em>(<code>int</code> (*draw)(<code>mglGraph *</code>gr), <code>const char *</code>title=<code>"MathGL"</code>)</em></dt>
-<dt><a name="index-mglQT-3"></a>Constructor on <code>mglQT</code>: <em></em> <strong>mglQT</strong> <em>(<code>mglDraw *</code>draw, <code>const char *</code>title=<code>"MathGL"</code>)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fgraph_005fqt"></a>C function: <em><code>HMGL</code></em> <strong>mgl_create_graph_qt</strong> <em>(<code>int</code> (*draw)(<code>HMGL</code> gr, <code>void *</code>p), <code>const char *</code>title, <code>void *</code>par, <code>void</code> (*reload)(<code>HMGL</code> gr, <code>void *</code>p))</em></dt>
-<dd>
-<p>Creates a FLTK-based window for plotting. Parameter <var>draw</var> sets a pointer to drawing function (this is the name of function) or instance of <a href="#mglDraw-class">mglDraw class</a>. There is support of a list of plots (frames). So as one can prepare a set of frames at first and redraw it fast later (but it requires more memory). Function should return positive number of frames for the list or zero if it will plot directly. Note, that <var>draw</var> can be <code>NULL</code> for displaying static bitmaps only (no animation or slides). Parameter <var>title</var> sets the title of the window. Parameter <var>par</var> contains pointer to data for the plotting function <var>draw</var>.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-mglGLUT-1"></a>Constructor on <code>mglGLUT</code>: <em></em> <strong>mglGLUT</strong> <em>(<code>const char *</code>title=<code>"MathGL"</code>)</em></dt>
-<dt><a name="index-mglGLUT-2"></a>Constructor on <code>mglGLUT</code>: <em></em> <strong>mglGLUT</strong> <em>(<code>int</code> (*draw)(<code>HMGL</code> gr, <code>void *</code>p), <code>const char *</code>title=<code>"MathGL"</code>, <code>void *</code>par=<code>NULL</code>, <code>void</code> (*reload)(<code>HMGL</code> gr, <code>void *</code>p)=0)</em></dt>
-<dt><a name="index-mglGLUT-3"></a>Constructor on <code>mglGLUT</code>: <em></em> <strong>mglGLUT</strong> <em>(<code>int</code> (*draw)(<code>mglGraph *</code>gr), <code>const char *</code>title=<code>"MathGL"</code>)</em></dt>
-<dt><a name="index-mglGLUT-4"></a>Constructor on <code>mglGLUT</code>: <em></em> <strong>mglGLUT</strong> <em>(<code>mglDraw *</code>draw, <code>const char *</code>title=<code>"MathGL"</code>)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fgraph_005fglut"></a>C function: <em><code>HMGL</code></em> <strong>mgl_create_graph_glut</strong> <em>(<code>int</code> (*draw)(<code>HMGL</code> gr, <code>void *</code>p), <code>const char *</code>title, <code>void *</code>par, <code>void</code> (*reload)(<code>HMGL</code> gr, <code>void *</code>p))</em></dt>
-<dd>
-<p>Creates a GLUT-based window for plotting. Parameter <var>draw</var> sets a pointer to drawing function (this is the name of function) or instance of <code>mglDraw</code> class. There is support of a list of plots (frames). So as one can prepare a set of frames at first and redraw it fast later (but it requires more memory). Function should return positive number of frames for the list or zero if it will plot directly. Note, that <var>draw</var> can be <code>NULL</code> for displaying static bitmaps only (no animation or slides). Parameter <var>title</var> sets the title of the window. Parameter <var>par</var> contains pointer to data for the plotting function <var>draw</var>. GLUT-based windows are fastest one but there is no toolbar, and plot have some issues due to OpenGL limitations.
-</p>
-<p>There are some keys handles for manipulating by the plot: ’a’, ’d’, ’w’, ’s’ for the rotating; ’,’, ’.’ for viewing of the previous or next frames in the list; ’r’ for the switching of transparency; ’f’ for the switching of lightning; ’x’ for hiding (closing) the window.
-</p></dd></dl>
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#mglWnd-class" accesskey="1">mglWnd class</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mglDraw-class" accesskey="2">mglDraw class</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Fl_005fMathGL-class" accesskey="3">Fl_MathGL class</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#QMathGL-class" accesskey="4">QMathGL class</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#wxMathGL-class" accesskey="5">wxMathGL class</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-
-<hr>
-<a name="mglWnd-class"></a>
-<div class="header">
-<p>
-Next: <a href="#mglDraw-class" accesskey="n" rel="next">mglDraw class</a>, Up: <a href="#Widget-classes" accesskey="u" rel="up">Widget classes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="mglWnd-class-1"></a>
-<h3 class="section">5.1 mglWnd class</h3>
-
-<a name="index-mglWnd-1"></a>
-<a name="index-window-2"></a>
-
-<p>This class is abstract class derived from mglGraph class (see <a href="#MathGL-core">MathGL core</a>). It is defined in <code>#include <mgl2/wnd.h></code> and provide base methods for handling window with MathGL graphics. Inherited classes are exist for QT and FLTK widget libraries: <code>mglQT</code> in <code>#include <mgl2/qt.h></code>, <code>mglFLTK</code> in <code>#include <mgl2/fltk.h></code>.
-</p>
-
-<dl>
-<dt><a name="index-Run"></a>Method on <code>mglWnd</code>: <em><code>int</code></em> <strong>Run</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fqt_005frun"></a>C function: <em><code>int</code></em> <strong>mgl_qt_run</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005ffltk_005frun"></a>C function: <em><code>int</code></em> <strong>mgl_fltk_run</strong> <em>()</em></dt>
-<dd><p>Run main loop for event handling. Usually it should be called in a separate thread or as last function call in <code>main()</code>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetDrawFunc"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>SetDrawFunc</strong> <em>(<code>int</code> (*draw)(<code>HMGL</code> gr, <code>void *</code>p), <code>void *</code>par=<code>NULL</code>, <code>void</code> (*reload)(<code>void *</code>p)=<code>NULL</code>)</em></dt>
-<dt><a name="index-SetDrawFunc-1"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>SetDrawFunc</strong> <em>(<code>int</code> (*draw)(<code>mglGraph *</code>gr))</em></dt>
-<dt><a name="index-SetDrawFunc-2"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>SetDrawFunc</strong> <em>(<code>mglDraw *</code>obj)</em></dt>
-<dt><a name="index-mgl_005fwnd_005fset_005ffunc"></a>C function: <em><code>void</code></em> <strong>mgl_wnd_set_func</strong> <em>(<code>HMGL</code> gr, <code>int</code> (*draw)(<code>HMGL</code> gr, <code>void *</code>p), <code>void *</code>par, <code>void</code> (*reload)(<code>void *</code>p))</em></dt>
-<dd><p>Set callback functions for drawing (<var>draw</var>) and data reloading (<var>reload</var>), or instance <var>obj</var> of a class derived from <code>mglDraw</code>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetClickFunc"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>SetClickFunc</strong> <em>(<code>void</code> (*func)(<code>HMGL</code> gr, <code>void *</code>p))</em></dt>
-<dt><a name="index-mgl_005fset_005fclick_005ffunc"></a>C function: <em><code>void</code></em> <strong>mgl_set_click_func</strong> <em>(<code>void</code> (*func)(<code>HMGL</code> gr, <code>void *</code>p))</em></dt>
-<dd><p>Set callback function <var>func</var> which will be called on mouse click.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetMutex_0028pthread_005fmutex_005ft-_002amutex_0029"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>SetMutex(<code>pthread_mutex_t *</code>mutex)</strong></dt>
-<dt><a name="index-mgl_005fwnd_005fset_005fmutex_0028HMGL"></a>C function: <em><code>void</code></em> <strong>mgl_wnd_set_mutex(<code>HMGL</code></strong> <em>gr, <code>pthread_mutex_t *</code>mutex)</em></dt>
-<dd><p>Set external mutex for lock/unlock external calculations by widget. This functions is called automatically at using <a href="#mglDraw-class">mglDraw class</a>.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-ToggleAlpha"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>ToggleAlpha</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005ftoggle_005falpha"></a>C function: <em><code>void</code></em> <strong>mgl_wnd_toggle_alpha</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Switch on/off transparency but do not overwrite switches in user drawing function.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ToggleLight"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>ToggleLight</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005ftoggle_005flight"></a>C function: <em><code>void</code></em> <strong>mgl_wnd_toggle_light</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Switch on/off lighting but do not overwrite switches in user drawing function.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ToggleRotate"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>ToggleRotate</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005ftoggle_005frotate"></a>C function: <em><code>void</code></em> <strong>mgl_wnd_toggle_rotate</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Switch on/off rotation by mouse. Usually, left button is used for rotation, middle button for shift, right button for zoom/perspective.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ToggleZoom"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>ToggleZoom</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005ftoggle_005fzoom"></a>C function: <em><code>void</code></em> <strong>mgl_wnd_toggle_zoom</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Switch on/off zooming by mouse. Just select rectangular region by mouse and it will be zoomed in.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ToggleNo"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>ToggleNo</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005ftoggle_005fno"></a>C function: <em><code>void</code></em> <strong>mgl_wnd_toggle_no</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Switch off all zooming and rotation and restore initial state.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Update"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>Update</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005fupdate"></a>C function: <em><code>void</code></em> <strong>mgl_wnd_update</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Update window contents. This is very useful function for manual updating the plot while long calculation was running in parallel thread.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ReLoad"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>ReLoad</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005freload"></a>C function: <em><code>void</code></em> <strong>mgl_wnd_reload</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Reload user data and update picture. This function also update number of frames which drawing function can create.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Adjust-2"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>Adjust</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005fadjust"></a>C function: <em><code>void</code></em> <strong>mgl_wnd_adjust</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Adjust size of bitmap to window size.
-</p></dd></dl>
-<dl>
-<dt><a name="index-NextFrame"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>NextFrame</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005fnext_005fframe"></a>C function: <em><code>void</code></em> <strong>mgl_wnd_next_frame</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Show next frame if one.
-</p></dd></dl>
-<dl>
-<dt><a name="index-PrevFrame"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>PrevFrame</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005fprev_005fframe"></a>C function: <em><code>void</code></em> <strong>mgl_wnd_prev_frame</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Show previous frame if one.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Animation"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>Animation</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005fanimation"></a>C function: <em><code>void</code></em> <strong>mgl_wnd_animation</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Run/stop slideshow (animation) of frames.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetDelay"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>SetDelay</strong> <em>(<code>double</code> dt)</em></dt>
-<dt><a name="index-mgl_005fwnd_005fset_005fdelay"></a>C function: <em><code>void</code></em> <strong>mgl_wnd_set_delay</strong> <em>(<code>HMGL</code> gr, <code>double</code> dt)</em></dt>
-<dd><p>Sets delay for animation in seconds. Default value is 1 sec.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetDelay"></a>Method on <code>mglWnd</code>: <em><code>double</code></em> <strong>GetDelay</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005fget_005fdelay"></a>C function: <em><code>double</code></em> <strong>mgl_wnd_get_delay</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Gets delay for animation in seconds.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Setup"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>Setup</strong> <em>(<code>bool</code> clfupd=<code>true</code>, <code>bool</code> showpos=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fsetup_005fwindow"></a>C function: <em><code>void</code></em> <strong>mgl_setup_window</strong> <em>(<code>HMGL</code> gr, <code>bool</code> clfupd, <code>bool</code> showpos)</em></dt>
-<dd><p>Enable/disable flags for:
-</p><ul>
-<li> clearing plot before Update();
-</li><li> showing the last mouse click position in the widget.
-</li></ul>
-</dd></dl>
-
-<dl>
-<dt><a name="index-LastMousePos"></a>Method on <code>mglWnd</code>: <em><code>mglPoint</code></em> <strong>LastMousePos</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fget_005flast_005fmouse_005fpos"></a>C function: <em><code>void</code></em> <strong>mgl_get_last_mouse_pos</strong> <em>(<code>HMGL</code> gr, <code>mreal *</code>x, <code>mreal *</code>y, <code>mreal *</code>z)</em></dt>
-<dd><p>Gets last position of mouse click.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Widget"></a>Method on <code>mglWnd</code>: <em><code>void *</code></em> <strong>Widget</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005ffltk_005fwidget"></a>C function: <em><code>void *</code></em> <strong>mgl_fltk_widget</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dt><a name="index-mgl_005fqt_005fwidget"></a>C function: <em><code>void *</code></em> <strong>mgl_qt_widget</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Return pointer to widget (<a href="#Fl_005fMathGL-class">Fl_MathGL class</a> or <a href="#QMathGL-class">QMathGL class</a>) used for plotting.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="mglDraw-class"></a>
-<div class="header">
-<p>
-Next: <a href="#Fl_005fMathGL-class" accesskey="n" rel="next">Fl_MathGL class</a>, Previous: <a href="#mglWnd-class" accesskey="p" rel="prev">mglWnd class</a>, Up: <a href="#Widget-classes" accesskey="u" rel="up">Widget classes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="mglDraw-class-1"></a>
-<h3 class="section">5.2 mglDraw class</h3>
-
-<a name="index-mglDraw"></a>
-
-<p>This class provide base functionality for callback drawing and running calculation in separate thread. It is defined in <code>#include <mgl2/wnd.h></code>. You should make inherited class and implement virtual functions if you need it.
-</p>
-<dl>
-<dt><a name="index-Draw"></a>Virtual method on <code>mglDraw</code>: <em><code>int</code></em> <strong>Draw</strong> <em>(<code>mglGraph *</code>gr)</em></dt>
-<dd><p>This is callback drawing function, which will be called when any redrawing is required for the window. There is support of a list of plots (frames). So as one can prepare a set of frames at first and redraw it fast later (but it requires more memory). Function should return positive number of frames for the list or zero if it will plot directly.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Reload"></a>Virtual method on <code>mglDraw</code>: <em><code>void</code></em> <strong>Reload</strong> <em>()</em></dt>
-<dd><p>This is callback function, which will be called if user press menu or toolbutton to reload data.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Click"></a>Virtual method on <code>mglDraw</code>: <em><code>void</code></em> <strong>Click</strong> <em>()</em></dt>
-<dd><p>This is callback function, which will be called if user click mouse.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Calc"></a>Virtual method on <code>mglDraw</code>: <em><code>void</code></em> <strong>Calc</strong> <em>()</em></dt>
-<dd><p>This is callback function, which will be called if user start calculations in separate thread by calling <code>mglDraw::Run()</code> function. It should periodically call <code>mglDraw::Check()</code> function to check if calculations should be paused.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Run-1"></a>Method on <code>mglDraw</code>: <em><code>void</code></em> <strong>Run</strong> <em>()</em></dt>
-<dd><p>Runs <code>mglDraw::Calc()</code> function in separate thread. It also initialize <code>mglDraw::thr</code> variable and unlock <code>mglDraw::mutex</code>. Function is present only if FLTK support for widgets was enabled.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Cancel"></a>Method on <code>mglDraw</code>: <em><code>void</code></em> <strong>Cancel</strong> <em>()</em></dt>
-<dd><p>Cancels thread with calculations. Function is present only if FLTK support for widgets was enabled.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Pause"></a>Method on <code>mglDraw</code>: <em><code>void</code></em> <strong>Pause</strong> <em>()</em></dt>
-<dd><p>Pauses thread with calculations by locking <code>mglDraw::mutex</code>. You should call <code>mglDraw::Continue()</code> to continue calculations. Function is present only if FLTK support for widgets was enabled.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Continue"></a>Method on <code>mglDraw</code>: <em><code>void</code></em> <strong>Continue</strong> <em>()</em></dt>
-<dd><p>Continues calculations by unlocking <code>mglDraw::mutex</code>. Function is present only if FLTK support for widgets was enabled.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Continue-1"></a>Method on <code>mglDraw</code>: <em><code>void</code></em> <strong>Continue</strong> <em>()</em></dt>
-<dd><p>Checks if calculations should be paused and pause it. Function is present only if FLTK support for widgets was enabled.
-</p></dd></dl>
-
-
-<hr>
-<a name="Fl_005fMathGL-class"></a>
-<div class="header">
-<p>
-Next: <a href="#QMathGL-class" accesskey="n" rel="next">QMathGL class</a>, Previous: <a href="#mglDraw-class" accesskey="p" rel="prev">mglDraw class</a>, Up: <a href="#Widget-classes" accesskey="u" rel="up">Widget classes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Fl_005fMathGL-class-1"></a>
-<h3 class="section">5.3 Fl_MathGL class</h3>
-
-<a name="index-Fl_005fMathGL-1"></a>
-<a name="index-widgets-2"></a>
-
-<p>Class is FLTK widget which display MathGL graphics. It is defined in <code>#include <mgl2/Fl_MathGL.h></code>.
-</p>
-<div align="center"><img src="fltk.png" alt="Example of FLTK window with MathGL plot.">
-</div>
-<dl>
-<dt><a name="index-set_005fdraw-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_draw</strong> <em>(<code>int</code> (*draw)(<code>HMGL</code> gr, <code>void *</code>p))</em></dt>
-<dt><a name="index-set_005fdraw-on-Fl_005fMathGL-1"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_draw</strong> <em>(<code>int</code> (*draw)(<code>mglGraph *</code>gr))</em></dt>
-<dt><a name="index-set_005fdraw-on-Fl_005fMathGL-2"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_draw</strong> <em>(<code>mglDraw *</code>draw)</em></dt>
-<dd><p>Sets drawing function as global function or as one from a class <code>mglDraw</code>. There is support of a list of plots (frames). So as one can prepare a set of frames at first and redraw it fast later (but it requires more memory). Function should return positive number of frames for the list or zero if it will plot directly. Parameter <var>par</var> contains pointer to data for the plotting function <var>draw</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-_0028_0029-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>mglDraw *</code>get_class</em> <strong>()</strong></dt>
-<dd><p>Get pointer to <code>mglDraw</code> class or <code>NULL</code> if absent.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-update-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>update</strong> <em>()</em></dt>
-<dd><p>Update (redraw) plot.
-</p></dd></dl>
-<dl>
-<dt><a name="index-set_005fangle-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_angle</strong> <em>(<code>mreal</code> t, <code>mreal</code> p)</em></dt>
-<dd><p>Set angles for additional plot rotation
-</p></dd></dl>
-<dl>
-<dt><a name="index-set_005fflag-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_flag</strong> <em>(<code>int</code> f)</em></dt>
-<dd><p>Set bitwise flags for general state (1-Alpha, 2-Light)
-</p></dd></dl>
-<dl>
-<dt><a name="index-set_005fstate-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_state</strong> <em>(<code>bool</code> r, <code>bool</code> z)</em></dt>
-<dd><p>Set flags for handling mouse:
-<var>z</var>=<code>true</code> allow zooming,
-<var>r</var>=<code>true</code> allow rotation/shifting/perspective and so on.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-set_005fzoom-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_zoom</strong> <em>(<code>mreal</code> X1, <code>mreal</code> Y1, <code>mreal</code> X2, <code>mreal</code> Y2)</em></dt>
-<dd><p>Set zoom in/out region
-</p></dd></dl>
-<dl>
-<dt><a name="index-get_005fzoom-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>get_zoom</strong> <em>(<code>mreal *</code>X1, <code>mreal *</code>Y1, <code>mreal *</code>X2, <code>mreal *</code>Y2)</em></dt>
-<dd><p>Get zoom in/out region
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-set_005fpopup-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_popup</strong> <em>(<code>const Fl_Menu_Item *</code>pmenu, <code>Fl_Widget *</code>w, <code>void *</code>v)</em></dt>
-<dd><p>Set popup menu pointer
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-set_005fgraph-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_graph</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dt><a name="index-set_005fgraph-on-Fl_005fMathGL-1"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_graph</strong> <em>(<code>mglGraph *</code>gr)</em></dt>
-<dd><p>Set new grapher instead of built-in one. Note that Fl_MathGL will automatically delete this object at destruction or at new <code>set_graph()</code> call.
-</p></dd></dl>
-<dl>
-<dt><a name="index-get_005fgraph-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>HMGL</code></em> <strong>get_graph</strong> <em>()</em></dt>
-<dd><p>Get pointer to grapher.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-set_005fshow_005fwarn-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_show_warn</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Show window with warnings after script parsing.
-</p></dd></dl>
-<dl>
-<dt><a name="index-stop-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>stop</strong> <em>(<code>bool</code> stop=<code>true</code>)</em></dt>
-<dd><p>Ask to stop of script parsing.
-</p></dd></dl>
-<dl>
-<dt><a name="index-set_005fhandle_005fkey-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_handle_key</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Enable/disable key handling as in mglview (default is false).
-</p></dd></dl>
-<dl>
-<dt><a name="index-get_005flast_005fid-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>int</code></em> <strong>get_last_id</strong> <em>()</em></dt>
-<dd><p>Get id of last clicked object.
-</p></dd></dl>
-<dl>
-<dt><a name="index-running-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>bool</code></em> <strong>running</strong> <em>()</em></dt>
-<dd><p>Check if script is parsing now or not.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-tet_005fval-of-Fl_005fMathGL"></a>Fl_MathGL option of Fl_MathGL: <em><code>Fl_Valuator *</code></em> <strong>tet_val</strong></dt>
-<dd><p>Pointer to external tet-angle validator.
-</p></dd></dl>
-<dl>
-<dt><a name="index-phi_005fval-of-Fl_005fMathGL"></a>Fl_MathGL option of Fl_MathGL: <em><code>Fl_Valuator *</code></em> <strong>phi_val</strong></dt>
-<dd><p>Pointer to external phi-angle validator.
-</p></dd></dl>
-
-
-<hr>
-<a name="QMathGL-class"></a>
-<div class="header">
-<p>
-Next: <a href="#wxMathGL-class" accesskey="n" rel="next">wxMathGL class</a>, Previous: <a href="#Fl_005fMathGL-class" accesskey="p" rel="prev">Fl_MathGL class</a>, Up: <a href="#Widget-classes" accesskey="u" rel="up">Widget classes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="QMathGL-class-1"></a>
-<h3 class="section">5.4 QMathGL class</h3>
-
-<a name="index-QMathGL-1"></a>
-<a name="index-widgets-3"></a>
-
-<p>Class is Qt widget which display MathGL graphics. It is defined in <code>#include <mgl2/qt.h></code>.
-</p>
-<div align="center"><img src="qt.png" alt="Example of Qt window with MathGL plot.">
-</div>
-<dl>
-<dt><a name="index-setDraw-on-QMathGL"></a>Method on QMathGL: <em><code>void</code></em> <strong>setDraw</strong> <em>(<code>mglDraw *</code>dr)</em></dt>
-<dd><p>Sets drawing functions from a class inherited from <code>mglDraw</code>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-setDraw-on-QMathGL-1"></a>Method on QMathGL: <em><code>void</code></em> <strong>setDraw</strong> <em>(<code>int (*</code>draw<code>)(mglBase *</code>gr, <code>void *</code>p<code>)</code>, <code>void *</code>par=<code>NULL</code>)</em></dt>
-<dt><a name="index-setDraw-on-QMathGL-2"></a>Method on QMathGL: <em><code>void</code></em> <strong>setDraw</strong> <em>(<code>int (*</code>draw<code>)(mglGraph *</code>gr<code>)</code>)</em></dt>
-<dd><p>Sets the drawing function <var>draw</var>. There is support of a list of plots (frames). So as one can prepare a set of frames at first and redraw it fast later (but it requires more memory). Function should return positive number of frames for the list or zero if it will plot directly. Parameter <var>par</var> contains pointer to data for the plotting function <var>draw</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-setGraph-on-QMathGL"></a>Method on QMathGL: <em><code>void</code></em> <strong>setGraph</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dt><a name="index-setGraph-on-QMathGL-1"></a>Method on QMathGL: <em><code>void</code></em> <strong>setGraph</strong> <em>(<code>mglGraph *</code>gr)</em></dt>
-<dd><p>Set pointer to external grapher (instead of built-in one). Note that QMathGL will automatically delete this object at destruction or at new <code>setGraph()</code> call.
-</p></dd></dl>
-<dl>
-<dt><a name="index-getGraph-on-QMathGL"></a>Method on QMathGL: <em><code>HMGL</code></em> <strong>getGraph</strong> <em>()</em></dt>
-<dd><p>Get pointer to grapher.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-setPopup-on-QMathGL"></a>Method on QMathGL: <em><code>void</code></em> <strong>setPopup</strong> <em>(<code>QMenu *</code>p)</em></dt>
-<dd><p>Set popup menu pointer.
-</p></dd></dl>
-<dl>
-<dt><a name="index-setSize-on-QMathGL"></a>Method on QMathGL: <em><code>void</code></em> <strong>setSize</strong> <em>(<code>int</code> w, <code>int</code> h)</em></dt>
-<dd><p>Set widget/picture sizes
-</p></dd></dl>
-<dl>
-<dt><a name="index-getRatio-on-QMathGL"></a>Method on QMathGL: <em><code>double</code></em> <strong>getRatio</strong> <em>()</em></dt>
-<dd><p>Return aspect ratio of the picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-getPer-on-QMathGL"></a>Method on QMathGL: <em><code>int</code></em> <strong>getPer</strong> <em>()</em></dt>
-<dd><p>Get perspective value in percents.
-</p></dd></dl>
-<dl>
-<dt><a name="index-getPhi-on-QMathGL"></a>Method on QMathGL: <em><code>int</code></em> <strong>getPhi</strong> <em>()</em></dt>
-<dd><p>Get Phi-angle value in degrees.
-</p></dd></dl>
-<dl>
-<dt><a name="index-getTet-on-QMathGL"></a>Method on QMathGL: <em><code>int</code></em> <strong>getTet</strong> <em>()</em></dt>
-<dd><p>Get Theta-angle value in degrees.
-</p></dd></dl>
-<dl>
-<dt><a name="index-getAlpha-on-QMathGL"></a>Method on QMathGL: <em><code>bool</code></em> <strong>getAlpha</strong> <em>()</em></dt>
-<dd><p>Get transparency state.
-</p></dd></dl>
-<dl>
-<dt><a name="index-getLight-on-QMathGL"></a>Method on QMathGL: <em><code>bool</code></em> <strong>getLight</strong> <em>()</em></dt>
-<dd><p>Get lightning state.
-</p></dd></dl>
-<dl>
-<dt><a name="index-getZoom-on-QMathGL"></a>Method on QMathGL: <em><code>bool</code></em> <strong>getZoom</strong> <em>()</em></dt>
-<dd><p>Get mouse zooming state.
-</p></dd></dl>
-<dl>
-<dt><a name="index-getRotate-on-QMathGL"></a>Method on QMathGL: <em><code>bool</code></em> <strong>getRotate</strong> <em>()</em></dt>
-<dd><p>Get mouse rotation state.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-refresh"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>refresh</strong> <em>()</em></dt>
-<dd><p>Redraw saved bitmap without executing drawing function.
-</p></dd></dl>
-<dl>
-<dt><a name="index-update"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>update</strong> <em>()</em></dt>
-<dd><p>Update picture by executing drawing function.
-</p></dd></dl>
-<dl>
-<dt><a name="index-copy"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>copy</strong> <em>()</em></dt>
-<dd><p>Copy graphics to clipboard.
-</p></dd></dl>
-<dl>
-<dt><a name="index-copyClickCoor"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>copyClickCoor</strong> <em>()</em></dt>
-<dd><p>Copy coordinates of click (as text).
-</p></dd></dl>
-<dl>
-<dt><a name="index-print"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>print</strong> <em>()</em></dt>
-<dd><p>Print current picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-stop-1"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>stop</strong> <em>()</em></dt>
-<dd><p>Send signal to stop drawing.
-</p></dd></dl>
-<dl>
-<dt><a name="index-adjust-1"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>adjust</strong> <em>()</em></dt>
-<dd><p>Adjust image size to fit whole widget.
-</p></dd></dl>
-<dl>
-<dt><a name="index-nextSlide"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>nextSlide</strong> <em>()</em></dt>
-<dd><p>Show next slide.
-</p></dd></dl>
-<dl>
-<dt><a name="index-prevSlide"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>prevSlide</strong> <em>()</em></dt>
-<dd><p>Show previous slide.
-</p></dd></dl>
-<dl>
-<dt><a name="index-animation"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>animation</strong> <em>(<code>bool</code> st=<code>true</code>)</em></dt>
-<dd><p>Start/stop animation.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-setPer"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>setPer</strong> <em>(<code>int</code> val)</em></dt>
-<dd><p>Set perspective value.
-</p></dd></dl>
-<dl>
-<dt><a name="index-setPhi"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>setPhi</strong> <em>(<code>int</code> val)</em></dt>
-<dd><p>Set Phi-angle value.
-</p></dd></dl>
-<dl>
-<dt><a name="index-setTet"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>setTet</strong> <em>(<code>int</code> val)</em></dt>
-<dd><p>Set Theta-angle value.
-</p></dd></dl>
-<dl>
-<dt><a name="index-setAlpha"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>setAlpha</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Switch on/off transparency.
-</p></dd></dl>
-<dl>
-<dt><a name="index-setLight"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>setLight</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Switch on/off lightning.
-</p></dd></dl>
-<dl>
-<dt><a name="index-setGrid"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>setGrid</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Switch on/off drawing of grid for absolute coordinates.
-</p></dd></dl>
-<dl>
-<dt><a name="index-setZoom"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>setZoom</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Switch on/off mouse zooming.
-</p></dd></dl>
-<dl>
-<dt><a name="index-setRotate"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>setRotate</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Switch on/off mouse rotation.
-</p></dd></dl>
-<dl>
-<dt><a name="index-zoomIn"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>zoomIn</strong> <em>()</em></dt>
-<dd><p>Zoom in graphics.
-</p></dd></dl>
-<dl>
-<dt><a name="index-zoomOut"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>zoomOut</strong> <em>()</em></dt>
-<dd><p>Zoom out graphics.
-</p></dd></dl>
-<dl>
-<dt><a name="index-shiftLeft"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>shiftLeft</strong> <em>()</em></dt>
-<dd><p>Shift graphics to left direction.
-</p></dd></dl>
-<dl>
-<dt><a name="index-shiftRight"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>shiftRight</strong> <em>()</em></dt>
-<dd><p>Shift graphics to right direction.
-</p></dd></dl>
-<dl>
-<dt><a name="index-shiftUp"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>shiftUp</strong> <em>()</em></dt>
-<dd><p>Shift graphics to up direction.
-</p></dd></dl>
-<dl>
-<dt><a name="index-shiftDown"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>shiftDown</strong> <em>()</em></dt>
-<dd><p>Shift graphics to down direction.
-</p></dd></dl>
-<dl>
-<dt><a name="index-restore"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>restore</strong> <em>()</em></dt>
-<dd><p>Restore zoom and rotation to default values.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-exportPNG"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportPNG</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Export current picture to PNG file.
-</p></dd></dl>
-<dl>
-<dt><a name="index-exportPNGs"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportPNGs</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Export current picture to PNG file (no transparency).
-</p></dd></dl>
-<dl>
-<dt><a name="index-exportJPG"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportJPG</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Export current picture to JPEG file.
-</p></dd></dl>
-<dl>
-<dt><a name="index-exportBPS"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportBPS</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Export current picture to bitmap EPS file.
-</p></dd></dl>
-<dl>
-<dt><a name="index-exportEPS"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportEPS</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Export current picture to vector EPS file.
-</p></dd></dl>
-<dl>
-<dt><a name="index-exportSVG"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportSVG</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Export current picture to SVG file.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-exportGIF"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportGIF</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Export current picture to GIF file.
-</p></dd></dl>
-<dl>
-<dt><a name="index-exportTEX"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportTEX</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Export current picture to LaTeX/Tikz file.
-</p></dd></dl>
-<dl>
-<dt><a name="index-exportTGA"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportTGA</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Export current picture to TGA file.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-exportXYZ"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportXYZ</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Export current picture to XYZ/XYZL/XYZF file.
-</p></dd></dl>
-<dl>
-<dt><a name="index-exportOBJ"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportOBJ</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Export current picture to OBJ/MTL file.
-</p></dd></dl>
-<dl>
-<dt><a name="index-exportSTL"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportSTL</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Export current picture to STL file.
-</p></dd></dl>
-<dl>
-<dt><a name="index-exportOFF"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportOFF</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Export current picture to OFF file.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-_0028bool"></a>Slot on <code>QMathGL</code>: <em><code>void</code>setUsePrimitives</em> <strong>(<code>bool</code></strong> <em>use)</em></dt>
-<dd><p>Enable using list of primitives for frames. This allows frames transformation/zoom but requires much more memory. Default value is <code>true</code>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-setMGLFont"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>setMGLFont</strong> <em>(<code>QString</code> path)</em></dt>
-<dd><p>Restore (<var>path</var>=<code>""</code>) or load font for graphics.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-about"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>about</strong> <em>()</em></dt>
-<dd><p>Show about information.
-</p></dd></dl>
-<dl>
-<dt><a name="index-aboutQt"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>aboutQt</strong> <em>()</em></dt>
-<dd><p>Show information about Qt version.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-phiChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>phiChanged</strong> <em>(<code>int</code> val)</em></dt>
-<dd><p>Phi angle changed (by mouse or by toolbar).
-</p></dd></dl>
-<dl>
-<dt><a name="index-tetChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>tetChanged</strong> <em>(<code>int</code> val)</em></dt>
-<dd><p>Tet angle changed (by mouse or by toolbar).
-</p></dd></dl>
-<dl>
-<dt><a name="index-perChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>perChanged</strong> <em>(<code>int</code> val)</em></dt>
-<dd><p>Perspective changed (by mouse or by toolbar).
-</p></dd></dl>
-<dl>
-<dt><a name="index-alphaChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>alphaChanged</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Transparency changed (by toolbar).
-</p></dd></dl>
-<dl>
-<dt><a name="index-lightChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>lightChanged</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Lighting changed (by toolbar).
-</p></dd></dl>
-<dl>
-<dt><a name="index-gridChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>gridChanged</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Grid drawing changed (by toolbar).
-</p></dd></dl>
-<dl>
-<dt><a name="index-zoomChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>zoomChanged</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Zooming changed (by toolbar).
-</p></dd></dl>
-<dl>
-<dt><a name="index-rotateChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>rotateChanged</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Rotation changed (by toolbar).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mouseClick"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>mouseClick</strong> <em>(<code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z)</em></dt>
-<dd><p>Mouse click take place at position {x,y,z}.
-</p></dd></dl>
-<dl>
-<dt><a name="index-frameChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>frameChanged</strong> <em>(<code>int</code> val)</em></dt>
-<dd><p>Need another frame to show.
-</p></dd></dl>
-<dl>
-<dt><a name="index-showWarn"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>showWarn</strong> <em>(<code>QString</code> warn)</em></dt>
-<dd><p>Need to show warning.
-</p></dd></dl>
-<dl>
-<dt><a name="index-posChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>posChanged</strong> <em>(<code>QString</code> pos)</em></dt>
-<dd><p>Position of mouse click is changed.
-</p></dd></dl>
-<dl>
-<dt><a name="index-objChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>objChanged</strong> <em>(<code>int</code> id)</em></dt>
-<dd><p>Object id is changed (due to mouse click).
-</p></dd></dl>
-<dl>
-<dt><a name="index-refreshData"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>refreshData</strong> <em>()</em></dt>
-<dd><p>Data can be changed (drawing is finished).
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-appName-of-QMathGL"></a>QMathGL option of QMathGL: <em><code>QString</code></em> <strong>appName</strong></dt>
-<dd><p>Application name for message boxes.
-</p></dd></dl>
-<dl>
-<dt><a name="index-autoResize-of-QMathGL"></a>QMathGL option of QMathGL: <em><code>bool</code></em> <strong>autoResize</strong></dt>
-<dd><p>Allow auto resizing (default is false).
-</p></dd></dl>
-
-
-<hr>
-<a name="wxMathGL-class"></a>
-<div class="header">
-<p>
-Previous: <a href="#QMathGL-class" accesskey="p" rel="prev">QMathGL class</a>, Up: <a href="#Widget-classes" accesskey="u" rel="up">Widget classes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="wxMathGL-class-1"></a>
-<h3 class="section">5.5 wxMathGL class</h3>
-
-<a name="index-wxMathGL"></a>
-<a name="index-widgets-4"></a>
-
-<p>Class is WX widget which display MathGL graphics. It is defined in <code>#include <mgl2/wx.h></code>.
-</p>
-<dl>
-<dt><a name="index-SetDraw-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetDraw</strong> <em>(<code>mglDraw *</code>dr)</em></dt>
-<dd><p>Sets drawing functions from a class inherited from <code>mglDraw</code>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetDraw-on-wxMathGL-1"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetDraw</strong> <em>(<code>int (*</code>draw<code>)(mglBase *</code>gr, <code>void *</code>p<code>)</code>, <code>void *</code>par=<code>NULL</code>)</em></dt>
-<dt><a name="index-SetDraw-on-wxMathGL-2"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetDraw</strong> <em>(<code>int (*</code>draw<code>)(mglGraph *</code>gr<code>)</code>)</em></dt>
-<dd><p>Sets the drawing function <var>draw</var>. There is support of a list of plots (frames). So as one can prepare a set of frames at first and redraw it fast later (but it requires more memory). Function should return positive number of frames for the list or zero if it will plot directly. Parameter <var>par</var> contains pointer to data for the plotting function <var>draw</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetGraph-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetGraph</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dt><a name="index-SetGraph-on-wxMathGL-1"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetGraph</strong> <em>(<code>mglGraph *</code>gr)</em></dt>
-<dd><p>Set pointer to external grapher (instead of built-in one). Note that wxMathGL will automatically delete this object at destruction or at new <code>setGraph()</code> call.
-</p></dd></dl>
-<dl>
-<dt><a name="index-GetGraph-on-wxMathGL"></a>Method on wxMathGL: <em><code>HMGL</code></em> <strong>GetGraph</strong> <em>()</em></dt>
-<dd><p>Get pointer to grapher.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetPopup-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetPopup</strong> <em>(<code>wxMenu *</code>p)</em></dt>
-<dd><p>Set popup menu pointer.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetSize-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetSize</strong> <em>(<code>int</code> w, <code>int</code> h)</em></dt>
-<dd><p>Set widget/picture sizes
-</p></dd></dl>
-<dl>
-<dt><a name="index-GetRatio-on-wxMathGL"></a>Method on wxMathGL: <em><code>double</code></em> <strong>GetRatio</strong> <em>()</em></dt>
-<dd><p>Return aspect ratio of the picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetPer-on-wxMathGL"></a>Method on wxMathGL: <em><code>int</code></em> <strong>GetPer</strong> <em>()</em></dt>
-<dd><p>Get perspective value in percents.
-</p></dd></dl>
-<dl>
-<dt><a name="index-GetPhi-on-wxMathGL"></a>Method on wxMathGL: <em><code>int</code></em> <strong>GetPhi</strong> <em>()</em></dt>
-<dd><p>Get Phi-angle value in degrees.
-</p></dd></dl>
-<dl>
-<dt><a name="index-GetTet-on-wxMathGL"></a>Method on wxMathGL: <em><code>int</code></em> <strong>GetTet</strong> <em>()</em></dt>
-<dd><p>Get Theta-angle value in degrees.
-</p></dd></dl>
-<dl>
-<dt><a name="index-GetAlpha-on-wxMathGL"></a>Method on wxMathGL: <em><code>bool</code></em> <strong>GetAlpha</strong> <em>()</em></dt>
-<dd><p>Get transparency state.
-</p></dd></dl>
-<dl>
-<dt><a name="index-GetLight-on-wxMathGL"></a>Method on wxMathGL: <em><code>bool</code></em> <strong>GetLight</strong> <em>()</em></dt>
-<dd><p>Get lightning state.
-</p></dd></dl>
-<dl>
-<dt><a name="index-GetZoom-on-wxMathGL"></a>Method on wxMathGL: <em><code>bool</code></em> <strong>GetZoom</strong> <em>()</em></dt>
-<dd><p>Get mouse zooming state.
-</p></dd></dl>
-<dl>
-<dt><a name="index-GetRotate-on-wxMathGL"></a>Method on wxMathGL: <em><code>bool</code></em> <strong>GetRotate</strong> <em>()</em></dt>
-<dd><p>Get mouse rotation state.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-Repaint-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>Repaint</strong> <em>()</em></dt>
-<dd><p>Redraw saved bitmap without executing drawing function.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Update-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>Update</strong> <em>()</em></dt>
-<dd><p>Update picture by executing drawing function.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Copy-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>Copy</strong> <em>()</em></dt>
-<dd><p>Copy graphics to clipboard.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Print-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>Print</strong> <em>()</em></dt>
-<dd><p>Print current picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Adjust-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>Adjust</strong> <em>()</em></dt>
-<dd><p>Adjust image size to fit whole widget.
-</p></dd></dl>
-<dl>
-<dt><a name="index-NextSlide-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>NextSlide</strong> <em>()</em></dt>
-<dd><p>Show next slide.
-</p></dd></dl>
-<dl>
-<dt><a name="index-PrevSlide-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>PrevSlide</strong> <em>()</em></dt>
-<dd><p>Show previous slide.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Animation-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>Animation</strong> <em>(<code>bool</code> st=<code>true</code>)</em></dt>
-<dd><p>Start/stop animation.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetPer-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetPer</strong> <em>(<code>int</code> val)</em></dt>
-<dd><p>Set perspective value.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetPhi-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetPhi</strong> <em>(<code>int</code> val)</em></dt>
-<dd><p>Set Phi-angle value.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetTet-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetTet</strong> <em>(<code>int</code> val)</em></dt>
-<dd><p>Set Theta-angle value.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetAlpha-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetAlpha</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Switch on/off transparency.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetLight-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetLight</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Switch on/off lightning.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetZoom-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetZoom</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Switch on/off mouse zooming.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetRotate-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetRotate</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Switch on/off mouse rotation.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ZoomIn-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ZoomIn</strong> <em>()</em></dt>
-<dd><p>Zoom in graphics.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ZoomOut-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ZoomOut</strong> <em>()</em></dt>
-<dd><p>Zoom out graphics.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ShiftLeft-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ShiftLeft</strong> <em>()</em></dt>
-<dd><p>Shift graphics to left direction.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ShiftRight-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ShiftRight</strong> <em>()</em></dt>
-<dd><p>Shift graphics to right direction.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ShiftUp-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ShiftUp</strong> <em>()</em></dt>
-<dd><p>Shift graphics to up direction.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ShiftDown-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ShiftDown</strong> <em>()</em></dt>
-<dd><p>Shift graphics to down direction.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Restore-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>Restore</strong> <em>()</em></dt>
-<dd><p>Restore zoom and rotation to default values.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-About-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>About</strong> <em>()</em></dt>
-<dd><p>Show about information.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ExportPNG-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ExportPNG</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Export current picture to PNG file.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ExportPNGs-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ExportPNGs</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Export current picture to PNG file (no transparency).
-</p></dd></dl>
-<dl>
-<dt><a name="index-ExportJPG-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ExportJPG</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Export current picture to JPEG file.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ExportBPS-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ExportBPS</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Export current picture to bitmap EPS file.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ExportEPS-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ExportEPS</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Export current picture to vector EPS file.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ExportSVG-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ExportSVG</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Export current picture to SVG file.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Data-processing"></a>
-<div class="header">
-<p>
-Next: <a href="#MGL-scripts" accesskey="n" rel="next">MGL scripts</a>, Previous: <a href="#Widget-classes" accesskey="p" rel="prev">Widget classes</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-processing-1"></a>
-<h2 class="chapter">6 Data processing</h2>
-
-
-
-<p>This chapter describe classes <code>mglData</code> and <code>mglDataC</code> for working with data arrays of real and complex numbers. Both classes are derived from abstract class <code>mglDataA</code>, and can be used as arguments of any plotting functions (see <a href="#MathGL-core">MathGL core</a>). These classes are defined in <code>#include <mgl2/data.h></code> and <code>#include <mgl2/datac.h></code> correspondingly. The classes have mostly the same set of functions for easy and safe allocation, resizing, loading, saving, modifying of data arrays. Also it can numerically differentiate and integrate data, interpolate, fill data by formula and so on. Classes support data with dimensions up to 3 (like function of 3 variables – x,y,z). The internal representation of numbers is mreal (or dual=std::complex<mreal> for <code>mglDataC</code>), which can be configured as float or double by selecting option <code>--enable-double</code> at the MathGL configuring (see <a href="#Installation">Installation</a>). Float type have smaller size in memory and usually it has enough precision in plotting purposes. However, double type provide high accuracy what can be important for time-axis, for example. Data arrays are denoted by Small Caps (like <small>DAT</small>) if it can be (re-)created by MGL commands.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Public-variables" accesskey="1">Public variables</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-constructor" accesskey="2">Data constructor</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-resizing" accesskey="3">Data resizing</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-filling" accesskey="4">Data filling</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#File-I_002fO" accesskey="5">File I/O</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Make-another-data" accesskey="6">Make another data</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-changing" accesskey="7">Data changing</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Interpolation" accesskey="8">Interpolation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-information" accesskey="9">Data information</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Operators">Operators</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Global-functions">Global functions</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Evaluate-expression">Evaluate expression</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Special-data-classes">Special data classes</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Public-variables"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-constructor" accesskey="n" rel="next">Data constructor</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Public-variables-1"></a>
-<h3 class="section">6.1 Public variables</h3>
-
-
-
-<dl>
-<dt><a name="index-a-of-mglData"></a>Variable of mglData: <em><code>mreal *</code></em> <strong>a</strong></dt>
-<dt><a name="index-a-of-mglDataC"></a>Variable of mglDataC: <em><code>dual *</code></em> <strong>a</strong></dt>
-<dd><p>Data array itself. The flat data representation is used. For example, matrix [nx x ny] is presented as flat (1d-) array with length nx*ny. The element with indexes {i, j, k} is a[i+nx*j+nx*ny*k] (indexes are zero based).
-</p></dd></dl>
-<dl>
-<dt><a name="index-nx-of-mglData"></a>Variable of mglData: <em><code>long</code></em> <strong>nx</strong></dt>
-<dt><a name="index-nx-of-mglDataC"></a>Variable of mglDataC: <em><code>long</code></em> <strong>nx</strong></dt>
-<dd><p>Number of points in 1st dimensions (’x’ dimension).
-</p></dd></dl>
-<dl>
-<dt><a name="index-ny-of-mglData"></a>Variable of mglData: <em><code>long</code></em> <strong>ny</strong></dt>
-<dt><a name="index-ny-of-mglDataC"></a>Variable of mglDataC: <em><code>long</code></em> <strong>ny</strong></dt>
-<dd><p>Number of points in 2nd dimensions (’y’ dimension).
-</p></dd></dl>
-<dl>
-<dt><a name="index-nz-of-mglData"></a>Variable of mglData: <em><code>long</code></em> <strong>nz</strong></dt>
-<dt><a name="index-nz-of-mglDataC"></a>Variable of mglDataC: <em><code>long</code></em> <strong>nz</strong></dt>
-<dd><p>Number of points in 3d dimensions (’z’ dimension).
-</p></dd></dl>
-<dl>
-<dt><a name="index-id-of-mglData"></a>Variable of mglData: <em><code>std::string</code></em> <strong>id</strong></dt>
-<dt><a name="index-id-of-mglDataC"></a>Variable of mglDataC: <em><code>std::string</code></em> <strong>id</strong></dt>
-<dd><p>Names of column (or slice if nz>1) – one character per column.
-</p></dd></dl>
-<dl>
-<dt><a name="index-link-of-mglData"></a>Variable of mglData: <em><code>bool</code></em> <strong>link</strong></dt>
-<dt><a name="index-link-of-mglDataC"></a>Variable of mglDataC: <em><code>bool</code></em> <strong>link</strong></dt>
-<dd><p>Flag to use external data, i.e. don’t delete it.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-s-of-mglDataA"></a>Variable of mglDataA: <em><code>std::wstring</code></em> <strong>s</strong></dt>
-<dd><p>Name of data. It is used in parsing of MGL scripts.
-</p></dd></dl>
-<dl>
-<dt><a name="index-temp-of-mglDataA"></a>Variable of mglDataA: <em><code>bool</code></em> <strong>temp</strong></dt>
-<dd><p>Flag of temporary variable, which should be deleted.
-</p></dd></dl>
-<dl>
-<dt><a name="index-func-of-mglDataA"></a>Variable of mglDataA: <em><code>void (*)(void *)</code></em> <strong>func</strong></dt>
-<dd><p>Pointer to callback function which will be called at destroying.
-</p></dd></dl>
-<dl>
-<dt><a name="index-o-of-mglDataA"></a>Variable of mglDataA: <em><code>void *</code></em> <strong>o</strong></dt>
-<dd><p>Pointer to object for callback function.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-GetVal"></a>Method on <code>mglData</code>: <em><code>mreal</code></em> <strong>GetVal</strong> <em>(<code>long</code> i)</em></dt>
-<dt><a name="index-GetVal-1"></a>Method on <code>mglDataC</code>: <em><code>mreal</code></em> <strong>GetVal</strong> <em>(<code>long</code> i)</em></dt>
-<dt><a name="index-SetVal"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>SetVal</strong> <em>(<code>mreal</code> val, <code>long</code> i)</em></dt>
-<dt><a name="index-SetVal-1"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>SetVal</strong> <em>(<code>mreal</code> val, <code>long</code> i)</em></dt>
-<dd><p>Gets or sets the value in by "flat" index <var>i</var> without border checking. Index <var>i</var> should be in range [0, nx*ny*nz-1].
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetNx-1"></a>Method on <code>mglDataA</code>: <em><code>long</code></em> <strong>GetNx</strong> <em>()</em></dt>
-<dt><a name="index-GetNy-1"></a>Method on <code>mglDataA</code>: <em><code>long</code></em> <strong>GetNy</strong> <em>()</em></dt>
-<dt><a name="index-GetNz-1"></a>Method on <code>mglDataA</code>: <em><code>long</code></em> <strong>GetNz</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fdata_005fget_005fnx"></a>C function: <em><code>long</code></em> <strong>mgl_data_get_nx</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dt><a name="index-mgl_005fdata_005fget_005fny"></a>C function: <em><code>long</code></em> <strong>mgl_data_get_ny</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dt><a name="index-mgl_005fdata_005fget_005fnz"></a>C function: <em><code>long</code></em> <strong>mgl_data_get_nz</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dd><p>Gets the x-, y-, z-size of the data.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mgl_005fdata_005fget_005fvalue"></a>C function: <em><code>mreal</code></em> <strong>mgl_data_get_value</strong> <em>(<code>HCDT</code> dat, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fget_005fvalue"></a>C function: <em><code>dual</code></em> <strong>mgl_datac_get_value</strong> <em>(<code>HCDT</code> dat, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dt><a name="index-mgl_005fdata_005fvalue"></a>C function: <em><code>mreal *</code></em> <strong>mgl_data_value</strong> <em>(<code>HMDT</code> dat, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fvalue"></a>C function: <em><code>dual *</code></em> <strong>mgl_datac_value</strong> <em>(<code>HADT</code> dat, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fvalue"></a>C function: <em><code>void</code></em> <strong>mgl_data_set_value</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> v, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset_005fvalue"></a>C function: <em><code>void</code></em> <strong>mgl_datac_set_value</strong> <em>(<code>HADT</code> dat, <code>dual</code> v, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dd><p>Gets or sets the value in specified cell of the data with border checking.
-</p></dd></dl>
-<dl>
-<dt><a name="index-mgl_005fdata_005fdata"></a>C function: <em><code>const mreal *</code></em> <strong>mgl_data_data</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fdata"></a>C function: <em><code>const dual *</code></em> <strong>mgl_datac_data</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dd><p>Returns pointer to internal data array.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mgl_005fdata_005fset_005ffunc"></a>C function only: <em><code>void</code></em> <strong>mgl_data_set_func</strong> <em>(<code>mglDataA *</code>dat, <code>void (*</code>func<code>)(void *)</code>, <code>void *</code>par)</em></dt>
-<dd><p>Set pointer to callback function which will be called at destroying.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mgl_005fdata_005fset_005fname"></a>C function: <em><code>void</code></em> <strong>mgl_data_set_name</strong> <em>(<code>mglDataA *</code>dat, <code>const char *</code>name)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fname_005fw"></a>C function: <em><code>void</code></em> <strong>mgl_data_set_name_w</strong> <em>(<code>mglDataA *</code>dat, <code>const wchar_t *</code>name)</em></dt>
-<dd><p>Set name of data, which used in parsing of MGL scripts.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Data-constructor"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-resizing" accesskey="n" rel="next">Data resizing</a>, Previous: <a href="#Public-variables" accesskey="p" rel="prev">Public variables</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-constructor-1"></a>
-<h3 class="section">6.2 Data constructor</h3>
-
-<a name="index-mglData"></a>
-
-
-<a name="new"></a><dl>
-<dt><a name="index-new"></a>MGL command: <em></em> <strong>new</strong> <em><small>DAT</small> [<code>nx=1</code> 'eq']</em></dt>
-<dt><a name="index-new-1"></a>MGL command: <em></em> <strong>new</strong> <em><small>DAT</small> <code>nx ny</code> ['eq']</em></dt>
-<dt><a name="index-new-2"></a>MGL command: <em></em> <strong>new</strong> <em><small>DAT</small> <code>nx ny nz</code> ['eq']</em></dt>
-<dt><a name="index-mglData-1"></a>Constructor on <code>mglData</code>: <em></em> <strong>mglData</strong> <em>(<code>int</code> mx=<code>1</code>, <code>int</code> my=<code>1</code>, <code>int</code> mz=<code>1</code>)</em></dt>
-<dt><a name="index-mglDataC"></a>Constructor on <code>mglDataC</code>: <em></em> <strong>mglDataC</strong> <em>(<code>int</code> mx=<code>1</code>, <code>int</code> my=<code>1</code>, <code>int</code> mz=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fdata"></a>C function: <em><code>HMDT</code></em> <strong>mgl_create_data</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fcreate_005fdata_005fsize"></a>C function: <em><code>HMDT</code></em> <strong>mgl_create_data_size</strong> <em>(<code>int</code> mx, <code>int</code> my, <code>int</code> mz)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fdatac"></a>C function: <em><code>HADT</code></em> <strong>mgl_create_datac</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fcreate_005fdatac_005fsize"></a>C function: <em><code>HADT</code></em> <strong>mgl_create_datac_size</strong> <em>(<code>int</code> mx, <code>int</code> my, <code>int</code> mz)</em></dt>
-<dd><p>Default constructor. Allocates the memory for data array and initializes it by zero. If string <var>eq</var> is specified then data will be filled by corresponding formula as in <a href="#fill">fill</a>.
-</p></dd></dl>
-
-<a name="copy"></a><dl>
-<dt><a name="index-copy-1"></a>MGL command: <em></em> <strong>copy</strong> <em><small>DAT</small> dat2 ['eq'='']</em></dt>
-<dt><a name="index-copy-2"></a>MGL command: <em></em> <strong>copy</strong> <em><small>DAT</small> <code>val</code></em></dt>
-<dt><a name="index-mglData-2"></a>Constructor on <code>mglData</code>: <em></em> <strong>mglData</strong> <em>(<code>const mglDataA &</code>dat2)</em></dt>
-<dt><a name="index-mglData-3"></a>Constructor on <code>mglData</code>: <em></em> <strong>mglData</strong> <em>(<code>const mglDataA *</code>dat2)</em></dt>
-<dt><a name="index-mglData-4"></a>Constructor on <code>mglData</code>: <em></em> <strong>mglData</strong> <em>(<code>int</code> size, <code>const float *</code>dat2)</em></dt>
-<dt><a name="index-mglData-5"></a>Constructor on <code>mglData</code>: <em></em> <strong>mglData</strong> <em>(<code>int</code> size, <code>int</code> cols, <code>const float *</code>dat2)</em></dt>
-<dt><a name="index-mglData-6"></a>Constructor on <code>mglData</code>: <em></em> <strong>mglData</strong> <em>(<code>int</code> size, <code>const double *</code>dat2)</em></dt>
-<dt><a name="index-mglData-7"></a>Constructor on <code>mglData</code>: <em></em> <strong>mglData</strong> <em>(<code>int</code> size, <code>int</code> cols, <code>const double *</code>dat2)</em></dt>
-<dt><a name="index-mglData-8"></a>Constructor on <code>mglData</code>: <em></em> <strong>mglData</strong> <em>(<code>const double *</code>dat2, <code>int</code> size)</em></dt>
-<dt><a name="index-mglData-9"></a>Constructor on <code>mglData</code>: <em></em> <strong>mglData</strong> <em>(<code>const double *</code>dat2, <code>int</code> size, <code>int</code> cols)</em></dt>
-<dt><a name="index-mglDataC-1"></a>Constructor on <code>mglDataC</code>: <em></em> <strong>mglDataC</strong> <em>(<code>const mglDataA &</code>dat2)</em></dt>
-<dt><a name="index-mglDataC-2"></a>Constructor on <code>mglDataC</code>: <em></em> <strong>mglDataC</strong> <em>(<code>const mglDataA *</code>dat2)</em></dt>
-<dt><a name="index-mglDataC-3"></a>Constructor on <code>mglDataC</code>: <em></em> <strong>mglDataC</strong> <em>(<code>int</code> size, <code>const float *</code>dat2)</em></dt>
-<dt><a name="index-mglDataC-4"></a>Constructor on <code>mglDataC</code>: <em></em> <strong>mglDataC</strong> <em>(<code>int</code> size, <code>int</code> cols, <code>const float *</code>dat2)</em></dt>
-<dt><a name="index-mglDataC-5"></a>Constructor on <code>mglDataC</code>: <em></em> <strong>mglDataC</strong> <em>(<code>int</code> size, <code>const double *</code>dat2)</em></dt>
-<dt><a name="index-mglDataC-6"></a>Constructor on <code>mglDataC</code>: <em></em> <strong>mglDataC</strong> <em>(<code>int</code> size, <code>int</code> cols, <code>const double *</code>dat2)</em></dt>
-<dt><a name="index-mglDataC-7"></a>Constructor on <code>mglDataC</code>: <em></em> <strong>mglDataC</strong> <em>(<code>int</code> size, <code>const dual *</code>dat2)</em></dt>
-<dt><a name="index-mglDataC-8"></a>Constructor on <code>mglDataC</code>: <em></em> <strong>mglDataC</strong> <em>(<code>int</code> size, <code>int</code> cols, <code>const dual *</code>dat2)</em></dt>
-<dd><p>Copy constructor. Allocates the memory for data array and copy values from other array. At this, if parameter <var>eq</var> or <var>val</var> is specified then the data will be modified by corresponding formula similarly to <a href="#fill">fill</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-copy-3"></a>MGL command: <em></em> <strong>copy</strong> <em><small>REDAT</small> <small>IMDAT</small> dat2 ['eq'='']</em></dt>
-<dd><p>Allocates the memory for data array and copy real and imaginary values from complex array <var>dat2</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-copy-4"></a>MGL command: <em></em> <strong>copy</strong> <em>'name'</em></dt>
-<dd><p>Allocates the memory for data array and copy values from other array specified by its name, which can be "invalid" for MGL names (like one read from HDF5 files).
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-read"></a>MGL command: <em></em> <strong>read</strong> <em><small>DAT</small> 'fname'</em></dt>
-<dt><a name="index-mglData-10"></a>Constructor on <code>mglData</code>: <em></em> <strong>mglData</strong> <em>(<code>const char *</code>fname)</em></dt>
-<dt><a name="index-mglDataC-9"></a>Constructor on <code>mglDataC</code>: <em></em> <strong>mglDataC</strong> <em>(<code>const char *</code>fname)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fdata_005ffile"></a>C function: <em><code>HMDT</code></em> <strong>mgl_create_data_file</strong> <em>(<code>const char *</code>fname)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fdatac_005ffile"></a>C function: <em><code>HADT</code></em> <strong>mgl_create_datac_file</strong> <em>(<code>const char *</code>fname)</em></dt>
-<dd><p>Reads data from tab-separated text file with auto determining sizes of the data.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-delete"></a>MGL command: <em></em> <strong>delete</strong> <em>dat</em></dt>
-<dt><a name="index-delete-1"></a>MGL command: <em></em> <strong>delete</strong> <em>'name'</em></dt>
-<dt><a name="index-_007emglData"></a>Destructor on <code>mglData</code>: <em></em> <strong>~mglData</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fdelete_005fdata"></a>C function: <em><code>void</code></em> <strong>mgl_delete_data</strong> <em>(<code>HMDT</code> dat)</em></dt>
-<dt><a name="index-_007emglDataC"></a>Destructor on <code>mglDataC</code>: <em></em> <strong>~mglDataC</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fdelete_005fdatac"></a>C function: <em><code>void</code></em> <strong>mgl_delete_datac</strong> <em>(<code>HADT</code> dat)</em></dt>
-<dd><p>Deletes the data array from memory.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Data-resizing"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-filling" accesskey="n" rel="next">Data filling</a>, Previous: <a href="#Data-constructor" accesskey="p" rel="prev">Data constructor</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-resizing-1"></a>
-<h3 class="section">6.3 Data resizing</h3>
-
-<a name="index-Create"></a>
-<a name="index-Rearrange"></a>
-<a name="index-Extend"></a>
-<a name="index-Transpose"></a>
-<a name="index-Squeeze"></a>
-<a name="index-Crop"></a>
-<a name="index-Insert"></a>
-<a name="index-Delete"></a>
-<a name="index-Sort"></a>
-<a name="index-Clean"></a>
-<a name="index-Join"></a>
-
-<dl>
-<dt><a name="index-new-3"></a>MGL command: <em></em> <strong>new</strong> <em><small>DAT</small> [<code>nx=1 ny=1 nz=1</code>]</em></dt>
-<dt><a name="index-Create-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Create</strong> <em>(<code>int</code> mx, <code>int</code> my=<code>1</code>, <code>int</code> mz=<code>1</code>)</em></dt>
-<dt><a name="index-Create-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Create</strong> <em>(<code>int</code> mx, <code>int</code> my=<code>1</code>, <code>int</code> mz=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fcreate"></a>C function: <em><code>void</code></em> <strong>mgl_data_create</strong> <em>(<code>HMDT</code> dat, <code>int</code> mx, <code>int</code> my, <code>int</code> mz)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fcreate"></a>C function: <em><code>void</code></em> <strong>mgl_datac_create</strong> <em>(<code>HADT</code> dat, <code>int</code> mx, <code>int</code> my, <code>int</code> mz)</em></dt>
-<dd><p>Creates or recreates the array with specified size and fills it by zero. This function does nothing if one of parameters <var>mx</var>, <var>my</var>, <var>mz</var> is zero or negative.
-</p></dd></dl>
-
-<a name="rearrange"></a><dl>
-<dt><a name="index-rearrange"></a>MGL command: <em></em> <strong>rearrange</strong> <em>dat <code>mx [my=0 mz=0]</code></em></dt>
-<dt><a name="index-Rearrange-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Rearrange</strong> <em>(<code>int</code> mx, <code>int</code> my=<code>0</code>, <code>int</code> mz=<code>0</code>)</em></dt>
-<dt><a name="index-Rearrange-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Rearrange</strong> <em>(<code>int</code> mx, <code>int</code> my=<code>0</code>, <code>int</code> mz=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005frearrange"></a>C function: <em><code>void</code></em> <strong>mgl_data_rearrange</strong> <em>(<code>HMDT</code> dat, <code>int</code> mx, <code>int</code> my, <code>int</code> mz)</em></dt>
-<dt><a name="index-mgl_005fdatac_005frearrange"></a>C function: <em><code>void</code></em> <strong>mgl_datac_rearrange</strong> <em>(<code>HADT</code> dat, <code>int</code> mx, <code>int</code> my, <code>int</code> mz)</em></dt>
-<dd><p>Rearrange dimensions without changing data array so that resulting sizes should be <var>mx</var>*<var>my</var>*<var>mz</var> < nx*ny*nz. If some of parameter <var>my</var> or <var>mz</var> are zero then it will be selected to optimal fill of data array. For example, if <var>my</var>=0 then it will be change to <var>my</var>=nx*ny*nz/<var>mx</var> and <var>mz</var>=1.
-</p></dd></dl>
-
-<a name="transpose"></a><dl>
-<dt><a name="index-transpose"></a>MGL command: <em></em> <strong>transpose</strong> <em>dat ['dim'='yxz']</em></dt>
-<dt><a name="index-Transpose-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Transpose</strong> <em>(<code>const char *</code>dim=<code>"yx"</code>)</em></dt>
-<dt><a name="index-Transpose-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Transpose</strong> <em>(<code>const char *</code>dim=<code>"yx"</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005ftranspose"></a>C function: <em><code>void</code></em> <strong>mgl_data_transpose</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dim)</em></dt>
-<dt><a name="index-mgl_005fdatac_005ftranspose"></a>C function: <em><code>void</code></em> <strong>mgl_datac_transpose</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dim)</em></dt>
-<dd><p>Transposes (shift order of) dimensions of the data. New order of dimensions is specified in string <var>dim</var>. This function can be useful also after reading of one-dimensional data.
-</p></dd></dl>
-
-<a name="extend"></a><dl>
-<dt><a name="index-extend"></a>MGL command: <em></em> <strong>extend</strong> <em>dat <code>n1 [n2=0]</code></em></dt>
-<dt><a name="index-Extend-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Extend</strong> <em>(<code>int</code> n1, <code>int</code> n2=<code>0</code>)</em></dt>
-<dt><a name="index-Extend-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Extend</strong> <em>(<code>int</code> n1, <code>int</code> n2=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fextend"></a>C function: <em><code>void</code></em> <strong>mgl_data_extend</strong> <em>(<code>HMDT</code> dat, <code>int</code> n1, <code>int</code> n2)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fextend"></a>C function: <em><code>void</code></em> <strong>mgl_datac_extend</strong> <em>(<code>HADT</code> dat, <code>int</code> n1, <code>int</code> n2)</em></dt>
-<dd><p>Increase the dimensions of the data by inserting new (|<var>n1</var>|+1)-th slices after (for <var>n1</var>>0) or before (for <var>n1</var><0) of existed one. It is possible to insert 2 dimensions simultaneously for 1d data by using parameter <var>n2</var>. Data to new slices is copy from existed one. For example, for <var>n1</var>>0 new array will be
-a_ij^new = a_i^old where j=0...<var>n1</var>. Correspondingly, for <var>n1</var><0 new array will be a_ij^new = a_j^old where i=0...|<var>n1</var>|.
-</p></dd></dl>
-
-<a name="squeeze"></a><dl>
-<dt><a name="index-squeeze"></a>MGL command: <em></em> <strong>squeeze</strong> <em>dat <code>rx [ry=1 rz=1 sm=off]</code></em></dt>
-<dt><a name="index-Squeeze-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Squeeze</strong> <em>(<code>int</code> rx, <code>int</code> ry=<code>1</code>, <code>int</code> rz=<code>1</code>, <code>bool</code> smooth=<code>false</code>)</em></dt>
-<dt><a name="index-Squeeze-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Squeeze</strong> <em>(<code>int</code> rx, <code>int</code> ry=<code>1</code>, <code>int</code> rz=<code>1</code>, <code>bool</code> smooth=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fsqueeze"></a>C function: <em><code>void</code></em> <strong>mgl_data_squeeze</strong> <em>(<code>HMDT</code> dat, <code>int</code> rx, <code>int</code> ry, <code>int</code> rz, <code>int</code> smooth)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fsqueeze"></a>C function: <em><code>void</code></em> <strong>mgl_datac_squeeze</strong> <em>(<code>HADT</code> dat, <code>int</code> rx, <code>int</code> ry, <code>int</code> rz, <code>int</code> smooth)</em></dt>
-<dd><p>Reduces the data size by excluding data elements which indexes are not divisible by <var>rx</var>, <var>ry</var>, <var>rz</var> correspondingly. Parameter <var>smooth</var> set to use smoothing
-(i.e. out[i]=\sum_{j=i,i+r} a[j]/r) or not (i.e. out[i]=a[j*r]).
-</p></dd></dl>
-
-<a name="crop"></a><dl>
-<dt><a name="index-crop"></a>MGL command: <em></em> <strong>crop</strong> <em>dat <code>n1 n2</code> 'dir'</em></dt>
-<dt><a name="index-Crop-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Crop</strong> <em>(<code>int</code> n1, <code>int</code> n2, <code>char</code> dir=<code>'x'</code>)</em></dt>
-<dt><a name="index-Crop-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Crop</strong> <em>(<code>int</code> n1, <code>int</code> n2, <code>char</code> dir=<code>'x'</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fcrop"></a>C function: <em><code>void</code></em> <strong>mgl_data_crop</strong> <em>(<code>HMDT</code> dat, <code>int</code> n1, <code>int</code> n2, <code>char</code> dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fcrop"></a>C function: <em><code>void</code></em> <strong>mgl_datac_crop</strong> <em>(<code>HADT</code> dat, <code>int</code> n1, <code>int</code> n2, <code>char</code> dir)</em></dt>
-<dd><p>Cuts off edges of the data <var>i</var><<var>n1</var> and <var>i</var>><var>n2</var> if <var>n2</var>>0 or <var>i</var>><code>n[xyz]</code>-<var>n2</var> if <var>n2</var><=0 along direction <var>dir</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-crop-1"></a>MGL command: <em></em> <strong>crop</strong> <em>dat 'how'</em></dt>
-<dt><a name="index-Crop-3"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Crop</strong> <em>(<code>const char *</code>how=<code>"235x"</code>)</em></dt>
-<dt><a name="index-Crop-4"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Crop</strong> <em>(<code>const char *</code>how=<code>"235x"</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fcrop_005fopt"></a>C function: <em><code>void</code></em> <strong>mgl_data_crop_opt</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>how)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fcrop_005fopt"></a>C function: <em><code>void</code></em> <strong>mgl_datac_crop_opt</strong> <em>(<code>HADT</code> dat, <code>const char *</code>how)</em></dt>
-<dd><p>Cuts off far edge of the data to be more optimal for fast Fourier transform. The resulting size will be the closest value of 2^n*3^m*5^l to the original one. The string <var>how</var> may contain: ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’ for directions, and ‘<samp>2</samp>’, ‘<samp>3</samp>’, ‘<samp>5</samp>’ for using corresponding bases.
-</p></dd></dl>
-
-<a name="insert"></a><dl>
-<dt><a name="index-insert"></a>MGL command: <em></em> <strong>insert</strong> <em>dat 'dir' <code>[pos=off num=0]</code></em></dt>
-<dt><a name="index-Insert-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Insert</strong> <em>(<code>char</code> dir, <code>int</code> pos=<code>0</code>, <code>int</code> num=<code>1</code>)</em></dt>
-<dt><a name="index-Insert-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Insert</strong> <em>(<code>char</code> dir, <code>int</code> pos=<code>0</code>, <code>int</code> num=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005finsert"></a>C function: <em><code>void</code></em> <strong>mgl_data_insert</strong> <em>(<code>HMDT</code> dat, <code>char</code> dir, <code>int</code> pos, <code>char</code> num)</em></dt>
-<dt><a name="index-mgl_005fdatac_005finsert"></a>C function: <em><code>void</code></em> <strong>mgl_datac_insert</strong> <em>(<code>HADT</code> dat, <code>char</code> dir, <code>int</code> pos, <code>char</code> num)</em></dt>
-<dd><p>Insert <var>num</var> slices along <var>dir</var>-direction at position <var>pos</var> and fill it by zeros.
-</p></dd></dl>
-
-<a name="delete"></a><dl>
-<dt><a name="index-delete-2"></a>MGL command: <em></em> <strong>delete</strong> <em>dat 'dir' <code>[pos=off num=0]</code></em></dt>
-<dt><a name="index-Delete-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Delete</strong> <em>(<code>char</code> dir, <code>int</code> pos=<code>0</code>, <code>int</code> num=<code>1</code>)</em></dt>
-<dt><a name="index-Delete-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Delete</strong> <em>(<code>char</code> dir, <code>int</code> pos=<code>0</code>, <code>int</code> num=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fdelete"></a>C function: <em><code>void</code></em> <strong>mgl_data_delete</strong> <em>(<code>HMDT</code> dat, <code>char</code> dir, <code>int</code> pos, <code>char</code> num)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fdelete"></a>C function: <em><code>void</code></em> <strong>mgl_datac_delete</strong> <em>(<code>HADT</code> dat, <code>char</code> dir, <code>int</code> pos, <code>char</code> num)</em></dt>
-<dd><p>Delete <var>num</var> slices along <var>dir</var>-direction at position <var>pos</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-delete-3"></a>MGL command: <em></em> <strong>delete</strong> <em>dat</em></dt>
-<dt><a name="index-delete-4"></a>MGL command: <em></em> <strong>delete</strong> <em>'name'</em></dt>
-<dd><p>Deletes the whole data array.
-</p></dd></dl>
-
-<a name="sort"></a><dl>
-<dt><a name="index-sort"></a>MGL command: <em></em> <strong>sort</strong> <em>dat <code>idx [idy=-1]</code></em></dt>
-<dt><a name="index-Sort-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Sort</strong> <em>(<code>lond</code> idx, <code>long</code> idy=<code>-1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fsort"></a>C function: <em><code>void</code></em> <strong>mgl_data_sort</strong> <em>(<code>HMDT</code> dat, <code>lond</code> idx, <code>long</code> idy)</em></dt>
-<dd><p>Sort data rows (or slices in 3D case) by values of specified column <var>idx</var> (or cell {<var>idx</var>,<var>idy</var>} for 3D case). Note, this function is not thread safe!
-</p></dd></dl>
-
-<a name="clean"></a><dl>
-<dt><a name="index-clean"></a>MGL command: <em></em> <strong>clean</strong> <em>dat <code>idx</code></em></dt>
-<dt><a name="index-Clean-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Clean</strong> <em>(<code>lond</code> idx)</em></dt>
-<dt><a name="index-mgl_005fdata_005fclean"></a>C function: <em><code>void</code></em> <strong>mgl_data_clean</strong> <em>(<code>HMDT</code> dat, <code>lond</code> idx)</em></dt>
-<dd><p>Delete rows which values are equal to next row for given column <var>idx</var>.
-</p></dd></dl>
-
-<a name="join"></a><dl>
-<dt><a name="index-join"></a>MGL command: <em></em> <strong>join</strong> <em>dat vdat [v2dat ...]</em></dt>
-<dt><a name="index-Join-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Join</strong> <em>(<code>const mglDataA &</code>vdat)</em></dt>
-<dt><a name="index-Join-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Join</strong> <em>(<code>const mglDataA &</code>vdat)</em></dt>
-<dt><a name="index-mgl_005fdata_005fjoin"></a>C function: <em><code>void</code></em> <strong>mgl_data_join</strong> <em>(<code>HMDT</code> dat, <code>HCDT</code> vdat)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fjoin"></a>C function: <em><code>void</code></em> <strong>mgl_datac_join</strong> <em>(<code>HADT</code> dat, <code>HCDT</code> vdat)</em></dt>
-<dd><p>Join data cells from <var>vdat</var> to <var>dat</var>. At this, function increase <var>dat</var> sizes according following: z-size for data arrays arrays with equal x-,y-sizes; or y-size for data arrays with equal x-sizes; or x-size otherwise.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Data-filling"></a>
-<div class="header">
-<p>
-Next: <a href="#File-I_002fO" accesskey="n" rel="next">File I/O</a>, Previous: <a href="#Data-resizing" accesskey="p" rel="prev">Data resizing</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-filling-1"></a>
-<h3 class="section">6.4 Data filling</h3>
-
-<a name="index-Fill-1"></a>
-<a name="index-Modify"></a>
-<a name="index-Set"></a>
-<a name="index-List"></a>
-<a name="index-Var"></a>
-<a name="index-Refill"></a>
-
-<a name="list"></a><dl>
-<dt><a name="index-list"></a>MGL command: <em></em> <strong>list</strong> <em><small>DAT</small> <code>v1 ...</code></em></dt>
-<dd><p>Creates new variable with name <var>dat</var> and fills it by numeric values of command arguments <code>v1 ...</code>. Command can create one-dimensional and two-dimensional arrays with arbitrary values. For creating 2d array the user should use delimiter ‘<samp>|</samp>’ which means that the following values lie in next row. Array sizes are [maximal of row sizes * number of rows]. For example, command <code>list 1 | 2 3</code> creates the array [1 0; 2 3]. Note, that the maximal number of arguments is 1000.
-</p></dd></dl>
-<dl>
-<dt><a name="index-list-1"></a>MGL command: <em></em> <strong>list</strong> <em><small>DAT</small> d1 ...</em></dt>
-<dd><p>Creates new variable with name <var>dat</var> and fills it by data values of arrays of command arguments <var>d1 ...</var>. Command can create two-dimensional or three-dimensional (if arrays in arguments are 2d arrays) arrays with arbitrary values. Minor dimensions of all arrays in arguments should be equal to dimensions of first array d1. In the opposite case the argument will be ignored. Note, that the maximal number of arguments is 1000.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Set-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const float *</code>A, <code>int</code> NX, <code>int</code> NY=<code>1</code>, <code>int</code> NZ=<code>1</code>)</em></dt>
-<dt><a name="index-Set-2"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const double *</code>A, <code>int</code> NX, <code>int</code> NY=<code>1</code>, <code>int</code> NZ=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005ffloat"></a>C function: <em><code>void</code></em> <strong>mgl_data_set_float</strong> <em>(<code>HMDT</code> dat, <code>const mreal *</code>A, <code>int</code> NX, <code>int</code> NY, <code>int</code> NZ)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fdouble"></a>C function: <em><code>void</code></em> <strong>mgl_data_set_double</strong> <em>(<code>HMDT</code> dat, <code>const double *</code>A, <code>int</code> NX, <code>int</code> NY, <code>int</code> NZ)</em></dt>
-<dt><a name="index-Set-3"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const float *</code>A, <code>int</code> NX, <code>int</code> NY=<code>1</code>, <code>int</code> NZ=<code>1</code>)</em></dt>
-<dt><a name="index-Set-4"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const double *</code>A, <code>int</code> NX, <code>int</code> NY=<code>1</code>, <code>int</code> NZ=<code>1</code>)</em></dt>
-<dt><a name="index-Set-5"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const dual *</code>A, <code>int</code> NX, <code>int</code> NY=<code>1</code>, <code>int</code> NZ=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset_005ffloat"></a>C function: <em><code>void</code></em> <strong>mgl_datac_set_float</strong> <em>(<code>HADT</code> dat, <code>const mreal *</code>A, <code>int</code> NX, <code>int</code> NY, <code>int</code> NZ)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset_005fdouble"></a>C function: <em><code>void</code></em> <strong>mgl_datac_set_double</strong> <em>(<code>HADT</code> dat, <code>const double *</code>A, <code>int</code> NX, <code>int</code> NY, <code>int</code> NZ)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset_005fcomplex"></a>C function: <em><code>void</code></em> <strong>mgl_datac_set_complex</strong> <em>(<code>HADT</code> dat, <code>const dual *</code>A, <code>int</code> NX, <code>int</code> NY, <code>int</code> NZ)</em></dt>
-<dd><p>Allocates memory and copies the data from the <strong>flat</strong> <code>float*</code> or <code>double*</code> array.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Set-6"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const float **</code>A, <code>int</code> N1, <code>int</code> N2)</em></dt>
-<dt><a name="index-Set-7"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const double **</code>A, <code>int</code> N1, <code>int</code> N2)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fmreal2"></a>C function: <em><code>void</code></em> <strong>mgl_data_set_mreal2</strong> <em>(<code>HMDT</code> dat, <code>const mreal **</code>A, <code>int</code> N1, <code>int</code> N2)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fdouble2"></a>C function: <em><code>void</code></em> <strong>mgl_data_set_double2</strong> <em>(<code>HMDT</code> dat, <code>const double **</code>A, <code>int</code> N1, <code>int</code> N2)</em></dt>
-<dd><p>Allocates memory and copies the data from the <code>float**</code> or <code>double**</code> array with dimensions <var>N1</var>, <var>N2</var>, i.e. from array defined as <code>mreal a[N1][N2];</code>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Set-8"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const float ***</code>A, <code>int</code> N1, <code>int</code> N2)</em></dt>
-<dt><a name="index-Set-9"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const double ***</code>A, <code>int</code> N1, <code>int</code> N2)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fmreal3"></a>C function: <em><code>void</code></em> <strong>mgl_data_set_mreal3</strong> <em>(<code>HMDT</code> dat, <code>const mreal ***</code>A, <code>int</code> N1, <code>int</code> N2)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fdouble3"></a>C function: <em><code>void</code></em> <strong>mgl_data_set_double3</strong> <em>(<code>HMDT</code> dat, <code>const double ***</code>A, <code>int</code> N1, <code>int</code> N2)</em></dt>
-<dd><p>Allocates memory and copies the data from the <code>float***</code> or <code>double***</code> array with dimensions <var>N1</var>, <var>N2</var>, <var>N3</var>, i.e. from array defined as <code>mreal a[N1][N2][N3];</code>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Set-10"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>gsl_vector *</code>v)</em></dt>
-<dt><a name="index-Set-11"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>gsl_vector *</code>v)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fvector"></a>C function: <em><code>void</code></em> <strong>mgl_data_set_vector</strong> <em>(<code>HMDT</code> dat, <code>gsl_vector *</code>v)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset_005fvector"></a>C function: <em><code>void</code></em> <strong>mgl_datac_set_vector</strong> <em>(<code>HADT</code> dat, <code>gsl_vector *</code>v)</em></dt>
-<dd><p>Allocates memory and copies the data from the <code>gsl_vector *</code> structure.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Set-12"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>gsl_matrix *</code>m)</em></dt>
-<dt><a name="index-Set-13"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>gsl_matrix *</code>m)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fmatrix"></a>C function: <em><code>void</code></em> <strong>mgl_data_set_matrix</strong> <em>(<code>HMDT</code> dat, <code>gsl_matrix *</code>m)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset_005fmatrix"></a>C function: <em><code>void</code></em> <strong>mgl_datac_set_matrix</strong> <em>(<code>HADT</code> dat, <code>gsl_matrix *</code>m)</em></dt>
-<dd><p>Allocates memory and copies the data from the <code>gsl_matrix *</code> structure.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Set-14"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const mglDataA &</code>from)</em></dt>
-<dt><a name="index-Set-15"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>HCDT</code> from)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset"></a>C function: <em><code>void</code></em> <strong>mgl_data_set</strong> <em>(<code>HMDT</code> dat, <code>HCDT</code> from)</em></dt>
-<dt><a name="index-Set-16"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const mglDataA &</code>from)</em></dt>
-<dt><a name="index-Set-17"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>HCDT</code> from)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset"></a>C function: <em><code>void</code></em> <strong>mgl_datac_set</strong> <em>(<code>HADT</code> dat, <code>HCDT</code> from)</em></dt>
-<dd><p>Copies the data from <code>mglData</code> (or <code>mglDataA</code>) instance <var>from</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Set-18"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const mglDataA &</code>re, <code>const mglDataA &</code>im)</em></dt>
-<dt><a name="index-Set-19"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>HCDT</code> re, <code>HCDT</code> im)</em></dt>
-<dt><a name="index-SetAmpl"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>SetAmpl</strong> <em>(<code>HCDT</code> ampl, <code>const mglDataA &</code>phase)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset_005fri"></a>C function: <em><code>void</code></em> <strong>mgl_datac_set_ri</strong> <em>(<code>HADT</code> dat, <code>HCDT</code> re, <code>HCDT</code> im)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset_005fap"></a>C function: <em><code>void</code></em> <strong>mgl_datac_set_ap</strong> <em>(<code>HADT</code> dat, <code>HCDT</code> ampl, <code>HCDT</code> phase)</em></dt>
-<dd><p>Copies the data from <code>mglData</code> instances for real and imaginary parts of complex data arrays.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Set-20"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const std::vector<int> &</code>d)</em></dt>
-<dt><a name="index-Set-21"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const std::vector<int> &</code>d)</em></dt>
-<dt><a name="index-Set-22"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const std::vector<float> &</code>d)</em></dt>
-<dt><a name="index-Set-23"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const std::vector<float> &</code>d)</em></dt>
-<dt><a name="index-Set-24"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const std::vector<double> &</code>d)</em></dt>
-<dt><a name="index-Set-25"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const std::vector<double> &</code>d)</em></dt>
-<dt><a name="index-Set-26"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const std::vector<dual> &</code>d)</em></dt>
-<dd><p>Allocates memory and copies the data from the <code>std::vector<T></code> array.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Set-27"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const char *</code>str, <code>int</code> NX, <code>int</code> NY=<code>1</code>, <code>int</code> NZ=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fvalues"></a>C function: <em><code>void</code></em> <strong>mgl_data_set_values</strong> <em>(<code>const char *</code>str, <code>int</code> NX, <code>int</code> NY, <code>int</code> NZ)</em></dt>
-<dt><a name="index-Set-28"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const char *</code>str, <code>int</code> NX, <code>int</code> NY=<code>1</code>, <code>int</code> NZ=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset_005fvalues"></a>C function: <em><code>void</code></em> <strong>mgl_datac_set_values</strong> <em>(<code>const char *</code>str, <code>int</code> NX, <code>int</code> NY, <code>int</code> NZ)</em></dt>
-<dd><p>Allocates memory and scanf the data from the string.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-SetList"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>SetList</strong> <em>(<code>long</code> n, ...)</em></dt>
-<dd><p>Allocate memory and set data from variable argument list of <em>double</em> values. Note, you need to specify decimal point ‘<samp>.</samp>’ for integer values! For example, the code <code>SetList(2,0.,1.);</code> is correct, but the code <code>SetList(2,0,1);</code> is incorrect.
-</p></dd></dl>
-
-
-
-<dl>
-<dt><a name="index-Link"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Link</strong> <em>(<code>mglData &</code>from)</em></dt>
-<dt><a name="index-Link-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Link</strong> <em>(<code>mreal *</code>A, <code>int</code> NX, <code>int</code> NY=<code>1</code>, <code>int</code> NZ=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005flink"></a>C function: <em><code>void</code></em> <strong>mgl_data_link</strong> <em>(<code>HMDT</code> dat, <code>mreal *</code>A, <code>int</code> NX, <code>int</code> NY, <code>int</code> NZ)</em></dt>
-<dt><a name="index-Link-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Link</strong> <em>(<code>mglDataC &</code>from)</em></dt>
-<dt><a name="index-Link-3"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Link</strong> <em>(<code>dual *</code>A, <code>int</code> NX, <code>int</code> NY=<code>1</code>, <code>int</code> NZ=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdatac_005flink"></a>C function: <em><code>void</code></em> <strong>mgl_datac_link</strong> <em>(<code>HADT</code> dat, <code>dual *</code>A, <code>int</code> NX, <code>int</code> NY, <code>int</code> NZ)</em></dt>
-<dd><p>Links external data array, i.e. don’t delete this array at exit.
-</p></dd></dl>
-
-<a name="var"></a><dl>
-<dt><a name="index-var"></a>MGL command: <em></em> <strong>var</strong> <em><small>DAT</small> <code>num v1 [v2=nan]</code></em></dt>
-<dd><p>Creates new variable with name <var>dat</var> for one-dimensional array of size <var>num</var>. Array elements are equidistantly distributed in range [<var>v1</var>, <var>v2</var>]. If <var>v2</var>=<code>nan</code> then <var>v2=v1</var> is used.
-</p></dd></dl>
-
-<a name="fill"></a><dl>
-<dt><a name="index-fill-3"></a>MGL command: <em></em> <strong>fill</strong> <em>dat v1 v2 ['dir'='x']</em></dt>
-<dt><a name="index-Fill-5"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>mreal</code> v1, <code>mreal</code> v2, <code>char</code> dir=<code>'x'</code>)</em></dt>
-<dt><a name="index-Fill-6"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>dual</code> v1, <code>dual</code> v2, <code>char</code> dir=<code>'x'</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005ffill"></a>C function: <em><code>void</code></em> <strong>mgl_data_fill</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> v1, <code>mreal</code> v2, <code>char</code> dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005ffill"></a>C function: <em><code>void</code></em> <strong>mgl_datac_fill</strong> <em>(<code>HADT</code> dat, <code>dual</code> v1, <code>dual</code> v2, <code>char</code> dir)</em></dt>
-<dd><p>Equidistantly fills the data values to range [<var>v1</var>, <var>v2</var>] in direction <var>dir</var>={‘<samp>x</samp>’,‘<samp>y</samp>’,‘<samp>z</samp>’}.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-fill-4"></a>MGL command: <em></em> <strong>fill</strong> <em>dat 'eq' [vdat wdat]</em></dt>
-<dt><a name="index-Fill-7"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>eq, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fill-8"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>eq, <code>const mglDataA &</code>vdat, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fill-9"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>eq, <code>const mglDataA &</code>vdat, <code>const mglDataA &</code>wdat, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fill-10"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>eq, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fill-11"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>eq, <code>const mglDataA &</code>vdat, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fill-12"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>eq, <code>const mglDataA &</code>vdat, <code>const mglDataA &</code>wdat, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005ffill_005feq-1"></a>C function: <em><code>void</code></em> <strong>mgl_data_fill_eq</strong> <em>(<code>HMGL</code> gr, <code>HMDT</code> dat, <code>const char *</code>eq, <code>HCDT</code> vdat, <code>HCDT</code> wdat, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fdatac_005ffill_005feq"></a>C function: <em><code>void</code></em> <strong>mgl_datac_fill_eq</strong> <em>(<code>HMGL</code> gr, <code>HADT</code> dat, <code>const char *</code>eq, <code>HCDT</code> vdat, <code>HCDT</code> wdat, <code>const char *</code>opt)</em></dt>
-<dd><p>Fills the value of array according to the formula in string <var>eq</var>. Formula is an arbitrary expression depending on variables ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’, ‘<samp>u</samp>’, ‘<samp>v</samp>’, ‘<samp>w</samp>’. Coordinates ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’ are supposed to be normalized in axis range of canvas <var>gr</var> (in difference from <code>Modify</code> functions). Variable ‘<samp>u</samp>’ is the original value of the array. Variables ‘<samp>v</samp>’ and ‘<samp>w</samp>’ are values of <var>vdat</var>, <var>wdat</var> which can be <code>NULL</code> (i.e. can be omitted).
-</p></dd></dl>
-
-<a name="modify"></a><dl>
-<dt><a name="index-modify"></a>MGL command: <em></em> <strong>modify</strong> <em>dat 'eq' [<code>dim=0</code>]</em></dt>
-<dt><a name="index-modify-1"></a>MGL command: <em></em> <strong>modify</strong> <em>dat 'eq' vdat [wdat]</em></dt>
-<dt><a name="index-Modify-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Modify</strong> <em>(<code>const char *</code>eq, <code>int</code> dim=<code>0</code>)</em></dt>
-<dt><a name="index-Modify-2"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Modify</strong> <em>(<code>const char *</code>eq, <code>const mglDataA &</code>v)</em></dt>
-<dt><a name="index-Modify-3"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Modify</strong> <em>(<code>const char *</code>eq, <code>const mglDataA &</code>v, <code>const mglDataA &</code>w)</em></dt>
-<dt><a name="index-Modify-4"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Modify</strong> <em>(<code>const char *</code>eq, <code>int</code> dim=<code>0</code>)</em></dt>
-<dt><a name="index-Modify-5"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Modify</strong> <em>(<code>const char *</code>eq, <code>const mglDataA &</code>v)</em></dt>
-<dt><a name="index-Modify-6"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Modify</strong> <em>(<code>const char *</code>eq, <code>const mglDataA &</code>v, <code>const mglDataA &</code>w)</em></dt>
-<dt><a name="index-mgl_005fdata_005fmodify"></a>C function: <em><code>void</code></em> <strong>mgl_data_modify</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>eq, <code>int</code> dim)</em></dt>
-<dt><a name="index-mgl_005fdata_005fmodify_005fvw"></a>C function: <em><code>void</code></em> <strong>mgl_data_modify_vw</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>eq, <code>HCDT</code> v, <code>HCDT</code> w)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fmodify"></a>C function: <em><code>void</code></em> <strong>mgl_datac_modify</strong> <em>(<code>HADT</code> dat, <code>const char *</code>eq, <code>int</code> dim)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fmodify_005fvw"></a>C function: <em><code>void</code></em> <strong>mgl_datac_modify_vw</strong> <em>(<code>HADT</code> dat, <code>const char *</code>eq, <code>HCDT</code> v, <code>HCDT</code> w)</em></dt>
-<dd><p>The same as previous ones but coordinates ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’ are supposed to be normalized in range [0,1]. If <var>dim</var>>0 is specified then modification will be fulfilled only for slices >=<var>dim</var>.
-</p></dd></dl>
-
-<a name="fillsample"></a><dl>
-<dt><a name="index-fillsample"></a>MGL command: <em></em> <strong>fillsample</strong> <em>dat 'how'</em></dt>
-<dt><a name="index-FillSample"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>FillSample</strong> <em>(<code>const char *</code>how)</em></dt>
-<dt><a name="index-mgl_005fdata_005ffill_005fsample"></a>C function: <em><code>void</code></em> <strong>mgl_data_fill_sample</strong> <em>(<code>HMDT</code> a, <code>const char *</code>how)</em></dt>
-<dd><p>Fills data by ’x’ or ’k’ samples for Hankel (’h’) or Fourier (’f’) transform.
-</p></dd></dl>
-
-
-<a name="datagrid"></a><dl>
-<dt><a name="index-datagrid-1"></a>MGL command: <em></em> <strong>datagrid</strong> <em>dat xdat ydat zdat</em></dt>
-<dt><a name="index-Grid-5"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Grid</strong> <em>(<code>HMGL</code> gr, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Grid-6"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Grid</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>mglPoint</code> p1, <code>mglPoint</code> p2)</em></dt>
-<dt><a name="index-mgl_005fdata_005fgrid-1"></a>C function: <em><code>void</code></em> <strong>mgl_data_grid</strong> <em>(<code>HMGL</code> gr, <code>HMDT</code> u, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fdata_005fgrid_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_data_grid_xy</strong> <em>(<code>HMDT</code> u, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>mreal</code> x1, <code>mreal</code> x2, <code>mreal</code> y1, <code>mreal</code> y2)</em></dt>
-<dd><p>Fills the value of array according to the linear interpolation of triangulated surface assuming x-,y-coordinates equidistantly distributed in axis range (or in range [x1,x2]*[y1,y2]). Triangulated surface is found for arbitrary placed points ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’. NAN value is used for grid points placed outside of triangulated surface. See <a href="#Making-regular-data">Making regular data</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="put"></a><dl>
-<dt><a name="index-put"></a>MGL command: <em></em> <strong>put</strong> <em>dat <code>val [i=all j=all k=all]</code></em></dt>
-<dt><a name="index-Put"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Put</strong> <em>(<code>mreal</code> val, <code>int</code> i=<code>-1</code>, <code>int</code> j=<code>-1</code>, <code>int</code> k=<code>-1</code>)</em></dt>
-<dt><a name="index-Put-1"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Put</strong> <em>(<code>dual</code> val, <code>int</code> i=<code>-1</code>, <code>int</code> j=<code>-1</code>, <code>int</code> k=<code>-1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fput_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_data_put_val</strong> <em>(<code>HMDT</code> a, <code>mreal</code> val, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fput_005fval"></a>C function: <em><code>void</code></em> <strong>mgl_datac_put_val</strong> <em>(<code>HADT</code> a, <code>dual</code> val, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dd><p>Sets value(s) of array a[<var>i</var>, <var>j</var>, <var>k</var>] = <var>val</var>. Negative indexes <var>i</var>, <var>j</var>, <var>k</var>=-1 set the value <var>val</var> to whole range in corresponding direction(s). For example, <code>Put(val,-1,0,-1);</code> sets a[i,0,j]=<var>val</var> for i=0...(nx-1), j=0...(nz-1).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-put-1"></a>MGL command: <em></em> <strong>put</strong> <em>dat vdat [<code>i=all j=all k=all</code>]</em></dt>
-<dt><a name="index-Put-2"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Put</strong> <em>(<code>const mglDataA &</code>v, <code>int</code> i=<code>-1</code>, <code>int</code> j=<code>-1</code>, <code>int</code> k=<code>-1</code>)</em></dt>
-<dt><a name="index-Put-3"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Put</strong> <em>(<code>const mglDataA &</code>v, <code>int</code> i=<code>-1</code>, <code>int</code> j=<code>-1</code>, <code>int</code> k=<code>-1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fput_005fdat"></a>C function: <em><code>void</code></em> <strong>mgl_data_put_dat</strong> <em>(<code>HMDT</code> a, <code>HCDT</code> v, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fput_005fdat"></a>C function: <em><code>void</code></em> <strong>mgl_datac_put_dat</strong> <em>(<code>HADT</code> a, <code>HCDT</code> v, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dd><p>Copies value(s) from array <var>v</var> to the range of original array. Negative indexes <var>i</var>, <var>j</var>, <var>k</var>=-1 set the range in corresponding direction(s). At this minor dimensions of array <var>v</var> should be large than corresponding dimensions of this array. For example, <code>Put(v,-1,0,-1);</code> sets a[i,0,j]=v.ny>nz ? v[i,j] : v[i], where i=0...(nx-1), j=0...(nz-1) and condition v.nx>=nx is true.
-</p></dd></dl>
-
-<a name="refill"></a><dl>
-<dt><a name="index-refill-3"></a>MGL command: <em></em> <strong>refill</strong> <em>dat xdat vdat [sl=-1]</em></dt>
-<dt><a name="index-refill-4"></a>MGL command: <em></em> <strong>refill</strong> <em>dat xdat ydat vdat [sl=-1]</em></dt>
-<dt><a name="index-refill-5"></a>MGL command: <em></em> <strong>refill</strong> <em>dat xdat ydat zdat vdat</em></dt>
-<dt><a name="index-Refill-4"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Refill</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>v, <code>mreal</code> x1, <code>mreal</code> x2, <code>long</code> sl=<code>-1</code>)</em></dt>
-<dt><a name="index-Refill-5"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Refill</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>v, <code>mglPoint</code> p1, <code>mglPoint</code> p2, <code>long</code> sl=<code>-1</code>)</em></dt>
-<dt><a name="index-Refill-6"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Refill</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>v, <code>mglPoint</code> p1, <code>mglPoint</code> p2, <code>long</code> sl=<code>-1</code>)</em></dt>
-<dt><a name="index-Refill-7"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Refill</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>v, <code>mglPoint</code> p1, <code>mglPoint</code> p2)</em></dt>
-<dt><a name="index-Refill-8"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Refill</strong> <em>(<code>HMGL</code> gr, <code>const mglDataA &</code>x, <code>const mglDataA &</code>v, <code>long</code> sl=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Refill-9"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Refill</strong> <em>(<code>HMGL</code> gr, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>v, <code>long</code> sl=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Refill-10"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Refill</strong> <em>(<code>HMGL</code> gr, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>v, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005frefill_005fx"></a>C function: <em><code>void</code></em> <strong>mgl_data_refill_x</strong> <em>(<code>HMDT</code> a, <code>HCDT</code> x, <code>HCDT</code> v, <code>mreal</code> x1, <code>mreal</code> x2, <code>long</code> sl)</em></dt>
-<dt><a name="index-mgl_005fdata_005frefill_005fxy"></a>C function: <em><code>void</code></em> <strong>mgl_data_refill_xy</strong> <em>(<code>HMDT</code> a, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> v, <code>mreal</code> x1, <code>mreal</code> x2, <code>mreal</code> y1, <code>mreal</code> y2, <code>long</code> sl)</em></dt>
-<dt><a name="index-mgl_005fdata_005frefill_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_data_refill_xyz</strong> <em>(<code>HMDT</code> a, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> v, <code>mreal</code> x1, <code>mreal</code> x2, <code>mreal</code> y1, <code>mreal</code> y2, <code>mreal</code> z1, <code>mreal</code> z2)</em></dt>
-<dt><a name="index-mgl_005fdata_005frefill_005fgr-1"></a>C function: <em><code>void</code></em> <strong>mgl_data_refill_gr</strong> <em>(<code>HMGL</code> gr, <code>HMDT</code> a, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> v, <code>long</code> sl, <code>const char *</code>opt)</em></dt>
-<dd><p>Fills by interpolated values of array <var>v</var> at the point {<var>x</var>, <var>y</var>, <var>z</var>}={<code>X[i], Y[j], Z[k]</code>} (or {<var>x</var>, <var>y</var>, <var>z</var>}={<code>X[i,j,k], Y[i,j,k], Z[i,j,k]</code>} if <var>x</var>, <var>y</var>, <var>z</var> are not 1d arrays), where <code>X,Y,Z</code> are equidistantly distributed in range [<var>x1</var>,<var>x2</var>]*[<var>y1</var>,<var>y2</var>]*[<var>z1</var>,<var>z2</var>] and have the same sizes as this array. If parameter <var>sl</var> is 0 or positive then changes will be applied only for slice <var>sl</var>.
-</p></dd></dl>
-
-<a name="gspline"></a><dl>
-<dt><a name="index-gspline"></a>MGL command: <em></em> <strong>gspline</strong> <em>dat xdat vdat [sl=-1]</em></dt>
-<dt><a name="index-RefillGS"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>RefillGS</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>v, <code>mreal</code> x1, <code>mreal</code> x2, <code>long</code> sl=<code>-1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005frefill_005fgs"></a>C function: <em><code>void</code></em> <strong>mgl_data_refill_gs</strong> <em>(<code>HMDT</code> a, <code>HCDT</code> x, <code>HCDT</code> v, <code>mreal</code> x1, <code>mreal</code> x2, <code>long</code> sl)</em></dt>
-<dd><p>Fills by global cubic spline values of array <var>v</var> at the point <var>x</var>=<code>X[i]</code>, where <code>X</code> are equidistantly distributed in range [<var>x1</var>,<var>x2</var>] and have the same sizes as this array. If parameter <var>sl</var> is 0 or positive then changes will be applied only for slice <var>sl</var>.
-</p></dd></dl>
-
-<a name="idset"></a><dl>
-<dt><a name="index-idset"></a>MGL command: <em></em> <strong>idset</strong> <em>dat 'ids'</em></dt>
-<dt><a name="index-SetColumnId"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>SetColumnId</strong> <em>(<code>const char *</code>ids)</em></dt>
-<dt><a name="index-SetColumnId-1"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>SetColumnId</strong> <em>(<code>const char *</code>ids)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fid"></a>C function: <em><code>void</code></em> <strong>mgl_data_set_id</strong> <em>(<code>HMDT</code> a, <code>const char *</code>ids)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset_005fid"></a>C function: <em><code>void</code></em> <strong>mgl_datac_set_id</strong> <em>(<code>HADT</code> a, <code>const char *</code>ids)</em></dt>
-<dd><p>Sets the symbol <var>ids</var> for data columns. The string should contain one symbol ’a’...’z’ per column. These ids are used in <a href="#column">column</a>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="File-I_002fO"></a>
-<div class="header">
-<p>
-Next: <a href="#Make-another-data" accesskey="n" rel="next">Make another data</a>, Previous: <a href="#Data-filling" accesskey="p" rel="prev">Data filling</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="File-I_002fO-1"></a>
-<h3 class="section">6.5 File I/O</h3>
-
-<a name="index-Read"></a>
-<a name="index-ReadMat"></a>
-<a name="index-ReadRange"></a>
-<a name="index-ReadAll"></a>
-<a name="index-Save"></a>
-<a name="index-ReadHDF"></a>
-<a name="index-SaveHDF"></a>
-<a name="index-Import"></a>
-<a name="index-Export"></a>
-
-<a name="read"></a><dl>
-<dt><a name="index-read-1"></a>MGL command: <em></em> <strong>read</strong> <em><small>DAT</small> 'fname'</em></dt>
-<dt><a name="index-read-2"></a>MGL command: <em></em> <strong>read</strong> <em><small>REDAT</small> <small>IMDAT</small> 'fname'</em></dt>
-<dt><a name="index-Read-1"></a>Method on <code>mglData</code>: <em><code>bool</code></em> <strong>Read</strong> <em>(<code>const char *</code>fname)</em></dt>
-<dt><a name="index-Read-2"></a>Method on <code>mglDataC</code>: <em><code>bool</code></em> <strong>Read</strong> <em>(<code>const char *</code>fname)</em></dt>
-<dt><a name="index-mgl_005fdata_005fread"></a>C function: <em><code>int</code></em> <strong>mgl_data_read</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>fname)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fread"></a>C function: <em><code>int</code></em> <strong>mgl_datac_read</strong> <em>(<code>HADT</code> dat, <code>const char *</code>fname)</em></dt>
-<dd><p>Reads data from tab-separated text file with auto determining sizes of the data. Double newline means the beginning of new z-slice.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-read-3"></a>MGL command: <em></em> <strong>read</strong> <em><small>DAT</small> 'fname' <code>mx [my=1 mz=1]</code></em></dt>
-<dt><a name="index-read-4"></a>MGL command: <em></em> <strong>read</strong> <em><small>REDAT</small> <small>IMDAT</small> 'fname' <code>mx [my=1 mz=1]</code></em></dt>
-<dt><a name="index-Read-3"></a>Method on <code>mglData</code>: <em><code>bool</code></em> <strong>Read</strong> <em>(<code>const char *</code>fname, <code>int</code> mx, <code>int</code> my=<code>1</code>, <code>int</code> mz=<code>1</code>)</em></dt>
-<dt><a name="index-Read-4"></a>Method on <code>mglDataC</code>: <em><code>bool</code></em> <strong>Read</strong> <em>(<code>const char *</code>fname, <code>int</code> mx, <code>int</code> my=<code>1</code>, <code>int</code> mz=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fread_005fdim"></a>C function: <em><code>int</code></em> <strong>mgl_data_read_dim</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>fname, <code>int</code> mx, <code>int</code> my, <code>int</code> mz)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fread_005fdim"></a>C function: <em><code>int</code></em> <strong>mgl_datac_read_dim</strong> <em>(<code>HADT</code> dat, <code>const char *</code>fname, <code>int</code> mx, <code>int</code> my, <code>int</code> mz)</em></dt>
-<dd><p>Reads data from text file with specified data sizes. This function does nothing if one of parameters <var>mx</var>, <var>my</var> or <var>mz</var> is zero or negative.
-</p></dd></dl>
-
-<a name="readmat"></a><dl>
-<dt><a name="index-readmat"></a>MGL command: <em></em> <strong>readmat</strong> <em><small>DAT</small> 'fname' [<code>dim=2</code>]</em></dt>
-<dt><a name="index-ReadMat-1"></a>Method on <code>mglData</code>: <em><code>bool</code></em> <strong>ReadMat</strong> <em>(<code>const char *</code>fname, <code>int</code> dim=<code>2</code>)</em></dt>
-<dt><a name="index-ReadMat-2"></a>Method on <code>mglDataC</code>: <em><code>bool</code></em> <strong>ReadMat</strong> <em>(<code>const char *</code>fname, <code>int</code> dim=<code>2</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fread_005fmat"></a>C function: <em><code>int</code></em> <strong>mgl_data_read_mat</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>fname, <code>int</code> dim)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fread_005fmat"></a>C function: <em><code>int</code></em> <strong>mgl_datac_read_mat</strong> <em>(<code>HADT</code> dat, <code>const char *</code>fname, <code>int</code> dim)</em></dt>
-<dd><p>Read data from text file with size specified at beginning of the file by first <var>dim</var> numbers. At this, variable <var>dim</var> set data dimensions.
-</p></dd></dl>
-
-<a name="readall"></a><dl>
-<dt><a name="index-readall"></a>MGL command: <em></em> <strong>readall</strong> <em><small>DAT</small> 'templ' <code>v1 v2 [dv=1 slice=off]</code></em></dt>
-<dt><a name="index-ReadRange-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>ReadRange</strong> <em>(<code>const char *</code>templ, <code>mreal</code> from, <code>mreal</code> to, <code>mreal</code> step=<code>1</code>, <code>bool</code> as_slice=<code>false</code>)</em></dt>
-<dt><a name="index-ReadRange-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>ReadRange</strong> <em>(<code>const char *</code>templ, <code>mreal</code> from, <code>mreal</code> to, <code>mreal</code> step=<code>1</code>, <code>bool</code> as_slice=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fread_005frange"></a>C function: <em><code>int</code></em> <strong>mgl_data_read_range</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>templ, <code>mreal</code> from, <code>mreal</code> to, <code>mreal</code> step, <code>int</code> as_slice)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fread_005frange"></a>C function: <em><code>int</code></em> <strong>mgl_datac_read_range</strong> <em>(<code>HADT</code> dat, <code>const char *</code>templ, <code>mreal</code> from, <code>mreal</code> to, <code>mreal</code> step, <code>int</code> as_slice)</em></dt>
-<dd><p>Join data arrays from several text files. The file names are determined by function call <code>sprintf(fname,templ,val);</code>, where <var>val</var> changes from <var>from</var> to <var>to</var> with step <var>step</var>. The data load one-by-one in the same slice if <var>as_slice</var>=<code>false</code> or as slice-by-slice if <var>as_slice</var>=<code>true</code>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-readall-1"></a>MGL command: <em></em> <strong>readall</strong> <em><small>DAT</small> 'templ' <code>[slice=off]</code></em></dt>
-<dt><a name="index-ReadAll-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>ReadAll</strong> <em>(<code>const char *</code>templ, <code>bool</code> as_slice=<code>false</code>)</em></dt>
-<dt><a name="index-ReadAll-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>ReadAll</strong> <em>(<code>const char *</code>templ, <code>bool</code> as_slice=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fread_005fall"></a>C function: <em><code>int</code></em> <strong>mgl_data_read_all</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>templ, <code>int</code> as_slice)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fread_005fall"></a>C function: <em><code>int</code></em> <strong>mgl_datac_read_all</strong> <em>(<code>HADT</code> dat, <code>const char *</code>templ, <code>int</code> as_slice)</em></dt>
-<dd><p>Join data arrays from several text files which filenames satisfied the template <var>templ</var> (for example, <var>templ</var>=<code>"t_*.dat"</code>). The data load one-by-one in the same slice if <var>as_slice</var>=<code>false</code> or as slice-by-slice if <var>as_slice</var>=<code>true</code>.
-</p></dd></dl>
-
-<a name="scanfile"></a><dl>
-<dt><a name="index-scanfile"></a>MGL command: <em></em> <strong>scanfile</strong> <em><small>DAT</small> 'fname' 'templ'</em></dt>
-<dt><a name="index-ScanFile"></a>Method on <code>mglData</code>: <em><code>bool</code></em> <strong>ScanFile</strong> <em>(<code>const char *</code>fname, <code>const char *</code>templ)</em></dt>
-<dt><a name="index-mgl_005fdata_005fscan_005ffile"></a>C function: <em><code>int</code></em> <strong>mgl_data_scan_file</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>fname, <code>const char *</code>templ)</em></dt>
-<dd><p>Read file <var>fname</var> line-by-line and scan each line for numbers according the template <var>templ</var>. The numbers denoted as ‘<samp>%g</samp>’ in the template. See <a href="#Saving-and-scanning-file">Saving and scanning file</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="save"></a><dl>
-<dt><a name="index-save"></a>MGL command: <em></em> <strong>save</strong> <em>dat 'fname'</em></dt>
-<dt><a name="index-Save-1"></a>Method on <code>mglDataA</code>: <em><code>void</code></em> <strong>Save</strong> <em>(<code>const char *</code>fname, <code>int</code> ns=<code>-1</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fsave"></a>C function: <em><code>void</code></em> <strong>mgl_data_save</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>fname, <code>int</code> ns)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fsave"></a>C function: <em><code>void</code></em> <strong>mgl_datac_save</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>fname, <code>int</code> ns)</em></dt>
-<dd><p>Saves the whole data array (for <var>ns</var>=<code>-1</code>) or only <var>ns</var>-th slice to the text file <var>fname</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-save-1"></a>MGL command: <em></em> <strong>save</strong> <em>'str' 'fname' ['mode'='a']</em></dt>
-<dd><p>Saves the string <var>str</var> to the text file <var>fname</var>. For parameter <var>mode</var>=‘<samp>a</samp>’ will append string to the file (default); for <var>mode</var>=‘<samp>w</samp>’ will overwrite the file. See <a href="#Saving-and-scanning-file">Saving and scanning file</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="readhdf"></a><dl>
-<dt><a name="index-readhdf"></a>MGL command: <em></em> <strong>readhdf</strong> <em><small>DAT</small> 'fname' 'dname'</em></dt>
-<dt><a name="index-ReadHDF-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>ReadHDF</strong> <em>(<code>const char *</code>fname, <code>const char *</code>dname)</em></dt>
-<dt><a name="index-ReadHDF-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>ReadHDF</strong> <em>(<code>const char *</code>fname, <code>const char *</code>dname)</em></dt>
-<dt><a name="index-mgl_005fdata_005fread_005fhdf"></a>C function: <em><code>void</code></em> <strong>mgl_data_read_hdf</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>fname, <code>const char *</code>dname)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fread_005fhdf"></a>C function: <em><code>void</code></em> <strong>mgl_datac_read_hdf</strong> <em>(<code>HADT</code> dat, <code>const char *</code>fname, <code>const char *</code>dname)</em></dt>
-<dd><p>Reads data array named <var>dname</var> from HDF5 or HDF4 file. This function does nothing if HDF5|HDF4 was disabled during library compilation.
-</p></dd></dl>
-
-<a name="savehdf"></a><dl>
-<dt><a name="index-savehdf"></a>MGL command: <em></em> <strong>savehdf</strong> <em>dat 'fname' 'dname' [<code>rewrite</code>=<code>off</code>]</em></dt>
-<dt><a name="index-SaveHDF-1"></a>Method on <code>mglDataA</code>: <em><code>void</code></em> <strong>SaveHDF</strong> <em>(<code>const char *</code>fname, <code>const char *</code>dname, <code>bool</code> rewrite=<code>false</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fsave_005fhdf"></a>C function: <em><code>void</code></em> <strong>mgl_data_save_hdf</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>fname, <code>const char *</code>dname, <code>int</code> rewrite)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fsave_005fhdf"></a>C function: <em><code>void</code></em> <strong>mgl_datac_save_hdf</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>fname, <code>const char *</code>dname, <code>int</code> rewrite)</em></dt>
-<dd><p>Saves data array named <var>dname</var> to HDF5 file. This function does nothing if HDF5 was disabled during library compilation.
-</p></dd></dl>
-
-<a name="datas"></a><dl>
-<dt><a name="index-datas"></a>MGL command: <em></em> <strong>datas</strong> <em>'fname'</em></dt>
-<dt><a name="index-DatasHDF"></a>Method on <code>mglDataA</code>: <em><code>int</code></em> <strong>DatasHDF</strong> <em>(<code>const char *</code>fname, <code>char *</code>buf, <code>long</code> size) <code>static</code></em></dt>
-<dt><a name="index-mgl_005fdatas_005fhdf"></a>C function: <em><code>int</code></em> <strong>mgl_datas_hdf</strong> <em>(<code>const char *</code>fname, <code>char *</code>buf, <code>long</code> size)</em></dt>
-<dd><p>Put data names from HDF5 file <var>fname</var> into <var>buf</var> as ’\t’ separated fields. In MGL version the list of data names will be printed as message. This function does nothing if HDF5 was disabled during library compilation.
-</p></dd></dl>
-
-<a name="openhdf"></a><dl>
-<dt><a name="index-openhdf"></a>MGL command: <em></em> <strong>openhdf</strong> <em>'fname'</em></dt>
-<dt><a name="index-OpenHDF"></a>Method on <code>mglParse</code>: <em><code>void</code></em> <strong>OpenHDF</strong> <em>(<code>const char *</code>fname)</em></dt>
-<dt><a name="index-mgl_005fparser_005fopenhdf"></a>C function: <em><code>void</code></em> <strong>mgl_parser_openhdf</strong> <em>(<code>HMPR</code> pr, <code>const char *</code>fname)</em></dt>
-<dd><p>Reads all data array from HDF5 file <var>fname</var> and create MGL variables with names of data names in HDF file. Complex variables will be created if data name starts with ‘<samp>!</samp>’.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mgl_005fdatas_005fhdf_005fstr"></a>C function: <em><code>const char * const *</code></em> <strong>mgl_datas_hdf_str</strong> <em>(<code>HMPR</code> pr, <code>const char *</code>fname)</em></dt>
-<dd><p>Put HDF data names as list of strings (last one is ""). The result is valid untill next call of the function.
-</p></dd></dl>
-
-
-<a name="import"></a><dl>
-<dt><a name="index-import"></a>MGL command: <em></em> <strong>import</strong> <em><small>DAT</small> 'fname' 'sch' [<code>v1=0 v2=1</code>]</em></dt>
-<dt><a name="index-Import-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Import</strong> <em>(<code>const char *</code>fname, <code>const char *</code>scheme, <code>mreal</code> v1=<code>0</code>, mreal v2=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fimport"></a>C function: <em><code>void</code></em> <strong>mgl_data_import</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>fname, <code>const char *</code>scheme, <code>mreal</code> v1, mreal v2)</em></dt>
-<dd><p>Reads data from bitmap file (now support only PNG format). The RGB values of bitmap pixels are transformed to mreal values in range [<var>v1</var>, <var>v2</var>] using color scheme <var>scheme</var> (see <a href="#Color-scheme">Color scheme</a>).
-</p></dd></dl>
-
-<a name="export"></a><dl>
-<dt><a name="index-export"></a>MGL command: <em></em> <strong>export</strong> <em>dat 'fname' 'sch' [<code>v1=0 v2=0</code>]</em></dt>
-<dt><a name="index-Export-1"></a>Method on <code>mglDataA</code>: <em><code>void</code></em> <strong>Export</strong> <em>(<code>const char *</code>fname, <code>const char *</code>scheme, <code>mreal</code> v1=<code>0</code>, mreal v2=<code>0</code>, <code>int</code> ns=<code>-1</code>) const</em></dt>
-<dt><a name="index-mgl_005fdata_005fexport"></a>C function: <em><code>void</code></em> <strong>mgl_data_export</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>fname, <code>const char *</code>scheme, <code>mreal</code> v1, mreal v2, <code>int</code> ns) const</em></dt>
-<dd><p>Saves data matrix (or <code>ns</code>-th slice for 3d data) to bitmap file (now support only PNG format). The data values are transformed from range [<var>v1</var>, <var>v2</var>] to RGB pixels of bitmap using color scheme <var>scheme</var> (see <a href="#Color-scheme">Color scheme</a>). If <var>v1</var>>=<var>v2</var> then the values of <var>v1</var>, <var>v2</var> are automatically determined as minimal and maximal value of the data array.
-</p></dd></dl>
-
-
-<hr>
-<a name="Make-another-data"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-changing" accesskey="n" rel="next">Data changing</a>, Previous: <a href="#File-I_002fO" accesskey="p" rel="prev">File I/O</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Make-another-data-1"></a>
-<h3 class="section">6.6 Make another data</h3>
-
-<a name="index-SubData"></a>
-<a name="index-Column"></a>
-<a name="index-Trace"></a>
-<a name="index-Hist-1"></a>
-<a name="index-Resize"></a>
-<a name="index-Evaluate"></a>
-<a name="index-Combine-1"></a>
-<a name="index-Momentum"></a>
-<a name="index-Sum"></a>
-<a name="index-Min"></a>
-<a name="index-Max"></a>
-<a name="index-Roots"></a>
-<a name="index-Correl"></a>
-<a name="index-AutoCorrel"></a>
-
-
-<a name="subdata"></a><dl>
-<dt><a name="index-subdata"></a>MGL command: <em></em> <strong>subdata</strong> <em><small>RES</small> dat <code>xx [yy=all zz=all]</code></em></dt>
-<dt><a name="index-SubData-1"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>SubData</strong> <em>(<code>mreal</code> xx, <code>mreal</code> yy=<code>-1</code>, <code>mreal</code> zz=<code>-1</code>) <code>const</code></em></dt>
-<dt><a name="index-SubData-2"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>SubData</strong> <em>(<code>mreal</code> xx, <code>mreal</code> yy=<code>-1</code>, <code>mreal</code> zz=<code>-1</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fsubdata"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_subdata</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> xx, <code>mreal</code> yy, <code>mreal</code> zz)</em></dt>
-<dd><p>Extracts sub-array data from the original data array keeping fixed positive index. For example <code>SubData(-1,2)</code> extracts 3d row (indexes are zero based), <code>SubData(4,-1)</code> extracts 5th column, <code>SubData(-1,-1,3)</code> extracts 4th slice and so on. If argument(s) are non-integer then linear interpolation between slices is used. In MGL version this command usually is used as inline one <code>dat(xx,yy,zz)</code>. Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-subdata-1"></a>MGL command: <em></em> <strong>subdata</strong> <em><small>RES</small> dat xdat [ydat zdat]</em></dt>
-<dt><a name="index-SubData-3"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>SubData</strong> <em>(<code>const mglDataA &</code>xx, <code>const mglDataA &</code>yy, <code>const mglDataA &</code>zz) <code>const</code></em></dt>
-<dt><a name="index-SubData-4"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>SubData</strong> <em>(<code>const mglDataA &</code>xx, <code>const mglDataA &</code>yy, <code>const mglDataA &</code>zz) <code>const</code></em></dt>
-<dt><a name="index-SubData-5"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>SubData</strong> <em>(<code>const mglDataA &</code>xx, <code>const mglDataA &</code>yy) <code>const</code></em></dt>
-<dt><a name="index-SubData-6"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>SubData</strong> <em>(<code>const mglDataA &</code>xx, <code>const mglDataA &</code>yy) <code>const</code></em></dt>
-<dt><a name="index-SubData-7"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>SubData</strong> <em>(<code>const mglDataA &</code>xx) <code>const</code></em></dt>
-<dt><a name="index-SubData-8"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>SubData</strong> <em>(<code>const mglDataA &</code>xx) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fsubdata_005fext"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_subdata_ext</strong> <em>(<code>HCDT</code> dat, <code>HCDT</code> xx, <code>HCDT</code> yy, <code>HCDT</code> zz)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fsubdata_005fext"></a>C function: <em><code>HADT</code></em> <strong>mgl_datac_subdata_ext</strong> <em>(<code>HCDT</code> dat, <code>HCDT</code> xx, <code>HCDT</code> yy, <code>HCDT</code> zz)</em></dt>
-<dd><p>Extracts sub-array data from the original data array for indexes specified by arrays <var>xx</var>, <var>yy</var>, <var>zz</var> (indirect access). This function work like previous one for 1D arguments or numbers, and resulting array dimensions are equal dimensions of 1D arrays for corresponding direction. For 2D and 3D arrays in arguments, the resulting array have the same dimensions as input arrays. The dimensions of all argument must be the same (or to be scalar 1*1*1) if they are 2D or 3D arrays. In MGL version this command usually is used as inline one <code>dat(xx,yy,zz)</code>. Function return NULL or create empty data if data cannot be created for given arguments. In C function some of <var>xx</var>, <var>yy</var>, <var>zz</var> can be NULL.
-</p></dd></dl>
-
-<a name="column"></a><dl>
-<dt><a name="index-column"></a>MGL command: <em></em> <strong>column</strong> <em><small>RES</small> dat 'eq'</em></dt>
-<dt><a name="index-Column-1"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Column</strong> <em>(<code>const char *</code>eq) <code>const</code></em></dt>
-<dt><a name="index-Column-2"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Column</strong> <em>(<code>const char *</code>eq) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fcolumn"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_column</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>eq)</em></dt>
-<dd><p>Get column (or slice) of the data filled by formula <var>eq</var> on column ids. For example, <code>Column("n*w^2/exp(t)");</code>. The column ids must be defined first by <a href="#idset">idset</a> function or read from files. In MGL version this command usually is used as inline one <code>dat('eq')</code>. Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<a name="resize"></a><dl>
-<dt><a name="index-resize"></a>MGL command: <em></em> <strong>resize</strong> <em><small>RES</small> dat <code>mx [my=1 mz=1]</code></em></dt>
-<dt><a name="index-Resize-1"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Resize</strong> <em>(<code>int</code> mx, <code>int</code> my=<code>0</code>, <code>int</code> mz=<code>0</code>, <code>mreal</code> x1=<code>0</code>, <code>mreal</code> x2=<code>1</code>, <code>mreal</code> y1=<code>0</code>, <code>mreal</code> y2=<code>1</code>, <code>mreal</code> z1=<code>0</code>, <code>mreal</code> z2=<code>1</code>) <code>const</code></em></dt>
-<dt><a name="index-Resize-2"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Resize</strong> <em>(<code>int</code> mx, <code>int</code> my=<code>0</code>, <code>int</code> mz=<code>0</code>, <code>mreal</code> x1=<code>0</code>, <code>mreal</code> x2=<code>1</code>, <code>mreal</code> y1=<code>0</code>, <code>mreal</code> y2=<code>1</code>, <code>mreal</code> z1=<code>0</code>, <code>mreal</code> z2=<code>1</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fresize"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_resize</strong> <em>(<code>HCDT</code> dat, <code>int</code> mx, <code>int</code> my, <code>int</code> mz)</em></dt>
-<dt><a name="index-mgl_005fdata_005fresize_005fbox"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_resize_box</strong> <em>(<code>HCDT</code> dat, <code>int</code> mx, <code>int</code> my, <code>int</code> mz, <code>mreal</code> x1, <code>mreal</code> x2, <code>mreal</code> y1, <code>mreal</code> y2, <code>mreal</code> z1, <code>mreal</code> z2)</em></dt>
-<dd><p>Resizes the data to new size <var>mx</var>, <var>my</var>, <var>mz</var> from box (part) [<var>x1</var>,<var>x2</var>] x [<var>y1</var>,<var>y2</var>] x [<var>z1</var>,<var>z2</var>] of original array. Initially x,y,z coordinates are supposed to be in [0,1]. If one of sizes <var>mx</var>, <var>my</var> or <var>mz</var> is 0 then initial size is used. Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<a name="evaluate"></a><dl>
-<dt><a name="index-evaluate"></a>MGL command: <em></em> <strong>evaluate</strong> <em><small>RES</small> dat idat [<code>norm=on</code>]</em></dt>
-<dt><a name="index-evaluate-1"></a>MGL command: <em></em> <strong>evaluate</strong> <em><small>RES</small> dat idat jdat [<code>norm=on</code>]</em></dt>
-<dt><a name="index-evaluate-2"></a>MGL command: <em></em> <strong>evaluate</strong> <em><small>RES</small> dat idat jdat kdat [<code>norm=on</code>]</em></dt>
-<dt><a name="index-Evaluate-1"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Evaluate</strong> <em>(<code>const mglDataA &</code>idat, <code>bool</code> norm=<code>true</code>) <code>const</code></em></dt>
-<dt><a name="index-Evaluate-2"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Evaluate</strong> <em>(<code>const mglDataA &</code>idat, <code>const mglDataA &</code>jdat, <code>bool</code> norm=<code>true</code>) <code>const</code></em></dt>
-<dt><a name="index-Evaluate-3"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Evaluate</strong> <em>(<code>const mglDataA &</code>idat, <code>const mglDataA &</code>jdat, <code>const mglDataA &</code>kdat, <code>bool</code> norm=<code>true</code>) <code>const</code></em></dt>
-<dt><a name="index-Evaluate-4"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Evaluate</strong> <em>(<code>const mglDataA &</code>idat, <code>bool</code> norm=<code>true</code>) <code>const</code></em></dt>
-<dt><a name="index-Evaluate-5"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Evaluate</strong> <em>(<code>const mglDataA &</code>idat, <code>const mglDataA &</code>jdat, <code>bool</code> norm=<code>true</code>) <code>const</code></em></dt>
-<dt><a name="index-Evaluate-6"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Evaluate</strong> <em>(<code>const mglDataA &</code>idat, <code>const mglDataA &</code>jdat, <code>const mglDataA &</code>kdat, <code>bool</code> norm=<code>true</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fevaluate"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_evaluate</strong> <em>(<code>HCDT</code> dat, <code>HCDT</code> idat, <code>HCDT</code> jdat, <code>HCDT</code> kdat, <code>int</code> norm)</em></dt>
-<dd><p>Gets array which values is result of interpolation of original array for coordinates from other arrays. All dimensions must be the same for data <var>idat</var>, <var>jdat</var>, <var>kdat</var>. Coordinates from <var>idat</var>, <var>jdat</var>, <var>kdat</var> are supposed to be normalized in range [0,1] (if <var>norm</var>=<code>true</code>) or in ranges [0,nx], [0,ny], [0,nz] correspondingly. Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<a name="section"></a><dl>
-<dt><a name="index-section"></a>MGL command: <em></em> <strong>section</strong> <em><small>RES</small> dat ids ['dir'='y' <code>val=nan</code>]</em></dt>
-<dt><a name="index-section-1"></a>MGL command: <em></em> <strong>section</strong> <em><small>RES</small> dat <code>id</code> ['dir'='y' <code>val=nan</code>]</em></dt>
-<dt><a name="index-Section"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Section</strong> <em>(<code>const mglDataA &</code>ids, <code>const char *</code>dir=<code>'y'</code>, <code>mreal</code> val=<code>NAN</code>) <code>const</code></em></dt>
-<dt><a name="index-Section-1"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Section</strong> <em>(<code>long</code> id, <code>const char *</code>dir=<code>'y'</code>, <code>mreal</code> val=<code>NAN</code>) <code>const</code></em></dt>
-<dt><a name="index-Section-2"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Section</strong> <em>(<code>const mglDataA &</code>ids, <code>const char *</code>dir=<code>'y'</code>, <code>mreal</code> val=<code>NAN</code>) <code>const</code></em></dt>
-<dt><a name="index-Section-3"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Section</strong> <em>(<code>long</code> id, <code>const char *</code>dir=<code>'y'</code>, <code>mreal</code> val=<code>NAN</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fsection"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_section</strong> <em>(<code>HCDT</code> dat, <code>HCDT</code> ids, <code>const char *</code>dir, <code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fdata_005fsection_005fval"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_section_val</strong> <em>(<code>HCDT</code> dat, <code>long</code> id, <code>const char *</code>dir, <code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fsection"></a>C function: <em><code>HADT</code></em> <strong>mgl_datac_section</strong> <em>(<code>HCDT</code> dat, <code>HCDT</code> ids, <code>const char *</code>dir, <code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fsection_005fval"></a>C function: <em><code>HADT</code></em> <strong>mgl_datac_section_val</strong> <em>(<code>HCDT</code> dat, <code>long</code> id, <code>const char *</code>dir, <code>mreal</code> val)</em></dt>
-<dd><p>Gets array which is <var>id</var>-th section (range of slices separated by value <var>val</var>) of original array <var>dat</var>. For <var>id</var><0 the reverse order is used (i.e. -1 give last section). If several <var>ids</var> are provided then output array will be result of sequential joining of sections.
-</p></dd></dl>
-
-
-<a name="solve"></a><dl>
-<dt><a name="index-solve"></a>MGL command: <em></em> <strong>solve</strong> <em><small>RES</small> dat <code>val</code> 'dir' [<code>norm=on</code>]</em></dt>
-<dt><a name="index-solve-1"></a>MGL command: <em></em> <strong>solve</strong> <em><small>RES</small> dat <code>val</code> 'dir' idat [<code>norm=on</code>]</em></dt>
-<dt><a name="index-Solve"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Solve</strong> <em>(<code>mreal</code> val, <code>char</code> dir, <code>bool</code> norm=<code>true</code>) <code>const</code></em></dt>
-<dt><a name="index-Solve-1"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Solve</strong> <em>(<code>mreal</code> val, <code>char</code> dir, <code>const mglDataA &</code>idat, <code>bool</code> norm=<code>true</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fsolve"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_solve</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> val, <code>char</code> dir, <code>HCDT</code> idat, <code>int</code> norm)</em></dt>
-<dd><p>Gets array which values is indexes (roots) along given direction <var>dir</var>, where interpolated values of data <var>dat</var> are equal to <var>val</var>. Output data will have the sizes of <var>dat</var> in directions transverse to <var>dir</var>. If data <var>idat</var> is provided then its values are used as starting points. This allows to find several branches by consequentive calls. Indexes are supposed to be normalized in range [0,1] (if <var>norm</var>=<code>true</code>) or in ranges [0,nx], [0,ny], [0,nz] correspondingly. Function return NULL or create empty data if data cannot be created for given arguments. See <a href="#Solve-sample">Solve sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="roots"></a><dl>
-<dt><a name="index-roots"></a>MGL command: <em></em> <strong>roots</strong> <em><small>RES</small> 'func' ini ['var'='x']</em></dt>
-<dt><a name="index-roots-1"></a>MGL command: <em></em> <strong>roots</strong> <em><small>RES</small> 'func' <code>ini</code> ['var'='x']</em></dt>
-<dt><a name="index-Roots-1"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Roots</strong> <em>(<code>const char *</code>func, <code>char</code> var) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005froots"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_roots</strong> <em>(<code>const char *</code>func, <code>HCDT</code> ini, <code>char</code> var)</em></dt>
-<dt><a name="index-mgl_005ffind_005froot_005ftxt"></a>C function: <em><code>mreal</code></em> <strong>mgl_find_root_txt</strong> <em>(<code>const char *</code>func, <code>mreal</code> ini, <code>char</code> var)</em></dt>
-<dd><p>Find roots of equation ’func’=0 for variable <var>var</var> with initial guess <var>ini</var>. Secant method is used for root finding. Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-roots-2"></a>MGL command: <em></em> <strong>roots</strong> <em><small>RES</small> 'funcs' 'vars' ini</em></dt>
-<dt><a name="index-MultiRoots"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>MultiRoots</strong> <em>(<code>const char *</code>funcs, <code>const char *</code>vars) <code>const</code></em></dt>
-<dt><a name="index-MultiRoots-1"></a>Method on <code>mglDataC</code>: <em><code>mglDataC</code></em> <strong>MultiRoots</strong> <em>(<code>const char *</code>funcs, <code>const char *</code>vars) <code>const</code></em></dt>
-<dt><a name="index-mgl_005ffind_005froots_005ftxt"></a>C function: <em><code>HMDT</code></em> <strong>mgl_find_roots_txt</strong> <em>(<code>const char *</code>func, <code>const char *</code>vars, <code>HCDT</code> ini)</em></dt>
-<dt><a name="index-mgl_005ffind_005froots_005ftxt_005fc"></a>C function: <em><code>HADT</code></em> <strong>mgl_find_roots_txt_c</strong> <em>(<code>const char *</code>func, <code>const char *</code>vars, <code>HCDT</code> ini)</em></dt>
-<dd><p>Find roots of system of equations ’funcs’=0 for variables <var>vars</var> with initial guesses <var>ini</var>. Secant method is used for root finding. Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<a name="detect"></a><dl>
-<dt><a name="index-detect"></a>MGL command: <em></em> <strong>detect</strong> <em><small>RES</small> dat <code>lvl dj [di=0 minlen=0]</code></em></dt>
-<dt><a name="index-Detect"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Detect</strong> <em>(<code>mreal</code> lvl, <code>mreal</code> dj, <code>mreal</code> di=<code>0</code>, <code>mreal</code> minlen=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fdetect"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_detect</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> lvl, <code>mreal</code> dj, <code>mreal</code> di, <code>mreal</code> minlen)</em></dt>
-<dd><p>Get curves {x,y}, separated by NAN values, for local maximal values of array <var>dat</var> as function of x-coordinate. Noises below <var>lvl</var> amplitude are ignored. Parameter <var>dj</var> (in range [0,ny]) set the "attraction" y-distance of points to the curve. Similarly, <var>di</var> continue curve in x-direction through gaps smaller than <var>di</var> points. Curves with minimal length smaller than <var>minlen</var> will be ignored.
-</p></dd></dl>
-
-<a name="hist"></a><dl>
-<dt><a name="index-hist-3"></a>MGL command: <em></em> <strong>hist</strong> <em><small>RES</small> dat <code>num v1 v2 [nsub=0]</code></em></dt>
-<dt><a name="index-hist-4"></a>MGL command: <em></em> <strong>hist</strong> <em><small>RES</small> dat wdat <code>num v1 v2 [nsub=0]</code></em></dt>
-<dt><a name="index-Hist-5"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Hist</strong> <em>(<code>int</code> n, <code>mreal</code> v1=<code>0</code>, <code>mreal</code> v2=<code>1</code>, <code>int</code> nsub=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-Hist-6"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Hist</strong> <em>(<code>const mglDataA &</code>w, <code>int</code> n, <code>mreal</code> v1=<code>0</code>, <code>mreal</code> v2=<code>1</code>, <code>int</code> nsub=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-Hist-7"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Hist</strong> <em>(<code>int</code> n, <code>mreal</code> v1=<code>0</code>, <code>mreal</code> v2=<code>1</code>, <code>int</code> nsub=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-Hist-8"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Hist</strong> <em>(<code>const mglDataA &</code>w, <code>int</code> n, <code>mreal</code> v1=<code>0</code>, <code>mreal</code> v2=<code>1</code>, <code>int</code> nsub=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fhist"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_hist</strong> <em>(<code>HCDT</code> dat, <code>int</code> n, <code>mreal</code> v1, <code>mreal</code> v2, <code>int</code> nsub)</em></dt>
-<dt><a name="index-mgl_005fdata_005fhist_005fw"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_hist_w</strong> <em>(<code>HCDT</code> dat, <code>HCDT</code> w, <code>int</code> n, <code>mreal</code> v1, <code>mreal</code> v2, <code>int</code> nsub)</em></dt>
-<dd><p>Creates <var>n</var>-th points distribution of the data values in range [<var>v1</var>, <var>v2</var>]. Array <var>w</var> specifies weights of the data elements (by default is 1). Parameter <var>nsub</var> define the number of additional interpolated points (for smoothness of histogram). Function return NULL or create empty data if data cannot be created for given arguments. See also <a href="#Data-manipulation">Data manipulation</a>
-</p></dd></dl>
-
-<a name="momentum"></a><dl>
-<dt><a name="index-momentum"></a>MGL command: <em></em> <strong>momentum</strong> <em><small>RES</small> dat 'how' ['dir'='z']</em></dt>
-<dt><a name="index-Momentum-2"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Momentum</strong> <em>(<code>char</code> dir, <code>const char *</code>how) <code>const</code></em></dt>
-<dt><a name="index-Momentum-3"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Momentum</strong> <em>(<code>char</code> dir, <code>const char *</code>how) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmomentum"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_momentum</strong> <em>(<code>HCDT</code> dat, <code>char</code> dir, <code>const char *</code>how)</em></dt>
-<dd><p>Gets momentum (1d-array) of the data along direction <var>dir</var>. String <var>how</var> contain kind of momentum. The momentum is defined like as
-res_k = \sum_ij how(x_i,y_j,z_k) a_ij/ \sum_ij a_ij
-if <var>dir</var>=‘<samp>z</samp>’ and so on. Coordinates ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’ are data indexes normalized in range [0,1]. Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<a name="sum"></a><dl>
-<dt><a name="index-sum"></a>MGL command: <em></em> <strong>sum</strong> <em><small>RES</small> dat 'dir'</em></dt>
-<dt><a name="index-Sum-1"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Sum</strong> <em>(<code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-Sum-2"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Sum</strong> <em>(<code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fsum"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_sum</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Gets array which is the result of summation in given direction or direction(s). Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<a name="max"></a><dl>
-<dt><a name="index-max"></a>MGL command: <em></em> <strong>max</strong> <em><small>RES</small> dat 'dir'</em></dt>
-<dt><a name="index-Max-1"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Max</strong> <em>(<code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-Max-2"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Max</strong> <em>(<code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmax_005fdir"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_max_dir</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Gets array which is the maximal data values in given direction or direction(s). Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<a name="min"></a><dl>
-<dt><a name="index-min"></a>MGL command: <em></em> <strong>min</strong> <em><small>RES</small> dat 'dir'</em></dt>
-<dt><a name="index-Min-1"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Min</strong> <em>(<code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-Min-2"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Min</strong> <em>(<code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmin_005fdir"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_min_dir</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Gets array which is the maximal data values in given direction or direction(s). Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<a name="combine"></a><dl>
-<dt><a name="index-combine"></a>MGL command: <em></em> <strong>combine</strong> <em><small>RES</small> adat bdat</em></dt>
-<dt><a name="index-Combine-3"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Combine</strong> <em>(<code>const mglDataA &</code>a) <code>const</code></em></dt>
-<dt><a name="index-Combine-4"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Combine</strong> <em>(<code>const mglDataA &</code>a) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fcombine"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_combine</strong> <em>(<code>HCDT</code> dat, <code>HCDT</code> a)</em></dt>
-<dd><p>Returns direct multiplication of arrays (like, res[i,j] = this[i]*a[j] and so on). Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<a name="trace"></a><dl>
-<dt><a name="index-trace"></a>MGL command: <em></em> <strong>trace</strong> <em><small>RES</small> dat</em></dt>
-<dt><a name="index-Trace-1"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Trace</strong> <em>() <code>const</code></em></dt>
-<dt><a name="index-Trace-2"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Trace</strong> <em>() <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005ftrace"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_trace</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dd><p>Gets array of diagonal elements a[i,i] (for 2D case) or a[i,i,i] (for 3D case) where i=0...nx-1. Function return copy of itself for 1D case. Data array must have dimensions ny,nz >= nx or ny,nz = 1. Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<a name="correl"></a><dl>
-<dt><a name="index-correl"></a>MGL command: <em></em> <strong>correl</strong> <em><small>RES</small> adat bdat 'dir'</em></dt>
-<dt><a name="index-Correl-1"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Correl</strong> <em>(<code>const mglDataA &</code>b, <code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-AutoCorrel-1"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>AutoCorrel</strong> <em>(<code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-Correl-2"></a>Method on <code>mglDataC</code>: <em><code>mglDataC</code></em> <strong>Correl</strong> <em>(<code>const mglDataA &</code>b, <code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-AutoCorrel-2"></a>Method on <code>mglDataC</code>: <em><code>mglDataC</code></em> <strong>AutoCorrel</strong> <em>(<code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fcorrel"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_correl</strong> <em>(<code>HCDT</code> a, <code>HCDT</code> b, <code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fcorrel"></a>C function: <em><code>HADT</code></em> <strong>mgl_datac_correl</strong> <em>(<code>HCDT</code> a, <code>HCDT</code> b, <code>const char *</code>dir)</em></dt>
-<dd><p>Find correlation between data <var>a</var> (or this in C++) and <var>b</var> along directions <var>dir</var>. Fourier transform is used to find the correlation. So, you may want to use functions <a href="#swap">swap</a> or <a href="#norm">norm</a> before plotting it. Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Real"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Real</strong> <em>() <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdatac_005freal"></a>C function: <em><code>HMDT</code></em> <strong>mgl_datac_real</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dd><p>Gets array of real parts of the data.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Imag"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Imag</strong> <em>() <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdatac_005fimag"></a>C function: <em><code>HMDT</code></em> <strong>mgl_datac_imag</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dd><p>Gets array of imaginary parts of the data.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Abs"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Abs</strong> <em>() <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdatac_005fabs"></a>C function: <em><code>HMDT</code></em> <strong>mgl_datac_abs</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dd><p>Gets array of absolute values of the data.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Arg"></a>Method on <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Arg</strong> <em>() <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdatac_005farg"></a>C function: <em><code>HMDT</code></em> <strong>mgl_datac_arg</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dd><p>Gets array of arguments of the data.
-</p></dd></dl>
-
-<a name="pulse"></a><dl>
-<dt><a name="index-pulse"></a>MGL command: <em></em> <strong>pulse</strong> <em><small>RES</small> dat 'dir'</em></dt>
-<dt><a name="index-Pulse"></a>Method on <code>mglData</code>: <em><code>mglData</code></em> <strong>Pulse</strong> <em>(<code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fpulse"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_pulse</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Find pulse properties along direction <var>dir</var>: pulse maximum (in column 0) and its position (in column 1), pulse width near maximum (in column 3) and by half height (in column 2), energy in first pulse (in column 4). NAN values are used for widths if maximum is located near the edges. Note, that there is uncertainty for complex data. Usually one should use square of absolute value (i.e. |dat[i]|^2) for them. So, MathGL don’t provide this function for complex data arrays. However, C function will work even in this case but use absolute value (i.e. |dat[i]|). Function return NULL or create empty data if data cannot be created for given arguments. See also <a href="#max">max</a>, <a href="#min">min</a>, <a href="#momentum">momentum</a>, <a href="#sum">sum</a>. See <a href="#Pulse-properties">Pulse properties</a>, for sample code and picture.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Data-changing"></a>
-<div class="header">
-<p>
-Next: <a href="#Interpolation" accesskey="n" rel="next">Interpolation</a>, Previous: <a href="#Make-another-data" accesskey="p" rel="prev">Make another data</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-changing-1"></a>
-<h3 class="section">6.7 Data changing</h3>
-
-<a name="index-CumSum"></a>
-<a name="index-Integral"></a>
-<a name="index-Diff"></a>
-<a name="index-Diff2"></a>
-<a name="index-SinFFT"></a>
-<a name="index-CosFFT"></a>
-<a name="index-Hankel"></a>
-<a name="index-Swap"></a>
-<a name="index-Roll"></a>
-<a name="index-Mirror"></a>
-<a name="index-Sew"></a>
-<a name="index-Smooth"></a>
-<a name="index-Envelop"></a>
-<a name="index-Norm"></a>
-<a name="index-NormSl"></a>
-
-<p>These functions change the data in some direction like differentiations, integrations and so on. The direction in which the change will applied is specified by the string parameter, which may contain ‘<samp>x</samp>’, ‘<samp>y</samp>’ or ‘<samp>z</samp>’ characters for 1-st, 2-nd and 3-d dimension correspondingly.
-</p>
-<a name="cumsum"></a><dl>
-<dt><a name="index-cumsum"></a>MGL command: <em></em> <strong>cumsum</strong> <em>dat 'dir'</em></dt>
-<dt><a name="index-CumSum-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>CumSum</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-CumSum-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>CumSum</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdata_005fcumsum"></a>C function: <em><code>void</code></em> <strong>mgl_data_cumsum</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fcumsum"></a>C function: <em><code>void</code></em> <strong>mgl_datac_cumsum</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Cumulative summation of the data in given direction or directions.
-</p></dd></dl>
-
-<a name="integrate"></a><dl>
-<dt><a name="index-integrate"></a>MGL command: <em></em> <strong>integrate</strong> <em>dat 'dir'</em></dt>
-<dt><a name="index-Integral-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Integral</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-Integral-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Integral</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdata_005fintegral"></a>C function: <em><code>void</code></em> <strong>mgl_data_integral</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fintegral"></a>C function: <em><code>void</code></em> <strong>mgl_datac_integral</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Integrates (like cumulative summation) the data in given direction or directions.
-</p></dd></dl>
-
-<a name="diff"></a><dl>
-<dt><a name="index-diff"></a>MGL command: <em></em> <strong>diff</strong> <em>dat 'dir'</em></dt>
-<dt><a name="index-Diff-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Diff</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-Diff-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Diff</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdata_005fdiff"></a>C function: <em><code>void</code></em> <strong>mgl_data_diff</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fdiff"></a>C function: <em><code>void</code></em> <strong>mgl_datac_diff</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Differentiates the data in given direction or directions.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-diff-1"></a>MGL command: <em></em> <strong>diff</strong> <em>dat xdat ydat [zdat]</em></dt>
-<dt><a name="index-Diff-3"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Diff</strong> <em>(<code>const mglDataA &</code>x)</em></dt>
-<dt><a name="index-Diff-4"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Diff</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y)</em></dt>
-<dt><a name="index-Diff-5"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Diff</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z)</em></dt>
-<dt><a name="index-Diff-6"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Diff</strong> <em>(<code>const mglDataA &</code>x)</em></dt>
-<dt><a name="index-Diff-7"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Diff</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y)</em></dt>
-<dt><a name="index-Diff-8"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Diff</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z)</em></dt>
-<dt><a name="index-mgl_005fdata_005fdiff_005fpar"></a>C function: <em><code>void</code></em> <strong>mgl_data_diff_par</strong> <em>(<code>HMDT</code> dat, <code>HCDT</code> x, <code>HCDT</code>y, <code>HCDT</code>z)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fdiff_005fpar"></a>C function: <em><code>void</code></em> <strong>mgl_datac_diff_par</strong> <em>(<code>HADT</code> dat, <code>HCDT</code> x, <code>HCDT</code>y, <code>HCDT</code>z)</em></dt>
-<dd><p>Differentiates the data specified parametrically in direction <var>x</var> with <var>y</var>, <var>z</var>=constant. Parametrical differentiation uses the formula (for 2D case): <em>da/dx = (a_j*y_i-a_i*y_j)/(x_j*y_i-x_i*y_j)</em> where <em>a_i=da/di, a_j=da/dj</em> denotes usual differentiation along 1st and 2nd dimensions. The similar formula is used for 3D case. Note, that you may change the order of arguments – for example, if you have 2D data a(i,j) which depend on coordinates {x(i,j), y(i,j)} then usual derivative along ‘<samp>x</samp>’ will be <code>Diff(x,y);</code> and usual derivative along ‘<samp>y</samp>’ will be <code>Diff(y,x);</code>.
-</p></dd></dl>
-
-<a name="diff2"></a><dl>
-<dt><a name="index-diff2"></a>MGL command: <em></em> <strong>diff2</strong> <em>dat 'dir'</em></dt>
-<dt><a name="index-Diff2-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Diff2</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-Diff2-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Diff2</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdata_005fdiff2"></a>C function: <em><code>void</code></em> <strong>mgl_data_diff2</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fdiff2"></a>C function: <em><code>void</code></em> <strong>mgl_datac_diff2</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Double-differentiates (like Laplace operator) the data in given direction.
-</p></dd></dl>
-
-<a name="sinfft"></a><dl>
-<dt><a name="index-sinfft"></a>MGL command: <em></em> <strong>sinfft</strong> <em>dat 'dir'</em></dt>
-<dt><a name="index-SinFFT-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>SinFFT</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdata_005fsinfft"></a>C function: <em><code>void</code></em> <strong>mgl_data_sinfft</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Do Sine transform of the data in given direction or directions. The Sine transform is <em>\sum a_j \sin(k j)</em> (see <a href="http://en.wikipedia.org/wiki/Discrete_sine_transform#DST-I">http://en.wikipedia.org/wiki/Discrete_sine_transform#DST-I</a>).
-</p></dd></dl>
-
-<a name="cosfft"></a><dl>
-<dt><a name="index-cosfft"></a>MGL command: <em></em> <strong>cosfft</strong> <em>dat 'dir'</em></dt>
-<dt><a name="index-CosFFT-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>CosFFT</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdata_005fcosfft"></a>C function: <em><code>void</code></em> <strong>mgl_data_cosfft</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Do Cosine transform of the data in given direction or directions. The Cosine transform is <em>\sum a_j \cos(k j)</em> (see <a href="http://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-I">http://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-I</a>).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-FFT"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>FFT</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005ffft"></a>C function: <em><code>void</code></em> <strong>mgl_datac_fft</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Do Fourier transform of the data in given direction or directions. If <var>dir</var> contain ‘<samp>i</samp>’ then inverse Fourier is used. The Fourier transform is <em>\sum a_j \exp(i k j)</em> (see <a href="http://en.wikipedia.org/wiki/Discrete_Fourier_transform">http://en.wikipedia.org/wiki/Discrete_Fourier_transform</a>).
-</p></dd></dl>
-
-<a name="hankel"></a><dl>
-<dt><a name="index-hankel"></a>MGL command: <em></em> <strong>hankel</strong> <em>dat 'dir'</em></dt>
-<dt><a name="index-Hankel-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Hankel</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-Hankel-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Hankel</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdata_005fhankel"></a>C function: <em><code>void</code></em> <strong>mgl_data_hankel</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fhankel"></a>C function: <em><code>void</code></em> <strong>mgl_datac_hankel</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Do Hankel transform of the data in given direction or directions. The Hankel transform is <em>\sum a_j J_0(k j)</em> (see <a href="http://en.wikipedia.org/wiki/Hankel_transform">http://en.wikipedia.org/wiki/Hankel_transform</a>).
-</p></dd></dl>
-
-<a name="wavelet"></a><dl>
-<dt><a name="index-wavelet"></a>MGL command: <em></em> <strong>wavelet</strong> <em>dat 'dir' <code>k</code></em></dt>
-<dt><a name="index-Wavelet"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Wavelet</strong> <em>(<code>const char *</code>dir, <code>int</code> k)</em></dt>
-<dt><a name="index-mgl_005fdata_005fwavelet"></a>C function: <em><code>void</code></em> <strong>mgl_data_wavelet</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir, <code>int</code> k)</em></dt>
-<dd><p>Apply wavelet transform of the data in given direction or directions. Parameter <var>dir</var> set the kind of wavelet transform:
-‘<samp>d</samp>’ for daubechies, ‘<samp>D</samp>’ for centered daubechies, ‘<samp>h</samp>’ for haar, ‘<samp>H</samp>’ for centered haar, ‘<samp>b</samp>’ for bspline, ‘<samp>B</samp>’ for centered bspline. If string <var>dir</var> contain symbol ‘<samp>i</samp>’ then inverse wavelet transform is applied. Parameter <var>k</var> set the size of wavelet transform.
-</p></dd></dl>
-
-<a name="swap"></a><dl>
-<dt><a name="index-swap"></a>MGL command: <em></em> <strong>swap</strong> <em>dat 'dir'</em></dt>
-<dt><a name="index-Swap-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Swap</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-Swap-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Swap</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdata_005fswap"></a>C function: <em><code>void</code></em> <strong>mgl_data_swap</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fswap"></a>C function: <em><code>void</code></em> <strong>mgl_datac_swap</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Swaps the left and right part of the data in given direction (useful for Fourier spectrum).
-</p></dd></dl>
-
-<a name="roll"></a><dl>
-<dt><a name="index-roll"></a>MGL command: <em></em> <strong>roll</strong> <em>dat 'dir' num</em></dt>
-<dt><a name="index-Roll-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Roll</strong> <em>(<code>char</code> dir, <code>num</code>)</em></dt>
-<dt><a name="index-Roll-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Roll</strong> <em>(<code>char</code> dir, <code>num</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005froll"></a>C function: <em><code>void</code></em> <strong>mgl_data_roll</strong> <em>(<code>HMDT</code> dat, <code>char</code> dir, <code>num</code>)</em></dt>
-<dt><a name="index-mgl_005fdatac_005froll"></a>C function: <em><code>void</code></em> <strong>mgl_datac_roll</strong> <em>(<code>HADT</code> dat, <code>char</code> dir, <code>num</code>)</em></dt>
-<dd><p>Rolls the data along direction <var>dir</var>. Resulting array will be out[i] = ini[(i+<var>num</var>)%nx] if <code>dir='x'</code>.
-</p></dd></dl>
-
-<a name="mirror"></a><dl>
-<dt><a name="index-mirror"></a>MGL command: <em></em> <strong>mirror</strong> <em>dat 'dir'</em></dt>
-<dt><a name="index-Mirror-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Mirror</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-Mirror-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Mirror</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdata_005fmirror"></a>C function: <em><code>void</code></em> <strong>mgl_data_mirror</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fmirror"></a>C function: <em><code>void</code></em> <strong>mgl_datac_mirror</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Mirror the left-to-right part of the data in given direction. Looks like change the value index <var>i</var>-><var>n-i</var>. Note, that the similar effect in graphics you can reach by using options (see <a href="#Command-options">Command options</a>), for example, <code>surf dat; xrange 1 -1</code>.
-</p></dd></dl>
-
-<a name="sew"></a><dl>
-<dt><a name="index-sew"></a>MGL command: <em></em> <strong>sew</strong> <em>dat ['dir'='xyz' <code>da=2*pi</code>]</em></dt>
-<dt><a name="index-Sew-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Sew</strong> <em>(<code>const char *</code>dir, <code>mreal</code> da=<code>2*M_PI</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fsew"></a>C function: <em><code>void</code></em> <strong>mgl_data_sew</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir, <code>mreal</code> da)</em></dt>
-<dd><p>Remove value steps (like phase jumps after inverse trigonometric functions) with period <var>da</var> in given direction.
-</p></dd></dl>
-
-<a name="smooth"></a><dl>
-<dt><a name="index-smooth"></a>MGL command: <em></em> <strong>smooth</strong> <em>data ['dir'='xyz']</em></dt>
-<dt><a name="index-Smooth-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Smooth</strong> <em>(<code>const char *</code>dir=<code>"xyz"</code>, <code>mreal</code> delta=<code>0</code>)</em></dt>
-<dt><a name="index-Smooth-2"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Smooth</strong> <em>(<code>const char *</code>dir=<code>"xyz"</code>, <code>mreal</code> delta=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fsmooth"></a>C function: <em><code>void</code></em> <strong>mgl_data_smooth</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir, <code>mreal</code> delta)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fsmooth"></a>C function: <em><code>void</code></em> <strong>mgl_datac_smooth</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dir, <code>mreal</code> delta)</em></dt>
-<dd><p>Smooths the data on specified direction or directions. String <var>dirs</var> specifies the dimensions which will be smoothed. It may contain characters:
-</p><ul>
-<li> ‘<samp>xyz</samp>’ for smoothing along x-,y-,z-directions correspondingly,
-</li><li> ‘<samp>0</samp>’ does nothing,
-</li><li> ‘<samp>3</samp>’ for linear averaging over 3 points,
-</li><li> ‘<samp>5</samp>’ for linear averaging over 5 points,
-</li><li> ‘<samp>d1</samp>’...‘<samp>d9</samp>’ for linear averaging over (2*N+1)-th points,
-</li><li> ‘<samp>^</samp>’ for finding upper bound,
-</li><li> ‘<samp>_</samp>’ for finding lower bound.
-</li></ul>
-<p>By default quadratic averaging over 5 points is used.
-</p></dd></dl>
-
-<a name="envelop"></a><dl>
-<dt><a name="index-envelop"></a>MGL command: <em></em> <strong>envelop</strong> <em>dat ['dir'='x']</em></dt>
-<dt><a name="index-Envelop-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Envelop</strong> <em>(<code>char</code> dir=<code>'x'</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fenvelop"></a>C function: <em><code>void</code></em> <strong>mgl_data_envelop</strong> <em>(<code>HMDT</code> dat, <code>char</code> dir)</em></dt>
-<dd><p>Find envelop for data values along direction <var>dir</var>.
-</p></dd></dl>
-
-<a name="diffract"></a><dl>
-<dt><a name="index-diffract"></a>MGL command: <em></em> <strong>diffract</strong> <em>dat 'how' <code>q</code></em></dt>
-<dt><a name="index-Diffraction"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Diffraction</strong> <em>(<code>const char *</code>how, <code>mreal</code> q)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fdiffr"></a>C function: <em><code>void</code></em> <strong>mgl_datac_diffr</strong> <em>(<code>HADT</code> dat, <code>const char *</code>how, <code>mreal</code> q)</em></dt>
-<dd><p>Calculates one step of diffraction by finite-difference method with parameter <var>q</var>=<em>\delta t/\delta x^2</em> using method with 3-d order of accuracy. Parameter <var>how</var> may contain:
-</p><ul>
-<li> ‘<samp>xyz</samp>’ for calculations along x-,y-,z-directions correspondingly;
-</li><li> ‘<samp>r</samp>’ for using axial symmetric Laplace operator for x-direction;
-</li><li> ‘<samp>0</samp>’ for zero boundary conditions;
-</li><li> ‘<samp>1</samp>’ for constant boundary conditions;
-</li><li> ‘<samp>2</samp>’ for linear boundary conditions;
-</li><li> ‘<samp>3</samp>’ for parabolic boundary conditions;
-</li><li> ‘<samp>4</samp>’ for exponential boundary conditions;
-</li><li> ‘<samp>5</samp>’ for gaussian boundary conditions.
-</li></ul>
-</dd></dl>
-
-<a name="norm"></a><dl>
-<dt><a name="index-norm"></a>MGL command: <em></em> <strong>norm</strong> <em>dat <code>v1 v2 [sym=off dim=0]</code></em></dt>
-<dt><a name="index-Norm-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Norm</strong> <em>(<code>mreal</code> v1=<code>0</code>, <code>mreal</code> v2=<code>1</code>, <code>bool</code> sym=<code>false</code>, <code>long</code> dim=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fnorm"></a>C function: <em><code>void</code></em> <strong>mgl_data_norm</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> v1, <code>mreal</code> v2, <code>int</code> sym, <code>long</code> dim)</em></dt>
-<dd><p>Normalizes the data to range [<var>v1</var>,<var>v2</var>]. If flag <var>sym</var>=<code>true</code> then symmetrical interval [-max(|v1|,|v2|), max(|v1|,|v2|)] is used. Modification will be applied only for slices >=<var>dim</var>.
-</p></dd></dl>
-
-<a name="normsl"></a><dl>
-<dt><a name="index-normsl"></a>MGL command: <em></em> <strong>normsl</strong> <em>dat <code>v1 v2</code> ['dir'='z' <code>keep=on sym=off</code>]</em></dt>
-<dt><a name="index-NormSl-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>NormSl</strong> <em>(<code>mreal</code> v1=<code>0</code>, <code>mreal</code> v2=<code>1</code>, <code>char</code> dir=<code>'z'</code>, <code>bool</code> keep=<code>true</code>, <code>bool</code> sym=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fnorm_005fslice"></a>C function: <em><code>void</code></em> <strong>mgl_data_norm_slice</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> v1, <code>mreal</code> v2, <code>char</code> dir, <code>int</code> keep, <code>int</code> sym)</em></dt>
-<dd><p>Normalizes data slice-by-slice along direction <var>dir</var> the data in slices to range [<var>v1</var>,<var>v2</var>]. If flag <var>sym</var>=<code>true</code> then symmetrical interval [-max(|v1|,|v2|), max(|v1|,|v2|)] is used. If <var>keep</var> is set then maximal value of k-th slice will be limited by
-<em>\sqrt{\sum a_ij(k)/\sum a_ij(0)}</em>.
-</p></dd></dl>
-
-<a name="limit"></a><dl>
-<dt><a name="index-limit"></a>MGL command: <em></em> <strong>limit</strong> <em>dat <code>val</code></em></dt>
-<dt><a name="index-Limit"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Limit</strong> <em>(<code>mreal</code> val)</em></dt>
-<dt><a name="index-Limit-1"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>Limit</strong> <em>(<code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fdata_005flimit"></a>C function: <em><code>void</code></em> <strong>mgl_data_limit</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fdatac_005flimit"></a>C function: <em><code>void</code></em> <strong>mgl_datac_limit</strong> <em>(<code>HADT</code> dat, <code>mreal</code> val)</em></dt>
-<dd><p>Limits the data values to be inside the range [-<var>val</var>,<var>val</var>], keeping the original sign of the value (phase for complex numbers). This is equivalent to operation <code>a[i] *= abs(a[i])<val?1.:val/abs(a[i]);</code>.
-</p></dd></dl>
-
-<a name="coil"></a><dl>
-<dt><a name="index-coil"></a>MGL command: <em></em> <strong>coil</strong> <em>dat <code>v1 v2 [sep=on]</code></em></dt>
-<dt><a name="index-Coil"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Coil</strong> <em>(<code>mreal</code> v1, <code>mreal</code> v2, <code>bool</code> sep=<code>true</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fcoil"></a>C function: <em><code>void</code></em> <strong>mgl_data_coil</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> v1, <code>mreal</code> v2, <code>int</code> sep)</em></dt>
-<dd><p>Project the periodical data to range [<var>v1</var>,<var>v2</var>] (like <code>mod()</code> function). Separate branches by <code>NAN</code> if <var>sep</var>=<code>true</code>.
-</p></dd></dl>
-
-
-<a name="dilate"></a><dl>
-<dt><a name="index-dilate"></a>MGL command: <em></em> <strong>dilate</strong> <em>dat <code>[val=1 step=1]</code></em></dt>
-<dt><a name="index-Dilate"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Dilate</strong> <em>(<code>mreal</code> val=<code>1</code>, <code>long</code> step=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fdilate"></a>C function: <em><code>void</code></em> <strong>mgl_data_dilate</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> val, <code>long</code> step)</em></dt>
-<dd><p>Return dilated by <var>step</var> cells array of 0 or 1 for data values larger <var>val</var>. </p></dd></dl>
-
-<a name="erode"></a><dl>
-<dt><a name="index-erode"></a>MGL command: <em></em> <strong>erode</strong> <em>dat <code>[val=1 step=1]</code></em></dt>
-<dt><a name="index-Erode"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>Erode</strong> <em>(<code>mreal</code> val=<code>1</code>, <code>long</code> step=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005ferode"></a>C function: <em><code>void</code></em> <strong>mgl_data_erode</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> val, <code>long</code> step)</em></dt>
-<dd><p>Return eroded by <var>step</var> cells array of 0 or 1 for data values larger <var>val</var>. </p></dd></dl>
-
-
-
-<hr>
-<a name="Interpolation"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-information" accesskey="n" rel="next">Data information</a>, Previous: <a href="#Data-changing" accesskey="p" rel="prev">Data changing</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Interpolation-1"></a>
-<h3 class="section">6.8 Interpolation</h3>
-
-
-<p>MGL scripts can use spline interpolation by <a href="#evaluate">evaluate</a> or <a href="#refill">refill</a> commands. Also you can use <a href="#resize">resize</a> for obtaining a data array with new sizes.
-</p>
-
-<p>However, there are much special faster functions in other modes (C/C++/Fortran/Python/...).
-</p>
-<a name="index-Spline"></a>
-<dl>
-<dt><a name="index-Spline-1"></a>Method on <code>mglData</code>: <em><code>mreal</code></em> <strong>Spline</strong> <em>(<code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-Spline-2"></a>Method on <code>mglDataC</code>: <em><code>dual</code></em> <strong>Spline</strong> <em>(<code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fspline"></a>C function: <em><code>mreal</code></em> <strong>mgl_data_spline</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fspline"></a>C function: <em><code>dual</code></em> <strong>mgl_datac_spline</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z)</em></dt>
-<dd><p>Interpolates data by cubic spline to the given point <var>x</var> in [0...nx-1], <var>y</var> in [0...ny-1], <var>z</var> in [0...nz-1].
-</p></dd></dl>
-<a name="index-Spline1"></a>
-<dl>
-<dt><a name="index-Spline1-2"></a>Method on <code>mglData</code>: <em><code>mreal</code></em> <strong>Spline1</strong> <em>(<code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-Spline1-3"></a>Method on <code>mglDataC</code>: <em><code>dual</code></em> <strong>Spline1</strong> <em>(<code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dd><p>Interpolates data by cubic spline to the given point <var>x</var>, <var>y</var>, <var>z</var> which assumed to be normalized in range [0, 1].
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Spline-3"></a>Method on <code>mglData</code>: <em><code>mreal</code></em> <strong>Spline</strong> <em>(<code>mglPoint</code> &dif, <code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fspline_005fext"></a>C function: <em><code>mreal</code></em> <strong>mgl_data_spline_ext</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>mreal *</code>dx, <code>mreal *</code>dy, <code>mreal *</code>dz)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fspline_005fext"></a>C function: <em><code>dual</code></em> <strong>mgl_datac_spline_ext</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>dual *</code>dx, <code>dual *</code>dy, <code>dual *</code>dz)</em></dt>
-<dd><p>Interpolates data by cubic spline to the given point <var>x</var> in [0...nx-1], <var>y</var> in [0...ny-1], <var>z</var> in [0...nz-1]. The values of derivatives at the point are saved in <var>dif</var>.
-</p></dd></dl>
-<a name="index-Spline1-1"></a>
-<dl>
-<dt><a name="index-Spline1-4"></a>Method on <code>mglData</code>: <em><code>mreal</code></em> <strong>Spline1</strong> <em>(<code>mglPoint</code> &dif, <code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dd><p>Interpolates data by cubic spline to the given point <var>x</var>, <var>y</var>, <var>z</var> which assumed to be normalized in range [0, 1]. The values of derivatives at the point are saved in <var>dif</var>.
-</p></dd></dl>
-
-<a name="index-Linear"></a>
-<dl>
-<dt><a name="index-Linear-1"></a>Method on <code>mglData</code>: <em><code>mreal</code></em> <strong>Linear</strong> <em>(<code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-Linear-2"></a>Method on <code>mglDataC</code>: <em><code>dual</code></em> <strong>Linear</strong> <em>(<code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005flinear"></a>C function: <em><code>mreal</code></em> <strong>mgl_data_linear</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z)</em></dt>
-<dt><a name="index-mgl_005fdatac_005flinear"></a>C function: <em><code>dual</code></em> <strong>mgl_datac_linear</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z)</em></dt>
-<dd><p>Interpolates data by linear function to the given point <var>x</var> in [0...nx-1], <var>y</var> in [0...ny-1], <var>z</var> in [0...nz-1].
-</p></dd></dl>
-<a name="index-Linear1"></a>
-<dl>
-<dt><a name="index-Linear1-2"></a>Method on <code>mglData</code>: <em><code>mreal</code></em> <strong>Linear1</strong> <em>(<code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-Linear1-3"></a>Method on <code>mglDataC</code>: <em><code>dual</code></em> <strong>Linear1</strong> <em>(<code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dd><p>Interpolates data by linear function to the given point <var>x</var>, <var>y</var>, <var>z</var> which assumed to be normalized in range [0, 1].
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Linear-3"></a>Method on <code>mglData</code>: <em><code>mreal</code></em> <strong>Linear</strong> <em>(<code>mglPoint</code> &dif, <code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-Linear-4"></a>Method on <code>mglDataC</code>: <em><code>dual</code></em> <strong>Linear</strong> <em>(<code>mglPoint</code> &dif, <code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005flinear_005fext"></a>C function: <em><code>mreal</code></em> <strong>mgl_data_linear_ext</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>mreal *</code>dx, <code>mreal *</code>dy, <code>mreal *</code>dz)</em></dt>
-<dt><a name="index-mgl_005fdatac_005flinear_005fext"></a>C function: <em><code>dual</code></em> <strong>mgl_datac_linear_ext</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>dual *</code>dx, <code>dual *</code>dy, <code>dual *</code>dz)</em></dt>
-<dd><p>Interpolates data by linear function to the given point <var>x</var> in [0...nx-1], <var>y</var> in [0...ny-1], <var>z</var> in [0...nz-1]. The values of derivatives at the point are saved in <var>dif</var>.
-</p></dd></dl>
-<a name="index-Linear1-1"></a>
-<dl>
-<dt><a name="index-Linear1-4"></a>Method on <code>mglData</code>: <em><code>mreal</code></em> <strong>Linear1</strong> <em>(<code>mglPoint</code> &dif, <code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-Linear1-5"></a>Method on <code>mglDataC</code>: <em><code>dual</code></em> <strong>Linear1</strong> <em>(<code>mglPoint</code> &dif, <code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dd><p>Interpolates data by linear function to the given point <var>x</var>, <var>y</var>, <var>z</var> which assumed to be normalized in range [0, 1]. The values of derivatives at the point are saved in <var>dif</var>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Data-information"></a>
-<div class="header">
-<p>
-Next: <a href="#Operators" accesskey="n" rel="next">Operators</a>, Previous: <a href="#Interpolation" accesskey="p" rel="prev">Interpolation</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-information-1"></a>
-<h3 class="section">6.9 Data information</h3>
-
-
-<p>There are a set of functions for obtaining data properties in MGL language. However most of them can be found using "suffixes". Suffix can get some numerical value of the data array (like its size, maximal or minimal value, the sum of elements and so on) as number. Later it can be used as usual number in command arguments. The suffixes start from point ‘<samp>.</samp>’ right after (without spaces) variable name or its sub-array. For example, <code>a.nx</code> give the x-size of data <var>a</var>, <code>b(1).max</code> give maximal value of second row of variable <var>b</var>, <code>(c(:,0)^2).sum</code> give the sum of squares of elements in the first column of <var>c</var> and so on.
-</p>
-
-<a name="index-PrintInfo"></a>
-<a name="info"></a><dl>
-<dt><a name="index-info"></a>MGL command: <em></em> <strong>info</strong> <em>dat</em></dt>
-<dt><a name="index-PrintInfo-1"></a>Method on <code>mglDataA</code>: <em><code>const char *</code></em> <strong>PrintInfo</strong> <em>() <code>const</code></em></dt>
-<dt><a name="index-PrintInfo-2"></a>Method on <code>mglDataA</code>: <em><code>void</code></em> <strong>PrintInfo</strong> <em>(<code>FILE *</code>fp) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005finfo"></a>C function only: <em><code>const char *</code></em> <strong>mgl_data_info</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dt><a name="index-mgl_005fdata_005finfo-1"></a>Fortran subroutine: <em><code></code></em> <strong>mgl_data_info</strong> <em>(<code>long</code> dat, <code>char *</code>out, <code>int</code> len)</em></dt>
-<dd><p>Gets or prints to file <var>fp</var> or as message (in MGL) information about the data (sizes, maximum/minimum, momentums and so on).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-info-1"></a>MGL command: <em></em> <strong>info</strong> <em>'txt'</em></dt>
-<dd><p>Prints string <var>txt</var> as message.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-info-2"></a>MGL command: <em></em> <strong>info</strong> <em>val</em></dt>
-<dd><p>Prints value of number <var>val</var> as message.
-</p></dd></dl>
-
-<a name="print"></a><dl>
-<dt><a name="index-print-1"></a>MGL command: <em></em> <strong>print</strong> <em>dat</em></dt>
-<dt><a name="index-print-2"></a>MGL command: <em></em> <strong>print</strong> <em>'txt'</em></dt>
-<dt><a name="index-print-3"></a>MGL command: <em></em> <strong>print</strong> <em>val</em></dt>
-<dd><p>The same as <a href="#info">info</a> but immediately print to stdout.
-</p></dd></dl>
-
-<a name="echo"></a><dl>
-<dt><a name="index-echo"></a>MGL command: <em></em> <strong>echo</strong> <em>dat</em></dt>
-<dd><p>Prints all values of the data array <var>dat</var> as message.
-</p></dd></dl>
-
-<a name="progress"></a><dl>
-<dt><a name="index-progress"></a>MGL command: <em></em> <strong>progress</strong> <em><code>val max</code></em></dt>
-<dt><a name="index-Progress"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Progress</strong> <em>(<code>int</code> val, <code>int</code> max)</em></dt>
-<dt><a name="index-mgl_005fprogress"></a>C function: <em><code>void</code></em> <strong>mgl_progress</strong> <em>(<code>int</code> val, <code>int</code> max)</em></dt>
-<dd><p>Display progress of something as filled horizontal bar with relative length <var>val</var>/<var>max</var>. Note, it work now only in console and in FLTK-based applications, including <code>mgllab</code> and <code>mglview</code>.
-</p></dd></dl>
-
-
-<a name="index-GetNx"></a>
-<a name="index-GetNy"></a>
-<a name="index-GetNz"></a>
-<a name="g_t_002enx"></a><a name="g_t_002eny"></a><a name="g_t_002enz"></a><dl>
-<dt><a name="index-_002enx"></a>MGL suffix: <em>(dat)</em> <strong>.nx</strong></dt>
-<dt><a name="index-_002eny"></a>MGL suffix: <em>(dat)</em> <strong>.ny</strong></dt>
-<dt><a name="index-_002enz"></a>MGL suffix: <em>(dat)</em> <strong>.nz</strong></dt>
-<dt><a name="index-GetNx-2"></a>Method on <code>mglDataA</code>: <em><code>long</code></em> <strong>GetNx</strong> <em>()</em></dt>
-<dt><a name="index-GetNy-2"></a>Method on <code>mglDataA</code>: <em><code>long</code></em> <strong>GetNy</strong> <em>()</em></dt>
-<dt><a name="index-GetNz-2"></a>Method on <code>mglDataA</code>: <em><code>long</code></em> <strong>GetNz</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fdata_005fget_005fnx-1"></a>C function: <em><code>long</code></em> <strong>mgl_data_get_nx</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dt><a name="index-mgl_005fdata_005fget_005fny-1"></a>C function: <em><code>long</code></em> <strong>mgl_data_get_ny</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dt><a name="index-mgl_005fdata_005fget_005fnz-1"></a>C function: <em><code>long</code></em> <strong>mgl_data_get_nz</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dd><p>Gets the x-, y-, z-size of the data.
-</p></dd></dl>
-
-
-
-<a name="index-Maximal"></a>
-<a name="g_t_002emax"></a><dl>
-<dt><a name="index-_002emax"></a>MGL suffix: <em>(dat)</em> <strong>.max</strong></dt>
-<dt><a name="index-Maximal-1"></a>Method on <code>mglDataA</code>: <em><code>mreal</code></em> <strong>Maximal</strong> <em>() <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmax"></a>C function: <em><code>mreal</code></em> <strong>mgl_data_max</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dd><p>Gets maximal value of the data.
-</p></dd></dl>
-
-<a name="index-Minimal"></a>
-<a name="g_t_002emin"></a><dl>
-<dt><a name="index-_002emin"></a>MGL suffix: <em>(dat)</em> <strong>.min</strong></dt>
-<dt><a name="index-Minimal-1"></a>Method on <code>mglDataA</code>: <em><code>mreal</code></em> <strong>Minimal</strong> <em>() <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmin"></a>C function: <em><code>mreal</code></em> <strong>mgl_data_min</strong> <em>(<code>HMDT</code> dat) <code>const</code></em></dt>
-<dd><p>Gets minimal value of the data.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Minimal-2"></a>Method on <code>mglDataA</code>: <em><code>mreal</code></em> <strong>Minimal</strong> <em>(<code>int</code> &i, <code>int</code> &j, <code>int</code> &k) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmin_005fint"></a>C function: <em><code>mreal</code></em> <strong>mgl_data_min_int</strong> <em>(<code>HCDT</code> dat, <code>int</code> *i, <code>int</code> *j, <code>int</code> *k)</em></dt>
-<dd><p>Gets position of minimum to variables <var>i</var>, <var>j</var>, <var>k</var> and returns the minimal value.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Maximal-2"></a>Method on <code>mglDataA</code>: <em><code>mreal</code></em> <strong>Maximal</strong> <em>(<code>int</code> &i, <code>int</code> &j, <code>int</code> &k) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmax_005fint"></a>C function: <em><code>mreal</code></em> <strong>mgl_data_max_int</strong> <em>(<code>HCDT</code> dat, <code>int</code> *i, <code>int</code> *j, <code>int</code> *k)</em></dt>
-<dd><p>Gets position of maximum to variables <var>i</var>, <var>j</var>, <var>k</var> and returns the maximal value.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Minimal-3"></a>Method on <code>mglDataA</code>: <em><code>mreal</code></em> <strong>Minimal</strong> <em>(<code>mreal</code> &x, <code>mreal</code> &y, <code>mreal</code> &z) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmin_005freal"></a>C function: <em><code>mreal</code></em> <strong>mgl_data_min_real</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> *x, <code>mreal</code> *y, <code>mreal</code> *z)</em></dt>
-<dd><p>Gets approximated (interpolated) position of minimum to variables <var>x</var>, <var>y</var>, <var>z</var> and returns the minimal value.
-</p></dd></dl>
-
-<a name="g_t_002emx"></a><a name="g_t_002emy"></a><a name="g_t_002emz"></a><dl>
-<dt><a name="index-_002emx"></a>MGL suffix: <em>(dat)</em> <strong>.mx</strong></dt>
-<dt><a name="index-_002emy"></a>MGL suffix: <em>(dat)</em> <strong>.my</strong></dt>
-<dt><a name="index-_002emz"></a>MGL suffix: <em>(dat)</em> <strong>.mz</strong></dt>
-<dt><a name="index-Maximal-3"></a>Method on <code>mglDataA</code>: <em><code>mreal</code></em> <strong>Maximal</strong> <em>(<code>mreal</code> &x, <code>mreal</code> &y, <code>mreal</code> &z) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmax_005freal"></a>C function: <em><code>mreal</code></em> <strong>mgl_data_max_real</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> *x, <code>mreal</code> *y, <code>mreal</code> *z)</em></dt>
-<dd><p>Gets approximated (interpolated) position of maximum to variables <var>x</var>, <var>y</var>, <var>z</var> and returns the maximal value.
-</p></dd></dl>
-
-
-<a name="g_t_002emxf"></a><a name="g_t_002emyf"></a><a name="g_t_002emzf"></a><a name="g_t_002emxl"></a><a name="g_t_002emyl"></a><a name="g_t_002emzl"></a><dl>
-<dt><a name="index-_002emxf"></a>MGL suffix: <em>(dat)</em> <strong>.mxf</strong></dt>
-<dt><a name="index-_002emyf"></a>MGL suffix: <em>(dat)</em> <strong>.myf</strong></dt>
-<dt><a name="index-_002emzf"></a>MGL suffix: <em>(dat)</em> <strong>.mzf</strong></dt>
-<dt><a name="index-_002emxl"></a>MGL suffix: <em>(dat)</em> <strong>.mxl</strong></dt>
-<dt><a name="index-_002emyl"></a>MGL suffix: <em>(dat)</em> <strong>.myl</strong></dt>
-<dt><a name="index-_002emzl"></a>MGL suffix: <em>(dat)</em> <strong>.mzl</strong></dt>
-<dt><a name="index-Maximal-4"></a>Method on <code>mglDataA</code>: <em><code>long</code></em> <strong>Maximal</strong> <em>(<code>char</code> dir, <code>long</code> from) <code>const</code></em></dt>
-<dt><a name="index-Maximal-5"></a>Method on <code>mglDataA</code>: <em><code>long</code></em> <strong>Maximal</strong> <em>(<code>char</code> dir, <code>long</code> from, <code>long</code> &p1, <code>long</code> &p2) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmax_005ffirstl"></a>C function: <em><code>mreal</code></em> <strong>mgl_data_max_firstl</strong> <em>(<code>HCDT</code> dat, <code>char</code> dir, <code>long</code> from, <code>long</code> *p1, <code>long</code> *p2)</em></dt>
-<dd><p>Get first starting <var>from</var> give position (or last one if <var>from</var><0) maximum along direction <var>dir</var>, and save its orthogonal coordinates in <var>p1</var>, <var>p2</var>.
-</p></dd></dl>
-
-
-<a name="index-Momentum-1"></a>
-<a name="g_t_002eax"></a><a name="g_t_002eay"></a><a name="g_t_002eaz"></a><a name="g_t_002eaa"></a><a name="g_t_002esum"></a><a name="g_t_002ewx"></a><a name="g_t_002ewy"></a><a name="g_t_002ewz"></a><a name="g_t_002ewa"></a><a name="g_t_002esx"></a><a name="g_t_002esy"></a><a name="g_t_002esz"></a><a name="g_t_002esa"></a><a name="g_t_002ekx"></a><a name="g_t_002eky"></a><a name="g_t_002ekz"></a><a name="g_t_002eka"></a><dl>
-<dt><a name="index-_002esum"></a>MGL suffix: <em>(dat)</em> <strong>.sum</strong></dt>
-<dt><a name="index-_002eax"></a>MGL suffix: <em>(dat)</em> <strong>.ax</strong></dt>
-<dt><a name="index-_002eay"></a>MGL suffix: <em>(dat)</em> <strong>.ay</strong></dt>
-<dt><a name="index-_002eaz"></a>MGL suffix: <em>(dat)</em> <strong>.az</strong></dt>
-<dt><a name="index-_002eaa"></a>MGL suffix: <em>(dat)</em> <strong>.aa</strong></dt>
-<dt><a name="index-_002ewx"></a>MGL suffix: <em>(dat)</em> <strong>.wx</strong></dt>
-<dt><a name="index-_002ewy"></a>MGL suffix: <em>(dat)</em> <strong>.wy</strong></dt>
-<dt><a name="index-_002ewz"></a>MGL suffix: <em>(dat)</em> <strong>.wz</strong></dt>
-<dt><a name="index-_002ewa"></a>MGL suffix: <em>(dat)</em> <strong>.wa</strong></dt>
-<dt><a name="index-_002esx"></a>MGL suffix: <em>(dat)</em> <strong>.sx</strong></dt>
-<dt><a name="index-_002esy"></a>MGL suffix: <em>(dat)</em> <strong>.sy</strong></dt>
-<dt><a name="index-_002esz"></a>MGL suffix: <em>(dat)</em> <strong>.sz</strong></dt>
-<dt><a name="index-_002esa"></a>MGL suffix: <em>(dat)</em> <strong>.sa</strong></dt>
-<dt><a name="index-_002ekx"></a>MGL suffix: <em>(dat)</em> <strong>.kx</strong></dt>
-<dt><a name="index-_002eky"></a>MGL suffix: <em>(dat)</em> <strong>.ky</strong></dt>
-<dt><a name="index-_002ekz"></a>MGL suffix: <em>(dat)</em> <strong>.kz</strong></dt>
-<dt><a name="index-_002eka"></a>MGL suffix: <em>(dat)</em> <strong>.ka</strong></dt>
-<dt><a name="index-Momentum-4"></a>Method on <code>mglDataA</code>: <em><code>mreal</code></em> <strong>Momentum</strong> <em>(<code>char</code> dir, <code>mreal</code> &a, <code>mreal</code> &w) <code>const</code></em></dt>
-<dt><a name="index-Momentum-5"></a>Method on <code>mglDataA</code>: <em><code>mreal</code></em> <strong>Momentum</strong> <em>(<code>char</code> dir, <code>mreal</code> &m, <code>mreal</code> &w, <code>mreal</code> &s, <code>mreal</code> &k) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmomentum_005fval"></a>C function: <em><code>mreal</code></em> <strong>mgl_data_momentum_val</strong> <em>(<code>HCDT</code> dat, <code>char</code> dir, <code>mreal</code> *a, <code>mreal</code> *w, <code>mreal</code> *s, <code>mreal</code> *k)</em></dt>
-<dd><p>Gets zero-momentum (energy, <em>I=\sum dat_i</em>) and write first momentum (median, <em>a = \sum \xi_i dat_i/I</em>), second momentum (width, <em>w^2 = \sum (\xi_i-a)^2 dat_i/I</em>), third momentum (skewness, <em>s = \sum (\xi_i-a)^3 dat_i/ I w^3</em>) and fourth momentum (kurtosis, <em>k = \sum (\xi_i-a)^4 dat_i / 3 I w^4</em>) to variables. Here <em>\xi</em> is corresponding coordinate if <var>dir</var> is ‘<samp>'x'</samp>’, ‘<samp>'y'</samp>’ or ‘<samp>'z'</samp>’. Otherwise median is <em>a = \sum dat_i/N</em>, width is <em>w^2 = \sum (dat_i-a)^2/N</em> and so on.
-</p></dd></dl>
-
-<a name="g_t_002efst"></a><dl>
-<dt><a name="index-_002efst"></a>MGL suffix: <em>(dat)</em> <strong>.fst</strong></dt>
-<dd><a name="index-Find"></a>
-</dd><dt><a name="index-Find-1"></a>Method on <code>mglDataA</code>: <em><code>mreal</code></em> <strong>Find</strong> <em>(<code>const char *</code>cond, <code>int</code> &i, <code>int</code> &j, <code>int</code> &k) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005ffirst"></a>C function: <em><code>mreal</code></em> <strong>mgl_data_first</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>cond, <code>int</code> *i, <code>int</code> *j, <code>int</code> *k)</em></dt>
-<dd><p>Find position (after specified in <var>i</var>, <var>j</var>, <var>k</var>) of first nonzero value of formula <var>cond</var>. Function return the data value at found position.
-</p></dd></dl>
-
-<a name="g_t_002elst"></a><dl>
-<dt><a name="index-_002elst"></a>MGL suffix: <em>(dat)</em> <strong>.lst</strong></dt>
-<dd><a name="index-Last"></a>
-</dd><dt><a name="index-Last-1"></a>Method on <code>mglDataA</code>: <em><code>mreal</code></em> <strong>Last</strong> <em>(<code>const char *</code>cond, <code>int</code> &i, <code>int</code> &j, <code>int</code> &k) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005flast"></a>C function: <em><code>mreal</code></em> <strong>mgl_data_last</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>cond, <code>int</code> *i, <code>int</code> *j, <code>int</code> *k)</em></dt>
-<dd><p>Find position (before specified in <var>i</var>, <var>j</var>, <var>k</var>) of last nonzero value of formula <var>cond</var>. Function return the data value at found position.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Find-2"></a>Method on <code>mglDataA</code>: <em><code>int</code></em> <strong>Find</strong> <em>(<code>const char *</code>cond, <code>char</code> dir, <code>int</code> i=<code>0</code>, <code>int</code> j=<code>0</code>, <code>int</code> k=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005ffind"></a>C function: <em><code>mreal</code></em> <strong>mgl_data_find</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>cond, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dd><p>Return position of first in direction <var>dir</var> nonzero value of formula <var>cond</var>. The search is started from point {i,j,k}.
-</p></dd></dl>
-<a name="index-FindAny"></a>
-<dl>
-<dt><a name="index-FindAny-1"></a>Method on <code>mglDataA</code>: <em><code>bool</code></em> <strong>FindAny</strong> <em>(<code>const char *</code>cond) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005ffind_005fany"></a>C function: <em><code>mreal</code></em> <strong>mgl_data_find_any</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>cond)</em></dt>
-<dd><p>Determines if any nonzero value of formula in the data array.
-</p></dd></dl>
-
-<a name="g_t_002ea"></a><dl>
-<dt><a name="index-_002ea"></a>MGL suffix: <em>(dat)</em> <strong>.a</strong></dt>
-<dd><p>Give first (for <code>.a</code>, i.e. <code>dat->a[0]</code>).
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Operators"></a>
-<div class="header">
-<p>
-Next: <a href="#Global-functions" accesskey="n" rel="next">Global functions</a>, Previous: <a href="#Data-information" accesskey="p" rel="prev">Data information</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Operators-1"></a>
-<h3 class="section">6.10 Operators</h3>
-
-
-<dl>
-<dt><a name="index-copy-5"></a>MGL command: <em></em> <strong>copy</strong> <em><small>DAT</small> dat2 ['eq'='']</em></dt>
-<dt><a name="index-operator_003d"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>operator=</strong> <em>(<code>const mglDataA &</code>d)</em></dt>
-<dd><p>Copies data from other variable.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-copy-6"></a>MGL command: <em></em> <strong>copy</strong> <em>dat <code>val</code></em></dt>
-<dt><a name="index-operator_003d-1"></a>Method on <code>mreal</code>: <em><code>void</code></em> <strong>operator=</strong> <em>(<code>mreal</code> val)</em></dt>
-<dd><p>Set all data values equal to <var>val</var>.
-</p></dd></dl>
-
-<a name="multo"></a><dl>
-<dt><a name="index-multo"></a>MGL command: <em></em> <strong>multo</strong> <em>dat dat2</em></dt>
-<dt><a name="index-multo-1"></a>MGL command: <em></em> <strong>multo</strong> <em>dat <code>val</code></em></dt>
-<dt><a name="index-operator_002a_003d"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>operator*=</strong> <em>(<code>const mglDataA &</code>d)</em></dt>
-<dt><a name="index-operator_002a_003d-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>operator*=</strong> <em>(<code>mreal</code> d)</em></dt>
-<dt><a name="index-mgl_005fdata_005fmul_005fdat"></a>C function: <em><code>void</code></em> <strong>mgl_data_mul_dat</strong> <em>(<code>HMDT</code> dat, <code>HCDT</code> d)</em></dt>
-<dt><a name="index-mgl_005fdata_005fmul_005fnum"></a>C function: <em><code>void</code></em> <strong>mgl_data_mul_num</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> d)</em></dt>
-<dd><p>Multiplies data element by the other one or by value.
-</p></dd></dl>
-
-<a name="divto"></a><dl>
-<dt><a name="index-divto"></a>MGL command: <em></em> <strong>divto</strong> <em>dat dat2</em></dt>
-<dt><a name="index-divto-1"></a>MGL command: <em></em> <strong>divto</strong> <em>dat <code>val</code></em></dt>
-<dt><a name="index-operator_002f_003d"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>operator/=</strong> <em>(<code>const mglDataA &</code>d)</em></dt>
-<dt><a name="index-operator_002f_003d-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>operator/=</strong> <em>(<code>mreal</code> d)</em></dt>
-<dt><a name="index-mgl_005fdata_005fdiv_005fdat"></a>C function: <em><code>void</code></em> <strong>mgl_data_div_dat</strong> <em>(<code>HMDT</code> dat, <code>HCDT</code> d)</em></dt>
-<dt><a name="index-mgl_005fdata_005fdiv_005fnum"></a>C function: <em><code>void</code></em> <strong>mgl_data_div_num</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> d)</em></dt>
-<dd><p>Divides each data element by the other one or by value.
-</p></dd></dl>
-
-<a name="addto"></a><dl>
-<dt><a name="index-addto"></a>MGL command: <em></em> <strong>addto</strong> <em>dat dat2</em></dt>
-<dt><a name="index-addto-1"></a>MGL command: <em></em> <strong>addto</strong> <em>dat <code>val</code></em></dt>
-<dt><a name="index-operator_002b_003d"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>operator+=</strong> <em>(<code>const mglDataA &</code>d)</em></dt>
-<dt><a name="index-operator_002b_003d-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>operator+=</strong> <em>(<code>mreal</code> d)</em></dt>
-<dt><a name="index-mgl_005fdata_005fadd_005fdat"></a>C function: <em><code>void</code></em> <strong>mgl_data_add_dat</strong> <em>(<code>HMDT</code> dat, <code>HCDT</code> d)</em></dt>
-<dt><a name="index-mgl_005fdata_005fadd_005fnum"></a>C function: <em><code>void</code></em> <strong>mgl_data_add_num</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> d)</em></dt>
-<dd><p>Adds to each data element the other one or the value.
-</p></dd></dl>
-
-<a name="subto"></a><dl>
-<dt><a name="index-subto"></a>MGL command: <em></em> <strong>subto</strong> <em>dat dat2</em></dt>
-<dt><a name="index-subto-1"></a>MGL command: <em></em> <strong>subto</strong> <em>dat <code>val</code></em></dt>
-<dt><a name="index-operator_002d_003d"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>operator-=</strong> <em>(<code>const mglDataA &</code>d)</em></dt>
-<dt><a name="index-operator_002d_003d-1"></a>Method on <code>mglData</code>: <em><code>void</code></em> <strong>operator-=</strong> <em>(<code>mreal</code> d)</em></dt>
-<dt><a name="index-mgl_005fdata_005fsub_005fdat"></a>C function: <em><code>void</code></em> <strong>mgl_data_sub_dat</strong> <em>(<code>HMDT</code> dat, <code>HCDT</code> d)</em></dt>
-<dt><a name="index-mgl_005fdata_005fsub_005fnum"></a>C function: <em><code>void</code></em> <strong>mgl_data_sub_num</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> d)</em></dt>
-<dd><p>Subtracts from each data element the other one or the value.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_002b"></a>Library Function: <em>mglData</em> <strong>operator+</strong> <em>(<code>const mglDataA &</code>a, <code>const mglDataA &</code>b)</em></dt>
-<dt><a name="index-operator_002b-1"></a>Library Function: <em>mglData</em> <strong>operator+</strong> <em>(<code>mreal</code> a, <code>const mglDataA &</code>b)</em></dt>
-<dt><a name="index-operator_002b-2"></a>Library Function: <em>mglData</em> <strong>operator+</strong> <em>(<code>const mglDataA &</code>a, <code>mreal</code> b)</em></dt>
-<dd><p>Adds the other data or the number.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_002d"></a>Library Function: <em>mglData</em> <strong>operator-</strong> <em>(<code>const mglDataA &</code>a, <code>const mglDataA &</code>b)</em></dt>
-<dt><a name="index-operator_002d-1"></a>Library Function: <em>mglData</em> <strong>operator-</strong> <em>(<code>mreal</code> a, <code>const mglDataA &</code>b)</em></dt>
-<dt><a name="index-operator_002d-2"></a>Library Function: <em>mglData</em> <strong>operator-</strong> <em>(<code>const mglDataA &</code>a, <code>mreal</code> b)</em></dt>
-<dd><p>Subtracts the other data or the number.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_002a"></a>Library Function: <em>mglData</em> <strong>operator*</strong> <em>(<code>const mglDataA &</code>a, <code>const mglDataA &</code>b)</em></dt>
-<dt><a name="index-operator_002a-1"></a>Library Function: <em>mglData</em> <strong>operator*</strong> <em>(<code>mreal</code> a, <code>const mglDataA &</code>b)</em></dt>
-<dt><a name="index-operator_002a-2"></a>Library Function: <em>mglData</em> <strong>operator*</strong> <em>(<code>const mglDataA &</code>a, <code>mreal</code> b)</em></dt>
-<dd><p>Multiplies by the other data or the number.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_002f"></a>Library Function: <em>mglData</em> <strong>operator/</strong> <em>(<code>const mglDataA &</code>a, <code>const mglDataA &</code>b)</em></dt>
-<dt><a name="index-operator_002f-1"></a>Library Function: <em>mglData</em> <strong>operator/</strong> <em>(<code>const mglDataA &</code>a, <code>mreal</code> b)</em></dt>
-<dd><p>Divides by the other data or the number.
-</p></dd></dl>
-
-
-<hr>
-<a name="Global-functions"></a>
-<div class="header">
-<p>
-Next: <a href="#Evaluate-expression" accesskey="n" rel="next">Evaluate expression</a>, Previous: <a href="#Operators" accesskey="p" rel="prev">Operators</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Global-functions-1"></a>
-<h3 class="section">6.11 Global functions</h3>
-
-
-<p>These functions are not methods of <code>mglData</code> class. However it provide additional functionality to handle data. So I put it in this chapter.
-</p>
-<a name="transform"></a><dl>
-<dt><a name="index-transform"></a>MGL command: <em></em> <strong>transform</strong> <em><small>DAT</small> 'type' real imag</em></dt>
-<dt><a name="index-mglTransform"></a>Global function: <em><code>mglData</code></em> <strong>mglTransform</strong> <em>(<code>const mglDataA &</code>real, <code>const mglDataA &</code>imag, <code>const char *</code>type)</em></dt>
-<dt><a name="index-mgl_005ftransform"></a>C function: <em><code>HMDT</code></em> <strong>mgl_transform</strong> <em>(<code>HCDT</code> real, <code>HCDT</code> imag, <code>const char *</code>type)</em></dt>
-<dd><p>Does integral transformation of complex data <var>real</var>, <var>imag</var> on specified direction. The order of transformations is specified in string <var>type</var>: first character for x-dimension, second one for y-dimension, third one for z-dimension. The possible character are: ‘<samp>f</samp>’ is forward Fourier transformation, ‘<samp>i</samp>’ is inverse Fourier transformation, ‘<samp>s</samp>’ is Sine transform, ‘<samp>c</samp>’ is Cosine transform, ‘<samp>h</samp>’ is Hankel transform, ‘<samp>n</samp>’ or ‘<samp> </samp>’ is no transformation.
-</p></dd></dl>
-
-<a name="transforma"></a><dl>
-<dt><a name="index-transforma"></a>MGL command: <em></em> <strong>transforma</strong> <em><small>DAT</small> 'type' ampl phase</em></dt>
-<dt><a name="index-mglTransformA"></a>Global function: <em><code>mglData</code></em> <strong>mglTransformA</strong> <em><code>const mglDataA &</code>ampl, <code>const mglDataA &</code>phase, <code>const char *</code>type)</em></dt>
-<dt><a name="index-mgl_005ftransform_005fa"></a>C function: <em><code>HMDT</code></em> <strong>mgl_transform_a</strong> <em><code>HCDT</code> ampl, <code>HCDT</code> phase, <code>const char *</code>type)</em></dt>
-<dd><p>The same as previous but with specified amplitude <var>ampl</var> and phase <var>phase</var> of complex numbers.
-</p></dd></dl>
-
-<a name="fourier"></a><dl>
-<dt><a name="index-fourier"></a>MGL command: <em></em> <strong>fourier</strong> <em>reDat imDat 'dir'</em></dt>
-<dt><a name="index-fourier-1"></a>MGL command: <em></em> <strong>fourier</strong> <em>complexDat 'dir'</em></dt>
-<dt><a name="index-mglFourier"></a>Global function: <em><code>void</code></em> <strong>mglFourier</strong> <em><code>const mglDataA &</code>re, <code>const mglDataA &</code>im, <code>const char *</code>dir)</em></dt>
-<dt><a name="index-FFT-1"></a>Method on <code>mglDataC</code>: <em><code>void</code></em> <strong>FFT</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdata_005ffourier"></a>C function: <em><code>void</code></em> <strong>mgl_data_fourier</strong> <em><code>HCDT</code> re, <code>HCDT</code> im, <code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005ffft-1"></a>C function: <em><code>void</code></em> <strong>mgl_datac_fft</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Does Fourier transform of complex data <var>re</var>+i*<var>im</var> in directions <var>dir</var>. Result is placed back into <var>re</var> and <var>im</var> data arrays. If <var>dir</var> contain ‘<samp>i</samp>’ then inverse Fourier is used.
-</p></dd></dl>
-
-<a name="stfad"></a><dl>
-<dt><a name="index-stfad"></a>MGL command: <em></em> <strong>stfad</strong> <em><small>RES</small> real imag <code>dn</code> ['dir'='x']</em></dt>
-<dt><a name="index-mglSTFA"></a>Global function: <em><code>mglData</code></em> <strong>mglSTFA</strong> <em>(<code>const mglDataA &</code>real, <code>const mglDataA &</code>imag, <code>int</code> dn, <code>char</code> dir=<code>'x'</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fstfa"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_stfa</strong> <em>(<code>HCDT</code> real, <code>HCDT</code> imag, <code>int</code> dn, <code>char</code> dir)</em></dt>
-<dd><p>Short time Fourier transformation for real and imaginary parts. Output is amplitude of partial Fourier of length <var>dn</var>. For example if <var>dir</var>=‘<samp>x</samp>’, result will have size {int(nx/dn), dn, ny} and it will contain <em>res[i,j,k]=|\sum_d^dn exp(I*j*d)*(real[i*dn+d,k]+I*imag[i*dn+d,k])|/dn</em>.
-</p></dd></dl>
-
-<a name="triangulate"></a><dl>
-<dt><a name="index-triangulate"></a>MGL command: <em></em> <strong>triangulate</strong> <em>dat xdat ydat</em></dt>
-<dt><a name="index-mglTriangulation"></a>Global function: <em><code>mglData</code></em> <strong>mglTriangulation</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y)</em></dt>
-<dt><a name="index-mgl_005ftriangulation_005f2d"></a>C function: <em><code>void</code></em> <strong>mgl_triangulation_2d</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y)</em></dt>
-<dd><p>Do Delone triangulation for 2d points and return result suitable for <a href="#triplot">triplot</a> and <a href="#tricont">tricont</a>. See <a href="#Making-regular-data">Making regular data</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="tridmat"></a><dl>
-<dt><a name="index-tridmat"></a>MGL command: <em></em> <strong>tridmat</strong> <em><small>RES ADAT BDAT CDAT DDAT</small> 'how'</em></dt>
-<dt><a name="index-mglTridMat"></a>Global function: <em><code>mglData</code></em> <strong>mglTridMat</strong> <em>(<code>const mglDataA &</code>A, <code>const mglDataA &</code>B, <code>const mglDataA &</code>C, <code>const mglDataA &</code>D, <code>const char *</code>how)</em></dt>
-<dt><a name="index-mglTridMatC"></a>Global function: <em><code>mglDataC</code></em> <strong>mglTridMatC</strong> <em>(<code>const mglDataA &</code>A, <code>const mglDataA &</code>B, <code>const mglDataA &</code>C, <code>const mglDataA &</code>D, <code>const char *</code>how)</em></dt>
-<dt><a name="index-mgl_005fdata_005ftridmat"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_tridmat</strong> <em>(<code>HCDT</code> A, <code>HCDT</code> B, <code>HCDT</code> C, <code>HCDT</code> D, <code>const char*</code>how)</em></dt>
-<dt><a name="index-mgl_005fdatac_005ftridmat"></a>C function: <em><code>HADT</code></em> <strong>mgl_datac_tridmat</strong> <em>(<code>HCDT</code> A, <code>HCDT</code> B, <code>HCDT</code> C, <code>HCDT</code> D, <code>const char*</code>how)</em></dt>
-<dd><p>Get array as solution of tridiagonal system of equations <var>A</var>[i]*x[i-1]+<var>B</var>[i]*x[i]+<var>C</var>[i]*x[i+1]=<var>D</var>[i]. String <var>how</var> may contain:
-</p><ul>
-<li> ‘<samp>xyz</samp>’ for solving along x-,y-,z-directions correspondingly;
-</li><li> ‘<samp>h</samp>’ for solving along hexagonal direction at x-y plain (require square matrix);
-</li><li> ‘<samp>c</samp>’ for using periodical boundary conditions;
-</li><li> ‘<samp>d</samp>’ for for diffraction/diffuse calculation (i.e. for using -<var>A</var>[i]*<var>D</var>[i-1]+(2-<var>B</var>[i])*<var>D</var>[i]-<var>C</var>[i]*<var>D</var>[i+1] at right part instead of <var>D</var>[i]).
-</li></ul>
-<p>Data dimensions of arrays <var>A</var>, <var>B</var>, <var>C</var> should be equal. Also their dimensions need to be equal to all or to minor dimension(s) of array <var>D</var>. See <a href="#PDE-solving-hints">PDE solving hints</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="pde"></a><dl>
-<dt><a name="index-pde-1"></a>MGL command: <em></em> <strong>pde</strong> <em><small>RES</small> 'ham' ini_re ini_im [<code>dz=0.1 k0=100</code>]</em></dt>
-<dt><a name="index-mglPDE"></a>Global function: <em><code>mglData</code></em> <strong>mglPDE</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>mreal</code> dz=<code>0.1</code>, <code>mreal</code> k0=<code>100</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mglPDEc"></a>Global function: <em><code>mglDataC</code></em> <strong>mglPDEc</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>mreal</code> dz=<code>0.1</code>, <code>mreal</code> k0=<code>100</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fpde_005fsolve-1"></a>C function: <em><code>HMDT</code></em> <strong>mgl_pde_solve</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>ham, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>mreal</code> dz, <code>mreal</code> k0, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fpde_005fsolve_005fc"></a>C function: <em><code>HADT</code></em> <strong>mgl_pde_solve_c</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>ham, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>mreal</code> dz, <code>mreal</code> k0, <code>const char *</code>opt)</em></dt>
-<dd><p>Solves equation du/dz = i*k0*<var>ham</var>(p,q,x,y,z,|u|)[u], where p=-i/k0*d/dx, q=-i/k0*d/dy are pseudo-differential operators. Parameters <var>ini_re</var>, <var>ini_im</var> specify real and imaginary part of initial field distribution. Parameters <var>Min</var>, <var>Max</var> set the bounding box for the solution. Note, that really this ranges are increased by factor 3/2 for purpose of reducing reflection from boundaries. Parameter <var>dz</var> set the step along evolutionary coordinate z. At this moment, simplified form of function <var>ham</var> is supported – all “mixed” terms (like ‘<samp>x*p</samp>’->x*d/dx) are excluded. For example, in 2D case this function is effectively <em>ham = f(p,z) + g(x,z,u)</em>. However commutable combinations (like ‘<samp>x*q</samp>’->x*d/dy) are allowed. Here variable ‘<samp>u</samp>’ is used for field amplitude |u|. This allow one solve nonlinear problems – for example, for nonlinear Shrodinger equation you may set <code>ham="p^2 + q^2 - u^2"</code>. You may specify imaginary part for wave absorption, like <code>ham = "p^2 + i*x*(x>0)"</code>. See also <a href="#apde">apde</a>, <a href="#qo2d">qo2d</a>, <a href="#qo3d">qo3d</a>. See <a href="#PDE-solving-hints">PDE solving hints</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="apde"></a><dl>
-<dt><a name="index-apde"></a>MGL command: <em></em> <strong>apde</strong> <em><small>RES</small> 'ham' ini_re ini_im [<code>dz=0.1 k0=100</code>]</em></dt>
-<dt><a name="index-mglAPDE"></a>Global function: <em><code>mglData</code></em> <strong>mglAPDE</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>mreal</code> dz=<code>0.1</code>, <code>mreal</code> k0=<code>100</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mglAPDEc"></a>Global function: <em><code>mglDataC</code></em> <strong>mglAPDEc</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>mreal</code> dz=<code>0.1</code>, <code>mreal</code> k0=<code>100</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fpde_005fsolve_005fadv"></a>C function: <em><code>HMDT</code></em> <strong>mgl_pde_solve_adv</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>ham, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>mreal</code> dz, <code>mreal</code> k0, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fpde_005fsolve_005fadv_005fc"></a>C function: <em><code>HADT</code></em> <strong>mgl_pde_solve_adv_c</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>ham, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>mreal</code> dz, <code>mreal</code> k0, <code>const char *</code>opt)</em></dt>
-<dd><p>Solves equation du/dz = i*k0*<var>ham</var>(p,q,x,y,z,|u|)[u], where p=-i/k0*d/dx, q=-i/k0*d/dy are pseudo-differential operators. Parameters <var>ini_re</var>, <var>ini_im</var> specify real and imaginary part of initial field distribution. Parameters <var>Min</var>, <var>Max</var> set the bounding box for the solution. Note, that really this ranges are increased by factor 3/2 for purpose of reducing reflection from boundaries. Parameter <var>dz</var> set the step along evolutionary coordinate z. The advanced and rather slow algorithm is used for taking into account both spatial dispersion and inhomogeneities of media [see A.A. Balakin, E.D. Gospodchikov, A.G. Shalashov, JETP letters v.104, p.690-695 (2016)]. Variable ‘<samp>u</samp>’ is used for field amplitude |u|. This allow one solve nonlinear problems – for example, for nonlinear Shrodinger equation you may set <code>ham="p^2 + q^2 - u^2"</code>. You may specify imaginary part for wave absorption, like <code>ham = "p^2 + i*x*(x>0)"</code>. See also <a href="#pde">pde</a>. See <a href="#PDE-solving-hints">PDE solving hints</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="ray"></a><dl>
-<dt><a name="index-ray"></a>MGL command: <em></em> <strong>ray</strong> <em><small>RES</small> 'ham' <code>x0 y0 z0 p0 q0 v0 [dt=0.1 tmax=10]</code></em></dt>
-<dt><a name="index-mglRay"></a>Global function: <em><code>mglData</code></em> <strong>mglRay</strong> <em>(<code>const char *</code>ham, <code>mglPoint</code> r0, <code>mglPoint</code> p0, <code>mreal</code> dt=<code>0.1</code>, <code>mreal</code> tmax=<code>10</code>)</em></dt>
-<dt><a name="index-mgl_005fray_005ftrace"></a>C function: <em><code>HMDT</code></em> <strong>mgl_ray_trace</strong> <em>(<code>const char *</code>ham, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> px, <code>mreal</code> py, <code>mreal</code> pz, <code>mreal</code> dt, <code>mreal</code> tmax)</em></dt>
-<dd><p>Solves GO ray equation like dr/dt = d <var>ham</var>/dp, dp/dt = -d <var>ham</var>/dr. This is Hamiltonian equations for particle trajectory in 3D case. Here <var>ham</var> is Hamiltonian which may depend on coordinates ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’, momentums ‘<samp>p</samp>’=px, ‘<samp>q</samp>’=py, ‘<samp>v</samp>’=pz and time ‘<samp>t</samp>’: <em>ham = H(x,y,z,p,q,v,t)</em>. The starting point (at <code>t=0</code>) is defined by variables <var>r0</var>, <var>p0</var>. Parameters <var>dt</var> and <var>tmax</var> specify the integration step and maximal time for ray tracing. Result is array of {x,y,z,p,q,v,t} with dimensions {7 * int(<var>tmax</var>/<var>dt</var>+1) }.
-</p></dd></dl>
-
-<a name="ode"></a><dl>
-<dt><a name="index-ode"></a>MGL command: <em></em> <strong>ode</strong> <em><small>RES</small> 'df' 'var' ini [<code>dt=0.1 tmax=10</code>]</em></dt>
-<dt><a name="index-mglODE"></a>Global function: <em><code>mglData</code></em> <strong>mglODE</strong> <em>(<code>const char *</code>df, <code>const char *</code>var, <code>const mglDataA &</code>ini, <code>mreal</code> dt=<code>0.1</code>, <code>mreal</code> tmax=<code>10</code>)</em></dt>
-<dt><a name="index-mglODEc"></a>Global function: <em><code>mglDataC</code></em> <strong>mglODEc</strong> <em>(<code>const char *</code>df, <code>const char *</code>var, <code>const mglDataA &</code>ini, <code>mreal</code> dt=<code>0.1</code>, <code>mreal</code> tmax=<code>10</code>)</em></dt>
-<dt><a name="index-mgl_005fode_005fsolve_005fstr"></a>C function: <em><code>HMDT</code></em> <strong>mgl_ode_solve_str</strong> <em>(<code>const char *</code>df, <code>const char *</code>var, <code>HCDT</code> ini, <code>mreal</code> dt, <code>mreal</code> tmax)</em></dt>
-<dt><a name="index-mgl_005fode_005fsolve_005fstr_005fc"></a>C function: <em><code>HADT</code></em> <strong>mgl_ode_solve_str_c</strong> <em>(<code>const char *</code>df, <code>const char *</code>var, <code>HCDT</code> ini, <code>mreal</code> dt, <code>mreal</code> tmax)</em></dt>
-<dt><a name="index-mgl_005fode_005fsolve"></a>C function: <em><code>HMDT</code></em> <strong>mgl_ode_solve</strong> <em>(<code>void (*</code>df<code>)(const mreal *x, mreal *dx, void *par)</code>, <code>int</code> n, <code>const mreal *</code>ini, <code>mreal</code> dt, <code>mreal</code> tmax)</em></dt>
-<dt><a name="index-mgl_005fode_005fsolve_005fex"></a>C function: <em><code>HMDT</code></em> <strong>mgl_ode_solve_ex</strong> <em>(<code>void (*</code>df<code>)(const mreal *x, mreal *dx, void *par)</code>, <code>int</code> n, <code>const mreal *</code>ini, <code>mreal</code> dt, <code>mreal</code> tmax, <code>void (*</code>bord<code>)(mreal *x, const mreal *xprev, void *par)</code>)</em></dt>
-<dd><p>Solves ODE equations dx/dt = df(x). The functions <var>df</var> can be specified as string of ’;’-separated textual formulas (argument <var>var</var> set the character ids of variables x[i]) or as callback function, which fill <code>dx</code> array for give <code>x</code>’s. Parameters <var>ini</var>, <var>dt</var>, <var>tmax</var> set initial values, time step and maximal time of the calculation. Function stop execution if <code>NAN</code> or <code>INF</code> values appears. Result is data array with dimensions {<var>n</var> * <var>Nt</var>}, where <var>Nt</var> <= int(<var>tmax</var>/<var>dt</var>+1)
-</p></dd></dl>
-
-<a name="qo2d"></a><dl>
-<dt><a name="index-qo2d"></a>MGL command: <em></em> <strong>qo2d</strong> <em><small>RES</small> 'ham' ini_re ini_im ray [<code>r=1 k0=100</code> xx yy]</em></dt>
-<dt><a name="index-mglQO2d"></a>Global function: <em><code>mglData</code></em> <strong>mglQO2d</strong> <em>(<code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>const mglDataA &</code>ray, <code>mreal</code> r=<code>1</code>, <code>mreal</code> k0=<code>100</code>)</em></dt>
-<dt><a name="index-mglQO2d-1"></a>Global function: <em><code>mglData</code></em> <strong>mglQO2d</strong> <em>(<code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>const mglDataA &</code>ray, <code>mglData &</code>xx, <code>mglData &</code>yy, <code>mreal</code> r=<code>1</code>, <code>mreal</code> k0=<code>100</code>)</em></dt>
-<dt><a name="index-mglQO2dc"></a>Global function: <em><code>mglDataC</code></em> <strong>mglQO2dc</strong> <em>(<code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>const mglDataA &</code>ray, <code>mreal</code> r=<code>1</code>, <code>mreal</code> k0=<code>100</code>)</em></dt>
-<dt><a name="index-mglQO2dc-1"></a>Global function: <em><code>mglDataC</code></em> <strong>mglQO2dc</strong> <em>(<code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>const mglDataA &</code>ray, <code>mglData &</code>xx, <code>mglData &</code>yy, <code>mreal</code> r=<code>1</code>, <code>mreal</code> k0=<code>100</code>)</em></dt>
-<dt><a name="index-mgl_005fqo2d_005fsolve"></a>C function: <em><code>HMDT</code></em> <strong>mgl_qo2d_solve</strong> <em>(<code>const char *</code>ham, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>HCDT</code> ray, <code>mreal</code> r, <code>mreal</code> k0, <code>HMDT</code> xx, <code>HMDT</code> yy)</em></dt>
-<dt><a name="index-mgl_005fqo2d_005fsolve_005fc"></a>C function: <em><code>HADT</code></em> <strong>mgl_qo2d_solve_c</strong> <em>(<code>const char *</code>ham, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>HCDT</code> ray, <code>mreal</code> r, <code>mreal</code> k0, <code>HMDT</code> xx, <code>HMDT</code> yy)</em></dt>
-<dt><a name="index-mgl_005fqo2d_005ffunc"></a>C function: <em><code>HMDT</code></em> <strong>mgl_qo2d_func</strong> <em>(<code>dual (*</code>ham<code>)(mreal u, mreal x, mreal y, mreal px, mreal py, void *par)</code>, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>HCDT</code> ray, <code>mreal</code> r, <code>mreal</code> k0, <code>HMDT</code> xx, <code>HMDT</code> yy)</em></dt>
-<dt><a name="index-mgl_005fqo2d_005ffunc_005fc"></a>C function: <em><code>HADT</code></em> <strong>mgl_qo2d_func_c</strong> <em>(<code>dual (*</code>ham<code>)(mreal u, mreal x, mreal y, mreal px, mreal py, void *par)</code>, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>HCDT</code> ray, <code>mreal</code> r, <code>mreal</code> k0, <code>HMDT</code> xx, <code>HMDT</code> yy)</em></dt>
-<dd><p>Solves equation du/dt = i*k0*<var>ham</var>(p,q,x,y,|u|)[u], where p=-i/k0*d/dx, q=-i/k0*d/dy are pseudo-differential operators (see <code>mglPDE()</code> for details). Parameters <var>ini_re</var>, <var>ini_im</var> specify real and imaginary part of initial field distribution. Parameters <var>ray</var> set the reference ray, i.e. the ray around which the accompanied coordinate system will be maked. You may use, for example, the array created by <a href="#ray">ray</a> function. Note, that the reference ray <strong>must be</strong> smooth enough to make accompanied coodrinates unambiguity. Otherwise errors in the solution may appear. If <var>xx</var> and <var>yy</var> are non-zero then Cartesian coordinates for each point will be written into them. See also <a href="#pde">pde</a>, <a href="#qo3d">qo3d</a>. See <a href="#PDE-solving-hints">PDE solving hints</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="qo3d"></a><dl>
-<dt><a name="index-qo3d"></a>MGL command: <em></em> <strong>qo3d</strong> <em><small>RES</small> 'ham' ini_re ini_im ray [<code>r=1 k0=100</code> xx yy zz]</em></dt>
-<dt><a name="index-mglQO3d"></a>Global function: <em><code>mglData</code></em> <strong>mglQO3d</strong> <em>(<code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>const mglDataA &</code>ray, <code>mreal</code> r=<code>1</code>, <code>mreal</code> k0=<code>100</code>)</em></dt>
-<dt><a name="index-mglQO3d-1"></a>Global function: <em><code>mglData</code></em> <strong>mglQO3d</strong> <em>(<code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>const mglDataA &</code>ray, <code>mglData &</code>xx, <code>mglData &</code>yy, <code>mglData &</code>zz, <code>mreal</code> r=<code>1</code>, <code>mreal</code> k0=<code>100</code>)</em></dt>
-<dt><a name="index-mglQO3dc"></a>Global function: <em><code>mglDataC</code></em> <strong>mglQO3dc</strong> <em>(<code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>const mglDataA &</code>ray, <code>mreal</code> r=<code>1</code>, <code>mreal</code> k0=<code>100</code>)</em></dt>
-<dt><a name="index-mglQO3dc-1"></a>Global function: <em><code>mglDataC</code></em> <strong>mglQO3dc</strong> <em>(<code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>const mglDataA &</code>ray, <code>mglData &</code>xx, <code>mglData &</code>yy, <code>mglData &</code>zz, <code>mreal</code> r=<code>1</code>, <code>mreal</code> k0=<code>100</code>)</em></dt>
-<dt><a name="index-mgl_005fqo3d_005fsolve"></a>C function: <em><code>HMDT</code></em> <strong>mgl_qo3d_solve</strong> <em>(<code>const char *</code>ham, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>HCDT</code> ray, <code>mreal</code> r, <code>mreal</code> k0, <code>HMDT</code> xx, <code>HMDT</code> yy, <code>HMDT</code> zz)</em></dt>
-<dt><a name="index-mgl_005fqo3d_005fsolve_005fc"></a>C function: <em><code>HADT</code></em> <strong>mgl_qo3d_solve_c</strong> <em>(<code>const char *</code>ham, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>HCDT</code> ray, <code>mreal</code> r, <code>mreal</code> k0, <code>HMDT</code> xx, <code>HMDT</code> yy, <code>HMDT</code> zz)</em></dt>
-<dt><a name="index-mgl_005fqo3d_005ffunc"></a>C function: <em><code>HMDT</code></em> <strong>mgl_qo3d_func</strong> <em>(<code>dual (*</code>ham<code>)(mreal u, mreal x, mreal y, mreal z, mreal px, mreal py, mreal pz, void *par)</code>, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>HCDT</code> ray, <code>mreal</code> r, <code>mreal</code> k0, <code>HMDT</code> xx, <code>HMDT</code> yy, <code>HMDT</code> zz)</em></dt>
-<dt><a name="index-mgl_005fqo3d_005ffunc_005fc"></a>C function: <em><code>HADT</code></em> <strong>mgl_qo3d_func_c</strong> <em>(<code>dual (*</code>ham<code>)(mreal u, mreal x, mreal y, mreal z, mreal px, mreal py, mreal pz, void *par)</code>, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>HCDT</code> ray, <code>mreal</code> r, <code>mreal</code> k0, <code>HMDT</code> xx, <code>HMDT</code> yy, <code>HMDT</code> zz)</em></dt>
-<dd><p>Solves equation du/dt = i*k0*<var>ham</var>(p,q,v,x,y,z,|u|)[u], where p=-i/k0*d/dx, q=-i/k0*d/dy, v=-i/k0*d/dz are pseudo-differential operators (see <code>mglPDE()</code> for details). Parameters <var>ini_re</var>, <var>ini_im</var> specify real and imaginary part of initial field distribution. Parameters <var>ray</var> set the reference ray, i.e. the ray around which the accompanied coordinate system will be maked. You may use, for example, the array created by <a href="#ray">ray</a> function. Note, that the reference ray <strong>must be</strong> smooth enough to make accompanied coodrinates unambiguity. Otherwise errors in the solution may appear. If <var>xx</var> and <var>yy</var> and <var>zz</var> are non-zero then Cartesian coordinates for each point will be written into them. See also <a href="#pde">pde</a>, <a href="#qo2d">qo2d</a>. See <a href="#PDE-solving-hints">PDE solving hints</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="jacobian"></a><dl>
-<dt><a name="index-jacobian"></a>MGL command: <em></em> <strong>jacobian</strong> <em><small>RES</small> xdat ydat [zdat]</em></dt>
-<dt><a name="index-mglJacobian"></a>Global function: <em><code>mglData</code></em> <strong>mglJacobian</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y)</em></dt>
-<dt><a name="index-mglJacobian-1"></a>Global function: <em><code>mglData</code></em> <strong>mglJacobian</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z)</em></dt>
-<dt><a name="index-mgl_005fjacobian_005f2d"></a>C function: <em><code>HMDT</code></em> <strong>mgl_jacobian_2d</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y)</em></dt>
-<dt><a name="index-mgl_005fjacobian_005f3d"></a>C function: <em><code>HMDT</code></em> <strong>mgl_jacobian_3d</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z)</em></dt>
-<dd><p>Computes the Jacobian for transformation {i,j,k} to {<var>x</var>,<var>y</var>,<var>z</var>} where initial coordinates {i,j,k} are data indexes normalized in range [0,1]. The Jacobian is determined by formula det||<em>dr_\alpha/d\xi_\beta</em>|| where <em>r</em>={<var>x</var>,<var>y</var>,<var>z</var>} and <em>\xi</em>={i,j,k}. All dimensions must be the same for all data arrays. Data must be 3D if all 3 arrays {<var>x</var>,<var>y</var>,<var>z</var>} are specified or 2D if only 2 arrays {<var>x</var>,<var>y</var>} are specified.
-</p></dd></dl>
-
-<a name="triangulation"></a><dl>
-<dt><a name="index-triangulation"></a>MGL command: <em></em> <strong>triangulation</strong> <em><small>RES</small> xdat ydat</em></dt>
-<dt><a name="index-mglTriangulation-1"></a>Global function: <em><code>mglData</code></em> <strong>mglTriangulation</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y)</em></dt>
-<dt><a name="index-mgl_005ftriangulation_005f2d-1"></a>C function: <em><code>HMDT</code></em> <strong>mgl_triangulation_2d</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y)</em></dt>
-<dd><p>Computes triangulation for arbitrary placed points with coordinates {<var>x</var>,<var>y</var>} (i.e. finds triangles which connect points). MathGL use <a href="http://www.s-hull.org/">s-hull</a> code for triangulation. The sizes of 1st dimension <strong>must be equal</strong> for all arrays <code>x.nx=y.nx</code>. Resulting array can be used in <a href="#triplot">triplot</a> or <a href="#tricont">tricont</a> functions for visualization of reconstructed surface. See <a href="#Making-regular-data">Making regular data</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-mglGSplineInit"></a>Global function: <em><code>mglData</code></em> <strong>mglGSplineInit</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y)</em></dt>
-<dt><a name="index-mglGSplineCInit"></a>Global function: <em><code>mglDataC</code></em> <strong>mglGSplineCInit</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y)</em></dt>
-<dt><a name="index-mgl_005fgspline_005finit"></a>C function: <em><code>HMDT</code></em> <strong>mgl_gspline_init</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y)</em></dt>
-<dt><a name="index-mgl_005fgsplinec_005finit"></a>C function: <em><code>HADT</code></em> <strong>mgl_gsplinec_init</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y)</em></dt>
-<dd><p>Prepare coefficients for global cubic spline interpolation.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mglGSpline"></a>Global function: <em><code>mreal</code></em> <strong>mglGSpline</strong> <em>(<code>const mglDataA &</code>coef, <code>mreal</code> dx, <code>mreal *</code>d1=<code>0</code>, <code>mreal *</code>d2=<code>0</code>)</em></dt>
-<dt><a name="index-mglGSplineC"></a>Global function: <em><code>dual</code></em> <strong>mglGSplineC</strong> <em>(<code>const mglDataA &</code>coef, <code>mreal</code> dx, <code>dual *</code>d1=<code>0</code>, <code>dual *</code>d2=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fgspline"></a>C function: <em><code>mreal</code></em> <strong>mgl_gspline</strong> <em>(<code>HCDT</code> coef, <code>mreal</code> dx, <code>mreal *</code>d1, <code>mreal *</code>d2)</em></dt>
-<dt><a name="index-mgl_005fgsplinec"></a>C function: <em><code>dual</code></em> <strong>mgl_gsplinec</strong> <em>(<code>HCDT</code> coef, <code>mreal</code> dx, <code>dual *</code>d1, <code>dual *</code>d2)</em></dt>
-<dd><p>Evaluate global cubic spline (and its 1st and 2nd derivatives <var>d1</var>, <var>d2</var> if they are not <code>NULL</code>) using prepared coefficients <var>coef</var> at point <var>dx</var>+<var>x0</var> (where <var>x0</var> is 1st element of data <var>x</var> provided to <code>mglGSpline*Init()</code> function).
-</p></dd></dl>
-
-
-
-<a name="ifs2d"></a><dl>
-<dt><a name="index-ifs2d"></a>MGL command: <em></em> <strong>ifs2d</strong> <em><small>RES</small> dat <code>num</code> [<code>skip=20</code>]</em></dt>
-<dt><a name="index-mglIFS2d"></a>Global function: <em><code>mglData</code></em> <strong>mglIFS2d</strong> <em>(<code>const mglDataA &</code>dat, <code>long</code> num, <code>long</code> skip=<code>20</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fifs_005f2d"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_ifs_2d</strong> <em>(<code>HCDT</code> dat, <code>long</code> num, <code>long</code> skip)</em></dt>
-<dd><p>Computes <var>num</var> points {x[i]=res[0,i], y[i]=res[1,i]} for fractal using iterated function system. Matrix <var>dat</var> is used for generation according the formulas
-</p><pre class="verbatim">x[i+1] = dat[0,i]*x[i] + dat[1,i]*y[i] + dat[4,i];
-y[i+1] = dat[2,i]*x[i] + dat[3,i]*y[i] + dat[5,i];
-</pre><p>Value <code>dat[6,i]</code> is used as weight factor for i-th row of matrix <var>dat</var>. At this first <var>skip</var> iterations will be omitted. Data array <var>dat</var> must have x-size greater or equal to 7. See also <a href="#ifs3d">ifs3d</a>, <a href="#flame2d">flame2d</a>. See <a href="#ifs2d-sample">ifs2d sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="ifs3d"></a><dl>
-<dt><a name="index-ifs3d"></a>MGL command: <em></em> <strong>ifs3d</strong> <em><small>RES</small> dat <code>num</code> [<code>skip=20</code>]</em></dt>
-<dt><a name="index-mglIFS3d"></a>Global function: <em><code>mglData</code></em> <strong>mglIFS3d</strong> <em>(<code>const mglDataA &</code>dat, <code>long</code> num, <code>long</code> skip=<code>20</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fifs_005f3d"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_ifs_3d</strong> <em>(<code>HCDT</code> dat, <code>long</code> num, <code>long</code> skip)</em></dt>
-<dd><p>Computes <var>num</var> points {x[i]=res[0,i], y[i]=res[1,i], z[i]=res[2,i]} for fractal using iterated function system. Matrix <var>dat</var> is used for generation according the formulas
-</p><pre class="verbatim">x[i+1] = dat[0,i]*x[i] + dat[1,i]*y[i] + dat[2,i]*z[i] + dat[9,i];
-y[i+1] = dat[3,i]*x[i] + dat[4,i]*y[i] + dat[5,i]*z[i] + dat[10,i];
-z[i+1] = dat[6,i]*x[i] + dat[7,i]*y[i] + dat[8,i]*z[i] + dat[11,i];
-</pre><p>Value <code>dat[12,i]</code> is used as weight factor for i-th row of matrix <var>dat</var>. At this first <var>skip</var> iterations will be omitted. Data array <var>dat</var> must have x-size greater or equal to 13. See also <a href="#ifs2d">ifs2d</a>. See <a href="#ifs3d-sample">ifs3d sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="ifsfile"></a><dl>
-<dt><a name="index-ifsfile"></a>MGL command: <em></em> <strong>ifsfile</strong> <em><small>RES</small> 'fname' 'name' <code>num</code> [<code>skip=20</code>]</em></dt>
-<dt><a name="index-mglIFSfile"></a>Global function: <em><code>mglData</code></em> <strong>mglIFSfile</strong> <em>(<code>const char *</code>fname, <code>const char *</code>name, <code>long</code> num, <code>long</code> skip=<code>20</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fifs_005ffile"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_ifs_file</strong> <em>(<code>const char *</code>fname, <code>const char *</code>name, <code>long</code> num, <code>long</code> skip)</em></dt>
-<dd><p>Reads parameters of IFS fractal named <var>name</var> from file <var>fname</var> and computes <var>num</var> points for this fractal. At this first <var>skip</var> iterations will be omitted. See also <a href="#ifs2d">ifs2d</a>, <a href="#ifs3d">ifs3d</a>.
-</p>
-<p>IFS file may contain several records. Each record contain the name of fractal (‘<samp>binary</samp>’ in the example below) and the body of fractal, which is enclosed in curly braces {}. Symbol ‘<samp>;</samp>’ start the comment. If the name of fractal contain ‘<samp>(3D)</samp>’ or ‘<samp>(3d)</samp>’ then the 3d IFS fractal is specified. The sample below contain two fractals: ‘<samp>binary</samp>’ – usual 2d fractal, and ‘<samp>3dfern (3D)</samp>’ – 3d fractal. See also <a href="#ifs2d">ifs2d</a>, <a href="#ifs3d">ifs3d</a>.
-</p>
-<pre class="verbatim"> binary
- { ; comment allowed here
- ; and here
- .5 .0 .0 .5 -2.563477 -0.000003 .333333 ; also comment allowed here
- .5 .0 .0 .5 2.436544 -0.000003 .333333
- .0 -.5 .5 .0 4.873085 7.563492 .333333
- }
-
- 3dfern (3D) {
- .00 .00 0 .0 .18 .0 0 0.0 0.00 0 0.0 0 .01
- .85 .00 0 .0 .85 .1 0 -0.1 0.85 0 1.6 0 .85
- .20 -.20 0 .2 .20 .0 0 0.0 0.30 0 0.8 0 .07
- -.20 .20 0 .2 .20 .0 0 0.0 0.30 0 0.8 0 .07
- }
-</pre></dd></dl>
-
-<a name="flame2d"></a><dl>
-<dt><a name="index-flame2d"></a>MGL command: <em></em> <strong>flame2d</strong> <em><small>RES</small> dat func <code>num</code> [<code>skip=20</code>]</em></dt>
-<dt><a name="index-mglFlame2d"></a>Global function: <em><code>mglData</code></em> <strong>mglFlame2d</strong> <em>(<code>const mglDataA &</code>dat, <code>const mglDataA &</code>func, <code>long</code> num, <code>long</code> skip=<code>20</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fflame_005f2d"></a>C function: <em><code>HMDT</code></em> <strong>mgl_data_flame_2d</strong> <em>(<code>HCDT</code> dat, <code>HCDT</code> func, <code>long</code> num, <code>long</code> skip)</em></dt>
-<dd><p>Computes <var>num</var> points {x[i]=res[0,i], y[i]=res[1,i]} for "flame" fractal using iterated function system. Array <var>func</var> define "flame" function identificator (<var>func</var>[0,i,j]), its weight (<var>func</var>[0,i,j]) and arguments (<var>func</var>[2 ... 5,i,j]). Matrix <var>dat</var> set linear transformation of coordinates before applying the function. The resulting coordinates are
-</p><pre class="verbatim">xx = dat[0,i]*x[j] + dat[1,j]*y[i] + dat[4,j];
-yy = dat[2,i]*x[j] + dat[3,j]*y[i] + dat[5,j];
-x[j+1] = sum_i @var{func}[1,i,j]*@var{func}[0,i,j]_x(xx, yy; @var{func}[2,i,j],...,@var{func}[5,i,j]);
-y[j+1] = sum_i @var{func}[1,i,j]*@var{func}[0,i,j]_y(xx, yy; @var{func}[2,i,j],...,@var{func}[5,i,j]);
-</pre><p>The possible function ids are: <code>mglFlame2d_linear=0, mglFlame2d_sinusoidal, mglFlame2d_spherical, mglFlame2d_swirl, mglFlame2d_horseshoe,
- mglFlame2d_polar, mglFlame2d_handkerchief,mglFlame2d_heart, mglFlame2d_disc, mglFlame2d_spiral,
- mglFlame2d_hyperbolic, mglFlame2d_diamond, mglFlame2d_ex, mglFlame2d_julia, mglFlame2d_bent,
- mglFlame2d_waves, mglFlame2d_fisheye, mglFlame2d_popcorn, mglFlame2d_exponential, mglFlame2d_power,
- mglFlame2d_cosine, mglFlame2d_rings, mglFlame2d_fan, mglFlame2d_blob, mglFlame2d_pdj,
- mglFlame2d_fan2, mglFlame2d_rings2, mglFlame2d_eyefish, mglFlame2d_bubble, mglFlame2d_cylinder,
- mglFlame2d_perspective, mglFlame2d_noise, mglFlame2d_juliaN, mglFlame2d_juliaScope, mglFlame2d_blur,
- mglFlame2d_gaussian, mglFlame2d_radialBlur, mglFlame2d_pie, mglFlame2d_ngon, mglFlame2d_curl,
- mglFlame2d_rectangles, mglFlame2d_arch, mglFlame2d_tangent, mglFlame2d_square, mglFlame2d_blade,
- mglFlame2d_secant, mglFlame2d_rays, mglFlame2d_twintrian, mglFlame2d_cross, mglFlame2d_disc2,
- mglFlame2d_supershape, mglFlame2d_flower, mglFlame2d_conic, mglFlame2d_parabola, mglFlame2d_bent2,
- mglFlame2d_bipolar, mglFlame2d_boarders, mglFlame2d_butterfly, mglFlame2d_cell, mglFlame2d_cpow,
- mglFlame2d_curve, mglFlame2d_edisc, mglFlame2d_elliptic, mglFlame2d_escher, mglFlame2d_foci,
- mglFlame2d_lazySusan, mglFlame2d_loonie, mglFlame2d_preBlur, mglFlame2d_modulus, mglFlame2d_oscope,
- mglFlame2d_polar2, mglFlame2d_popcorn2, mglFlame2d_scry, mglFlame2d_separation, mglFlame2d_split,
- mglFlame2d_splits, mglFlame2d_stripes, mglFlame2d_wedge, mglFlame2d_wedgeJulia, mglFlame2d_wedgeSph,
- mglFlame2d_whorl, mglFlame2d_waves2, mglFlame2d_exp, mglFlame2d_log, mglFlame2d_sin,
- mglFlame2d_cos, mglFlame2d_tan, mglFlame2d_sec, mglFlame2d_csc, mglFlame2d_cot,
- mglFlame2d_sinh, mglFlame2d_cosh, mglFlame2d_tanh, mglFlame2d_sech, mglFlame2d_csch,
- mglFlame2d_coth, mglFlame2d_auger, mglFlame2d_flux.</code>
-Value <code>dat[6,i]</code> is used as weight factor for i-th row of matrix <var>dat</var>. At this first <var>skip</var> iterations will be omitted. Sizes of data arrays must be: <var>dat</var>.nx>=7, <var>func</var>.nx>=2 and <var>func</var>.nz=<var>dat</var>.ny. See also <a href="#ifs2d">ifs2d</a>, <a href="#ifs3d">ifs3d</a>. See <a href="#flame2d-sample">flame2d sample</a>, for sample code and picture.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Evaluate-expression"></a>
-<div class="header">
-<p>
-Next: <a href="#Special-data-classes" accesskey="n" rel="next">Special data classes</a>, Previous: <a href="#Global-functions" accesskey="p" rel="prev">Global functions</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Evaluate-expression-1"></a>
-<h3 class="section">6.12 Evaluate expression</h3>
-
-
-
-<a name="index-mglExpr"></a>
-<a name="index-mglExprC"></a>
-
-<p>MathGL have a special classes <code>mglExpr</code> and <code>mglExprC</code> for evaluating of formula specified by the string for real and complex numbers correspondingly. These classes are defined in <code>#include <mgl2/data.h></code> and <code>#include <mgl2/datac.h></code> correspondingly. It is the fast variant of formula evaluation. At creation it will be recognized and compiled to tree-like internal code. At evaluation stage only fast calculations are performed. There is no difference between lower or upper case in formulas. If argument value lie outside the range of function definition then function returns NaN. See <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-<dl>
-<dt><a name="index-mglExpr-1"></a>Constructor on <code>mglExpr</code>: <em><code></code></em> <strong>mglExpr</strong> <em>(<code>const char *</code>expr)</em></dt>
-<dt><a name="index-mglExprC-1"></a>Constructor on <code>mglExprC</code>: <em><code></code></em> <strong>mglExprC</strong> <em>(<code>const char *</code>expr)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fexpr"></a>C function: <em><code>HMEX</code></em> <strong>mgl_create_expr</strong> <em>(<code>const char *</code>expr)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fcexpr"></a>C function: <em><code>HAEX</code></em> <strong>mgl_create_cexpr</strong> <em>(<code>const char *</code>expr)</em></dt>
-<dd><p>Parses the formula <var>expr</var> and creates formula-tree. Constructor recursively parses the formula and creates a tree-like structure containing functions and operators for fast further evaluating by <code>Calc()</code> or <code>CalcD()</code> functions.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-_007emglExpr"></a>Destructor on <code>mglExpr</code>: <em><code></code></em> <strong>~mglExpr</strong> <em>()</em></dt>
-<dt><a name="index-_007emglExprC"></a>Destructor on <code>mglExprC</code>: <em><code></code></em> <strong>~mglExprC</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fdelete_005fexpr"></a>C function: <em><code>void</code></em> <strong>mgl_delete_expr</strong> <em>(<code>HMEX</code> ex)</em></dt>
-<dt><a name="index-mgl_005fdelete_005fcexpr"></a>C function: <em><code>void</code></em> <strong>mgl_delete_cexpr</strong> <em>(<code>HAEX</code> ex)</em></dt>
-<dd><p>Deletes the instance of class mglExpr.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Eval"></a>Method on <code>mglExpr</code>: <em><code>mreal</code></em> <strong>Eval</strong> <em>(<code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z)</em></dt>
-<dt><a name="index-Eval-1"></a>Method on <code>mglExprC</code>: <em><code>dual</code></em> <strong>Eval</strong> <em>(<code>dual</code> x, <code>dual</code> y, <code>dual</code> z)</em></dt>
-<dt><a name="index-mgl_005fexpr_005feval"></a>C function: <em><code>mreal</code></em> <strong>mgl_expr_eval</strong> <em>(<code>HMEX</code> ex, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z)</em></dt>
-<dt><a name="index-mgl_005fcexpr_005feval"></a>C function: <em><code>dual</code></em> <strong>mgl_cexpr_eval</strong> <em>(<code>HAEX</code> ex, <code>dual</code> x, <code>dual</code> y, <code>dual</code> z)</em></dt>
-<dd><p>Evaluates the formula for <code>'x','r'</code>=<var>x</var>, <code>'y','n'</code>=<var>y</var>, <code>'z','t'</code>=<var>z</var>, <code>'a','u'</code>=<var>u</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Eval-2"></a>Method on <code>mglExpr</code>: <em><code>mreal</code></em> <strong>Eval</strong> <em>(<code>mreal</code> var[26])</em></dt>
-<dt><a name="index-Eval-3"></a>Method on <code>mglExprC</code>: <em><code>dual</code></em> <strong>Eval</strong> <em>(<code>dual</code> var[26])</em></dt>
-<dt><a name="index-mgl_005fexpr_005feval_005fv"></a>C function: <em><code>mreal</code></em> <strong>mgl_expr_eval_v</strong> <em>(<code>HMEX</code> ex, <code>mreal *</code>var)</em></dt>
-<dt><a name="index-mgl_005fexpr_005feval_005fv-1"></a>C function: <em><code>dual</code></em> <strong>mgl_expr_eval_v</strong> <em>(<code>HAEX</code> ex, <code>dual *</code>var)</em></dt>
-<dd><p>Evaluates the formula for variables in array <var>var</var>[0,...,’z’-’a’].
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-Diff-9"></a>Method on <code>mglExpr</code>: <em><code>mreal</code></em> <strong>Diff</strong> <em>(<code>char</code> dir, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z)</em></dt>
-<dt><a name="index-mgl_005fexpr_005fdiff"></a>C function: <em><code>mreal</code></em> <strong>mgl_expr_diff</strong> <em>(<code>HMEX</code> ex, <code>char</code> dir, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z)</em></dt>
-<dd><p>Evaluates the formula derivation respect to <var>dir</var> for <code>'x','r'</code>=<var>x</var>, <code>'y','n'</code>=<var>y</var>, <code>'z','t'</code>=<var>z</var>, <code>'a','u'</code>=<var>u</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Diff-10"></a>Method on <code>mglExpr</code>: <em><code>mreal</code></em> <strong>Diff</strong> <em>(<code>char</code> dir, <code>mreal</code> var[26])</em></dt>
-<dt><a name="index-mgl_005fexpr_005fdiff_005fv"></a>C function: <em><code>mreal</code></em> <strong>mgl_expr_diff_v</strong> <em>(<code>HMEX</code> ex, <code>char</code> dir, <code>mreal *</code>var)</em></dt>
-<dd><p>Evaluates the formula derivation respect to <var>dir</var> for variables in array <var>var</var>[0,...,’z’-’a’].
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Special-data-classes"></a>
-<div class="header">
-<p>
-Previous: <a href="#Evaluate-expression" accesskey="p" rel="prev">Evaluate expression</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Special-data-classes-1"></a>
-<h3 class="section">6.13 Special data classes</h3>
-
-
-
-
-<p>This section describe special data classes <code>mglDataV</code>, <code>mglDataF</code>, <code>mglDataT</code> and <code>mglDataR</code> which sometime can noticeable speed up drawing or data handling. These classes are defined in <code>#include <mgl2/data.h></code>. Note, that all plotting and data handling routines can be done using usual <code>mglData</code> or <code>mglDataC</code> classes. Also these special classes are usable in C++ code only.
-</p>
-<a name="Class-mglDataV"></a>
-<h3 class="heading">Class <code>mglDataV</code></h3>
-<p>represent variable with values equidistantly distributed in given range.
-</p><dl>
-<dt><a name="index-mglDataV"></a>Constructor on <code>mglDataV</code>: <em><code></code></em> <strong>mglDataV</strong> <em>(<code>const mglDataV &</code> d)</em></dt>
-<dd><p>Copy constructor.
-</p></dd></dl>
-<dl>
-<dt><a name="index-mglDataV-1"></a>Constructor on <code>mglDataV</code>: <em><code></code></em> <strong>mglDataV</strong> <em>(<code>long</code> nx=<code>1</code>, <code>long</code> ny=<code>1</code>, <code>long</code> nz=<code>1</code>, <code>mreal</code> v1=<code>0</code>, <code>mreal</code> v2=<code>NaN</code>, <code>char</code> dir=<code>'x'</code>)</em></dt>
-<dd><p>Create variable with "sizes" <var>nx</var>x<var>ny</var>x<var>nz</var> which changes from <var>v1</var> to <var>v2</var> (or is constant if <var>v2</var>=<code>NaN</code>) along <var>dir</var> direction.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Create-3"></a>Method on <code>mglDataV</code>: <em><code>void</code></em> <strong>Create</strong> <em>(<code>long</code> nx=<code>1</code>, <code>long</code> ny=<code>1</code>, <code>long</code> nz=<code>1</code>)</em></dt>
-<dd><p>Set "sizes" <var>nx</var>x<var>ny</var>x<var>nz</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Fill-13"></a>Method on <code>mglDataV</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>mreal</code> x1, <code>mreal</code> x2=<code>NaN</code>, <code>char</code> dir=<code>'x'</code>)</em></dt>
-<dd><p>Set ranges of the variable.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Freq"></a>Method on <code>mglDataV</code>: <em><code>void</code></em> <strong>Freq</strong> <em>(<code>mreal</code> dp, <code>char</code> dir=<code>'x'</code>)</em></dt>
-<dd><p>Set as frequency variable with increment <var>dp</var>.
-</p></dd></dl>
-
-<a name="Class-mglDataF"></a>
-<h3 class="heading">Class <code>mglDataF</code></h3>
-<p>represent function which values are evaluated (instead of access to data array as in <code>mglData</code>).
-</p><dl>
-<dt><a name="index-mglDataF"></a>Constructor on <code>mglDataF</code>: <em><code></code></em> <strong>mglDataF</strong> <em>(<code>const mglDataF &</code> d)</em></dt>
-<dd><p>Copy constructor.
-</p></dd></dl>
-<dl>
-<dt><a name="index-mglDataF-1"></a>Constructor on <code>mglDataF</code>: <em><code></code></em> <strong>mglDataF</strong> <em>(<code>long</code> nx=<code>1</code>, <code>long</code> ny=<code>1</code>, <code>long</code> nz=<code>1</code>)</em></dt>
-<dd><p>Create variable with "sizes" <var>nx</var>x<var>ny</var>x<var>nz</var> with zero function.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Create-4"></a>Method on <code>mglDataF</code>: <em><code>void</code></em> <strong>Create</strong> <em>(<code>long</code> nx=<code>1</code>, <code>long</code> ny=<code>1</code>, <code>long</code> nz=<code>1</code>)</em></dt>
-<dd><p>Set "sizes" <var>nx</var>x<var>ny</var>x<var>nz</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetRanges-6"></a>Method on <code>mglDataF</code>: <em><code>void</code></em> <strong>SetRanges</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> p2)</em></dt>
-<dd><p>Set ranges for internal x,y,z variables.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetFormula"></a>Method on <code>mglDataF</code>: <em><code>void</code></em> <strong>SetFormula</strong> <em>(<code>const char *</code>func)</em></dt>
-<dd><p>Set string which will be evaluated at function calls. Note this variant is about 10 times slower than <code>SetFunc</code>() one.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetFunc-2"></a>Method on <code>mglDataF</code>: <em><code>void</code></em> <strong>SetFunc</strong> <em>(<code>mreal (*</code>f<code>)(mreal x,mreal y,mreal z,void *p)</code>, <code>void *</code>p=<code>NULL</code>)</em></dt>
-<dd><p>Set pointer to function which will be used for data.
-</p></dd></dl>
-
-<a name="Class-mglDataT"></a>
-<h3 class="heading">Class <code>mglDataT</code></h3>
-<p>represent named reference to column of another data array.
-</p><dl>
-<dt><a name="index-mglDataT"></a>Constructor on <code>mglDataT</code>: <em><code></code></em> <strong>mglDataT</strong> <em>(<code>const mglDataT &</code> d)</em></dt>
-<dd><p>Copy constructor.
-</p></dd></dl>
-<dl>
-<dt><a name="index-mglDataT-1"></a>Constructor on <code>mglDataT</code>: <em><code></code></em> <strong>mglDataT</strong> <em>(<code>const mglDataA &</code> d, <code>long</code> col=<code>0</code>)</em></dt>
-<dd><p>Create variable which reference <var>col</var>-th column of data <var>d</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetInd"></a>Method on <code>mglDataT</code>: <em><code>void</code></em> <strong>SetInd</strong> <em>(<code>long</code> col, <code>wchar_t</code> name)</em></dt>
-<dt><a name="index-SetInd-1"></a>Method on <code>mglDataT</code>: <em><code>void</code></em> <strong>SetInd</strong> <em>(<code>long</code> col, <code>const wchar_t *</code> name)</em></dt>
-<dd><p>Set reference to another column of the same data and its name.
-</p></dd></dl>
-
-<a name="Class-mglDataR"></a>
-<h3 class="heading">Class <code>mglDataR</code></h3>
-<p>represent named reference to row of another data array.
-</p><dl>
-<dt><a name="index-mglDataR"></a>Constructor on <code>mglDataR</code>: <em><code></code></em> <strong>mglDataR</strong> <em>(<code>const mglDataR &</code> d)</em></dt>
-<dd><p>Copy constructor.
-</p></dd></dl>
-<dl>
-<dt><a name="index-mglDataR-1"></a>Constructor on <code>mglDataR</code>: <em><code></code></em> <strong>mglDataR</strong> <em>(<code>const mglDataA &</code> d, <code>long</code> row=<code>0</code>)</em></dt>
-<dd><p>Create variable which reference <var>row</var>-th row of data <var>d</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetInd-2"></a>Method on <code>mglDataR</code>: <em><code>void</code></em> <strong>SetInd</strong> <em>(<code>long</code> row, <code>wchar_t</code> name)</em></dt>
-<dt><a name="index-SetInd-3"></a>Method on <code>mglDataR</code>: <em><code>void</code></em> <strong>SetInd</strong> <em>(<code>long</code> row, <code>const wchar_t *</code> name)</em></dt>
-<dd><p>Set reference to another row of the same data and its name.
-</p></dd></dl>
-
-<a name="Class-mglDataW"></a>
-<h3 class="heading">Class <code>mglDataW</code></h3>
-<p>represent FFT frequency as data array.
-</p><dl>
-<dt><a name="index-mglDataW"></a>Constructor on <code>mglDataW</code>: <em><code></code></em> <strong>mglDataW</strong> <em>(<code>const mglDataW &</code> d)</em></dt>
-<dd><p>Copy constructor.
-</p></dd></dl>
-<dl>
-<dt><a name="index-mglDataW-1"></a>Constructor on <code>mglDataW</code>: <em><code></code></em> <strong>mglDataW</strong> <em>(<code>long</code> xx=<code>1</code>, <code>long</code> yy=<code>1</code>, <code>long</code> zz=<code>1</code>, <code>double</code> dp=<code>0</code>, <code>char</code> dir=<code>'x'</code>)</em></dt>
-<dd><p>Set frequency sizes, direction <var>dir</var> and increment <var>dp</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Freq-1"></a>Method on <code>mglDataR</code>: <em><code>void</code></em> <strong>Freq</strong> <em>(<code>double</code> dp, <code>char</code> dir=<code>'x'</code>)</em></dt>
-<dd><p>Equidistantly fill the data with step <var>dp</var> in direction <var>dir</var>.
-</p></dd></dl>
-
-
-<a name="Class-mglDataS"></a>
-<h3 class="heading">Class <code>mglDataS</code></h3>
-<p>incapsulate std::vector and present it as data array.
-</p><dl>
-<dt><a name="index-dat-of-mglDataS"></a>Variable of mglDataS: <em><code>std::vector<mreal></code></em> <strong>dat</strong></dt>
-<dd><p>Data array itself.
-</p></dd></dl>
-<dl>
-<dt><a name="index-mglDataS"></a>Constructor on <code>mglDataS</code>: <em><code></code></em> <strong>mglDataS</strong> <em>(<code>const mglDataS &</code> d)</em></dt>
-<dd><p>Copy constructor.
-</p></dd></dl>
-<dl>
-<dt><a name="index-mglDataS-1"></a>Constructor on <code>mglDataS</code>: <em><code></code></em> <strong>mglDataS</strong> <em>(<code>const std::vector<mreal> &</code> d)</em></dt>
-<dd><p>Create copy data from <var>d</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-mglDataS-2"></a>Constructor on <code>mglDataS</code>: <em><code></code></em> <strong>mglDataS</strong> <em>(<code>size_t</code> s)</em></dt>
-<dd><p>Allocate memory for <var>s</var> .
-</p></dd></dl>
-<dl>
-<dt><a name="index-reserve"></a>Method on <code>mglDataS</code>: <em><code>void</code></em> <strong>reserve</strong> <em>(<code>size_t</code> num)</em></dt>
-<dd><p>Reserve space for <var>num</var> elements.
-</p></dd></dl>
-<dl>
-<dt><a name="index-push_005fback"></a>Method on <code>mglDataS</code>: <em><code>void</code></em> <strong>push_back</strong> <em>(<code>double</code> v)</em></dt>
-<dd><p>Appends value <var>v</var> to the end of data.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="MGL-scripts"></a>
-<div class="header">
-<p>
-Next: <a href="#UDAV" accesskey="n" rel="next">UDAV</a>, Previous: <a href="#Data-processing" accesskey="p" rel="prev">Data processing</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-
-<a name="MGL-scripts-1"></a>
-<h2 class="chapter">7 MGL scripts</h2>
-
-
-<p>MathGL library supports the simplest scripts for data handling and plotting. These scripts can be used independently (with the help of UDAV, mglconv, mglview programs and others
-, see <a href="#Utilities">Utilities</a>) or in the frame of the library using.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#MGL-definition" accesskey="1">MGL definition</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Program-flow-commands" accesskey="2">Program flow commands</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Special-comments" accesskey="3">Special comments</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#LaTeX-package" accesskey="4">LaTeX package</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mglParse-class" accesskey="5">mglParse class</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-
-<hr>
-<a name="MGL-definition"></a>
-<div class="header">
-<p>
-Next: <a href="#Program-flow-commands" accesskey="n" rel="next">Program flow commands</a>, Up: <a href="#MGL-scripts" accesskey="u" rel="up">MGL scripts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="MGL-definition-1"></a>
-<h3 class="section">7.1 MGL definition</h3>
-
-
-<p>MGL script language is rather simple. Each string is a command. First word of string is the name of command. Other words are command arguments. Words are separated from each other by space or tabulation symbol. The upper or lower case of words is important, i.e. variables <var>a</var> and <var>A</var> are different variables. Symbol ‘<samp>#</samp>’ starts the comment (all characters after # will be ignored). The exception is situation when ‘<samp>#</samp>’ is a part of some string. Also options can be specified after symbol ‘<samp>;</samp>’ (see <a href="#Command-options">Command options</a>). Symbol ‘<samp>:</samp>’ starts new command (like new line character) if it is not placed inside a string or inside brackets.
-</p>
-<p>If string contain references to external parameters (substrings ‘<samp>$0</samp>’, ‘<samp>$1</samp>’ ... ‘<samp>$9</samp>’) or definitions (substrings ‘<samp>$a</samp>’, ‘<samp>$b</samp>’ ... ‘<samp>$z</samp>’) then before execution the values of parameter/definition will be substituted instead of reference. It allows to use the same MGL script for different parameters (filenames, paths, condition and so on).
-</p>
-<p>Argument can be a string, a variable (data arrays) or a number (scalars).
-</p><ul>
-<li> The string is any symbols between ordinary marks ‘<samp>'</samp>’. Long strings can be concatenated from several lines by ‘<samp>\</samp>’ symbol. I.e. the string ‘<samp>'a +\<br> b'</samp>’ will give string ‘<samp>'a + b'</samp>’ (here ‘<samp><br></samp>’ is newline). There are several operations which can be performed with string:
-<ul>
-<li> Concatenation of strings and numbers using ‘<samp>,</samp>’ with out spaces (for example, ‘<samp>'max(u)=',u.max,' a.u.'</samp>’ or ‘<samp>'u=',!(1+i2)</samp>’ for complex numbers);
-</li><li> Getting n-th symbol of the string using ‘<samp>[]</samp>’ (for example, ‘<samp>'abc'[1]</samp>’ will give <code>'b'</code>);
-</li><li> Adding value to the last character of the string using ‘<samp>+</samp>’ (for example, ‘<samp>'abc'+3</samp>’ will give <code>'abf'</code>).
-</li></ul>
-
-</li><li> Usually variable have a name which is arbitrary combination of symbols (except spaces and ‘<samp>'</samp>’) started from a letter. Note, you can start an expression with ‘<samp>!</samp>’ symbol if you want to use complex values. For example, the code <code>new x 100 'x':copy !b !exp(1i*x)</code> will create real valued data <var>x</var> and complex data <var>b</var>, which is equal to <em>exp(I*x)</em>, where <em>I^2=-1</em>. A temporary array can be used as variable too:
-<ul>
-<li> sub-arrays (like in <a href="#subdata">subdata</a> command) as command argument. For example, <code>a(1)</code> or <code>a(1,:)</code> or <code>a(1,:,:)</code> is second row, <code>a(:,2)</code> or <code>a(:,2,:)</code> is third column, <code>a(:,:,0)</code> is first slice and so on. Also you can extract a part of array from m-th to n-th element by code <code>a(m:n,:,:)</code> or just <code>a(m:n)</code>.
-
-</li><li> any column combinations defined by formulas, like <code>a('n*w^2/exp(t)')</code> if names for data columns was specified (by <a href="#idset">idset</a> command or in the file at string started with <code>##</code>).
-
-</li><li> any expression (without spaces) of existed variables produce temporary variable. For example, ‘<samp>sqrt(dat(:,5)+1)</samp>’ will produce temporary variable with data values equal to <code>tmp[i,j] = sqrt(dat[i,5,j]+1)</code>. At this symbol ‘<samp>`</samp>’ will return transposed data array: both ‘<samp>`sqrt(dat(:,5)+1)</samp>’ and ‘<samp>sqrt(`dat(:,5)+1)</samp>’ will produce temporary variable with data values equal to <code>tmp[i,j] = sqrt(dat[j,5,i]+1)</code>.
-
-</li><li> temporary variable of higher dimensions by help of []. For example, ‘<samp>[1,2,3]</samp>’ will produce a temporary vector of 3 elements {1, 2, 3}; ‘<samp>[[11,12],[21,22]]</samp>’ will produce matrix 2*2 and so on. Here you can join even an arrays of the same dimensions by construction like ‘<samp>[v1,v2,...,vn]</samp>’.
-
-</li><li> result of code for making new data (see <a href="#Make-another-data">Make another data</a>) inside {}. For example, ‘<samp>{sum dat 'x'}</samp>’ produce temporary variable which contain result of summation of <var>dat</var> along direction ’x’. This is the same array <var>tmp</var> as produced by command ‘<samp>sum tmp dat 'x'</samp>’. You can use nested constructions, like ‘<samp>{sum {max dat 'z'} 'x'}</samp>’.
-</li></ul>
-<p>Temporary variables can not be used as 1st argument for commands which create (return) the data (like ‘<samp>new</samp>’, ‘<samp>read</samp>’, ‘<samp>hist</samp>’ and so on).
-</p>
-</li><li> Special names <code>nan=#QNAN, inf=INFINITY, rnd=random value, pi=3.1415926..., on=1, off=0, all=-1, :=-1</code>, variables with suffixes (see <a href="#Data-information">Data information</a>), names defined by <a href="#define">define</a> command, time values (in format "hh-mm-ss_DD.MM.YYYY", "hh-mm-ss" or "DD.MM.YYYY") are treated as number. Also results of formulas with sizes 1x1x1 are treated as number (for example, ‘<samp>pi/dat.nx</samp>’).
-</li></ul>
-<p>Before the first using all variables must be defined with the help of commands, like, <a href="#new">new</a>, <a href="#var">var</a>, <a href="#list">list</a>, <a href="#copy">copy</a>, <a href="#read">read</a>, <a href="#hist">hist</a>, <a href="#sum">sum</a> and so on (see sections <a href="#Data-constructor">Data constructor</a>, <a href="#Data-filling">Data filling</a> and <a href="#Make-another-data">Make another data</a>).
-</p>
-<p>Command may have several set of possible arguments (for example, <code>plot ydat</code> and <code>plot xdat ydat</code>). All command arguments for a selected set must be specified. However, some arguments can have default values. These argument are printed in [], like <code>text ydat ['stl'='']</code> or <code>text x y 'txt' ['fnt'='' size=-1]</code>. At this, the record <code>[arg1 arg2 arg3 ...]</code> means <code>[arg1 [arg2 [arg3 ...]]]</code>, i.e. you can omit only tailing arguments if you agree with its default values. For example, <code>text x y 'txt' '' 1</code> or <code>text x y 'txt' ''</code> is correct, but <code>text x y 'txt' 1</code> is incorrect (argument <code>'fnt'</code> is missed).
-</p>
-<p>You can provide several variants of arguments for a command by using ‘<samp>?</samp>’ symbol for separating them. The actual argument being used is set by <a href="#variant">variant</a>. At this, the last argument is used if the value of <a href="#variant">variant</a> is large than the number of provided variants. By default the first argument is used (i.e. as for <code>variant 0</code>). For example, the first plot will be drawn by blue (default is the first argument ‘<samp>b</samp>’), but the plot after <code>variant 1</code> will be drawn by red dash (the second is ‘<samp>r|</samp>’):
-</p><pre class="verbatim">fplot 'x' 'b'?'r'
-variant 1
-fplot 'x^3' 'b'?'r|'
-</pre>
-
-
-<hr>
-<a name="Program-flow-commands"></a>
-<div class="header">
-<p>
-Next: <a href="#Special-comments" accesskey="n" rel="next">Special comments</a>, Previous: <a href="#MGL-definition" accesskey="p" rel="prev">MGL definition</a>, Up: <a href="#MGL-scripts" accesskey="u" rel="up">MGL scripts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Program-flow-commands-1"></a>
-<h3 class="section">7.2 Program flow commands</h3>
-
-
-<p>Below I show commands to control program flow, like, conditions, loops, define script arguments and so on. Other commands can be found in chapters <a href="#MathGL-core">MathGL core</a> and <a href="#Data-processing">Data processing</a>. Note, that some of program flow commands (like <a href="#define">define</a>, <a href="#ask">ask</a>, <a href="#call">call</a>, <a href="#for">for</a>, <a href="#func">func</a>) should be placed alone in the string.
-</p>
-<a name="index-chdir"></a>
-<a name="chdir"></a><dl>
-<dt><a name="index-chdir-1"></a>MGL command: <em></em> <strong>chdir</strong> <em>'path'</em></dt>
-<dd><p>Changes the current directory to <var>path</var>.
-</p></dd></dl>
-
-<a name="index-ask"></a>
-<a name="ask"></a><dl>
-<dt><a name="index-ask-1"></a>MGL command: <em></em> <strong>ask</strong> <em>$N 'question'</em></dt>
-<dd><p>Sets <var>N</var>-th script argument to answer which give the user on the <var>question</var>. Usually this show dialog with question where user can enter some text as answer. Here <var>N</var> is digit (0...9) or alpha (a...z).
-</p></dd></dl>
-
-<a name="index-define"></a>
-<a name="define"></a><dl>
-<dt><a name="index-define-1"></a>MGL command: <em></em> <strong>define</strong> <em>$N smth</em></dt>
-<dd><p>Sets <var>N</var>-th script argument to <var>smth</var>. Note, that <var>smth</var> is used as is (with ‘<samp>'</samp>’ symbols if present). Here <var>N</var> is digit (0...9) or alpha (a...z).
-</p></dd></dl>
-<dl>
-<dt><a name="index-define-2"></a>MGL command: <em></em> <strong>define</strong> <em>name smth</em></dt>
-<dd><p>Create scalar variable <code>name</code> which have the numeric value of <code>smth</code>. Later you can use this variable as usual number.
-</p></dd></dl>
-<a name="index-defchr"></a>
-<a name="defchr"></a><dl>
-<dt><a name="index-defchr-1"></a>MGL command: <em></em> <strong>defchr</strong> <em>$N smth</em></dt>
-<dd><p>Sets <var>N</var>-th script argument to character with value evaluated from <var>smth</var>. Here <var>N</var> is digit (0...9) or alpha (a...z).
-</p></dd></dl>
-<a name="index-defnum"></a>
-<a name="defnum"></a><dl>
-<dt><a name="index-defnum-1"></a>MGL command: <em></em> <strong>defnum</strong> <em>$N smth</em></dt>
-<dd><p>Sets <var>N</var>-th script argument to number with value evaluated from <var>smth</var>. Here <var>N</var> is digit (0...9) or alpha (a...z).
-</p></dd></dl>
-
-
-<a name="index-call"></a>
-<a name="call"></a><dl>
-<dt><a name="index-call-1"></a>MGL command: <em></em> <strong>call</strong> <em>'funcname' [ARG1 ARG2 ... ARG9]</em></dt>
-<dd><p>Executes function <var>fname</var> (or script if function is not found). Optional arguments will be passed to functions. See also <a href="#func">func</a>.
-</p></dd></dl>
-<a name="index-func"></a>
-<a name="func"></a><dl>
-<dt><a name="index-func-1"></a>MGL command: <em></em> <strong>func</strong> <em>'funcname' [narg=0]</em></dt>
-<dd><p>Define the function <var>fname</var> and number of required arguments. The arguments will be placed in script parameters $1, $2, ... $9. Note, script execution is stopped at <code>func</code> keyword, similarly to <a href="#stop">stop</a> command. See also <a href="#return">return</a>.
-</p></dd></dl>
-<a name="index-return"></a>
-<a name="return"></a><dl>
-<dt><a name="index-return-1"></a>MGL command: <em></em> <strong>return</strong></dt>
-<dd><p>Return from the function. See also <a href="#func">func</a>.
-</p></dd></dl>
-
-<a name="index-load"></a>
-<a name="load"></a><dl>
-<dt><a name="index-load-1"></a>MGL command: <em></em> <strong>load</strong> <em>'filename'</em></dt>
-<dd><p>Load additional MGL command from external module (DLL or .so), located in file <var>filename</var>. This module have to contain array with name <code>mgl_cmd_extra</code> of type <code>mglCommand</code>, which describe provided commands.
-</p></dd></dl>
-
-
-<a name="index-if"></a>
-<a name="if"></a><a name="then"></a><dl>
-<dt><a name="index-if-1"></a>MGL command: <em></em> <strong>if</strong> <em><code>val</code> <strong>then</strong> <code>CMD</code></em></dt>
-<dd><p>Executes command <code>CMD</code> only if <code>val</code> is nonzero.
-</p></dd></dl>
-<dl>
-<dt><a name="index-if-2"></a>MGL command: <em></em> <strong>if</strong> <em><code>val</code></em></dt>
-<dd><p>Starts block which will be executed if <code>val</code> is nonzero.
-</p></dd></dl>
-<dl>
-<dt><a name="index-if-3"></a>MGL command: <em></em> <strong>if</strong> <em>dat 'cond'</em></dt>
-<dd><p>Starts block which will be executed if <var>dat</var> satisfy to <var>cond</var>.
-</p></dd></dl>
-<a name="index-elseif"></a>
-<a name="elseif"></a><dl>
-<dt><a name="index-elseif-1"></a>MGL command: <em></em> <strong>elseif</strong> <em><code>val</code></em></dt>
-<dd><p>Starts block which will be executed if previous <code>if</code> or <code>elseif</code> is false and <code>val</code> is nonzero.
-</p></dd></dl>
-<dl>
-<dt><a name="index-elseif-2"></a>MGL command: <em></em> <strong>elseif</strong> <em>dat 'cond'</em></dt>
-<dd><p>Starts block which will be executed if previous <code>if</code> or <code>elseif</code> is false and <var>dat</var> satisfy to <var>cond</var>.
-</p></dd></dl>
-<a name="index-else"></a>
-<a name="else"></a><dl>
-<dt><a name="index-else-1"></a>MGL command: <em></em> <strong>else</strong></dt>
-<dd><p>Starts block which will be executed if previous <code>if</code> or <code>elseif</code> is false.
-</p></dd></dl>
-<a name="index-endif"></a>
-<a name="endif"></a><dl>
-<dt><a name="index-endif-1"></a>MGL command: <em></em> <strong>endif</strong></dt>
-<dd><p>Finishes <code>if/elseif/else</code> block.
-</p></dd></dl>
-
-<a name="index-for"></a>
-<a name="for"></a><dl>
-<dt><a name="index-for-1"></a>MGL command: <em></em> <strong>for</strong> <em>$N <code>v1 v2 [dv=1]</code></em></dt>
-<dd><p>Starts loop with $<var>N</var>-th argument changing from <var>v1</var> to <var>v2</var> with the step <var>dv</var>. Here <var>N</var> is digit (0...9) or alpha (a...z).
-</p></dd></dl>
-<dl>
-<dt><a name="index-for-2"></a>MGL command: <em></em> <strong>for</strong> <em>$N dat</em></dt>
-<dd><p>Starts loop with $<var>N</var>-th argument changing for <var>dat</var> values. Here <var>N</var> is digit (0...9) or alpha (a...z).
-</p></dd></dl>
-<a name="index-next"></a>
-<a name="next"></a><dl>
-<dt><a name="index-next-1"></a>MGL command: <em></em> <strong>next</strong></dt>
-<dd><p>Finishes <code>for</code> loop.
-</p></dd></dl>
-
-<a name="index-do"></a>
-<a name="do"></a><dl>
-<dt><a name="index-do-1"></a>MGL command: <em></em> <strong>do</strong></dt>
-<dd><p>Starts infinite loop.
-</p></dd></dl>
-<a name="index-while"></a>
-<a name="while"></a><dl>
-<dt><a name="index-while-1"></a>MGL command: <em></em> <strong>while</strong> <em><code>val</code></em></dt>
-<dd><p>Continue loop iterations if <var>val</var> is nonzero, or finishes loop otherwise.
-</p></dd></dl>
-<dl>
-<dt><a name="index-while-2"></a>MGL command: <em></em> <strong>while</strong> <em>dat 'cond'</em></dt>
-<dd><p>Continue loop iterations if <var>dat</var> satisfy to <var>cond</var>, or finishes loop otherwise.
-</p></dd></dl>
-
-<a name="index-once"></a>
-<a name="once"></a><dl>
-<dt><a name="index-once-1"></a>MGL command: <em></em> <strong>once</strong> <em><code>val</code></em></dt>
-<dd><p>The code between <code>once on</code> and <code>once off</code> will be executed only once. Useful for large data manipulation in programs like UDAV.
-</p></dd></dl>
-<a name="index-stop"></a>
-<a name="stop"></a><dl>
-<dt><a name="index-stop-2"></a>MGL command: <em></em> <strong>stop</strong></dt>
-<dd><p>Terminate execution.
-</p></dd></dl>
-
-<a name="index-variant"></a>
-<a name="variant"></a><dl>
-<dt><a name="index-variant-1"></a>MGL command: <em></em> <strong>variant</strong> <em><code>val</code></em></dt>
-<dd><p>Set variant of argument(s) separated by ‘<samp>?</samp>’ symbol to be used in further commands.
-</p></dd></dl>
-
-
-<a name="index-rkstep"></a>
-<a name="rkstep"></a><dl>
-<dt><a name="index-rkstep-1"></a>MGL command: <em></em> <strong>rkstep</strong> <em>eq1;... var1;... [<code>dt=1</code>]</em></dt>
-<dd><p>Make one step for ordinary differential equation(s) {var1’ = eq1, ... } with time-step <var>dt</var>. Here variable(s) ‘<samp>var1</samp>’, ... are the ones, defined in MGL script previously. The Runge-Kutta 4-th order method is used for solution.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Special-comments"></a>
-<div class="header">
-<p>
-Next: <a href="#LaTeX-package" accesskey="n" rel="next">LaTeX package</a>, Previous: <a href="#Program-flow-commands" accesskey="p" rel="prev">Program flow commands</a>, Up: <a href="#MGL-scripts" accesskey="u" rel="up">MGL scripts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Special-comments-1"></a>
-<h3 class="section">7.3 Special comments</h3>
-
-
-<p>There are number of special comments for MGL script, which set some global behavior (like, animation, dialog for parameters and so on). All these special comments starts with double sign <code>##</code>. Let consider them.
-</p>
-<dl compact="compact">
-<dt>‘<samp><strong>##c</strong> <code>v1 v2 [dv=1]</code></samp>’</dt>
-<dd><p>Sets the parameter for animation loop relative to variable <code>$0</code>. Here <var>v1</var> and <var>v2</var> are initial and final values, <var>dv</var> is the increment.
-</p>
-</dd>
-<dt>‘<samp><strong>##a</strong> val</samp>’</dt>
-<dd><p>Adds the parameter <var>val</var> to the list of animation relative to variable <code>$0</code>. You can use it several times (one parameter per line) or combine it with animation loop <strong>##c</strong>.
-</p>
-</dd>
-<dt>‘<samp><strong>##d</strong> $I kind|label|par1|par2|...</samp>’</dt>
-<dd><p>Creates custom dialog for changing plot properties. Each line adds one widget to the dialog. Here <var>$I</var> is id ($0,$1...$9,$a,$b...$z), <var>label</var> is the label of widget, <var>kind</var> is the kind of the widget:
-</p><ul>
-<li> ’e’ for editor or input line (parameter is initial value) ,
-</li><li> ’v’ for spinner or counter (parameters are "ini|min|max|step|big_step"),
-</li><li> ’s’ for slider (parameters are "ini|min|max|step"),
-</li><li> ’b’ for check box (parameter is "ini"; also understand "on"=1),
-</li><li> ’c’ for choice (parameters are possible choices).
-</li></ul>
-<p>Now, it work in FLTK-based <code>mgllab</code> and <code>mglview</code> only.
-</p>
-<p>You can make custom dialog in C/C++ code too by using one of following functions.
-</p>
-<dl>
-<dt><a name="index-MakeDialog"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>MakeDialog</strong> <em>(<code>const char *</code>ids, <code>char const * const *</code>args, <code>const char *</code>title)</em></dt>
-<dt><a name="index-MakeDialog-1"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>MakeDialog</strong> <em>(<code>const std::string &</code>ids, <code>const std::vector<std::string> &</code>args, <code>const char *</code>title)</em></dt>
-<dt><a name="index-mgl_005fwnd_005fmake_005fdialog"></a>C function: <em><code>void</code></em> <strong>mgl_wnd_make_dialog</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>ids, <code>char const * const *</code>args, <code>const char *</code>title)</em></dt>
-<dd><p>Makes custom dialog for parameters ids of element properties defined by args.
-</p></dd></dl>
-
-<p>At this you need to provide callback function for setting up properties. You can do it by overloading <code>Param()</code> function of <code>mglDraw</code> class or set it manually.
-</p>
-<dl>
-<dt><a name="index-Param"></a>Method on <code>mglDraw</code>: <em><code>void</code></em> <strong>Param</strong> <em>(<code>char</code> id, <code>const char *</code> val)</em></dt>
-<dt><a name="index-SetPropFunc"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>SetPropFunc</strong> <em>(<code>void (*</code>prop<code>)(char id, const char *val, void *p)</code>, <code>void *</code>par=<code>NULL</code>)</em></dt>
-<dt><a name="index-mgl_005fwnd_005fset_005fprop"></a>C function: <em><code>void</code></em> <strong>mgl_wnd_set_prop</strong> <em>(<code>void (*</code>prop<code>)(char id, const char *val, void *p)</code>, <code>void *</code>par)</em></dt>
-<dd><p>Set callback function for properties setup.
-</p></dd></dl>
-
-
-</dd>
-</dl>
-
-
-<hr>
-<a name="LaTeX-package"></a>
-<div class="header">
-<p>
-Next: <a href="#mglParse-class" accesskey="n" rel="next">mglParse class</a>, Previous: <a href="#Special-comments" accesskey="p" rel="prev">Special comments</a>, Up: <a href="#MGL-scripts" accesskey="u" rel="up">MGL scripts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="LaTeX-package-1"></a>
-<h3 class="section">7.4 LaTeX package</h3>
-
-
-<p>There is LaTeX package <code>mgltex</code> (was made by Diego Sejas Viscarra) which allow one to make figures directly from MGL script located in LaTeX file.
-</p>
-<p>For using this package you need to specify <code>--shell-escape</code> option for <em>latex/pdflatex</em> or manually run <em>mglconv</em> tool with produced MGL scripts for generation of images. Don’t forgot to run <em>latex/pdflatex</em> second time to insert generated images into the output document. Also you need to run <em>pdflatex</em> third time to update converted from EPS images if you are using vector EPS output (default).
-</p>
-<p>The package may have following options: <code>draft</code>, <code>final</code> — the same as in the <em>graphicx</em> package; <code>on</code>, <code>off</code> — to activate/deactivate the creation of scripts and graphics; <code>comments</code>, <code>nocomments</code> — to make visible/invisible comments contained inside <code>mglcomment</code> environments; <code>jpg</code>, <code>jpeg</code>, <code>png</code> — to export graphics as JPEG/PNG images; <code>eps</code>, <code>epsz</code> — to export to uncompressed/compressed EPS format as primitives; <code>bps</code>, <code>bpsz</code> — to export to uncompressed/compressed EPS format as bitmap (doesn’t work with <em>pdflatex</em>); <code>pdf</code> — to export to 3D PDF; <code>tex</code> — to export to <em>LaTeX/tikz</em> document.
-</p>
-<p>The package defines the following environments:
-</p><dl compact="compact">
-<dt>‘<samp>mgl</samp>’</dt>
-<dd><p>It writes its contents to a general script which has the same name as the LaTeX document, but its extension is <em>.mgl</em>. The code in this environment is compiled and the image produced is included. It takes exactly the same optional arguments as the <code>\includegraphics</code> command, plus an additional argument <var>imgext</var>, which specifies the extension to save the image.
-</p>
-<p>An example of usage of ‘<samp>mgl</samp>’ environment would be:
-</p><pre class="verbatim">\begin{mglfunc}{prepare2d}
- new a 50 40 '0.6*sin(pi*(x+1))*sin(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
- new b 50 40 '0.6*cos(pi*(x+1))*cos(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-\end{mglfunc}
-
-\begin{figure}[!ht]
- \centering
- \begin{mgl}[width=0.85\textwidth,height=7.5cm]
- fog 0.5
- call 'prepare2d'
- subplot 2 2 0 : title 'Surf plot (default)' : rotate 50 60 : light on : box : surf a
-
- subplot 2 2 1 : title '"\#" style; meshnum 10' : rotate 50 60 : box
- surf a '#'; meshnum 10
-
- subplot 2 2 2 : title 'Mesh plot' : rotate 50 60 : box
- mesh a
-
- new x 50 40 '0.8*sin(pi*x)*sin(pi*(y+1)/2)'
- new y 50 40 '0.8*cos(pi*x)*sin(pi*(y+1)/2)'
- new z 50 40 '0.8*cos(pi*(y+1)/2)'
- subplot 2 2 3 : title 'parametric form' : rotate 50 60 : box
- surf x y z 'BbwrR'
- \end{mgl}
-\end{figure}
-</pre>
-</dd>
-<dt>‘<samp>mgladdon</samp>’</dt>
-<dd><p>It adds its contents to the general script, without producing any image.
-</p></dd>
-<dt>‘<samp>mglcode</samp>’</dt>
-<dd><p>Is exactly the same as ‘<samp>mgl</samp>’, but it writes its contents verbatim to its own file, whose name is specified as a mandatory argument.
-</p></dd>
-<dt>‘<samp>mglscript</samp>’</dt>
-<dd><p>Is exactly the same as ‘<samp>mglcode</samp>’, but it doesn’t produce any image, nor accepts optional arguments. It is useful, for example, to create a MGL script, which can later be post processed by another package like "listings".
-</p></dd>
-<dt>‘<samp>mglblock</samp>’</dt>
-<dd><p>It writes its contents verbatim to a file, specified as a mandatory argument, and to the LaTeX document, and numerates each line of code.
-</p>
-</dd>
-<dt>‘<samp>mglverbatim</samp>’</dt>
-<dd><p>Exactly the same as ‘<samp>mglblock</samp>’, but it doesn’t write to a file. This environment doesn’t have arguments.
-</p></dd>
-<dt>‘<samp>mglfunc</samp>’</dt>
-<dd><p>Is used to define MGL functions. It takes one mandatory argument, which is the name of the function, plus one additional argument, which specifies the number of arguments of the function. The environment needs to contain only the body of the function, since the first and last lines are appended automatically, and the resulting code is written at the end of the general script, after the <a href="#stop">stop</a> command, which is also written automatically. The warning is produced if 2 or more function with the same name is defined.
-</p></dd>
-<dt>‘<samp>mglcomment</samp>’</dt>
-<dd><p>Is used to contain multiline comments. This comments will be visible/invisible in the output document, depending on the use of the package options <code>comments</code> and <code>nocomments</code> (see above), or the <code>\mglcomments</code> and <code>\mglnocomments</code> commands (see bellow).
-</p></dd>
-<dt>‘<samp>mglsetup</samp>’</dt>
-<dd><p>If many scripts with the same code are to be written, the repetitive code can be written inside this environment only once, then this code will be used automatically every time the ‘<samp>\mglplot</samp>’ command is used (see below). It takes one optional argument, which is a name to be associated to the corresponding contents of the environment; this name can be passed to the ‘<samp>\mglplot</samp>’ command to use the corresponding block of code automatically (see below).
-</p></dd>
-</dl>
-
-<p>The package also defines the following commands:
-</p><dl compact="compact">
-<dt>‘<samp>\mglplot</samp>’</dt>
-<dd><p>It takes one mandatory argument, which is MGL instructions separated by the symbol ‘<samp>:</samp>’ this argument can be more than one line long. It takes the same optional arguments as the ‘<samp>mgl</samp>’ environment, plus an additional argument <var>setup</var>, which indicates the name associated to a block of code inside a ‘<samp>mglsetup</samp>’ environment. The code inside the mandatory argument will be appended to the block of code specified, and the resulting code will be written to the general script.
-</p>
-<p>An example of usage of ‘<samp>\mglplot</samp>’ command would be:
-</p><pre class="verbatim">\begin{mglsetup}
- box '@{W9}' : axis
-\end{mglsetup}
-\begin{mglsetup}[2d]
- box : axis
- grid 'xy' ';k'
-\end{mglsetup}
-\begin{mglsetup}[3d]
- rotate 50 60
- box : axis : grid 'xyz' ';k'
-\end{mglsetup}
-\begin{figure}[!ht]
- \centering
- \mglplot[scale=0.5]{new a 200 'sin(pi*x)' : plot a '2B'}
-\end{figure}
-\begin{figure}[!ht]
- \centering
- \mglplot[scale=0.5,setup=2d]{
- fplot 'sin(pi*x)' '2B' :
- fplot 'cos(pi*x^2)' '2R'
- }
-\end{figure}
-\begin{figure}[!ht]
- \centering
- \mglplot[setup=3d]{fsurf 'sin(pi*x)+cos(pi*y)'}
-\end{figure}
-</pre>
-</dd>
-<dt>‘<samp>\mglgraphics</samp>’</dt>
-<dd><p>This command takes the same optional arguments as the ‘<samp>mgl</samp>’ environment, and one mandatory argument, which is the name of a MGL script. This command will compile the corresponding script and include the resulting image. It is useful when you have a script outside the LaTeX document, and you want to include the image, but you don’t want to type the script again.
-</p></dd>
-<dt>‘<samp>\mglinclude</samp>’</dt>
-<dd><p>This is like ‘<samp>\mglgraphics</samp>’ but, instead of creating/including the corresponding image, it writes the contents of the MGL script to the LaTeX document, and numerates the lines.
-</p></dd>
-<dt>‘<samp>\mgldir</samp>’</dt>
-<dd><p>This command can be used in the preamble of the document to specify a directory where LaTeX will save the MGL scripts and generate the corresponding images. This directory is also where ‘<samp>\mglgraphics</samp>’ and ‘<samp>\mglinclude</samp>’ will look for scripts.
-</p></dd>
-<dt>‘<samp>\mglquality</samp>’</dt>
-<dd><p>Adjust the quality of the MGL graphics produced similarly to <a href="#quality">quality</a>.
-</p></dd>
-<dt>‘<samp>\mgltexon, \mgltexoff</samp>’</dt>
-<dd><p>Activate/deactivate the creation of MGL scripts and images. Notice these commands have local behavior in the sense that their effect is from the point they are called on.
-</p></dd>
-<dt>‘<samp>\mglcomment, \mglnocomment</samp>’</dt>
-<dd><p>Make visible/invisible the contents of the <code>mglcomment</code> environments. These commands have local effect too.
-</p></dd>
-<dt>‘<samp>\mglTeX</samp>’</dt>
-<dd><p>It just pretty prints the name of the package.
-</p></dd>
-</dl>
-
-<p>As an additional feature, when an image is not found or cannot be included, instead of issuing an error, <code>mgltex</code> prints a box with the word ‘<samp>MGL image not found</samp>’ in the LaTeX document.
-</p>
-
-
-
-<hr>
-<a name="mglParse-class"></a>
-<div class="header">
-<p>
-Previous: <a href="#LaTeX-package" accesskey="p" rel="prev">LaTeX package</a>, Up: <a href="#MGL-scripts" accesskey="u" rel="up">MGL scripts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="mglParse-class-1"></a>
-<h3 class="section">7.5 mglParse class</h3>
-
-<a name="index-mglParse"></a>
-
-<p>Class for parsing and executing MGL script. This class is defined in <code>#include <mgl2/mgl.h></code>.
-</p>
-<p>The main function of mglParse class is <code>Execute()</code>. Exactly this function parses and executes the script string-by-string. Also there are subservient functions for the finding and creation of a variable (object derived from <code>mglDataA</code>). These functions can be useful for displaying values of variables (arrays) in some external object (like, window) or for providing access to internal data. Function <code>AllowSetSize()</code> allows one to prevent changing the size of the picture inside the script (forbids the MGL command <code>setsize</code>).
-</p>
-
-<dl>
-<dt><a name="index-mglParse-1"></a>Constructor on <code>mglParse</code>: <em><code></code></em> <strong>mglParse</strong> <em>(<code>bool</code> setsize=<code>false</code>)</em></dt>
-<dt><a name="index-mglParse-2"></a>Constructor on <code>mglParse</code>: <em><code></code></em> <strong>mglParse</strong> <em>(<code>HMPR</code> pr)</em></dt>
-<dt><a name="index-mglParse-3"></a>Constructor on <code>mglParse</code>: <em><code></code></em> <strong>mglParse</strong> <em>(<code>mglParse &</code>pr)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fparser"></a>C function: <em><code>HMPR</code></em> <strong>mgl_create_parser</strong> <em>()</em></dt>
-<dd><p>Constructor initializes all values with zero and set <var>AllowSetSize</var> value.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-_007emglParse"></a>Destructor on <code>mglParse</code>: <em><code></code></em> <strong>~mglParse</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fdelete_005fparser"></a>C function: <em><code>void</code></em> <strong>mgl_delete_parser</strong> <em>(<code>HMPR</code> p)</em></dt>
-<dd><p>Destructor delete parser
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Self-1"></a>Method on <code>mglParse</code>: <em><code>HMPR</code></em> <strong>Self</strong> <em>()</em></dt>
-<dd><p>Returns the pointer to internal object of type <code>HMPR</code>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Execute"></a>Method on <code>mglParse</code>: <em><code>void</code></em> <strong>Execute</strong> <em>(<code>mglGraph *</code>gr, <code>const char *</code>text)</em></dt>
-<dt><a name="index-Execute-1"></a>Method on <code>mglParse</code>: <em><code>void</code></em> <strong>Execute</strong> <em>(<code>mglGraph *</code>gr, <code>const wchar_t *</code>text)</em></dt>
-<dt><a name="index-mgl_005fparse_005ftext"></a>C function: <em><code>void</code></em> <strong>mgl_parse_text</strong> <em>(<code>HMGL</code> gr, <code>HMPR</code> p, <code>const char *</code>text)</em></dt>
-<dt><a name="index-mgl_005fparse_005ftextw"></a>C function: <em><code>void</code></em> <strong>mgl_parse_textw</strong> <em>(<code>HMGL</code> gr, <code>HMPR</code> p, <code>const wchar_t *</code>text)</em></dt>
-<dd><p>Main function in the class. Function parse and execute line-by-line MGL script in array <var>text</var>. Lines are separated by newline symbol ‘<samp>\n</samp>’ as usual.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Execute-2"></a>Method on <code>mglParse</code>: <em><code>void</code></em> <strong>Execute</strong> <em>(<code>mglGraph *</code>gr, <code>FILE *</code>fp, <code>bool</code> print=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fparse_005ffile"></a>C function: <em><code>void</code></em> <strong>mgl_parse_file</strong> <em>(<code>HMGL</code> gr, <code>HMPR</code> p, <code>FILE *</code>fp, <code>int</code> print)</em></dt>
-<dd><p>The same as previous but read script from the file <var>fp</var>. If <var>print</var>=<code>true</code> then all warnings and information will be printed in stdout.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Parse"></a>Method on <code>mglParse</code>: <em><code>int</code></em> <strong>Parse</strong> <em>(<code>mglGraph *</code>gr, <code>const char *</code>str, <code>long</code> pos=<code>0</code>)</em></dt>
-<dt><a name="index-Parse-1"></a>Method on <code>mglParse</code>: <em><code>int</code></em> <strong>Parse</strong> <em>(<code>mglGraph *</code>gr, <code>const wchar_t *</code>str, <code>long</code> pos=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fparse_005fline"></a>C function: <em><code>int</code></em> <strong>mgl_parse_line</strong> <em>(<code>HMGL</code> gr, <code>HMPR</code> p, <code>const char *</code>str, <code>int</code> pos)</em></dt>
-<dt><a name="index-mgl_005fparse_005flinew"></a>C function: <em><code>int</code></em> <strong>mgl_parse_linew</strong> <em>(<code>HMGL</code> gr, <code>HMPR</code> p, <code>const wchar_t *</code>str, <code>int</code> pos)</em></dt>
-<dd><p>Function parses the string <var>str</var> and executes it by using <var>gr</var> as a graphics plotter. Returns the value depending on an error presence in the string <var>str</var>: 0 – no error, 1 – wrong command argument(s), 2 – unknown command, 3 – string is too long, 4 – strings is not closed. Optional argument <var>pos</var> allows to save the string position in the document (or file) for using <code>for|next</code> command.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Calc-1"></a>Method on <code>mglParse</code>: <em><code>mglData</code></em> <strong>Calc</strong> <em>(<code>const char *</code>formula)</em></dt>
-<dt><a name="index-Calc-2"></a>Method on <code>mglParse</code>: <em><code>mglData</code></em> <strong>Calc</strong> <em>(<code>const wchar_t *</code>formula)</em></dt>
-<dt><a name="index-mgl_005fparser_005fcalc"></a>C function: <em><code>HMDT</code></em> <strong>mgl_parser_calc</strong> <em>(<code>HMPR</code> p, <code>const char *</code>formula)</em></dt>
-<dt><a name="index-mgl_005fparser_005fcalcw"></a>C function: <em><code>HMDT</code></em> <strong>mgl_parser_calcw</strong> <em>(<code>HMPR</code> p, <code>const wchar_t *</code>formula)</em></dt>
-<dd><p>Function parses the string <var>formula</var> and return resulting data array. In difference to <code>AddVar()</code> or <code>FindVar()</code>, it is usual data array which should be deleted after usage.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-CalcComplex"></a>Method on <code>mglParse</code>: <em><code>mglDataC</code></em> <strong>CalcComplex</strong> <em>(<code>const char *</code>formula)</em></dt>
-<dt><a name="index-CalcComplex-1"></a>Method on <code>mglParse</code>: <em><code>mglDataC</code></em> <strong>CalcComplex</strong> <em>(<code>const wchar_t *</code>formula)</em></dt>
-<dt><a name="index-mgl_005fparser_005fcalc_005fcomplex"></a>C function: <em><code>HADT</code></em> <strong>mgl_parser_calc_complex</strong> <em>(<code>HMPR</code> p, <code>const char *</code>formula)</em></dt>
-<dt><a name="index-mgl_005fparser_005fcalc_005fcomplexw"></a>C function: <em><code>HADT</code></em> <strong>mgl_parser_calc_complexw</strong> <em>(<code>HMPR</code> p, <code>const wchar_t *</code>formula)</em></dt>
-<dd><p>Function parses the string <var>formula</var> and return resulting data array with complex values. In difference to <code>AddVar()</code> or <code>FindVar()</code>, it is usual data array which should be deleted after usage.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-AddParam"></a>Method on <code>mglParse</code>: <em><code>void</code></em> <strong>AddParam</strong> <em>(<code>int</code> n, <code>const char *</code>str)</em></dt>
-<dt><a name="index-AddParam-1"></a>Method on <code>mglParse</code>: <em><code>void</code></em> <strong>AddParam</strong> <em>(<code>int</code> n, <code>const wchar_t *</code>str)</em></dt>
-<dt><a name="index-mgl_005fparser_005fadd_005fparam"></a>C function: <em><code>void</code></em> <strong>mgl_parser_add_param</strong> <em>(<code>HMPR</code> p, <code>int</code> id, <code>const char *</code>val)</em></dt>
-<dt><a name="index-mgl_005fparser_005fadd_005fparamw"></a>C function: <em><code>void</code></em> <strong>mgl_parser_add_paramw</strong> <em>(<code>HMPR</code> p, <code>int</code> id, <code>const wchar_t *</code>val)</em></dt>
-<dd><p>Function set the value of <var>n</var>-th parameter as string <var>str</var> (<var>n</var>=0, 1 ... ’z’-’a’+10). String <var>str</var> shouldn’t contain ‘<samp>$</samp>’ symbol.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-FindVar"></a>Method on <code>mglParse</code>: <em><code>mglVar *</code></em> <strong>FindVar</strong> <em>(<code>const char *</code>name)</em></dt>
-<dt><a name="index-FindVar-1"></a>Method on <code>mglParse</code>: <em><code>mglVar *</code></em> <strong>FindVar</strong> <em>(<code>const wchar_t *</code>name)</em></dt>
-<dt><a name="index-mgl_005fparser_005ffind_005fvar"></a>C function: <em><code>HMDT</code></em> <strong>mgl_parser_find_var</strong> <em>(<code>HMPR</code> p, <code>const char *</code>name)</em></dt>
-<dt><a name="index-mgl_005fparser_005ffind_005fvarw"></a>C function: <em><code>HMDT</code></em> <strong>mgl_parser_find_varw</strong> <em>(<code>HMPR</code> p, <code>const wchar_t *</code>name)</em></dt>
-<dd><p>Function returns the pointer to variable with name <var>name</var> or zero if variable is absent. Use this function to put external data array to the script or get the data from the script. You must <strong>not delete</strong> obtained data arrays!
-</p></dd></dl>
-<dl>
-<dt><a name="index-AddVar"></a>Method on <code>mglParse</code>: <em><code>mglVar *</code></em> <strong>AddVar</strong> <em>(<code>const char *</code>name)</em></dt>
-<dt><a name="index-AddVar-1"></a>Method on <code>mglParse</code>: <em><code>mglVar *</code></em> <strong>AddVar</strong> <em>(<code>const wchar_t *</code>name)</em></dt>
-<dt><a name="index-mgl_005fparser_005fadd_005fvar"></a>C function: <em><code>HMDT</code></em> <strong>mgl_parser_add_var</strong> <em>(<code>HMPR</code> p, <code>const char *</code>name)</em></dt>
-<dt><a name="index-mgl_005fparser_005fadd_005fvarw"></a>C function: <em><code>HMDT</code></em> <strong>mgl_parser_add_varw</strong> <em>(<code>HMPR</code> p, <code>const wchar_t *</code>name)</em></dt>
-<dd><p>Function returns the pointer to variable with name <var>name</var>. If variable is absent then new variable is created with name <var>name</var>. Use this function to put external data array to the script or get the data from the script. You must <strong>not delete</strong> obtained data arrays!
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-OpenHDF-1"></a>Method on <code>mglParse</code>: <em><code>void</code></em> <strong>OpenHDF</strong> <em>(<code>const char *</code>fname)</em></dt>
-<dt><a name="index-mgl_005fparser_005fopenhdf-1"></a>C function: <em><code>void</code></em> <strong>mgl_parser_openhdf</strong> <em>(<code>HMPR</code> pr, <code>const char *</code>fname)</em></dt>
-<dd><p>Reads all data array from HDF5 file <var>fname</var> and create MGL variables with names of data names in HDF file. Complex variables will be created if data name starts with ‘<samp>!</samp>’.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-DeleteVar"></a>Method on <code>mglParse</code> (C++): <em><code>void</code></em> <strong>DeleteVar</strong> <em>(<code>const char *</code>name)</em></dt>
-<dt><a name="index-DeleteVar-1"></a>Method on <code>mglParse</code> (C++): <em><code>void</code></em> <strong>DeleteVar</strong> <em>(<code>const wchar_t *</code>name)</em></dt>
-<dt><a name="index-mgl_005fparser_005fdel_005fvar"></a>C function: <em><code>void</code></em> <strong>mgl_parser_del_var</strong> <em>(<code>HMPR</code> p, <code>const char *</code>name)</em></dt>
-<dt><a name="index-mgl_005fparser_005fdel_005fvarw"></a>C function: <em><code>void</code></em> <strong>mgl_parser_del_varw</strong> <em>(<code>HMPR</code> p, <code>const wchar_t *</code>name)</em></dt>
-<dd><p>Function delete the variable with given <var>name</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-DeleteAll"></a>Method on <code>mglParse</code> (C++): <em><code>void</code></em> <strong>DeleteAll</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fparser_005fdel_005fall"></a>C function: <em><code>void</code></em> <strong>mgl_parser_del_all</strong> <em>(<code>HMPR</code> p)</em></dt>
-<dd><p>Function delete all variables and reset list of commands to default one in this parser.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-RestoreOnce"></a>Method on <code>mglParse</code>: <em><code>void</code></em> <strong>RestoreOnce</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fparser_005frestore_005fonce"></a>C function: <em><code>void</code></em> <strong>mgl_parser_restore_once</strong> <em>(<code>HMPR</code> p)</em></dt>
-<dd><p>Restore Once flag.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-AllowSetSize"></a>Method on <code>mglParse</code>: <em><code>void</code></em> <strong>AllowSetSize</strong> <em>(<code>bool</code> a)</em></dt>
-<dt><a name="index-mgl_005fparser_005fallow_005fsetsize"></a>C function: <em><code>void</code></em> <strong>mgl_parser_allow_setsize</strong> <em>(<code>HMPR</code> p, <code>int</code> a)</em></dt>
-<dd><p>Allow to parse <a href="#setsize">setsize</a> command or not.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-AllowFileIO"></a>Method on <code>mglParse</code>: <em><code>void</code></em> <strong>AllowFileIO</strong> <em>(<code>bool</code> a)</em></dt>
-<dt><a name="index-mgl_005fparser_005fallow_005ffile_005fio"></a>C function: <em><code>void</code></em> <strong>mgl_parser_allow_file_io</strong> <em>(<code>HMPR</code> p, <code>int</code> a)</em></dt>
-<dd><p>Allow reading/saving files or not.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-AllowDllCall"></a>Method on <code>mglParse</code>: <em><code>void</code></em> <strong>AllowDllCall</strong> <em>(<code>bool</code> a)</em></dt>
-<dt><a name="index-mgl_005fparser_005fallow_005fdll_005fcall"></a>C function: <em><code>void</code></em> <strong>mgl_parser_allow_dll_call</strong> <em>(<code>HMPR</code> p, <code>int</code> a)</em></dt>
-<dd><p>Allow to parse <a href="#load">load</a> command or not.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Stop-2"></a>Method on <code>mglParse</code>: <em><code>void</code></em> <strong>Stop</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fparser_005fstop"></a>C function: <em><code>void</code></em> <strong>mgl_parser_stop</strong> <em>(<code>HMPR</code> p)</em></dt>
-<dd><p>Sends stop signal which terminate execution at next command.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetVariant"></a>Method on <code>mglParse</code>: <em><code>void</code></em> <strong>SetVariant</strong> <em>(<code>int</code> var=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fparser_005fvariant"></a>C function: <em><code>void</code></em> <strong>mgl_parser_variant</strong> <em>(<code>HMPR</code> p, <code>int</code> var)</em></dt>
-<dd><p>Sets variant of argument(s) separated by ‘<samp>?</samp>’ symbol to be used in further commands.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-StartID"></a>Method on <code>mglParse</code>: <em><code>void</code></em> <strong>StartID</strong> <em>(<code>int</code> id=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fparser_005fstart_005fid"></a>C function: <em><code>void</code></em> <strong>mgl_parser_start_id</strong> <em>(<code>HMPR</code> p, <code>int</code> id)</em></dt>
-<dd><p>Sets id (like, line number) of first line in further script parsing.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetCmdNum"></a>Method on <code>mglParse</code>: <em><code>long</code></em> <strong>GetCmdNum</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fparser_005fcmd_005fnum"></a>C function: <em><code>long</code></em> <strong>mgl_parser_cmd_num</strong> <em>(<code>HMPR</code> p)</em></dt>
-<dd><p>Return the number of registered MGL commands.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetCmdName"></a>Method on <code>mglParse</code>: <em><code>const char *</code></em> <strong>GetCmdName</strong> <em>(<code>long</code> id)</em></dt>
-<dt><a name="index-mgl_005fparser_005fcmd_005fname"></a>C function: <em><code>const char *</code></em> <strong>mgl_parser_cmd_name</strong> <em>(<code>HMPR</code> p, <code>long</code> id)</em></dt>
-<dd><p>Return the name of command with given <var>id</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-CmdType"></a>Method on <code>mglParse</code>: <em><code>int</code></em> <strong>CmdType</strong> <em>(<code>const char *</code>name)</em></dt>
-<dt><a name="index-mgl_005fparser_005fcmd_005ftype"></a>C function: <em><code>int</code></em> <strong>mgl_parser_cmd_type</strong> <em>(<code>HMPR</code> p, <code>const char *</code>name)</em></dt>
-<dd><p>Return the type of MGL command <var>name</var>. Type of commands are: 0 – not the command, 1 - data plot, 2 - other plot, 3 - setup, 4 - data handle, 5 - data create, 6 - subplot, 7 - program, 8 - 1d plot, 9 - 2d plot, 10 - 3d plot, 11 - dd plot, 12 - vector plot, 13 - axis, 14 - primitives, 15 - axis setup, 16 - text/legend, 17 - data transform.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-CmdFormat"></a>Method on <code>mglParse</code>: <em><code>const char *</code></em> <strong>CmdFormat</strong> <em>(<code>const char *</code>name)</em></dt>
-<dt><a name="index-mgl_005fparser_005fcmd_005ffrmt"></a>C function: <em><code>const char *</code></em> <strong>mgl_parser_cmd_frmt</strong> <em>(<code>HMPR</code> p, <code>const char *</code>name)</em></dt>
-<dd><p>Return the format of arguments for MGL command <var>name</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-CmdDesc"></a>Method on <code>mglParse</code>: <em><code>const char *</code></em> <strong>CmdDesc</strong> <em>(<code>const char *</code>name)</em></dt>
-<dt><a name="index-mgl_005fparser_005fcmd_005fdesc"></a>C function: <em><code>const char *</code></em> <strong>mgl_parser_cmd_desc</strong> <em>(<code>HMPR</code> p, <code>const char *</code>name)</em></dt>
-<dd><p>Return the description of MGL command <var>name</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-RK_005fStep"></a>Method on <code>mglParse</code>: <em><code>void</code></em> <strong>RK_Step</strong> <em>(<code>const char *</code>eqs, <code>const char *</code>vars, <code>mreal</code> dt=<code>1</code>)</em></dt>
-<dt><a name="index-RK_005fStep-1"></a>Method on <code>mglParse</code>: <em><code>void</code></em> <strong>RK_Step</strong> <em>(<code>const wchar_t *</code>eqs, <code>const wchar_t *</code>vars, <code>mreal</code> dt=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005frk_005fstep"></a>C function: <em><code>void</code></em> <strong>mgl_rk_step</strong> <em>(<code>HMPR</code> p, <code>const char *</code>eqs, <code>const char *</code>vars, <code>mreal</code> dt)</em></dt>
-<dt><a name="index-mgl_005frk_005fstep_005fw"></a>C function: <em><code>void</code></em> <strong>mgl_rk_step_w</strong> <em>(<code>HMPR</code> p, <code>const wchar_t *</code>eqs, <code>const wchar_t *</code>vars, <code>mreal</code> dt)</em></dt>
-<dd><p>Make one step for ordinary differential equation(s) {var1’ = eq1, ... } with time-step <var>dt</var>. Here strings <var>eqs</var> and <var>vars</var> contain the equations and variable names separated by symbol ‘<samp>;</samp>’. The variable(s) ‘<samp>var1</samp>’, ... are the ones, defined in MGL script previously. The Runge-Kutta 4-th order method is used.
-</p></dd></dl>
-
-
-
-
-
-<hr>
-<a name="UDAV"></a>
-<div class="header">
-<p>
-Next: <a href="#Other-classes" accesskey="n" rel="next">Other classes</a>, Previous: <a href="#MGL-scripts" accesskey="p" rel="prev">MGL scripts</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="UDAV-1"></a>
-<h2 class="chapter">8 UDAV</h2>
-
-
-<p>UDAV (Universal Data Array Visualizator) is cross-platform program for data arrays visualization based on MathGL library. It support wide spectrum of graphics, simple script language and visual data handling and editing. It has window interface for data viewing, changing and plotting. Also it can execute MGL scripts, setup and rotate graphics and so on. UDAV hot-keys can be found in the appendix <a href="#Hot_002dkeys-for-UDAV">Hot-keys for UDAV</a>.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#UDAV-overview" accesskey="1">UDAV overview</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#UDAV-dialogs" accesskey="2">UDAV dialogs</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#UDAV-hints" accesskey="3">UDAV hints</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="UDAV-overview"></a>
-<div class="header">
-<p>
-Next: <a href="#UDAV-dialogs" accesskey="n" rel="next">UDAV dialogs</a>, Up: <a href="#UDAV" accesskey="u" rel="up">UDAV</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="UDAV-overview-1"></a>
-<h3 class="section">8.1 UDAV overview</h3>
-
-
-<p>UDAV have main window divided by 2 parts in general case and optional bottom panel(s). Left side contain tabs for MGL script and data arrays. Right side contain tabs with graphics itself, with list of variables and with help on MGL. Bottom side may contain the panel with MGL messages and warnings, and the panel with calculator.
-</p>
-<div align="center"><img src="udav/udav_main.png" alt="Main window">
-</div>
-<p>Main window is shown on the figure above. You can see the script (at left) with current line highlighted by light-yellow, and result of its execution at right. Each panel have its own set of toolbuttons.
-</p>
-<p>Editor toolbuttons allow: open and save script from/to file; undo and redo changes; cut, copy and paste selection; find/replace text; show dialogs for command arguments and for plot setup; show calculator at bottom.
-</p>
-<p>Graphics toolbuttons allow: enable/disable additional transparency and lighting; show grid of absolute coordinates; enable mouse rotation; restore image view; refresh graphics (execute the script); stop calculation; copy graphics into clipboard; add primitives (line, curve, box, rhombus, ellipse, mark, text) to the image; change view angles manually. Vertical toolbuttons allow: shift and zoom in/out of image as whole; show next and previous frame of animation, or start animation (if one present).
-</p>
-<p>Graphics panel support plot editing by mouse.
-</p><ul>
-<li> Axis range can be changed by mouse wheel or by dragging image by middle mouse button. Right button show popup menu. Left button show the coordinates of mouse click. At this double click will highlight plot under mouse and jump to the corresponded string of the MGL script.
-</li><li> Pressing "mouse rotation" toolbutton will change mouse actions: dragging by left button will rotate plot, middle button will shift the plot as whole, right button will zoom in/out plot as whole and add perspective, mouse wheel will zoom in/out plot as whole.
-</li><li> Manual primitives can be added by pressing corresponding toolbutton. They can be shifted as whole at any time by mouse dragging. At this double click open dialog with its properties. If toolbutton "grid of absolute coordinates" is pressed then editing of active points for primitives is enabled.
-</li></ul>
-
-<div align="center"><img src="udav/udav_help.png" alt="Main window - help panel">
-</div>
-<p>Short command description and list of its arguments are shown at the status-bar, when you move cursor to the new line of code. You can press <tt class="key">F1</tt> to see more detailed help on special panel.
-</p>
-<div align="center"><img src="udav/udav_data.png" alt="Main window - data viewing">
-</div>
-<p>Also you can look the current list of variables, its dimensions and its size in the memory (right side of above figure). Toolbuttons allow: create new variable, edit variable, delete variable, preview variable plot and its properties, refresh list of variables. Pressing on any column will sort table according its contents. Double click on a variable will open panel with data cells of the variable, where you can view/edit each cell independently or apply a set of transformations.
-</p>
-<div align="center"><img src="udav/udav_calc.png" alt="Main window - calculator and messages">
-</div>
-<p>Finally, pressing <tt class="key">F2</tt> or <tt class="key">F4</tt> you can show/hide windows with messages/warnings and with calculator. Double click on a warning in message window will jump to corresponding line in editor. Calculator allow you type expression by keyboard as well as by toolbuttons. It know about all current variables, so you can use them in formulas.
-</p>
-
-<hr>
-<a name="UDAV-dialogs"></a>
-<div class="header">
-<p>
-Next: <a href="#UDAV-hints" accesskey="n" rel="next">UDAV hints</a>, Previous: <a href="#UDAV-overview" accesskey="p" rel="prev">UDAV overview</a>, Up: <a href="#UDAV" accesskey="u" rel="up">UDAV</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="UDAV-dialogs-1"></a>
-<h3 class="section">8.2 UDAV dialogs</h3>
-
-
-<p>There are a set of dialogs, which allow change/add a command, setup global plot properties, or setup UDAV itself.
-</p>
-<div align="center"><img src="udav/udav_cmd.png" alt="New command dialog">
-</div>
-<p>One of most interesting dialog (hotkey <tt class="key">Meta-C</tt> or <tt class="key">Win-C</tt>) is dialog which help to enter new command or change arguments of existed one. It allows consequently select the category of command, command name in category and appropriate set of command arguments. At this right side show detailed command description. Required argument(s) are denoted by bold text. Strings are placed in apostrophes, like <code>'txt'</code>. Buttons below table allow to call dialogs for changing style of command (if argument <code>'fmt'</code> is present in the list of command arguments); to set variable or expression for argument(s); to add options for command. Note, you can click on a cell to enter value, or double-click to call corresponding dialog.
-</p>
-<div align="center"><img src="udav/udav_pen.png" alt="Style dialog - pen style">
-</div><div align="center"><img src="udav/udav_sch.png" alt="Style dialog - color scheme">
-</div><div align="center"><img src="udav/udav_txt.png" alt="Style dialog - text style">
-</div><div align="center"><img src="udav/udav_mask.png" alt="Style dialog - manual mask">
-</div>
-<p>Dialog for changing style can be called independently, but usually is called from <em>New command</em> dialog or by double click on primitive. It contain 3 tabs: one for pen style, one for color scheme, one for text style. You should select appropriate one. Resulting string of style and sample picture are shown at bottom of dialog. Usually it can be called from New command dialog.
-</p>
-<div align="center"><img src="udav/udav_var.png" alt="Variable dialog">
-</div>
-<p>Dialog for entering variable allow to select variable or expression which can be used as argument of a command. Here you can select the variable name; range of indexes in each directions; operation which will be applied (like, summation, finding minimal/maximal values and so on). Usually it can be called from New command dialog.
-</p>
-<div align="center"><img src="udav/udav_opt.png" alt="Dialog for options of a command">
-</div>
-<p>Dialog for command options allow to change <a href="#Command-options">Command options</a>. Usually it can be called from New command dialog.
-</p>
-
-
-<div align="center"><img src="udav/udav_inplot.png" alt="New inplot dialog">
-</div>
-<p>Another interesting dialog, which help to select and properly setup a <a href="#subplot">subplot</a>, <a href="#inplot">inplot</a>, <a href="#columnplot">columnplot</a>, <a href="#stickplot">stickplot</a> and similar commands.
-</p>
-
-<div align="center"><img src="udav/udav_gen_set.png" alt="Dialog for general properties">
-</div><div align="center"><img src="udav/udav_light.png" alt="Dialog for light properties">
-</div>
-<p>There is dialog for setting general plot properties, including tab for setting lighting properties. It can be called by called by hotkey <tt class="key">???</tt> and put setup commands at the beginning of MGL script.
-</p>
-<div align="center"><img src="udav/udav_arg.png" alt="Dialog for script parameters">
-</div>
-<p>Also you can set or change script parameters (‘<samp>$0</samp>’ ... ‘<samp>$9</samp>’, see <a href="#MGL-definition">MGL definition</a>).
-</p>
-<div align="center"><img src="udav/udav_prop.png" alt="Dialog for UDAV settings">
-</div>
-<p>Finally, there is dialog for UDAV settings. It allow to change most of things in UDAV appearance and working, including colors of keywords and numbers, default font and image size, and so on (see figure above).
-</p>
-<p>There are also a set of dialogs for data handling, but they are too simple and clear. So, I will not put them here.
-</p>
-
-<hr>
-<a name="UDAV-hints"></a>
-<div class="header">
-<p>
-Previous: <a href="#UDAV-dialogs" accesskey="p" rel="prev">UDAV dialogs</a>, Up: <a href="#UDAV" accesskey="u" rel="up">UDAV</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="UDAV-hints-1"></a>
-<h3 class="section">8.3 UDAV hints</h3>
-
-
-<ul>
-<li> You can shift axis range by pressing middle button and moving mouse. Also, you can zoom in/out axis range by using mouse wheel.
-</li><li> You can rotate/shift/zoom whole plot by mouse. Just press ’Rotate’ toolbutton, click image and hold a mouse button: left button for rotation, right button for zoom/perspective, middle button for shift.
-</li><li> You may quickly draw the data from file. Just use: udav ’filename.dat’ in command line.
-</li><li> You can copy the current image to clipboard by pressing <tt class="key">Ctrl-Shift-C</tt>. Later you can paste it directly into yours document or presentation.
-</li><li> You can export image into a set of format (EPS, SVG, PNG, JPEG) by pressing right mouse button inside image and selecting ’Export as ...’.
-</li><li> You can setup colors for script highlighting in Property dialog. Just select menu item ’Settings/Properties’.
-</li><li> You can save the parameter of animation inside MGL script by using comment started from ’##a ’ or ’##c ’ for loops.
-</li><li> New drawing never clears things drawn already. For example, you can make a surface with contour lines by calling commands ’surf’ and ’cont’ one after another (in any order).
-</li><li> You can put several plots in the same image by help of commands ’subplot’ or ’inplot’.
-</li><li> All indexes (of data arrays, subplots and so on) are always start from 0.
-</li><li> You can edit MGL file in any text editor. Also you can run it in console by help of commands: <code>mglconv</code>, <code>mglview</code>.
-</li><li> You can use command ’once on|off’ for marking the block which should be executed only once. For example, this can be the block of large data reading/creating/handling. Press <tt class="key">F9</tt> (or menu item ’Graphics/Reload’) to re-execute this block.
-</li><li> You can use command ’stop’ for terminating script parsing. It is useful if you don’t want to execute a part of script.
-</li><li> You can type arbitrary expression as input argument for data or number. In last case (for numbers), the first value of data array is used.
-</li><li> There is powerful calculator with a lot of special functions. You can use buttons or keyboard to type the expression. Also you can use existed variables in the expression.
-</li><li> The calculator can help you to put complex expression in the script. Just type the expression (which may depend on coordinates x,y,z and so on) and put it into the script.
-</li><li> You can easily insert file or folder names, last fitted formula or numerical value of selection by using menu Edit|Insert.
-</li><li> The special dialog (Edit|Insert|New Command) help you select the command, fill its arguments and put it into the script.
-</li><li> You can put several plotting commands in the same line or in separate function, for highlighting all of them simultaneously.
-</li></ul>
-
-
-
-<hr>
-<a name="Other-classes"></a>
-<div class="header">
-<p>
-Next: <a href="#All-samples" accesskey="n" rel="next">All samples</a>, Previous: <a href="#UDAV" accesskey="p" rel="prev">UDAV</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Other-classes-1"></a>
-<h2 class="chapter">9 Other classes</h2>
-
-
-<p>There are few end-user classes: <code>mglGraph</code> (see <a href="#MathGL-core">MathGL core</a>), <code>mglWindow</code> and <code>mglGLUT</code> (see <a href="#Widget-classes">Widget classes</a>), <code>mglData</code> (see <a href="#Data-processing">Data processing</a>), <code>mglParse</code> (see <a href="#MGL-scripts">MGL scripts</a>). Exactly these classes I recommend to use in most of user programs. All methods in all of these classes are inline and have exact C/Fortran analogue functions. This give compiler independent binary libraries for MathGL.
-</p>
-<p>However, sometimes you may need to extend MathGL by writing yours own plotting functions or handling yours own data structures. In these cases you may need to use low-level API. This chapter describes it.
-</p>
-<div align="center"><img src="classes.png" alt="Class diagram for MathGL">
-</div>
-<p>The internal structure of MathGL is rather complicated. There are C++ classes <code>mglBase</code>, <code>mglCanvas</code>, ... for drawing primitives and positioning the plot (blue ones in the figure). There is a layer of C functions, which include interface for most important methods of these classes. Also most of plotting functions are implemented as C functions. After it, there are “inline” front-end classes which are created for user convenience (yellow ones in the figure). Also there are widgets for FLTK and Qt libraries (green ones in the figure).
-</p>
-<p>Below I show how this internal classes can be used.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#mglBase-class" accesskey="1">mglBase class</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mglDataA-class" accesskey="2">mglDataA class</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mglColor-class" accesskey="3">mglColor class</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mglPoint-class" accesskey="4">mglPoint class</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-
-<hr>
-<a name="mglBase-class"></a>
-<div class="header">
-<p>
-Next: <a href="#mglDataA-class" accesskey="n" rel="next">mglDataA class</a>, Up: <a href="#Other-classes" accesskey="u" rel="up">Other classes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Define-new-kind-of-plot-_0028mglBase-class_0029"></a>
-<h3 class="section">9.1 Define new kind of plot (mglBase class)</h3>
-
-
-<p>Basically most of new kinds of plot can be created using just MathGL primitives (see <a href="#Primitives">Primitives</a>). However the usage of <code>mglBase</code> methods can give you higher speed of drawing and better control of plot settings.
-</p>
-<p>All plotting functions should use a pointer to <code>mglBase</code> class (or <code>HMGL</code> type in C functions) due to compatibility issues. Exactly such type of pointers are used in front-end classes (<code>mglGraph, mglWindow</code>) and in widgets (<code>QMathGL, Fl_MathGL</code>).
-</p>
-<p>MathGL tries to remember all vertexes and all primitives and plot creation stage, and to use them for making final picture by demand. Basically for making plot, you need to add vertexes by <code>AddPnt()</code> function, which return index for new vertex, and call one of primitive drawing function (like <code>mark_plot(), arrow_plot(), line_plot(), trig_plot(), quad_plot(), text_plot()</code>), using vertex indexes as argument(s). <code>AddPnt()</code> function use 2 mreal numbers for color specification. First one is positioning in textures – integer part is texture index, fractional part is relative coordinate in the texture. Second number is like a transparency of plot (or second coordinate in the 2D texture).
-</p>
-<p>I don’t want to put here detailed description of <code>mglBase</code> class. It was rather well documented in <code>mgl2/base.h</code> file. I just show and example of its usage on the base of circle drawing.
-</p>
-<p>First, we should prototype new function <code>circle()</code> as C function.
-</p><pre class="verbatim">#ifdef __cplusplus
-extern "C" {
-#endif
-void circle(HMGL gr, mreal x, mreal y, mreal z, mreal r, const char *stl, const char *opt);
-#ifdef __cplusplus
-}
-#endif
-</pre><p>This is done for generating compiler independent binary. Because only C-functions have standard naming mechanism, the same for any compilers.
-</p>
-<p>Now, we create a C++ file and put the code of function. I’ll write it line by line and try to comment all important points.
-</p><pre class="verbatim">void circle(HMGL gr, mreal x, mreal y, mreal z, mreal r, const char *stl, const char *opt)
-{
-</pre><p>First, we need to check all input arguments and send warnings if something is wrong. In our case it is negative value of <var>r</var> argument. We just send warning, since it is not critical situation – other plot still can be drawn.
-</p><pre class="verbatim"> if(r<=0) { gr->SetWarn(mglWarnNeg,"Circle"); return; }
-</pre><p>Next step is creating a group. Group keep some general setting for plot (like options) and useful for export in 3d files.
-</p><pre class="verbatim"> static int cgid=1; gr->StartGroup("Circle",cgid++);
-</pre><p>Now let apply options. Options are rather useful things, generally, which allow one easily redefine axis range(s), transparency and other settings (see <a href="#Command-options">Command options</a>).
-</p><pre class="verbatim"> gr->SaveState(opt);
-</pre><p>I use global setting for determining the number of points in circle approximation. Note, that user can change <code>MeshNum</code> by options easily.
-</p><pre class="verbatim"> const int n = gr->MeshNum>1?gr->MeshNum : 41;
-</pre><p>Let try to determine plot specific flags. MathGL functions expect that most of flags will be sent in string. In our case it is symbol ‘<samp>@</samp>’ which set to draw filled circle instead of border only (last will be default). Note, you have to handle <code>NULL</code> as string pointer.
-</p><pre class="verbatim"> bool fill = mglchr(stl,'@');
-</pre><p>Now, time for coloring. I use palette mechanism because circle have few colors: one for filling and another for border. <code>SetPenPal()</code> function parse input string and write resulting texture index in <var>pal</var>. Function return the character for marker, which can be specified in string <var>str</var>. Marker will be plotted at the center of circle. I’ll show on next sample how you can use color schemes (smooth colors) too.
-</p><pre class="verbatim"> long pal=0;
- char mk=gr->SetPenPal(stl,&pal);
-</pre><p>Next step, is determining colors for filling and for border. First one for filling.
-</p><pre class="verbatim"> mreal c=gr->NextColor(pal), d;
-</pre><p>Second one for border. I use black color (call <code>gr->AddTexture('k')</code>) if second color is not specified.
-</p><pre class="verbatim"> mreal k=(gr->GetNumPal(pal)>1)?gr->NextColor(pal):gr->AddTexture('k');
-</pre><p>If user want draw only border (<code>fill=false</code>) then I use first color for border.
-</p><pre class="verbatim"> if(!fill) k=c;
-</pre><p>Now we should reserve space for vertexes. This functions need <code>n</code> for border, <code>n+1</code> for filling and <code>1</code> for marker. So, maximal number of vertexes is <code>2*n+2</code>. Note, that such reservation is not required for normal work but can sufficiently speed up the plotting.
-</p><pre class="verbatim"> gr->Reserve(2*n+2);
-</pre><p>We’ve done with setup and ready to start drawing. First, we need to add vertex(es). Let define NAN as normals, since I don’t want handle lighting for this plot,
-</p><pre class="verbatim"> mglPoint q(NAN,NAN);
-</pre><p>and start adding vertexes. First one for central point of filling. I use <code>-1</code> if I don’t need this point. The arguments of <code>AddPnt()</code> function is: <code>mglPoint(x,y,z)</code> – coordinate of vertex, <code>c</code> – vertex color, <code>q</code> – normal at vertex, <code>-1</code> – vertex transparency (<code>-1</code> for default), <code>3</code> bitwise flag which show that coordinates will be scaled (<code>0x1</code>) and will not be cutted (<code>0x2</code>).
-</p><pre class="verbatim"> long n0,n1,n2,m1,m2,i;
- n0 = fill ? gr->AddPnt(mglPoint(x,y,z),c,q,-1,3):-1;
-</pre><p>Similar for marker, but we use different color <var>k</var>.
-</p><pre class="verbatim"> n2 = mk ? gr->AddPnt(mglPoint(x,y,z),k,q,-1,3):-1;
-</pre><p>Draw marker.
-</p><pre class="verbatim"> if(mk) gr->mark_plot(n2,mk);
-</pre><p>Time for drawing circle itself. I use <code>-1</code> for <var>m1</var>, <var>n1</var> as sign that primitives shouldn’t be drawn for first point <code>i=0</code>.
-</p><pre class="verbatim"> for(i=0,m1=n1=-1;i<n;i++)
- {
-</pre><p>Each function should check <code>Stop</code> variable and return if it is non-zero. It is done for interrupting drawing for system which don’t support multi-threading.
-</p><pre class="verbatim"> if(gr->Stop) return;
-</pre><p>Let find coordinates of vertex.
-</p><pre class="verbatim"> mreal t = i*2*M_PI/(n-1.);
- mglPoint p(x+r*cos(t), y+r*sin(t), z);
-</pre><p>Save previous vertex and add next one
-</p><pre class="verbatim"> n2 = n1; n1 = gr->AddPnt(p,c,q,-1,3);
-</pre><p>and copy it for border but with different color. Such copying is much faster than adding new vertex using <code>AddPnt()</code>.
-</p><pre class="verbatim"> m2 = m1; m1 = gr->CopyNtoC(n1,k);
-</pre><p>Now draw triangle for filling internal part
-</p><pre class="verbatim"> if(fill) gr->trig_plot(n0,n1,n2);
-</pre><p>and draw line for border.
-</p><pre class="verbatim"> gr->line_plot(m1,m2);
- }
-</pre><p>Drawing is done. Let close group and return.
-</p><pre class="verbatim"> gr->EndGroup();
-}
-</pre>
-<p>Another sample I want to show is exactly the same function but with smooth coloring using color scheme. So, I’ll add comments only in the place of difference.
-</p>
-<pre class="verbatim">void circle_cs(HMGL gr, mreal x, mreal y, mreal z, mreal r, const char *stl, const char *opt)
-{
-</pre><p>In this case let allow negative radius too. Formally it is not the problem for plotting (formulas the same) and this allow us to handle all color range.
-</p><pre class="verbatim">//if(r<=0) { gr->SetWarn(mglWarnNeg,"Circle"); return; }
-
- static int cgid=1; gr->StartGroup("CircleCS",cgid++);
- gr->SaveState(opt);
- const int n = gr->MeshNum>1?gr->MeshNum : 41;
- bool fill = mglchr(stl,'@');
-</pre><p>Here is main difference. We need to create texture for color scheme specified by user
-</p><pre class="verbatim"> long ss = gr->AddTexture(stl);
-</pre><p>But we need also get marker and color for it (if filling is enabled). Let suppose that marker and color is specified after ‘<samp>:</samp>’. This is standard delimiter which stop color scheme entering. So, just lets find it and use for setting pen.
-</p><pre class="verbatim"> const char *pen=0;
- if(stl) pen = strchr(stl,':');
- if(pen) pen++;
-</pre><p>The substring is placed in <var>pen</var> and it will be used as line style.
-</p><pre class="verbatim"> long pal=0;
- char mk=gr->SetPenPal(pen,&pal);
-</pre><p>Next step, is determining colors for filling and for border. First one for filling.
-</p><pre class="verbatim"> mreal c=gr->GetC(ss,r);
-</pre><p>Second one for border.
-</p><pre class="verbatim"> mreal k=gr->NextColor(pal);
-</pre><p>The rest part is the same as in previous function.
-</p><pre class="verbatim"> if(!fill) k=c;
-
- gr->Reserve(2*n+2);
- mglPoint q(NAN,NAN);
- long n0,n1,n2,m1,m2,i;
- n0 = fill ? gr->AddPnt(mglPoint(x,y,z),c,q,-1,3):-1;
- n2 = mk ? gr->AddPnt(mglPoint(x,y,z),k,q,-1,3):-1;
- if(mk) gr->mark_plot(n2,mk);
- for(i=0,m1=n1=-1;i<n;i++)
- {
- if(gr->Stop) return;
- mreal t = i*2*M_PI/(n-1.);
- mglPoint p(x+r*cos(t), y+r*sin(t), z);
- n2 = n1; n1 = gr->AddPnt(p,c,q,-1,3);
- m2 = m1; m1 = gr->CopyNtoC(n1,k);
- if(fill) gr->trig_plot(n0,n1,n2);
- gr->line_plot(m1,m2);
- }
- gr->EndGroup();
-}
-</pre>
-<p>The last thing which we can do is derive our own class with new plotting functions. Good idea is to derive it from <code>mglGraph</code> (if you don’t need extended window), or from <code>mglWindow</code> (if you need to extend window). So, in our case it will be
-</p><pre class="verbatim">class MyGraph : public mglGraph
-{
-public:
- inline void Circle(mglPoint p, mreal r, const char *stl="", const char *opt="")
- { circle(p.x,p.y,p.z, r, stl, opt); }
- inline void CircleCS(mglPoint p, mreal r, const char *stl="", const char *opt="")
- { circle_cs(p.x,p.y,p.z, r, stl, opt); }
-};
-</pre><p>Note, that I use <code>inline</code> modifier for using the same binary code with different compilers.
-</p>
-<p>So, the complete sample will be
-</p><pre class="verbatim">#include <mgl2/mgl.h>
-//---------------------------------------------------------
-#ifdef __cplusplus
-extern "C" {
-#endif
-void circle(HMGL gr, mreal x, mreal y, mreal z, mreal r, const char *stl, const char *opt);
-void circle_cs(HMGL gr, mreal x, mreal y, mreal z, mreal r, const char *stl, const char *opt);
-#ifdef __cplusplus
-}
-#endif
-//---------------------------------------------------------
-class MyGraph : public mglGraph
-{
-public:
- inline void CircleCF(mglPoint p, mreal r, const char *stl="", const char *opt="")
- { circle(p.x,p.y,p.z, r, stl, opt); }
- inline void CircleCS(mglPoint p, mreal r, const char *stl="", const char *opt="")
- { circle_cs(p.x,p.y,p.z, r, stl, opt); }
-};
-//---------------------------------------------------------
-void circle(HMGL gr, mreal x, mreal y, mreal z, mreal r, const char *stl, const char *opt)
-{
- if(r<=0) { gr->SetWarn(mglWarnNeg,"Circle"); return; }
- static int cgid=1; gr->StartGroup("Circle",cgid++);
- gr->SaveState(opt);
- const int n = gr->MeshNum>1?gr->MeshNum : 41;
- bool fill = mglchr(stl,'@');
- long pal=0;
- char mk=gr->SetPenPal(stl,&pal);
- mreal c=gr->NextColor(pal), d;
- mreal k=(gr->GetNumPal(pal)>1)?gr->NextColor(pal):gr->AddTexture('k');
- if(!fill) k=c;
- gr->Reserve(2*n+2);
- mglPoint q(NAN,NAN);
- long n0,n1,n2,m1,m2,i;
- n0 = fill ? gr->AddPnt(mglPoint(x,y,z),c,q,-1,3):-1;
- n2 = mk ? gr->AddPnt(mglPoint(x,y,z),k,q,-1,3):-1;
- if(mk) gr->mark_plot(n2,mk);
- for(i=0,m1=n1=-1;i<n;i++)
- {
- if(gr->Stop) return;
- mreal t = i*2*M_PI/(n-1.);
- mglPoint p(x+r*cos(t), y+r*sin(t), z);
- n2 = n1; n1 = gr->AddPnt(p,c,q,-1,3);
- m2 = m1; m1 = gr->CopyNtoC(n1,k);
- if(fill) gr->trig_plot(n0,n1,n2);
- gr->line_plot(m1,m2);
- }
- gr->EndGroup();
-}
-//---------------------------------------------------------
-void circle_cs(HMGL gr, mreal x, mreal y, mreal z, mreal r, const char *stl, const char *opt)
-{
- static int cgid=1; gr->StartGroup("CircleCS",cgid++);
- gr->SaveState(opt);
- const int n = gr->MeshNum>1?gr->MeshNum : 41;
- bool fill = mglchr(stl,'@');
- long ss = gr->AddTexture(stl);
- const char *pen=0;
- if(stl) pen = strchr(stl,':');
- if(pen) pen++;
- long pal=0;
- char mk=gr->SetPenPal(pen,&pal);
- mreal c=gr->GetC(ss,r);
- mreal k=gr->NextColor(pal);
- if(!fill) k=c;
-
- gr->Reserve(2*n+2);
- mglPoint q(NAN,NAN);
- long n0,n1,n2,m1,m2,i;
- n0 = fill ? gr->AddPnt(mglPoint(x,y,z),c,q,-1,3):-1;
- n2 = mk ? gr->AddPnt(mglPoint(x,y,z),k,q,-1,3):-1;
- if(mk) gr->mark_plot(n2,mk);
- for(i=0,m1=n1=-1;i<n;i++)
- {
- if(gr->Stop) return;
- mreal t = i*2*M_PI/(n-1.);
- mglPoint p(x+r*cos(t), y+r*sin(t), z);
- n2 = n1; n1 = gr->AddPnt(p,c,q,-1,3);
- m2 = m1; m1 = gr->CopyNtoC(n1,k);
- if(fill) gr->trig_plot(n0,n1,n2);
- gr->line_plot(m1,m2);
- }
- gr->EndGroup();
-}
-//---------------------------------------------------------
-int main()
-{
- MyGraph gr;
- gr.Box();
- // first let draw circles with fixed colors
- for(int i=0;i<10;i++)
- gr.CircleCF(mglPoint(2*mgl_rnd()-1, 2*mgl_rnd()-1), mgl_rnd());
- // now let draw circles with color scheme
- for(int i=0;i<10;i++)
- gr.CircleCS(mglPoint(2*mgl_rnd()-1, 2*mgl_rnd()-1), 2*mgl_rnd()-1);
-}
-</pre>
-
-
-
-
-<hr>
-<a name="mglDataA-class"></a>
-<div class="header">
-<p>
-Next: <a href="#mglColor-class" accesskey="n" rel="next">mglColor class</a>, Previous: <a href="#mglBase-class" accesskey="p" rel="prev">mglBase class</a>, Up: <a href="#Other-classes" accesskey="u" rel="up">Other classes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="User-defined-types-_0028mglDataA-class_0029"></a>
-<h3 class="section">9.2 User defined types (mglDataA class)</h3>
-
-
-<p><code>mglData</code> class have abstract predecessor class <code>mglDataA</code>. Exactly the pointers to <code>mglDataA</code> instances are used in all plotting functions and some of data processing functions. This was done for taking possibility to define yours own class, which will handle yours own data (for example, complex numbers, or differently organized data). And this new class will be almost the same as <code>mglData</code> for plotting purposes.
-</p>
-<p>However, the most of data processing functions will be slower as if you used <code>mglData</code> instance. This is more or less understandable – I don’t know how data in yours particular class will be organized, and couldn’t optimize the these functions generally.
-</p>
-<p>There are few virtual functions which must be provided in derived classes. This functions give:
-</p><ul>
-<li> the sizes of the data (<code>GetNx</code>, <code>GetNy</code>, <code>GetNz</code>),
-</li><li> give data value and numerical derivatives for selected cell (<code>v</code>, <code>dvx</code>, <code>dvy</code>, <code>dvz</code>),
-</li><li> give maximal and minimal values (<code>Maximal</code>, <code>Minimal</code>) – you can use provided functions (like <code>mgl_data_max</code> and <code>mgl_data_min</code>), but yours own realization can be more efficient,
-</li><li> give access to all element as in single array (<code>vthr</code>) – you need this only if you want using MathGL’s data processing functions.
-</li></ul>
-
-<p>Let me, for example define class <code>mglComplex</code> which will handle complex number and draw its amplitude or phase, depending on flag <var>use_abs</var>:
-</p><pre class="verbatim">#include <complex>
-#include <mgl2/mgl.h>
-#define dual std::complex<double>
-class mglComplex : public mglDataA
-{
-public:
- long nx; ///< number of points in 1st dimensions ('x' dimension)
- long ny; ///< number of points in 2nd dimensions ('y' dimension)
- long nz; ///< number of points in 3d dimensions ('z' dimension)
- dual *a; ///< data array
- bool use_abs; ///< flag to use abs() or arg()
-
- inline mglComplex(long xx=1,long yy=1,long zz=1)
- { a=0; use_abs=true; Create(xx,yy,zz); }
- virtual ~mglComplex() { if(a) delete []a; }
-
- /// Get sizes
- inline long GetNx() const { return nx; }
- inline long GetNy() const { return ny; }
- inline long GetNz() const { return nz; }
- /// Create or recreate the array with specified size and fill it by zero
- inline void Create(long mx,long my=1,long mz=1)
- { nx=mx; ny=my; nz=mz; if(a) delete []a;
- a = new dual[nx*ny*nz]; }
- /// Get maximal value of the data
- inline mreal Maximal() const { return mgl_data_max(this); }
- /// Get minimal value of the data
- inline mreal Minimal() const { return mgl_data_min(this); }
-
-protected:
- inline mreal v(long i,long j=0,long k=0) const
- { return use_abs ? abs(a[i+nx*(j+ny*k)]) : arg(a[i+nx*(j+ny*k)]); }
- inline mreal vthr(long i) const
- { return use_abs ? abs(a[i]) : arg(a[i]); }
- inline mreal dvx(long i,long j=0,long k=0) const
- { long i0=i+nx*(j+ny*k);
- std::complex<double> res=i>0? (i<nx-1? (a[i0+1]-a[i0-1])/2.:a[i0]-a[i0-1]) : a[i0+1]-a[i0];
- return use_abs? abs(res) : arg(res); }
- inline mreal dvy(long i,long j=0,long k=0) const
- { long i0=i+nx*(j+ny*k);
- std::complex<double> res=j>0? (j<ny-1? (a[i0+nx]-a[i0-nx])/2.:a[i0]-a[i0-nx]) : a[i0+nx]-a[i0];
- return use_abs? abs(res) : arg(res); }
- inline mreal dvz(long i,long j=0,long k=0) const
- { long i0=i+nx*(j+ny*k), n=nx*ny;
- std::complex<double> res=k>0? (k<nz-1? (a[i0+n]-a[i0-n])/2.:a[i0]-a[i0-n]) : a[i0+n]-a[i0];
- return use_abs? abs(res) : arg(res); }
-};
-int main()
-{
- mglComplex dat(20);
- for(long i=0;i<20;i++)
- dat.a[i] = 3*exp(-0.05*(i-10)*(i-10))*dual(cos(M_PI*i*0.3), sin(M_PI*i*0.3));
- mglGraph gr;
- gr.SetRange('y', -M_PI, M_PI); gr.Box();
-
- gr.Plot(dat,"r","legend 'abs'");
- dat.use_abs=false;
- gr.Plot(dat,"b","legend 'arg'");
- gr.Legend();
- gr.WritePNG("complex.png");
- return 0;
-}
-</pre>
-
-
-<hr>
-<a name="mglColor-class"></a>
-<div class="header">
-<p>
-Next: <a href="#mglPoint-class" accesskey="n" rel="next">mglPoint class</a>, Previous: <a href="#mglDataA-class" accesskey="p" rel="prev">mglDataA class</a>, Up: <a href="#Other-classes" accesskey="u" rel="up">Other classes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="mglColor-class-1"></a>
-<h3 class="section">9.3 mglColor class</h3>
-
-<a name="index-mglColor"></a>
-
-<p>Structure for working with colors. This structure is defined in <code>#include <mgl2/type.h></code>.
-</p>
-<p>There are two ways to set the color in MathGL. First one is using of mreal values of red, green and blue channels for precise color definition. The second way is the using of character id. There are a set of characters specifying frequently used colors. Normally capital letter gives more dark color than lowercase one. See <a href="#Line-styles">Line styles</a>.
-</p>
-<dl>
-<dt><a name="index-r_002c-g_002c-b_002c-a-of-mglColor"></a>Parameter of mglColor: <em><code>mreal</code></em> <strong>r, g, b, a</strong></dt>
-<dd><p>Reg, green and blue component of color.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mglColor-on-mglColor"></a>Method on mglColor: <em><code></code></em> <strong>mglColor</strong> <em>(<code>mreal</code> R, <code>mreal</code> G, <code>mreal</code> B, <code>mreal</code> A=<code>1</code>)</em></dt>
-<dd><p>Constructor sets the color by mreal values of Red, Green, Blue and Alpha channels. These values should be in interval [0,1].
-</p></dd></dl>
-<dl>
-<dt><a name="index-mglColor-on-mglColor-1"></a>Method on mglColor: <em><code></code></em> <strong>mglColor</strong> <em>(<code>char</code> c=<code>'k'</code>, <code>mreal</code> bright=<code>1</code>)</em></dt>
-<dd><p>Constructor sets the color from character id. The black color is used by default. Parameter <var>br</var> set additional “lightness” of color.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Set-on-mglColor"></a>Method on mglColor: <em><code>void</code></em> <strong>Set</strong> <em>(<code>mreal</code> R, <code>mreal</code> G, <code>mreal</code> B, <code>mreal</code> A=<code>1</code>)</em></dt>
-<dd><p>Sets color from values of Red, Green, Blue and Alpha channels. These values should be in interval [0,1].
-</p></dd></dl>
-<dl>
-<dt><a name="index-Set-on-mglColor-1"></a>Method on mglColor: <em><code>void</code></em> <strong>Set</strong> <em>(<code>mglColor</code> c, <code>mreal</code> bright=<code>1</code>)</em></dt>
-<dd><p>Sets color as “lighted” version of color <var>c</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Set-on-mglColor-2"></a>Method on mglColor: <em><code>void</code></em> <strong>Set</strong> <em>(<code>char</code> p, <code>mreal</code> bright=<code>1</code>)</em></dt>
-<dd><p>Sets color from symbolic id.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Valid-on-mglColor"></a>Method on mglColor: <em><code>bool</code></em> <strong>Valid</strong> <em>()</em></dt>
-<dd><p>Checks correctness of the color.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Norm-on-mglColor"></a>Method on mglColor: <em><code>mreal</code></em> <strong>Norm</strong> <em>()</em></dt>
-<dd><p>Gets maximal of spectral component.
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_003d_003d-on-mglColor"></a>Method on mglColor: <em><code>bool</code></em> <strong>operator==</strong> <em>(<code>const mglColor &</code>c)</em></dt>
-<dt><a name="index-operator_0021_003d-on-mglColor"></a>Method on mglColor: <em><code>bool</code></em> <strong>operator!=</strong> <em>(<code>const mglColor &</code>c)</em></dt>
-<dd><p>Compare with another color
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_002a_003d-on-mglColor"></a>Method on mglColor: <em><code>bool</code></em> <strong>operator*=</strong> <em>(<code>mreal</code> v)</em></dt>
-<dd><p>Multiplies color components by number <var>v</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_002b_003d-on-mglColor"></a>Method on mglColor: <em><code>bool</code></em> <strong>operator+=</strong> <em>(<code>const mglColor &</code>c)</em></dt>
-<dd><p>Adds color <var>c</var> component by component.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_002d_003d-on-mglColor"></a>Method on mglColor: <em><code>bool</code></em> <strong>operator-=</strong> <em>(<code>const mglColor &</code>c)</em></dt>
-<dd><p>Subtracts color <var>c</var> component by component.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-operator_002b-3"></a>Library Function: <em>mglColor</em> <strong>operator+</strong> <em>(<code>const mglColor &</code>a, <code>const mglColor &</code>b)</em></dt>
-<dd><p>Adds colors by its RGB values.
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_002d-3"></a>Library Function: <em><code>mglColor</code></em> <strong>operator-</strong> <em>(<code>const mglColor &</code>a, <code>const mglColor &</code>b)</em></dt>
-<dd><p>Subtracts colors by its RGB values.
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_002a-3"></a>Library Function: <em><code>mglColor</code></em> <strong>operator*</strong> <em>(<code>const mglColor &</code>a, <code>mreal</code> b)</em></dt>
-<dt><a name="index-operator_002a-4"></a>Library Function: <em><code>mglColor</code></em> <strong>operator*</strong> <em>(<code>mreal</code> a, <code>const mglColor &</code>b)</em></dt>
-<dd><p>Multiplies color by number.
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_002f-2"></a>Library Function: <em><code>mglColor</code></em> <strong>operator/</strong> <em>(<code>const mglColor &</code>a, <code>mreal</code> b)</em></dt>
-<dd><p>Divide color by number.
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_0021"></a>Library Function: <em><code>mglColor</code></em> <strong>operator!</strong> <em>(<code>const mglColor &</code>a)</em></dt>
-<dd><p>Return inverted color.
-</p></dd></dl>
-
-
-<hr>
-<a name="mglPoint-class"></a>
-<div class="header">
-<p>
-Previous: <a href="#mglColor-class" accesskey="p" rel="prev">mglColor class</a>, Up: <a href="#Other-classes" accesskey="u" rel="up">Other classes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="mglPoint-class-1"></a>
-<h3 class="section">9.4 mglPoint class</h3>
-
-<a name="index-mglPoint"></a>
-
-<p>Structure describes point in space. This structure is defined in <code>#include <mgl2/type.h></code>
-</p>
-<dl>
-<dt><a name="index-x_002c-y_002c-z_002c-c-of-mglPoint"></a>Parameter of mglPoint: <em><code>mreal</code></em> <strong>x, y, z, c</strong></dt>
-<dd><p>Point coordinates {x,y,z} and one extra value <var>c</var> used for amplitude, transparency and so on. By default all values are zero.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mglPoint-on-mglPoint"></a>Method on mglPoint: <em><code></code></em> <strong>mglPoint</strong> <em>(<code>mreal</code> X=<code>0</code>, <code>mreal</code> Y=<code>0</code>, <code>mreal</code> Z=<code>0</code>, <code>mreal</code> C=<code>0</code>)</em></dt>
-<dd><p>Constructor sets the color by mreal values of Red, Green, Blue and Alpha channels. These values should be in interval [0,1].
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-IsNAN-on-mglPoint"></a>Method on mglPoint: <em><code>bool</code></em> <strong>IsNAN</strong> <em>()</em></dt>
-<dd><p>Returns <code>true</code> if point contain NAN values.
-</p></dd></dl>
-<dl>
-<dt><a name="index-norm-on-mglPoint"></a>Method on mglPoint: <em><code>mreal</code></em> <strong>norm</strong> <em>()</em></dt>
-<dd><p>Returns the norm <em>\sqrt{x^2+y^2+z^2}</em> of vector.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Normalize-on-mglPoint"></a>Method on mglPoint: <em><code>void</code></em> <strong>Normalize</strong> <em>()</em></dt>
-<dd><p>Normalizes vector to be unit vector.
-</p></dd></dl>
-<dl>
-<dt><a name="index-val-on-mglPoint"></a>Method on mglPoint: <em><code>mreal</code></em> <strong>val</strong> <em>(<code>int</code> i)</em></dt>
-<dd><p>Returns point component: <var>x</var> for <var>i</var>=0, <var>y</var> for <var>i</var>=1, <var>z</var> for <var>i</var>=2, <var>c</var> for <var>i</var>=3.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-operator_002b-4"></a>Library Function: <em><code>mglPoint</code></em> <strong>operator+</strong> <em>(<code>const mglPoint &</code>a, <code>const mglPoint &</code>b)</em></dt>
-<dd><p>Point of summation (summation of vectors).
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_002d-4"></a>Library Function: <em><code>mglPoint</code></em> <strong>operator-</strong> <em>(<code>const mglPoint &</code>a, <code>const mglPoint &</code>b)</em></dt>
-<dd><p>Point of difference (difference of vectors).
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_002a-5"></a>Library Function: <em><code>mglPoint</code></em> <strong>operator*</strong> <em>(<code>mreal</code> a, <code>const mglPoint &</code>b)</em></dt>
-<dt><a name="index-operator_002a-6"></a>Library Function: <em><code>mglPoint</code></em> <strong>operator*</strong> <em>(<code>const mglPoint &</code>a, <code>mreal</code> b)</em></dt>
-<dd><p>Multiplies (scale) points by number.
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_002f-3"></a>Library Function: <em><code>mglPoint</code></em> <strong>operator/</strong> <em>(<code>const mglPoint &</code>a, <code>mreal</code> b)</em></dt>
-<dd><p>Multiplies (scale) points by number 1/b.
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_002a-7"></a>Library Function: <em><code>mreal</code></em> <strong>operator*</strong> <em>(<code>const mglPoint &</code>a, <code>const mglPoint &</code>b)</em></dt>
-<dd><p>Scalar product of vectors.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_002f-4"></a>Library Function: <em><code>mglPoint</code></em> <strong>operator/</strong> <em>(<code>const mglPoint &</code>a, <code>const mglPoint &</code>b)</em></dt>
-<dd><p>Return vector of element-by-element product.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_005e"></a>Library Function: <em><code>mglPoint</code></em> <strong>operator^</strong> <em>(<code>const mglPoint &</code>a, <code>const mglPoint &</code>b)</em></dt>
-<dd><p>Cross-product of vectors.
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_0026"></a>Library Function: <em><code>mglPoint</code></em> <strong>operator&</strong> <em>(<code>const mglPoint &</code>a, <code>const mglPoint &</code>b)</em></dt>
-<dd><p>The part of <var>a</var> which is perpendicular to vector <var>b</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_007c"></a>Library Function: <em><code>mglPoint</code></em> <strong>operator|</strong> <em>(<code>const mglPoint &</code>a, <code>const mglPoint &</code>b)</em></dt>
-<dd><p>The part of <var>a</var> which is parallel to vector <var>b</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_0021-1"></a>Library Function: <em><code>mglPoint</code></em> <strong>operator!</strong> <em>(<code>const mglPoint &</code>a)</em></dt>
-<dd><p>Return vector perpendicular to vector <var>a</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-mgl_005fnorm"></a>Library Function: <em><code>mreal</code></em> <strong>mgl_norm</strong> <em>(<code>const mglPoint &</code>a)</em></dt>
-<dd><p>Return the norm sqrt(|<var>a</var>|^2) of vector <var>a</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_003d_003d"></a>Library Function: <em><code>bool</code></em> <strong>operator==</strong> <em>(<code>const mglPoint &</code>a, <code>const mglPoint &</code>b)</em></dt>
-<dd><p>Return true if points are the same.
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_0021_003d"></a>Library Function: <em><code>bool</code></em> <strong>operator!=</strong> <em>(<code>const mglPoint &</code>a, <code>const mglPoint &</code>b)</em></dt>
-<dd><p>Return true if points are different.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="All-samples"></a>
-<div class="header">
-<p>
-Next: <a href="#Symbols-and-hot_002dkeys" accesskey="n" rel="next">Symbols and hot-keys</a>, Previous: <a href="#Other-classes" accesskey="p" rel="prev">Other classes</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="All-samples-1"></a>
-<h2 class="chapter">10 All samples</h2>
-
-
-<p>This chapter contain alphabetical list of MGL and C++ samples for most of MathGL graphics and features.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#initialization-sample" accesskey="1">initialization sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#g_t3wave-sample" accesskey="2">3wave sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#alpha-sample" accesskey="3">alpha sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#apde-sample" accesskey="4">apde sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#area-sample" accesskey="5">area sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#aspect-sample" accesskey="6">aspect sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#axial-sample" accesskey="7">axial sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#axis-sample" accesskey="8">axis sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#barh-sample" accesskey="9">barh sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#bars-sample">bars sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#belt-sample">belt sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#bifurcation-sample">bifurcation sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#box-sample">box sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#boxplot-sample">boxplot sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#boxs-sample">boxs sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#candle-sample">candle sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#chart-sample">chart sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cloud-sample">cloud sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#colorbar-sample">colorbar sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#combined-sample">combined sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cones-sample">cones sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cont-sample">cont sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cont3-sample">cont3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cont_005fxyz-sample">cont_xyz sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#contd-sample">contd sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#contf-sample">contf sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#contf3-sample">contf3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#contf_005fxyz-sample">contf_xyz sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#contv-sample">contv sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#correl-sample">correl sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#curvcoor-sample">curvcoor sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cut-sample">cut sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dat_005fdiff-sample">dat_diff sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dat_005fextra-sample">dat_extra sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#data1-sample">data1 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#data2-sample">data2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dens-sample">dens sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dens3-sample">dens3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dens_005fxyz-sample">dens_xyz sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#detect-sample">detect sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dew-sample">dew sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#diffract-sample">diffract sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dilate-sample">dilate sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dots-sample">dots sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#earth-sample">earth sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#error-sample">error sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#error2-sample">error2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#export-sample">export sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#fall-sample">fall sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#fexport-sample">fexport sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#fit-sample">fit sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#flame2d-sample">flame2d sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#flow-sample">flow sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#flow3-sample">flow3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#fog-sample">fog sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#fonts-sample">fonts sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#grad-sample">grad sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#hist-sample">hist sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ifs2d-sample">ifs2d sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ifs3d-sample">ifs3d sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#indirect-sample">indirect sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#inplot-sample">inplot sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#iris-sample">iris sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#label-sample">label sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#lamerey-sample">lamerey sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#legend-sample">legend sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#light-sample">light sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#loglog-sample">loglog sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#map-sample">map sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mark-sample">mark sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mask-sample">mask sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mesh-sample">mesh sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mirror-sample">mirror sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#molecule-sample">molecule sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ode-sample">ode sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ohlc-sample">ohlc sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#param1-sample">param1 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#param2-sample">param2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#param3-sample">param3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#paramv-sample">paramv sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#parser-sample">parser sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#pde-sample">pde sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#pendelta-sample">pendelta sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#pipe-sample">pipe sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#plot-sample">plot sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#pmap-sample">pmap sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#primitives-sample">primitives sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#projection-sample">projection sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#projection5-sample">projection5 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#pulse-sample">pulse sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#qo2d-sample">qo2d sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality0-sample">quality0 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality1-sample">quality1 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality2-sample">quality2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality4-sample">quality4 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality5-sample">quality5 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality6-sample">quality6 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality8-sample">quality8 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#radar-sample">radar sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#refill-sample">refill sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#region-sample">region sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#scanfile-sample">scanfile sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#schemes-sample">schemes sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#section-sample">section sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#several_005flight-sample">several_light sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#solve-sample">solve sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#stem-sample">stem sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#step-sample">step sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#stereo-sample">stereo sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#stfa-sample">stfa sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#style-sample">style sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surf-sample">surf sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surf3-sample">surf3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surf3a-sample">surf3a sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surf3c-sample">surf3c sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surf3ca-sample">surf3ca sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surfa-sample">surfa sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surfc-sample">surfc sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surfca-sample">surfca sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#table-sample">table sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#tape-sample">tape sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#tens-sample">tens sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ternary-sample">ternary sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#text-sample">text sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#text2-sample">text2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#textmark-sample">textmark sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ticks-sample">ticks sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#tile-sample">tile sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#tiles-sample">tiles sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#torus-sample">torus sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#traj-sample">traj sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#triangulation-sample">triangulation sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#triplot-sample">triplot sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#tube-sample">tube sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#type0-sample">type0 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#type1-sample">type1 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#type2-sample">type2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#vect-sample">vect sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#vect3-sample">vect3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#venn-sample">venn sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-<hr>
-<a name="initialization-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#g_t3wave-sample" accesskey="n" rel="next">3wave sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Functions-for-initialization"></a>
-<h3 class="section">10.1 Functions for initialization</h3>
-
-
-<p>This section contain functions for input data for most of further samples.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">
-func 'prepare1d'
-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 x1 50 'x'
-new x2 50 '0.05-0.03*cos(pi*x)'
-new y1 50 '0.5-0.3*cos(pi*x)'
-new y2 50 '-0.3*sin(pi*x)'
-return
-
-func 'prepare2d'
-new a 50 40 '0.6*sin(pi*(x+1))*sin(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-new b 50 40 '0.6*cos(pi*(x+1))*cos(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-return
-
-func 'prepare3d'
-new c 61 50 40 '-2*(x^2+y^2+z^4-z^2)+0.2'
-new d 61 50 40 '1-2*tanh((x+y)*(x+y))'
-return
-
-func 'prepare2v'
-new a 20 30 '0.6*sin(pi*(x+1))*sin(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-new b 20 30 '0.6*cos(pi*(x+1))*cos(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-return
-
-func 'prepare3v'
-define $1 pow(x*x+y*y+(z-0.3)*(z-0.3)+0.03,1.5)
-define $2 pow(x*x+y*y+(z+0.3)*(z+0.3)+0.03,1.5)
-new ex 10 10 10 '0.2*x/$1-0.2*x/$2'
-new ey 10 10 10 '0.2*y/$1-0.2*y/$2'
-new ez 10 10 10 '0.2*(z-0.3)/$1-0.2*(z+0.3)/$2'
-return
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void mgls_prepare1d(mglData *y, mglData *y1, mglData *y2, mglData *x1, mglData *x2)\r
-{\r
- long n=50;\r
- if(y) y->Create(n,3);\r
- if(x1) x1->Create(n);\r
- if(x2) x2->Create(n);\r
- if(y1) y1->Create(n);\r
- if(y2) y2->Create(n);\r
- for(long i=0;i<n;i++)\r
- {\r
- double xx = i/(n-1.);\r
- if(y)\r
- {\r
- y->a[i] = 0.7*sin(2*M_PI*xx) + 0.5*cos(3*M_PI*xx) + 0.2*sin(M_PI*xx);\r
- y->a[i+n] = sin(2*M_PI*xx);\r
- y->a[i+2*n] = cos(2*M_PI*xx);\r
- }\r
- if(y1) y1->a[i] = 0.5+0.3*cos(2*M_PI*xx);\r
- if(y2) y2->a[i] = 0.3*sin(2*M_PI*xx);\r
- if(x1) x1->a[i] = xx*2-1;\r
- if(x2) x2->a[i] = 0.05+0.03*cos(2*M_PI*xx);\r
- }\r
-}\r
-//-----------------------------------------------------------------------------\r
-void mgls_prepare2d(mglData *a, mglData *b, mglData *v)\r
-{\r
- long n=50,m=40;\r
- if(a) a->Create(n,m);\r
- if(b) b->Create(n,m);\r
- if(v) { v->Create(9); v->Fill(-1,1); }\r
- for(long j=0;j<m;j++) for(long i=0;i<n;i++)\r
- {\r
- double x = i/(n-1.), y = j/(m-1.);\r
- long i0 = i+n*j;\r
- if(a) a->a[i0] = 0.6*sin(2*M_PI*x)*sin(3*M_PI*y)+0.4*cos(3*M_PI*x*y);\r
- if(b) b->a[i0] = 0.6*cos(2*M_PI*x)*cos(3*M_PI*y)+0.4*cos(3*M_PI*x*y);\r
- }\r
-}\r
-//-----------------------------------------------------------------------------\r
-void mgls_prepare3d(mglData *a, mglData *b)\r
-{\r
- long n=61,m=50,l=40;\r
- if(a) a->Create(n,m,l);\r
- if(b) b->Create(n,m,l);\r
- for(long k=0;k<l;k++) for(long j=0;j<m;j++) for(long i=0;i<n;i++)\r
- {\r
- double x=2*i/(n-1.)-1, y=2*j/(m-1.)-1, z=2*k/(l-1.)-1;\r
- long i0 = i+n*(j+m*k);\r
- if(a) a->a[i0] = -2*(x*x + y*y + z*z*z*z - z*z - 0.1);\r
- if(b) b->a[i0] = 1-2*tanh((x+y)*(x+y));\r
- }\r
-}\r
-//-----------------------------------------------------------------------------\r
-void mgls_prepare2v(mglData *a, mglData *b)\r
-{\r
- long n=20,m=30;\r
- if(a) a->Create(n,m);\r
- if(b) b->Create(n,m);\r
- for(long j=0;j<m;j++) for(long i=0;i<n;i++)\r
- {\r
- double x=i/(n-1.), y=j/(m-1.);\r
- long i0 = i+n*j;\r
- if(a) a->a[i0] = 0.6*sin(2*M_PI*x)*sin(3*M_PI*y)+0.4*cos(3*M_PI*x*y);\r
- if(b) b->a[i0] = 0.6*cos(2*M_PI*x)*cos(3*M_PI*y)+0.4*cos(3*M_PI*x*y);\r
- }\r
-}\r
-//-----------------------------------------------------------------------------\r
-void mgls_prepare3v(mglData *ex, mglData *ey, mglData *ez)\r
-{\r
- long n=10;\r
- double z0=0.3;\r
- if(!ex || !ey || !ez) return;\r
- ex->Create(n,n,n); ey->Create(n,n,n); ez->Create(n,n,n);\r
- for(long k=0;k<n;k++) for(long j=0;j<n;j++) for(long i=0;i<n;i++)\r
- {\r
- double x=2*i/(n-1.)-1, y=2*j/(n-1.)-1, z=2*k/(n-1.)-1;\r
- long i0 = i+n*(j+k*n);\r
- double r1 = pow(x*x+y*y+(z-z0)*(z-z0)+0.03,1.5);\r
- double r2 = pow(x*x+y*y+(z+z0)*(z+z0)+0.03,1.5);\r
- ex->a[i0]=0.2*x/r1 - 0.2*x/r2;\r
- ey->a[i0]=0.2*y/r1 - 0.2*y/r2;\r
- ez->a[i0]=0.2*(z-z0)/r1 - 0.2*(z+z0)/r2;\r
- }\r
-}\r
-//-----------------------------------------------------------------------------\r
-
-</pre>
-
-<hr>
-<a name="g_t3wave-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#alpha-sample" accesskey="n" rel="next">alpha sample</a>, Previous: <a href="#initialization-sample" accesskey="p" rel="prev">initialization sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-3wave"></a>
-<h3 class="section">10.2 Sample ‘<samp>3wave</samp>’</h3>
-
-
-<p>Example of complex <a href="#ode">ode</a> on basis of 3-wave decay.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">define t 50
-ode !r '-b*f;a*conj(f);a*conj(b)-0.1*f' 'abf' [1,1e-3,0] 0.1 t
-ranges 0 t 0 r.max
-plot r(0) 'b';legend 'a'
-plot r(1) 'g';legend 'b'
-plot r(2) 'r';legend 'f'
-axis:box:legend
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_3wave(mglGraph *gr)
-{
- gr->SubPlot(1,1,0,"<_");
- if(big!=3) gr->Title("Complex ODE sample");
- double t=50;
- mglData ini; ini.SetList(3, 1., 1e-3, 0.);
- mglDataC r(mglODEc("-b*f;a*conj(f);a*conj(b)-0.1*f","abf",ini,0.1,t));
- gr->SetRanges(0, t, 0, r.Maximal());
- gr->Plot(r.SubData(0),"b","legend 'a'");
- gr->Plot(r.SubData(1),"g","legend 'b'");
- gr->Plot(r.SubData(2),"r","legend 'f'");
- gr->Axis(); gr->Box(); gr->Legend();
-}
-</pre><div align="center"><img src="png/3wave.png" alt="Sample 3wave">
-</div>
-<hr>
-<a name="alpha-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#apde-sample" accesskey="n" rel="next">apde sample</a>, Previous: <a href="#g_t3wave-sample" accesskey="p" rel="prev">3wave sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-alpha"></a>
-<h3 class="section">10.3 Sample ‘<samp>alpha</samp>’</h3>
-
-
-<p>Example of <a href="#light">light</a> and <a href="#alpha">alpha</a> (transparency).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-subplot 2 2 0:title 'default':rotate 50 60:box
-surf a
-subplot 2 2 1:title 'light on':rotate 50 60:box
-light on:surf a
-subplot 2 2 3:title 'light on; alpha on':rotate 50 60:box
-alpha on:surf a
-subplot 2 2 2:title 'alpha on':rotate 50 60:box
-light off:surf a
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_alpha(mglGraph *gr) // alpha and lighting
-{
- mglData a; mgls_prepare2d(&a);
- gr->SubPlot(2,2,0); gr->Title("default"); gr->Rotate(50,60);
- gr->Box(); gr->Surf(a);
- gr->SubPlot(2,2,1); gr->Title("light on"); gr->Rotate(50,60);
- gr->Box(); gr->Light(true); gr->Surf(a);
- gr->SubPlot(2,2,3); gr->Title("alpha on; light on"); gr->Rotate(50,60);
- gr->Box(); gr->Alpha(true); gr->Surf(a);
- gr->SubPlot(2,2,2); gr->Title("alpha on"); gr->Rotate(50,60);
- gr->Box(); gr->Light(false); gr->Surf(a);
-}
-</pre><div align="center"><img src="png/alpha.png" alt="Sample alpha">
-</div>
-<hr>
-<a name="apde-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#area-sample" accesskey="n" rel="next">area sample</a>, Previous: <a href="#alpha-sample" accesskey="p" rel="prev">alpha sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-apde"></a>
-<h3 class="section">10.4 Sample ‘<samp>apde</samp>’</h3>
-
-
-<p>Comparison of advanced PDE solver (<a href="#apde">apde</a>) and ordinary one (<a href="#pde">pde</a>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">ranges -1 1 0 2 0 2
-new ar 256 'exp(-2*(x+0.0)^2)'
-new ai 256
-
-apde res1 'exp(-x^2-p^2)' ar ai 0.01:transpose res1
-pde res2 'exp(-x^2-p^2)' ar ai 0.01
-
-subplot 1 2 0 '_':title 'Advanced PDE solver'
-ranges 0 2 -1 1:crange res1
-dens res1:box
-axis:xlabel '\i z':ylabel '\i x'
-text -0.5 0.2 'i\partial_z\i u = exp(-\i x^2+\partial_x^2)[\i u]' 'y'
-
-subplot 1 2 1 '_':title 'Simplified PDE solver'
-dens res2:box
-axis:xlabel '\i z':ylabel '\i x'
-text -0.5 0.2 'i\partial_z\i u \approx\ exp(-\i x^2)\i u+exp(\partial_x^2)[\i u]' 'y'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_apde(mglGraph *gr)
-{
- gr->SetRanges(-1,1,0,2,0,2);
- mglData ar(256), ai(256); gr->Fill(ar,"exp(-2*(x+0.0)^2)");
-
- mglData res1(gr->APDE("exp(-x^2-p^2)",ar,ai,0.01)); res1.Transpose();
- mglData res2(gr->PDE("exp(-x^2-p^2)",ar,ai,0.01));
-
- gr->SubPlot(1,2,0,"_"); gr->Title("Advanced PDE solver");
- gr->SetRanges(0,2,-1,1); gr->SetRange('c',res1);
- gr->Dens(res1); gr->Axis(); gr->Box();
- gr->Label('x',"\\i z"); gr->Label('y',"\\i x");
- gr->Puts(mglPoint(-0.5,0.2),"i\\partial_z\\i u = exp(-\\i x^2+\\partial_x^2)[\\i u]","y");
-
- gr->SubPlot(1,2,1,"_"); gr->Title("Simplified PDE solver");
- gr->Dens(res2); gr->Axis(); gr->Box();
- gr->Label('x',"\\i z"); gr->Label('y',"\\i x");
- gr->Puts(mglPoint(-0.5,0.2),"i\\partial_z\\i u \\approx\\ exp(-\\i x^2)\\i u+exp(\\partial_x^2)[\\i u]","y");
-}
-</pre><div align="center"><img src="png/apde.png" alt="Sample apde">
-</div>
-<hr>
-<a name="area-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#aspect-sample" accesskey="n" rel="next">aspect sample</a>, Previous: <a href="#apde-sample" accesskey="p" rel="prev">apde sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-area"></a>
-<h3 class="section">10.5 Sample ‘<samp>area</samp>’</h3>
-
-
-<p>Function <a href="#area">area</a> fill the area between curve and axis plane. It support gradient filling if 2 colors per curve is specified.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-origin 0 0 0
-subplot 2 2 0 '':title 'Area plot (default)':box:area y
-subplot 2 2 1 '':title '2 colors':box:area y 'cbgGyr'
-subplot 2 2 2 '':title '"!" style':box:area y '!'
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 2 2 3:title '3d variant':rotate 50 60:box
-area xc yc z 'r'
-area xc -yc z 'b#'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_area(mglGraph *gr)
-{
- mglData y; mgls_prepare1d(&y); gr->SetOrigin(0,0,0);
- if(big!=3) { gr->SubPlot(2,2,0,""); gr->Title("Area plot (default)"); }
- gr->Box(); gr->Area(y);
- if(big==3) return;
- gr->SubPlot(2,2,1,""); gr->Title("2 colors"); gr->Box(); gr->Area(y,"cbgGyr");
- gr->SubPlot(2,2,2,""); gr->Title("'!' style"); gr->Box(); gr->Area(y,"!");
- gr->SubPlot(2,2,3); gr->Title("3d variant"); gr->Rotate(50,60); gr->Box();
- mglData yc(30), xc(30), z(30); z.Modify("2*x-1");
- yc.Modify("sin(pi*(2*x-1))"); xc.Modify("cos(pi*2*x-pi)");
- gr->Area(xc,yc,z,"r");
- yc.Modify("-sin(pi*(2*x-1))"); gr->Area(xc,yc,z,"b#");
-}
-</pre><div align="center"><img src="png/area.png" alt="Sample area">
-</div>
-<hr>
-<a name="aspect-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#axial-sample" accesskey="n" rel="next">axial sample</a>, Previous: <a href="#area-sample" accesskey="p" rel="prev">area sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-aspect"></a>
-<h3 class="section">10.6 Sample ‘<samp>aspect</samp>’</h3>
-
-
-<p>Example of <a href="#subplot">subplot</a>, <a href="#inplot">inplot</a>, <a href="#rotate">rotate</a>, <a href="#aspect">aspect</a>, <a href="#shear">shear</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0:box:text -1 1.1 'Just box' ':L'
-inplot 0.2 0.5 0.7 1 off:box:text 0 1.2 'InPlot example'
-subplot 2 2 1:title 'Rotate only':rotate 50 60:box
-subplot 2 2 2:title 'Rotate and Aspect':rotate 50 60:aspect 1 1 2:box
-subplot 2 2 3:title 'Shear':box 'c':shear 0.2 0.1:box
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_aspect(mglGraph *gr) // transformation
-{
- gr->SubPlot(2,2,0); gr->Box();
- gr->Puts(mglPoint(-1,1.1),"Just box",":L");
- gr->InPlot(0.2,0.5,0.7,1,false); gr->Box();
- gr->Puts(mglPoint(0,1.2),"InPlot example");
- gr->SubPlot(2,2,1); gr->Title("Rotate only");
- gr->Rotate(50,60); gr->Box();
- gr->SubPlot(2,2,2); gr->Title("Rotate and Aspect");
- gr->Rotate(50,60); gr->Aspect(1,1,2); gr->Box();
- gr->SubPlot(2,2,3); gr->Title("Shear");
- gr->Box("c"); gr->Shear(0.2,0.1); gr->Box();
-}
-</pre><div align="center"><img src="png/aspect.png" alt="Sample aspect">
-</div>
-<hr>
-<a name="axial-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#axis-sample" accesskey="n" rel="next">axis sample</a>, Previous: <a href="#aspect-sample" accesskey="p" rel="prev">aspect sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-axial"></a>
-<h3 class="section">10.7 Sample ‘<samp>axial</samp>’</h3>
-
-
-<p>Function <a href="#axial">axial</a> draw surfaces of rotation for contour lines. You can draw wire surfaces (‘<samp>#</samp>’ style) or ones rotated in other directions (‘<samp>x</samp>’, ‘<samp>z</samp>’ styles).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-subplot 2 2 0:title 'Axial plot (default)':light on:alpha on:rotate 50 60:box:axial a
-subplot 2 2 1:title '"x" style;"." style':light on:rotate 50 60:box:axial a 'x.'
-subplot 2 2 2:title '"z" style':light on:rotate 50 60:box:axial a 'z'
-subplot 2 2 3:title '"\#" style':light on:rotate 50 60:box:axial a '#'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_axial(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("Axial plot (default)"); }
- gr->Light(true); gr->Alpha(true); gr->Rotate(50,60); gr->Box(); gr->Axial(a);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("'x' style; '.'style"); gr->Rotate(50,60); gr->Box(); gr->Axial(a,"x.");
- gr->SubPlot(2,2,2); gr->Title("'z' style"); gr->Rotate(50,60); gr->Box(); gr->Axial(a,"z");
- gr->SubPlot(2,2,3); gr->Title("'\\#' style"); gr->Rotate(50,60); gr->Box(); gr->Axial(a,"#");
-}
-</pre><div align="center"><img src="png/axial.png" alt="Sample axial">
-</div>
-<hr>
-<a name="axis-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#barh-sample" accesskey="n" rel="next">barh sample</a>, Previous: <a href="#axial-sample" accesskey="p" rel="prev">axial sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-axis"></a>
-<h3 class="section">10.8 Sample ‘<samp>axis</samp>’</h3>
-
-
-<p>Different forms of <a href="#axis">axis</a> position.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0:title 'Axis origin, Grid':origin 0 0:axis:grid:fplot 'x^3'
-subplot 2 2 1:title '2 axis':ranges -1 1 -1 1:origin -1 -1:axis:ylabel 'axis_1':fplot 'sin(pi*x)' 'r2'
-ranges 0 1 0 1:origin 1 1:axis:ylabel 'axis_2':fplot 'cos(pi*x)'
-subplot 2 2 3:title 'More axis':origin nan nan:xrange -1 1:axis:xlabel 'x' 0:ylabel 'y_1' 0:fplot 'x^2' 'k'
-yrange -1 1:origin -1.3 -1:axis 'y' 'r':ylabel '#r{y_2}' 0.2:fplot 'x^3' 'r'
-
-subplot 2 2 2:title '4 segments, inverted axis':origin 0 0:
-inplot 0.5 1 0.5 1 on:ranges 0 10 0 2:axis
-fplot 'sqrt(x/2)':xlabel 'W' 1:ylabel 'U' 1
-inplot 0 0.5 0.5 1 on:ranges 1 0 0 2:axis 'x':fplot 'sqrt(x)+x^3':xlabel '\tau' 1
-inplot 0.5 1 0 0.5 on:ranges 0 10 4 0:axis 'y':fplot 'x/4':ylabel 'L' -1
-inplot 0 0.5 0 0.5 on:ranges 1 0 4 0:fplot '4*x^2'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_axis(mglGraph *gr)
-{
- gr->SubPlot(2,2,0); gr->Title("Axis origin, Grid"); gr->SetOrigin(0,0);
- gr->Axis(); gr->Grid(); gr->FPlot("x^3");
-
- gr->SubPlot(2,2,1); gr->Title("2 axis");
- gr->SetRanges(-1,1,-1,1); gr->SetOrigin(-1,-1,-1); // first axis
- gr->Axis(); gr->Label('y',"axis 1",0); gr->FPlot("sin(pi*x)","r2");
- gr->SetRanges(0,1,0,1); gr->SetOrigin(1,1,1); // second axis
- gr->Axis(); gr->Label('y',"axis 2",0); gr->FPlot("cos(pi*x)");
-
- gr->SubPlot(2,2,3); gr->Title("More axis"); gr->SetOrigin(NAN,NAN); gr->SetRange('x',-1,1);
- gr->Axis(); gr->Label('x',"x",0); gr->Label('y',"y_1",0); gr->FPlot("x^2","k");
- gr->SetRanges(-1,1,-1,1); gr->SetOrigin(-1.3,-1); // second axis
- gr->Axis("y","r"); gr->Label('y',"#r{y_2}",0.2); gr->FPlot("x^3","r");
-
- gr->SubPlot(2,2,2); gr->Title("4 segments, inverted axis"); gr->SetOrigin(0,0);
- gr->InPlot(0.5,1,0.5,1); gr->SetRanges(0,10,0,2); gr->Axis();
- gr->FPlot("sqrt(x/2)"); gr->Label('x',"W",1); gr->Label('y',"U",1);
- gr->InPlot(0,0.5,0.5,1); gr->SetRanges(1,0,0,2); gr->Axis("x");
- gr->FPlot("sqrt(x)+x^3"); gr->Label('x',"\\tau",-1);
- gr->InPlot(0.5,1,0,0.5); gr->SetRanges(0,10,4,0); gr->Axis("y");
- gr->FPlot("x/4"); gr->Label('y',"L",-1);
- gr->InPlot(0,0.5,0,0.5); gr->SetRanges(1,0,4,0); gr->FPlot("4*x^2");
-}
-</pre><div align="center"><img src="png/axis.png" alt="Sample axis">
-</div>
-<hr>
-<a name="barh-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#bars-sample" accesskey="n" rel="next">bars sample</a>, Previous: <a href="#axis-sample" accesskey="p" rel="prev">axis sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-barh"></a>
-<h3 class="section">10.9 Sample ‘<samp>barh</samp>’</h3>
-
-
-<p>Function <a href="#barh">barh</a> is the similar to <a href="#bars">bars</a> but draw horizontal bars.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ys 10 3 '0.8*sin(pi*(x+y/4+1.25))+0.2*rnd':origin 0 0 0
-subplot 2 2 0 '':title 'Barh plot (default)':box:barh ys
-subplot 2 2 1 '':title '2 colors':box:barh ys 'cbgGyr'
-ranges -3 3 -1 1:subplot 2 2 2 '':title '"a" style':box:barh ys 'a'
-subplot 2 2 3 '': title '"f" style':box:barh ys 'f'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_barh(mglGraph *gr)
-{
- mglData ys(10,3); ys.Modify("0.8*sin(pi*(2*x+y/2))+0.2*rnd");
- gr->SetOrigin(0,0,0);
- if(big!=3) { gr->SubPlot(2,2,0,""); gr->Title("Barh plot (default)"); }
- gr->Box(); gr->Barh(ys);
- if(big==3) return;
- gr->SubPlot(2,2,1,""); gr->Title("2 colors"); gr->Box(); gr->Barh(ys,"cbgGyr");
- gr->SetRanges(-3,3,-1,1); // increase range since summation can exceed [-1,1]
- gr->SubPlot(2,2,2,""); gr->Title("'a' style"); gr->Box(); gr->Barh(ys,"a");
- gr->SubPlot(2,2,3,""); gr->Title("'f' style"); gr->Box(); gr->Barh(ys,"f");
-}
-</pre><div align="center"><img src="png/barh.png" alt="Sample barh">
-</div>
-<hr>
-<a name="bars-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#belt-sample" accesskey="n" rel="next">belt sample</a>, Previous: <a href="#barh-sample" accesskey="p" rel="prev">barh sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-bars"></a>
-<h3 class="section">10.10 Sample ‘<samp>bars</samp>’</h3>
-
-
-<p>Function <a href="#bars">bars</a> draw vertical bars. It have a lot of options: bar-above-bar (‘<samp>a</samp>’ style), fall like (‘<samp>f</samp>’ style), 2 colors for positive and negative values, wired bars (‘<samp>#</samp>’ style), 3D variant.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ys 10 3 '0.8*sin(pi*(x+y/4+1.25))+0.2*rnd':origin 0 0 0
-subplot 3 2 0 '':title 'Bars plot (default)':box:bars ys
-subplot 3 2 1 '':title '2 colors':box:bars ys 'cbgGyr'
-subplot 3 2 4 '':title '"\#" style':box:bars ys '#'
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 3 2 5:title '3d variant':rotate 50 60:box:bars xc yc z 'r'
-ranges -1 1 -3 3:subplot 3 2 2 '':title '"a" style':box:bars ys 'a'
-subplot 3 2 3 '':title '"f" style':box:bars ys 'f'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_bars(mglGraph *gr)
-{
- mglData ys(10,3); ys.Modify("0.8*sin(pi*(2*x+y/2))+0.2*rnd");
- gr->SetOrigin(0,0,0);
- if(big!=3) { gr->SubPlot(3,2,0,""); gr->Title("Bars plot (default)"); }
- gr->Box(); gr->Bars(ys);
- if(big==3) return;
- gr->SubPlot(3,2,1,""); gr->Title("2 colors"); gr->Box(); gr->Bars(ys,"cbgGyr");
- gr->SubPlot(3,2,4,""); gr->Title("'\\#' style"); gr->Box(); gr->Bars(ys,"#");
- gr->SubPlot(3,2,5); gr->Title("3d variant"); gr->Rotate(50,60); gr->Box();
- mglData yc(30), xc(30), z(30); z.Modify("2*x-1");
- yc.Modify("sin(pi*(2*x-1))"); xc.Modify("cos(pi*2*x-pi)");
- gr->Bars(xc,yc,z,"r");
- gr->SetRanges(-1,1,-3,3); // increase range since summation can exceed [-1,1]
- gr->SubPlot(3,2,2,""); gr->Title("'a' style"); gr->Box(); gr->Bars(ys,"a");
- gr->SubPlot(3,2,3,""); gr->Title("'f' style"); gr->Box(); gr->Bars(ys,"f");
-}
-</pre><div align="center"><img src="png/bars.png" alt="Sample bars">
-</div>
-<hr>
-<a name="belt-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#bifurcation-sample" accesskey="n" rel="next">bifurcation sample</a>, Previous: <a href="#bars-sample" accesskey="p" rel="prev">bars sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-belt"></a>
-<h3 class="section">10.11 Sample ‘<samp>belt</samp>’</h3>
-
-
-<p>Function <a href="#belt">belt</a> draw surface by belts. You can use ‘<samp>x</samp>’ style for drawing lines in other direction.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Belt plot':rotate 50 60:box:belt a
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_belt(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- if(big!=3) gr->Title("Belt plot");
- gr->Rotate(50,60); gr->Box(); gr->Belt(a);
-}
-</pre><div align="center"><img src="png/belt.png" alt="Sample belt">
-</div>
-<hr>
-<a name="bifurcation-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#box-sample" accesskey="n" rel="next">box sample</a>, Previous: <a href="#belt-sample" accesskey="p" rel="prev">belt sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-bifurcation"></a>
-<h3 class="section">10.12 Sample ‘<samp>bifurcation</samp>’</h3>
-
-
-<p>Function <a href="#bifurcation">bifurcation</a> draw Bifurcation diagram for multiple stationary points of the map (like logistic map).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Bifurcation sample'
-ranges 0 4 0 1:axis
-bifurcation 0.005 'x*y*(1-y)' 'r'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_bifurcation(mglGraph *gr)
-{
- gr->SubPlot(1,1,0,"<_");
- if(big!=3) gr->Title("Bifurcation sample");
- gr->SetRanges(0,4,0,1); gr->Axis();
- gr->Bifurcation(0.005,"x*y*(1-y)","r");
-}
-</pre><div align="center"><img src="png/bifurcation.png" alt="Sample bifurcation">
-</div>
-<hr>
-<a name="box-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#boxplot-sample" accesskey="n" rel="next">boxplot sample</a>, Previous: <a href="#bifurcation-sample" accesskey="p" rel="prev">bifurcation sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-box"></a>
-<h3 class="section">10.13 Sample ‘<samp>box</samp>’</h3>
-
-
-<p>Different styles of bounding <a href="#box">box</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0:title 'Box (default)':rotate 50 60:box
-subplot 2 2 1:title 'colored':rotate 50 60:box 'r'
-subplot 2 2 2:title 'with faces':rotate 50 60:box '@'
-subplot 2 2 3:title 'both':rotate 50 60:box '@cm'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_boxplot(mglGraph *gr) // flow threads and density plot
-{
- mglData a(10,7); a.Modify("(2*rnd-1)^3/2");
- if(big!=3) { gr->SubPlot(1,1,0,""); gr->Title("Boxplot plot"); }
- gr->Box(); gr->BoxPlot(a);
-}
-</pre><div align="center"><img src="png/box.png" alt="Sample box">
-</div>
-<hr>
-<a name="boxplot-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#boxs-sample" accesskey="n" rel="next">boxs sample</a>, Previous: <a href="#box-sample" accesskey="p" rel="prev">box sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-boxplot"></a>
-<h3 class="section">10.14 Sample ‘<samp>boxplot</samp>’</h3>
-
-
-<p>Function <a href="#boxplot">boxplot</a> draw box-and-whisker diagram.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 10 7 '(2*rnd-1)^3/2'
-subplot 1 1 0 '':title 'Boxplot plot':box:boxplot a
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_boxplot(mglGraph *gr) // flow threads and density plot
-{
- mglData a(10,7); a.Modify("(2*rnd-1)^3/2");
- if(big!=3) { gr->SubPlot(1,1,0,""); gr->Title("Boxplot plot"); }
- gr->Box(); gr->BoxPlot(a);
-}
-</pre><div align="center"><img src="png/boxplot.png" alt="Sample boxplot">
-</div>
-<hr>
-<a name="boxs-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#candle-sample" accesskey="n" rel="next">candle sample</a>, Previous: <a href="#boxplot-sample" accesskey="p" rel="prev">boxplot sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-boxs"></a>
-<h3 class="section">10.15 Sample ‘<samp>boxs</samp>’</h3>
-
-
-<p>Function <a href="#boxs">boxs</a> draw surface by boxes. You can use ‘<samp>#</samp>’ for drawing wire plot.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-origin 0 0 0
-subplot 2 2 0:title 'Boxs plot (default)':rotate 40 60:light on:box:boxs a
-subplot 2 2 1:title '"\@" style':rotate 50 60:box:boxs a '@'
-subplot 2 2 2:title '"\#" style':rotate 50 60:box:boxs a '#'
-subplot 2 2 3:title 'compare with Tile':rotate 50 60:box:tile a
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_boxs(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- gr->SetOrigin(0,0,0); gr->Light(true);
- if(big!=3) {gr->SubPlot(2,2,0); gr->Title("Boxs plot (default)");}
- gr->Rotate(40,60); gr->Box(); gr->Boxs(a);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("'\\@' style");
- gr->Rotate(50,60); gr->Box(); gr->Boxs(a,"@");
- gr->SubPlot(2,2,2); gr->Title("'\\#' style");
- gr->Rotate(50,60); gr->Box(); gr->Boxs(a,"#");
- gr->SubPlot(2,2,3); gr->Title("compare with Tile");
- gr->Rotate(50,60); gr->Box(); gr->Tile(a);
-}
-</pre><div align="center"><img src="png/boxs.png" alt="Sample boxs">
-</div>
-<hr>
-<a name="candle-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#chart-sample" accesskey="n" rel="next">chart sample</a>, Previous: <a href="#boxs-sample" accesskey="p" rel="prev">boxs sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-candle"></a>
-<h3 class="section">10.16 Sample ‘<samp>candle</samp>’</h3>
-
-
-<p>Function <a href="#candle">candle</a> draw candlestick chart. This is a combination of a line-chart and a bar-chart, in that each bar represents the range of price movement over a given time interval.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new y 30 'sin(pi*x/2)^2'
-subplot 1 1 0 '':title 'Candle plot (default)'
-yrange 0 1:box
-candle y y/2 (y+1)/2
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_candle(mglGraph *gr)
-{
- mglData y(30); gr->Fill(y,"sin(pi*x/2)^2");
- mglData y1(30); gr->Fill(y1,"v/2",y);
- mglData y2(30); gr->Fill(y2,"(1+v)/2",y);
- if(big!=3) { gr->SubPlot(1,1,0,""); gr->Title("Candle plot (default)"); }
- gr->SetRange('y',0,1); gr->Box(); gr->Candle(y,y1,y2);
-}
-</pre><div align="center"><img src="png/candle.png" alt="Sample candle">
-</div>
-<hr>
-<a name="chart-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cloud-sample" accesskey="n" rel="next">cloud sample</a>, Previous: <a href="#candle-sample" accesskey="p" rel="prev">candle sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-chart"></a>
-<h3 class="section">10.17 Sample ‘<samp>chart</samp>’</h3>
-
-
-<p>Function <a href="#chart">chart</a> draw colored boxes with width proportional to data values. Use ‘<samp> </samp>’ for empty box. It produce well known pie chart if drawn in polar coordinates.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ch 7 2 'rnd+0.1':light on
-subplot 2 2 0:title 'Chart plot (default)':rotate 50 60:box:chart ch
-subplot 2 2 1:title '"\#" style':rotate 50 60:box:chart ch '#'
-subplot 2 2 2:title 'Pie chart; " " color':rotate 50 60:
-axis '(y+1)/2*cos(pi*x)' '(y+1)/2*sin(pi*x)' '':box:chart ch 'bgr cmy#'
-subplot 2 2 3:title 'Ring chart; " " color':rotate 50 60:
-axis '(y+2)/3*cos(pi*x)' '(y+2)/3*sin(pi*x)' '':box:chart ch 'bgr cmy#'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_chart(mglGraph *gr)
-{
- mglData ch(7,2); for(int i=0;i<7*2;i++) ch.a[i]=mgl_rnd()+0.1;
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("Chart plot (default)"); }
- gr->Light(true); gr->Rotate(50,60); gr->Box(); gr->Chart(ch);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("'\\#' style");
- gr->Rotate(50,60); gr->Box(); gr->Chart(ch,"#");
- gr->SubPlot(2,2,2); gr->Title("Pie chart; ' ' color");
- gr->SetFunc("(y+1)/2*cos(pi*x)","(y+1)/2*sin(pi*x)","");
- gr->Rotate(50,60); gr->Box(); gr->Chart(ch,"bgr cmy#");
- gr->SubPlot(2,2,3); gr->Title("Ring chart; ' ' color");
- gr->SetFunc("(y+2)/3*cos(pi*x)","(y+2)/3*sin(pi*x)","");
- gr->Rotate(50,60); gr->Box(); gr->Chart(ch,"bgr cmy#");
-}
-</pre><div align="center"><img src="png/chart.png" alt="Sample chart">
-</div>
-<hr>
-<a name="cloud-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#colorbar-sample" accesskey="n" rel="next">colorbar sample</a>, Previous: <a href="#chart-sample" accesskey="p" rel="prev">chart sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cloud"></a>
-<h3 class="section">10.18 Sample ‘<samp>cloud</samp>’</h3>
-
-
-<p>Function <a href="#cloud">cloud</a> draw cloud-like object which is less transparent for higher data values. Similar plot can be created using many (about 10...20 – <code>surf3a a a;value 10</code>) isosurfaces <a href="#surf3a">surf3a</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-subplot 2 2 0:title 'Cloud plot':rotate 50 60:alpha on:box:cloud c 'wyrRk'
-subplot 2 2 1:title '"i" style':rotate 50 60:box:cloud c 'iwyrRk'
-subplot 2 2 2:title '"." style':rotate 50 60:box:cloud c '.wyrRk'
-subplot 2 2 3:title 'meshnum 10':rotate 50 60:box:cloud c 'wyrRk'; meshnum 10
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_cloud(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("Cloud plot"); }
- gr->Rotate(50,60); gr->Alpha(true);
- gr->Box(); gr->Cloud(c,"wyrRk");
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("'i' style");
- gr->Rotate(50,60); gr->Box(); gr->Cloud(c,"iwyrRk");
- gr->SubPlot(2,2,2); gr->Title("'.' style");
- gr->Rotate(50,60); gr->Box(); gr->Cloud(c,".wyrRk");
- gr->SubPlot(2,2,3); gr->Title("meshnum 10");
- gr->Rotate(50,60); gr->Box(); gr->Cloud(c,"wyrRk","meshnum 10");
-}
-</pre><div align="center"><img src="png/cloud.png" alt="Sample cloud">
-</div>
-<hr>
-<a name="colorbar-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#combined-sample" accesskey="n" rel="next">combined sample</a>, Previous: <a href="#cloud-sample" accesskey="p" rel="prev">cloud sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-colorbar"></a>
-<h3 class="section">10.19 Sample ‘<samp>colorbar</samp>’</h3>
-
-
-<p>Example of <a href="#colorbar">colorbar</a> position and styles.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-new v 9 'x'
-subplot 2 2 0:title 'Colorbar out of box':box
-colorbar '<':colorbar '>':colorbar '_':colorbar '^'
-subplot 2 2 1:title 'Colorbar near box':box
-colorbar '<I':colorbar '>I':colorbar '_I':colorbar '^I'
-subplot 2 2 2:title 'manual colors':box:contd v a
-colorbar v '<':colorbar v '>':colorbar v '_':colorbar v '^'
-subplot 2 2 3:title '':text -0.5 1.55 'Color positions' ':C' -2
-colorbar 'bwr>' 0.25 0:text -0.9 1.2 'Default'
-colorbar 'b{w,0.3}r>' 0.5 0:text -0.1 1.2 'Manual'
-crange 0.01 1e3
-colorbar '>' 0.75 0:text 0.65 1.2 'Normal scale':colorbar '>':text 1.35 1.2 'Log scale'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_colorbar(mglGraph *gr)
-{
- gr->SubPlot(2,2,0); gr->Title("Colorbar out of box"); gr->Box();
- gr->Colorbar("<"); gr->Colorbar(">"); gr->Colorbar("_"); gr->Colorbar("^");
- gr->SubPlot(2,2,1); gr->Title("Colorbar near box"); gr->Box();
- gr->Colorbar("<I"); gr->Colorbar(">I"); gr->Colorbar("_I"); gr->Colorbar("^I");
- gr->SubPlot(2,2,2); gr->Title("manual colors");
- mglData a,v; mgls_prepare2d(&a,0,&v);
- gr->Box(); gr->ContD(v,a);
- gr->Colorbar(v,"<"); gr->Colorbar(v,">"); gr->Colorbar(v,"_"); gr->Colorbar(v,"^");
-
- gr->SubPlot(2,2,3); gr->Title(" ");
- gr->Puts(mglPoint(-0.5,1.55),"Color positions",":C",-2);
- gr->Colorbar("bwr>",0.25,0); gr->Puts(mglPoint(-0.9,1.2),"Default");
- gr->Colorbar("b{w,0.3}r>",0.5,0); gr->Puts(mglPoint(-0.1,1.2),"Manual");
-
- gr->Puts(mglPoint(1,1.55),"log-scale",":C",-2);
- gr->SetRange('c',0.01,1e3);
- gr->Colorbar(">",0.75,0); gr->Puts(mglPoint(0.65,1.2),"Normal scale");
- gr->SetFunc("","","","lg(c)");
- gr->Colorbar(">"); gr->Puts(mglPoint(1.35,1.2),"Log scale");
-}
-</pre><div align="center"><img src="png/colorbar.png" alt="Sample colorbar">
-</div>
-<hr>
-<a name="combined-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cones-sample" accesskey="n" rel="next">cones sample</a>, Previous: <a href="#colorbar-sample" accesskey="p" rel="prev">colorbar sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-combined"></a>
-<h3 class="section">10.20 Sample ‘<samp>combined</samp>’</h3>
-
-
-<p>Example of several plots in the same axis.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2v'
-call 'prepare3d'
-new v 10:fill v -0.5 1:copy d sqrt(a^2+b^2)
-subplot 2 2 0:title 'Surf + Cont':rotate 50 60:light on:box:surf a:cont a 'y'
-subplot 2 2 1 '':title 'Flow + Dens':light off:box:flow a b 'br':dens d
-subplot 2 2 2:title 'Mesh + Cont':rotate 50 60:box:mesh a:cont a '_'
-subplot 2 2 3:title 'Surf3 + ContF3':rotate 50 60:light on
-box:contf3 v c 'z' 0:contf3 v c 'x':contf3 v c
-cut 0 -1 -1 1 0 1.1
-contf3 v c 'z' c.nz-1:surf3 c -0.5
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_combined(mglGraph *gr) // flow threads and density plot
-{
- mglData a,b,d; mgls_prepare2v(&a,&b); d = a;
- for(int i=0;i<a.nx*a.ny;i++) d.a[i] = hypot(a.a[i],b.a[i]);
- mglData c; mgls_prepare3d(&c);
- mglData v(10); v.Fill(-0.5,1);
- gr->SubPlot(2,2,1,""); gr->Title("Flow + Dens");
- gr->Flow(a,b,"br"); gr->Dens(d); gr->Box();
- gr->SubPlot(2,2,0); gr->Title("Surf + Cont"); gr->Rotate(50,60);
- gr->Light(true); gr->Surf(a); gr->Cont(a,"y"); gr->Box();
- gr->SubPlot(2,2,2); gr->Title("Mesh + Cont"); gr->Rotate(50,60);
- gr->Box(); gr->Mesh(a); gr->Cont(a,"_");
- gr->SubPlot(2,2,3); gr->Title("Surf3 + ContF3");gr->Rotate(50,60);
- gr->Box(); gr->ContF3(v,c,"z",0); gr->ContF3(v,c,"x"); gr->ContF3(v,c);
- gr->SetCutBox(mglPoint(0,-1,-1), mglPoint(1,0,1.1));
- gr->ContF3(v,c,"z",c.nz-1); gr->Surf3(-0.5,c);
-}
-</pre><div align="center"><img src="png/combined.png" alt="Sample combined">
-</div>
-<hr>
-<a name="cones-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cont-sample" accesskey="n" rel="next">cont sample</a>, Previous: <a href="#combined-sample" accesskey="p" rel="prev">combined sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cones"></a>
-<h3 class="section">10.21 Sample ‘<samp>cones</samp>’</h3>
-
-
-<p>Function <a href="#cones">cones</a> is similar to <a href="#bars">bars</a> but draw cones.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ys 10 3 '0.8*sin(pi*(x+y/4+1.25))+0.2*rnd'
-light on:origin 0 0 0
-subplot 3 2 0:title 'Cones plot':rotate 50 60:box:cones ys
-subplot 3 2 1:title '2 colors':rotate 50 60:box:cones ys 'cbgGyr'
-subplot 3 2 2:title '"\#" style':rotate 50 60:box:cones ys '#'
-subplot 3 2 3:title '"a" style':rotate 50 60:zrange -2 2:box:cones ys 'a'
-subplot 3 2 4:title '"t" style':rotate 50 60:box:cones ys 't'
-subplot 3 2 5:title '"4" style':rotate 50 60:box:cones ys '4'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_cones(mglGraph *gr)
-{
- mglData ys(10,3); ys.Modify("0.8*sin(pi*(2*x+y/2))+0.2*rnd");
- gr->Light(true); gr->SetOrigin(0,0,0);
- if(big!=3) { gr->SubPlot(3,2,0); gr->Title("Cones plot"); }
- gr->Rotate(50,60); gr->Box(); gr->Cones(ys);
- if(big==3) return;
- gr->SubPlot(3,2,1); gr->Title("2 colors");
- gr->Rotate(50,60); gr->Box(); gr->Cones(ys,"cbgGyr");
- gr->SubPlot(3,2,2); gr->Title("'\\#' style");
- gr->Rotate(50,60); gr->Box(); gr->Cones(ys,"#");
- gr->SubPlot(3,2,3); gr->Title("'a' style");
- gr->SetRange('z',-2,2); // increase range since summation can exceed [-1,1]
- gr->Rotate(50,60); gr->Box(); gr->Cones(ys,"a");
- gr->SubPlot(3,2,4); gr->Title("'t' style");
- gr->Rotate(50,60); gr->Box(); gr->Cones(ys,"t");
- gr->SubPlot(3,2,5); gr->Title("'4' style");
- gr->Rotate(50,60); gr->Box(); gr->Cones(ys,"4");
-}
-</pre><div align="center"><img src="png/cones.png" alt="Sample cones">
-</div>
-<hr>
-<a name="cont-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cont3-sample" accesskey="n" rel="next">cont3 sample</a>, Previous: <a href="#cones-sample" accesskey="p" rel="prev">cones sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cont"></a>
-<h3 class="section">10.22 Sample ‘<samp>cont</samp>’</h3>
-
-
-<p>Function <a href="#cont">cont</a> draw contour lines for surface. You can select automatic (default) or manual levels for contours, print contour labels, draw it on the surface (default) or at plane (as <code>Dens</code>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-list v -0.5 -0.15 0 0.15 0.5
-subplot 2 2 0:title 'Cont plot (default)':rotate 50 60:box:cont a
-subplot 2 2 1:title 'manual levels':rotate 50 60:box:cont v a
-subplot 2 2 2:title '"\_" and "." styles':rotate 50 60:box:cont a '_':cont a '_.2k'
-subplot 2 2 3 '':title '"t" style':box:cont a 't'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_cont3(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) gr->Title("Cont3 sample");
- gr->Rotate(50,60); gr->Box();
- gr->Cont3(c,"x"); gr->Cont3(c); gr->Cont3(c,"z");
-}
-</pre><div align="center"><img src="png/cont.png" alt="Sample cont">
-</div>
-<hr>
-<a name="cont3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cont_005fxyz-sample" accesskey="n" rel="next">cont_xyz sample</a>, Previous: <a href="#cont-sample" accesskey="p" rel="prev">cont sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cont3"></a>
-<h3 class="section">10.23 Sample ‘<samp>cont3</samp>’</h3>
-
-
-<p>Function <a href="#contf3">contf3</a> draw ordinary contour lines but at slices of 3D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Cont3 sample':rotate 50 60:box
-cont3 c 'x':cont3 c:cont3 c 'z'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_cont3(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) gr->Title("Cont3 sample");
- gr->Rotate(50,60); gr->Box();
- gr->Cont3(c,"x"); gr->Cont3(c); gr->Cont3(c,"z");
-}
-</pre><div align="center"><img src="png/cont3.png" alt="Sample cont3">
-</div>
-<hr>
-<a name="cont_005fxyz-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#contd-sample" accesskey="n" rel="next">contd sample</a>, Previous: <a href="#cont3-sample" accesskey="p" rel="prev">cont3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cont_005fxyz"></a>
-<h3 class="section">10.24 Sample ‘<samp>cont_xyz</samp>’</h3>
-
-
-<p>Functions <a href="#contz">contz</a>, <a href="#conty">conty</a>, <a href="#contx">contx</a> draw contour lines on plane perpendicular to corresponding axis. One of possible application is drawing projections of 3D field.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Cont[XYZ] sample':rotate 50 60:box
-contx {sum c 'x'} '' -1:conty {sum c 'y'} '' 1:contz {sum c 'z'} '' -1
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_cont_xyz(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) gr->Title("Cont[XYZ] sample");
- gr->Rotate(50,60); gr->Box(); gr->ContX(c.Sum("x"),"",-1);
- gr->ContY(c.Sum("y"),"",1); gr->ContZ(c.Sum("z"),"",-1);
-}
-</pre><div align="center"><img src="png/cont_xyz.png" alt="Sample cont_xyz">
-</div>
-<hr>
-<a name="contd-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#contf-sample" accesskey="n" rel="next">contf sample</a>, Previous: <a href="#cont_005fxyz-sample" accesskey="p" rel="prev">cont_xyz sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-contd"></a>
-<h3 class="section">10.25 Sample ‘<samp>contd</samp>’</h3>
-
-
-<p>Function <a href="#contd">contd</a> is similar to <a href="#contf">contf</a> but with manual contour colors.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-list v -0.5 -0.15 0 0.15 0.5
-new a1 30 40 3 '0.6*sin(2*pi*x+pi*(z+1)/2)*sin(3*pi*y+pi*z) + 0.4*cos(3*pi*(x*y)+pi*(z+1)^2/2)'
-subplot 2 2 0:title 'ContD plot (default)':rotate 50 60:box:contd a
-subplot 2 2 1:title 'manual levels':rotate 50 60:box:contd v a
-subplot 2 2 2:title '"\_" style':rotate 50 60:box:contd a '_'
-subplot 2 2 3:title 'several slices':rotate 50 60:box:contd a1
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_contd(mglGraph *gr)
-{
- mglData a,v(5),a1(30,40,3); mgls_prepare2d(&a); v.a[0]=-0.5;
- v.a[1]=-0.15; v.a[2]=0; v.a[3]=0.15; v.a[4]=0.5;
- gr->Fill(a1,"0.6*sin(2*pi*x+pi*(z+1)/2)*sin(3*pi*y+pi*z) + 0.4*cos(3*pi*(x*y)+pi*(z+1)^2/2)");
-
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("ContD plot (default)"); }
- gr->Rotate(50,60); gr->Box(); gr->ContD(a);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("manual levels");
- gr->Rotate(50,60); gr->Box(); gr->ContD(v,a);
- gr->SubPlot(2,2,2); gr->Title("'\\_' style");
- gr->Rotate(50,60); gr->Box(); gr->ContD(a,"_");
- gr->SubPlot(2,2,3); gr->Title("several slices");
- gr->Rotate(50,60); gr->Box(); gr->ContD(a1);
-}
-</pre><div align="center"><img src="png/contd.png" alt="Sample contd">
-</div>
-<hr>
-<a name="contf-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#contf3-sample" accesskey="n" rel="next">contf3 sample</a>, Previous: <a href="#contd-sample" accesskey="p" rel="prev">contd sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-contf"></a>
-<h3 class="section">10.26 Sample ‘<samp>contf</samp>’</h3>
-
-
-<p>Function <a href="#contf">contf</a> draw filled contours. You can select automatic (default) or manual levels for contours.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-list v -0.5 -0.15 0 0.15 0.5
-new a1 30 40 3 '0.6*sin(2*pi*x+pi*(z+1)/2)*sin(3*pi*y+pi*z) + 0.4*cos(3*pi*(x*y)+pi*(z+1)^2/2)'
-subplot 2 2 0:title 'ContF plot (default)':rotate 50 60:box:contf a
-subplot 2 2 1:title 'manual levels':rotate 50 60:box:contf v a
-subplot 2 2 2:title '"\_" style':rotate 50 60:box:contf a '_'
-subplot 2 2 3:title 'several slices':rotate 50 60:box:contf a1
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_contf3(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) gr->Title("ContF3 sample");
- gr->Rotate(50,60); gr->Light(true); gr->Box();
- gr->ContF3(c,"x"); gr->ContF3(c); gr->ContF3(c,"z");
- gr->Cont3(c,"kx"); gr->Cont3(c,"k"); gr->Cont3(c,"kz");
-}
-</pre><div align="center"><img src="png/contf.png" alt="Sample contf">
-</div>
-<hr>
-<a name="contf3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#contf_005fxyz-sample" accesskey="n" rel="next">contf_xyz sample</a>, Previous: <a href="#contf-sample" accesskey="p" rel="prev">contf sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-contf3"></a>
-<h3 class="section">10.27 Sample ‘<samp>contf3</samp>’</h3>
-
-
-<p>Function <a href="#contf3">contf3</a> draw ordinary filled contours but at slices of 3D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Cont3 sample':rotate 50 60:box:light on
-contf3 c 'x':contf3 c:contf3 c 'z'
-cont3 c 'xk':cont3 c 'k':cont3 c 'zk'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_contf3(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) gr->Title("ContF3 sample");
- gr->Rotate(50,60); gr->Light(true); gr->Box();
- gr->ContF3(c,"x"); gr->ContF3(c); gr->ContF3(c,"z");
- gr->Cont3(c,"kx"); gr->Cont3(c,"k"); gr->Cont3(c,"kz");
-}
-</pre><div align="center"><img src="png/contf3.png" alt="Sample contf3">
-</div>
-<hr>
-<a name="contf_005fxyz-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#contv-sample" accesskey="n" rel="next">contv sample</a>, Previous: <a href="#contf3-sample" accesskey="p" rel="prev">contf3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-contf_005fxyz"></a>
-<h3 class="section">10.28 Sample ‘<samp>contf_xyz</samp>’</h3>
-
-
-<p>Functions <a href="#contfz">contfz</a>, <a href="#contfy">contfy</a>, <a href="#contfx">contfx</a>, draw filled contours on plane perpendicular to corresponding axis. One of possible application is drawing projections of 3D field.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'ContF[XYZ] sample':rotate 50 60:box
-contfx {sum c 'x'} '' -1:contfy {sum c 'y'} '' 1:contfz {sum c 'z'} '' -1
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_contf_xyz(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) gr->Title("ContF[XYZ] sample");
- gr->Rotate(50,60); gr->Box(); gr->ContFX(c.Sum("x"),"",-1);
- gr->ContFY(c.Sum("y"),"",1); gr->ContFZ(c.Sum("z"),"",-1);
-}
-</pre><div align="center"><img src="png/contf_xyz.png" alt="Sample contf_xyz">
-</div>
-<hr>
-<a name="contv-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#correl-sample" accesskey="n" rel="next">correl sample</a>, Previous: <a href="#contf_005fxyz-sample" accesskey="p" rel="prev">contf_xyz sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-contv"></a>
-<h3 class="section">10.29 Sample ‘<samp>contv</samp>’</h3>
-
-
-<p>Function <a href="#contv">contv</a> draw vertical cylinders (belts) at contour lines.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-list v -0.5 -0.15 0 0.15 0.5
-subplot 2 2 0:title 'ContV plot (default)':rotate 50 60:box:contv a
-subplot 2 2 1:title 'manual levels':rotate 50 60:box:contv v a
-subplot 2 2 2:title '"\_" style':rotate 50 60:box:contv a '_'
-subplot 2 2 3:title 'ContV and ContF':rotate 50 60:light on:box
-contv a:contf a:cont a 'k'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_contv(mglGraph *gr)
-{
- mglData a,v(5); mgls_prepare2d(&a); v.a[0]=-0.5;
- v.a[1]=-0.15; v.a[2]=0; v.a[3]=0.15; v.a[4]=0.5;
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("ContV plot (default)"); }
- gr->Rotate(50,60); gr->Box(); gr->ContV(a);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("manual levels");
- gr->Rotate(50,60); gr->Box(); gr->ContV(v,a);
- gr->SubPlot(2,2,2); gr->Title("'\\_' style");
- gr->Rotate(50,60); gr->Box(); gr->ContV(a,"_");
- gr->SubPlot(2,2,3); gr->Title("ContV and ContF");
- gr->Rotate(50,60); gr->Box(); gr->Light(true);
- gr->ContV(a); gr->ContF(a); gr->Cont(a,"k");
-}
-</pre><div align="center"><img src="png/contv.png" alt="Sample contv">
-</div>
-<hr>
-<a name="correl-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#curvcoor-sample" accesskey="n" rel="next">curvcoor sample</a>, Previous: <a href="#contv-sample" accesskey="p" rel="prev">contv sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-correl"></a>
-<h3 class="section">10.30 Sample ‘<samp>correl</samp>’</h3>
-
-
-<p>Test of correlation function (<a href="#correl">correl</a>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 100 'exp(-10*x^2)'
-new b 100 'exp(-10*(x+0.5)^2)'
-yrange 0 1
-subplot 1 2 0 '_':title 'Input fields'
-plot a:plot b:box:axis
-correl r a b 'x'
-norm r 0 1:swap r 'x' # make it human readable
-subplot 1 2 1 '_':title 'Correlation of a and b'
-plot r 'r':axis:box
-line 0.5 0 0.5 1 'B|'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_correl(mglGraph *gr)
-{
- mglData a(100),b(100);
- gr->Fill(a,"exp(-10*x^2)"); gr->Fill(b,"exp(-10*(x+0.5)^2)");
- gr->SetRange('y',0,1);
- gr->SubPlot(1,2,0,"_"); gr->Title("Input fields");
- gr->Plot(a); gr->Plot(b); gr->Axis(); gr->Box();
- mglData r = a.Correl(b,"x");
- r.Norm(0,1); r.Swap("x"); // make it human readable
- gr->SubPlot(1,2,1,"_"); gr->Title("Correlation of a and b");
- gr->Plot(r,"r"); gr->Axis(); gr->Box();
- gr->Line(mglPoint(0.5,0),mglPoint(0.5,1),"B|");
-}
-</pre><div align="center"><img src="png/correl.png" alt="Sample correl">
-</div>
-<hr>
-<a name="curvcoor-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cut-sample" accesskey="n" rel="next">cut sample</a>, Previous: <a href="#correl-sample" accesskey="p" rel="prev">correl sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-curvcoor"></a>
-<h3 class="section">10.31 Sample ‘<samp>curvcoor</samp>’</h3>
-
-
-<p>Some common curvilinear coordinates.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">origin -1 1 -1
-subplot 2 2 0:title 'Cartesian':rotate 50 60:fplot '2*t-1' '0.5' '0' '2r':axis:grid
-axis 'y*sin(pi*x)' 'y*cos(pi*x)' '':subplot 2 2 1:title 'Cylindrical':rotate 50 60:fplot '2*t-1' '0.5' '0' '2r':axis:grid
-axis '2*y*x' 'y*y - x*x' '':subplot 2 2 2:title 'Parabolic':rotate 50 60:fplot '2*t-1' '0.5' '0' '2r':axis:grid
-axis 'y*sin(pi*x)' 'y*cos(pi*x)' 'x+z':subplot 2 2 3:title 'Spiral':rotate 50 60:fplot '2*t-1' '0.5' '0' '2r':axis:grid
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_curvcoor(mglGraph *gr) // curvilinear coordinates
-{
- gr->SetOrigin(-1,1,-1);
-
- gr->SubPlot(2,2,0); gr->Title("Cartesian"); gr->Rotate(50,60);
- gr->FPlot("2*t-1","0.5","0","r2");
- gr->Axis(); gr->Grid();
-
- gr->SetFunc("y*sin(pi*x)","y*cos(pi*x)",0);
- gr->SubPlot(2,2,1); gr->Title("Cylindrical"); gr->Rotate(50,60);
- gr->FPlot("2*t-1","0.5","0","r2");
- gr->Axis(); gr->Grid();
-
- gr->SetFunc("2*y*x","y*y - x*x",0);
- gr->SubPlot(2,2,2); gr->Title("Parabolic"); gr->Rotate(50,60);
- gr->FPlot("2*t-1","0.5","0","r2");
- gr->Axis(); gr->Grid();
-
- gr->SetFunc("y*sin(pi*x)","y*cos(pi*x)","x+z");
- gr->SubPlot(2,2,3); gr->Title("Spiral"); gr->Rotate(50,60);
- gr->FPlot("2*t-1","0.5","0","r2");
- gr->Axis(); gr->Grid();
- gr->SetFunc(0,0,0); // set to default Cartesian
-}
-</pre><div align="center"><img src="png/curvcoor.png" alt="Sample curvcoor">
-</div>
-<hr>
-<a name="cut-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dat_005fdiff-sample" accesskey="n" rel="next">dat_diff sample</a>, Previous: <a href="#curvcoor-sample" accesskey="p" rel="prev">curvcoor sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cut"></a>
-<h3 class="section">10.32 Sample ‘<samp>cut</samp>’</h3>
-
-
-<p>Example of point cutting (<a href="#cut">cut</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-call 'prepare3d'
-subplot 2 2 0:title 'Cut on (default)':rotate 50 60:light on:box:surf a; zrange -1 0.5
-subplot 2 2 1:title 'Cut off':rotate 50 60:box:surf a; zrange -1 0.5; cut off
-subplot 2 2 2:title 'Cut in box':rotate 50 60:box:alpha on
-cut 0 -1 -1 1 0 1.1:surf3 c
-cut 0 0 0 0 0 0 # restore back
-subplot 2 2 3:title 'Cut by formula':rotate 50 60:box
-cut '(z>(x+0.5*y-1)^2-1) & (z>(x-0.5*y-1)^2-1)':surf3 c
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_cut(mglGraph *gr) // cutting
-{
- mglData a,c,v(1); mgls_prepare2d(&a); mgls_prepare3d(&c); v.a[0]=0.5;
- gr->SubPlot(2,2,0); gr->Title("Cut on (default)"); gr->Rotate(50,60); gr->Light(true);
- gr->Box(); gr->Surf(a,"","zrange -1 0.5");
- gr->SubPlot(2,2,1); gr->Title("Cut off"); gr->Rotate(50,60);
- gr->Box(); gr->Surf(a,"","zrange -1 0.5; cut off");
- gr->SubPlot(2,2,2); gr->Title("Cut in box"); gr->Rotate(50,60);
- gr->SetCutBox(mglPoint(0,-1,-1), mglPoint(1,0,1.1));
- gr->Alpha(true); gr->Box(); gr->Surf3(c);
- gr->SetCutBox(mglPoint(0), mglPoint(0)); // switch it off
- gr->SubPlot(2,2,3); gr->Title("Cut by formula"); gr->Rotate(50,60);
- gr->CutOff("(z>(x+0.5*y-1)^2-1) & (z>(x-0.5*y-1)^2-1)");
- gr->Box(); gr->Surf3(c); gr->CutOff(""); // switch it off
-}
-</pre><div align="center"><img src="png/cut.png" alt="Sample cut">
-</div>
-<hr>
-<a name="dat_005fdiff-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dat_005fextra-sample" accesskey="n" rel="next">dat_extra sample</a>, Previous: <a href="#cut-sample" accesskey="p" rel="prev">cut sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dat_005fdiff"></a>
-<h3 class="section">10.33 Sample ‘<samp>dat_diff</samp>’</h3>
-
-
-<p>Example of <a href="#diff">diff</a> and <a href="#integrate">integrate</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">ranges 0 1 0 1 0 1:new a 30 40 'x*y'
-subplot 2 2 0:title 'a(x,y)':rotate 60 40:surf a:box
-subplot 2 2 1:title 'da/dx':rotate 60 40:diff a 'x':surf a:box
-subplot 2 2 2:title '\int da/dx dxdy':rotate 60 40:integrate a 'xy':surf a:box
-subplot 2 2 3:title '\int {d^2}a/dxdy dx':rotate 60 40:diff2 a 'y':surf a:box
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_dat_diff(mglGraph *gr) // differentiate
-{
- gr->SetRanges(0,1,0,1,0,1);
- mglData a(30,40); a.Modify("x*y");
- gr->SubPlot(2,2,0); gr->Title("a(x,y)"); gr->Rotate(60,40);
- gr->Surf(a); gr->Box();
- gr->SubPlot(2,2,1); gr->Title("da/dx"); gr->Rotate(60,40);
- a.Diff("x"); gr->Surf(a); gr->Box();
- gr->SubPlot(2,2,2); gr->Title("\\int da/dx dxdy"); gr->Rotate(60,40);
- a.Integral("xy"); gr->Surf(a); gr->Box();
- gr->SubPlot(2,2,3); gr->Title("\\int {d^2}a/dxdy dx"); gr->Rotate(60,40);
- a.Diff2("y"); gr->Surf(a); gr->Box();
-}
-</pre><div align="center"><img src="png/dat_diff.png" alt="Sample dat_diff">
-</div>
-<hr>
-<a name="dat_005fextra-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#data1-sample" accesskey="n" rel="next">data1 sample</a>, Previous: <a href="#dat_005fdiff-sample" accesskey="p" rel="prev">dat_diff sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dat_005fextra"></a>
-<h3 class="section">10.34 Sample ‘<samp>dat_extra</samp>’</h3>
-
-
-<p>Example of <a href="#envelop">envelop</a>, <a href="#sew">sew</a>, <a href="#smooth">smooth</a> and <a href="#resize">resize</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0 '':title 'Envelop sample':new d1 1000 'exp(-8*x^2)*sin(10*pi*x)'
-axis:plot d1 'b':envelop d1 'x':plot d1 'r'
-subplot 2 2 1 '':title 'Smooth sample':ranges 0 1 0 1
-new y0 30 '0.4*sin(pi*x) + 0.3*cos(1.5*pi*x) - 0.4*sin(2*pi*x)+0.5*rnd'
-copy y1 y0:smooth y1 'x3':plot y1 'r';legend '"3" style'
-copy y2 y0:smooth y2 'x5':plot y2 'g';legend '"5" style'
-copy y3 y0:smooth y3 'x':plot y3 'b';legend 'default'
-plot y0 '{m7}:s';legend 'none'
-legend:box
-subplot 2 2 2:title 'Sew sample':rotate 50 60:light on:alpha on
-new d2 100 100 'mod((y^2-(1-x)^2)/2,0.1)'
-box:surf d2 'b':sew d2 'xy' 0.1:surf d2 'r'
-subplot 2 2 3:title 'Resize sample (interpolation)'
-new x0 10 'rnd':new v0 10 'rnd'
-resize x1 x0 100:resize v1 v0 100
-plot x0 v0 'b+ ':plot x1 v1 'r-':label x0 v0 '%n'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_dat_extra(mglGraph *gr) // differentiate
-{
- gr->SubPlot(2,2,0,""); gr->Title("Envelop sample");
- mglData d1(1000); gr->Fill(d1,"exp(-8*x^2)*sin(10*pi*x)");
- gr->Axis(); gr->Plot(d1, "b");
- d1.Envelop('x'); gr->Plot(d1, "r");
-
- gr->SubPlot(2,2,1,""); gr->Title("Smooth sample");
- mglData y0(30),y1,y2,y3;
- gr->SetRanges(0,1,0,1);
- gr->Fill(y0, "0.4*sin(pi*x) + 0.3*cos(1.5*pi*x) - 0.4*sin(2*pi*x)+0.5*rnd");
-
- y1=y0; y1.Smooth("x3");
- y2=y0; y2.Smooth("x5");
- y3=y0; y3.Smooth("x");
-
- gr->Plot(y0,"{m7}:s", "legend 'none'"); //gr->AddLegend("none","k");
- gr->Plot(y1,"r", "legend ''3' style'");
- gr->Plot(y2,"g", "legend ''5' style'");
- gr->Plot(y3,"b", "legend 'default'");
- gr->Legend(); gr->Box();
-
- gr->SubPlot(2,2,2); gr->Title("Sew sample");
- mglData d2(100, 100); gr->Fill(d2, "mod((y^2-(1-x)^2)/2,0.1)");
- gr->Rotate(50, 60); gr->Light(true); gr->Alpha(true);
- gr->Box(); gr->Surf(d2, "b");
- d2.Sew("xy", 0.1); gr->Surf(d2, "r");
-
- gr->SubPlot(2,2,3); gr->Title("Resize sample (interpolation)");
- mglData x0(10), v0(10), x1, v1;
- gr->Fill(x0,"rnd"); gr->Fill(v0,"rnd");
- x1 = x0.Resize(100); v1 = v0.Resize(100);
- gr->Plot(x0,v0,"b+ "); gr->Plot(x1,v1,"r-");
- gr->Label(x0,v0,"%n");
-}
-</pre><div align="center"><img src="png/dat_extra.png" alt="Sample dat_extra">
-</div>
-<hr>
-<a name="data1-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#data2-sample" accesskey="n" rel="next">data2 sample</a>, Previous: <a href="#dat_005fextra-sample" accesskey="p" rel="prev">dat_extra sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-data1"></a>
-<h3 class="section">10.35 Sample ‘<samp>data1</samp>’</h3>
-
-
-
-
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 40 50 60 'exp(-x^2-4*y^2-16*z^2)'
-light on:alpha on
-copy b a:diff b 'x':subplot 5 3 0:call 'splot'
-copy b a:diff2 b 'x':subplot 5 3 1:call 'splot'
-copy b a:cumsum b 'x':subplot 5 3 2:call 'splot'
-copy b a:integrate b 'x':subplot 5 3 3:call 'splot'
-mirror b 'x':subplot 5 3 4:call 'splot'
-copy b a:diff b 'y':subplot 5 3 5:call 'splot'
-copy b a:diff2 b 'y':subplot 5 3 6:call 'splot'
-copy b a:cumsum b 'y':subplot 5 3 7:call 'splot'
-copy b a:integrate b 'y':subplot 5 3 8:call 'splot'
-mirror b 'y':subplot 5 3 9:call 'splot'
-copy b a:diff b 'z':subplot 5 3 10:call 'splot'
-copy b a:diff2 b 'z':subplot 5 3 11:call 'splot'
-copy b a:cumsum b 'z':subplot 5 3 12:call 'splot'
-copy b a:integrate b 'z':subplot 5 3 13:call 'splot'
-mirror b 'z':subplot 5 3 14:call 'splot'
-stop
-func splot 0
-title 'max=',b.max:norm b -1 1 on:rotate 70 60:box:surf3 b
-return
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_data1(mglGraph *gr) // basic data operations
-{
- mglData a(40,50,60),b; gr->Fill(a,"exp(-x^2-4*y^2-16*z^2)");
- gr->Light(true); gr->Alpha(true);
- b.Set(a); b.Diff("x"); gr->SubPlot(5,3,0); splot1(gr,b);
- b.Set(a); b.Diff2("x"); gr->SubPlot(5,3,1); splot1(gr,b);
- b.Set(a); b.CumSum("x"); gr->SubPlot(5,3,2); splot1(gr,b);
- b.Set(a); b.Integral("x");gr->SubPlot(5,3,3); splot1(gr,b);
- b.Mirror("x"); gr->SubPlot(5,3,4); splot1(gr,b);
- b.Set(a); b.Diff("y"); gr->SubPlot(5,3,5); splot1(gr,b);
- b.Set(a); b.Diff2("y"); gr->SubPlot(5,3,6); splot1(gr,b);
- b.Set(a); b.CumSum("y"); gr->SubPlot(5,3,7); splot1(gr,b);
- b.Set(a); b.Integral("y");gr->SubPlot(5,3,8); splot1(gr,b);
- b.Mirror("y"); gr->SubPlot(5,3,9); splot1(gr,b);
- b.Set(a); b.Diff("z"); gr->SubPlot(5,3,10);splot1(gr,b);
- b.Set(a); b.Diff2("z"); gr->SubPlot(5,3,11);splot1(gr,b);
- b.Set(a); b.CumSum("z"); gr->SubPlot(5,3,12);splot1(gr,b);
- b.Set(a); b.Integral("z");gr->SubPlot(5,3,13);splot1(gr,b);
- b.Mirror("z"); gr->SubPlot(5,3,14);splot1(gr,b);
-}
-</pre><div align="center"><img src="png/data1.png" alt="Sample data1">
-</div>
-<hr>
-<a name="data2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dens-sample" accesskey="n" rel="next">dens sample</a>, Previous: <a href="#data1-sample" accesskey="p" rel="prev">data1 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-data2"></a>
-<h3 class="section">10.36 Sample ‘<samp>data2</samp>’</h3>
-
-
-
-
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 40 50 60 'exp(-x^2-4*y^2-16*z^2)'
-light on:alpha on
-copy b a:sinfft b 'x':subplot 5 3 0:call 'splot'
-copy b a:cosfft b 'x':subplot 5 3 1:call 'splot'
-copy b a:hankel b 'x':subplot 5 3 2:call 'splot'
-copy b a:swap b 'x':subplot 5 3 3:call 'splot'
-copy b a:smooth b 'x':subplot 5 3 4:call 'splot'
-copy b a:sinfft b 'y':subplot 5 3 5:call 'splot'
-copy b a:cosfft b 'y':subplot 5 3 6:call 'splot'
-copy b a:hankel b 'y':subplot 5 3 7:call 'splot'
-copy b a:swap b 'y':subplot 5 3 8:call 'splot'
-copy b a:smooth b 'y':subplot 5 3 9:call 'splot'
-copy b a:sinfft b 'z':subplot 5 3 10:call 'splot'
-copy b a:cosfft b 'z':subplot 5 3 11:call 'splot'
-copy b a:hankel b 'z':subplot 5 3 12:call 'splot'
-copy b a:swap b 'z':subplot 5 3 13:call 'splot'
-copy b a:smooth b 'z':subplot 5 3 14:call 'splot'
-stop
-func splot 0
-title 'max=',b.max:norm b -1 1 on:rotate 70 60:box
-surf3 b 0.5:surf3 b -0.5
-return
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_data2(mglGraph *gr) // data transforms
-{
- mglData a(40,50,60),b; gr->Fill(a,"exp(-x^2-4*y^2-16*z^2)");
- gr->Light(true); gr->Alpha(true);
- b.Set(a); b.SinFFT("x"); gr->SubPlot(5,3,0); splot2(gr,b);
- b.Set(a); b.CosFFT("x"); gr->SubPlot(5,3,1); splot2(gr,b);
- b.Set(a); b.Hankel("x"); gr->SubPlot(5,3,2); splot2(gr,b);
- b.Set(a); b.Swap("x"); gr->SubPlot(5,3,3); splot2(gr,b);
- b.Set(a); b.Smooth("x"); gr->SubPlot(5,3,4); splot2(gr,b);
- b.Set(a); b.SinFFT("y"); gr->SubPlot(5,3,5); splot2(gr,b);
- b.Set(a); b.CosFFT("y"); gr->SubPlot(5,3,6); splot2(gr,b);
- b.Set(a); b.Hankel("y"); gr->SubPlot(5,3,7); splot2(gr,b);
- b.Set(a); b.Swap("y"); gr->SubPlot(5,3,8); splot2(gr,b);
- b.Set(a); b.Smooth("y"); gr->SubPlot(5,3,9); splot2(gr,b);
- b.Set(a); b.SinFFT("z"); gr->SubPlot(5,3,10);splot2(gr,b);
- b.Set(a); b.CosFFT("z"); gr->SubPlot(5,3,11);splot2(gr,b);
- b.Set(a); b.Hankel("z"); gr->SubPlot(5,3,12);splot2(gr,b);
- b.Set(a); b.Swap("z"); gr->SubPlot(5,3,13);splot2(gr,b);
- b.Set(a); b.Smooth("z"); gr->SubPlot(5,3,14);splot2(gr,b);
-}
-</pre><div align="center"><img src="png/data2.png" alt="Sample data2">
-</div>
-<hr>
-<a name="dens-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dens3-sample" accesskey="n" rel="next">dens3 sample</a>, Previous: <a href="#data2-sample" accesskey="p" rel="prev">data2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dens"></a>
-<h3 class="section">10.37 Sample ‘<samp>dens</samp>’</h3>
-
-
-<p>Function <a href="#dens">dens</a> draw density plot (also known as color-map) for surface.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-new a1 30 40 3 '0.6*sin(2*pi*x+pi*(z+1)/2)*sin(3*pi*y+pi*z) + 0.4*cos(3*pi*(x*y)+pi*(z+1)^2/2)'
-subplot 2 2 0 '':title 'Dens plot (default)':box:dens a
-subplot 2 2 1:title '3d variant':rotate 50 60:box:dens a
-subplot 2 2 2 '':title '"\#" style; meshnum 10':box:dens a '#'; meshnum 10
-subplot 2 2 3:title 'several slices':rotate 50 60:box:dens a1
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_dens3(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) gr->Title("Dens3 sample");
- gr->Rotate(50,60); gr->Alpha(true); gr->SetAlphaDef(0.7);
- gr->SetOrigin(0,0,0); gr->Axis("_xyz"); gr->Box();
- gr->Dens3(c,"x"); gr->Dens3(c); gr->Dens3(c,"z");
-}
-</pre><div align="center"><img src="png/dens.png" alt="Sample dens">
-</div>
-<hr>
-<a name="dens3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dens_005fxyz-sample" accesskey="n" rel="next">dens_xyz sample</a>, Previous: <a href="#dens-sample" accesskey="p" rel="prev">dens sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dens3"></a>
-<h3 class="section">10.38 Sample ‘<samp>dens3</samp>’</h3>
-
-
-<p>Function <a href="#dens3">dens3</a> draw ordinary density plots but at slices of 3D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Dens3 sample':rotate 50 60:alpha on:alphadef 0.7
-origin 0 0 0:box:axis '_xyz'
-dens3 c 'x':dens3 c ':y':dens3 c 'z'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_dens3(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) gr->Title("Dens3 sample");
- gr->Rotate(50,60); gr->Alpha(true); gr->SetAlphaDef(0.7);
- gr->SetOrigin(0,0,0); gr->Axis("_xyz"); gr->Box();
- gr->Dens3(c,"x"); gr->Dens3(c); gr->Dens3(c,"z");
-}
-</pre><div align="center"><img src="png/dens3.png" alt="Sample dens3">
-</div>
-<hr>
-<a name="dens_005fxyz-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#detect-sample" accesskey="n" rel="next">detect sample</a>, Previous: <a href="#dens3-sample" accesskey="p" rel="prev">dens3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dens_005fxyz"></a>
-<h3 class="section">10.39 Sample ‘<samp>dens_xyz</samp>’</h3>
-
-
-<p>Functions <a href="#densz">densz</a>, <a href="#densy">densy</a>, <a href="#densx">densx</a> draw density plot on plane perpendicular to corresponding axis. One of possible application is drawing projections of 3D field.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Dens[XYZ] sample':rotate 50 60:box
-densx {sum c 'x'} '' -1:densy {sum c 'y'} '' 1:densz {sum c 'z'} '' -1
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_dens_xyz(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) gr->Title("Dens[XYZ] sample");
- gr->Rotate(50,60); gr->Box(); gr->DensX(c.Sum("x"),0,-1);
- gr->DensY(c.Sum("y"),0,1); gr->DensZ(c.Sum("z"),0,-1);
-}
-</pre><div align="center"><img src="png/dens_xyz.png" alt="Sample dens_xyz">
-</div>
-<hr>
-<a name="detect-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dew-sample" accesskey="n" rel="next">dew sample</a>, Previous: <a href="#dens_005fxyz-sample" accesskey="p" rel="prev">dens_xyz sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-detect"></a>
-<h3 class="section">10.40 Sample ‘<samp>detect</samp>’</h3>
-
-
-<p>Example of curve <a href="#detect">detect</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '':title 'Detect sample'
-new a 200 100 'exp(-30*(y-0.5*sin(pi*x))^2-rnd/10)+exp(-30*(y+0.5*sin(pi*x))^2-rnd/10)+exp(-30*(x+y)^2-rnd/10)'
-ranges 0 a.nx 0 a.ny:box
-alpha on:crange a:dens a
-
-detect r a 0.1 5
-plot r(0) r(1) '.'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_detect(mglGraph *gr)
-{
- mglData a(200, 100);
- gr->Fill(a,"exp(-30*(y-0.5*sin(pi*x))^2-rnd/10)+exp(-30*(y+0.5*sin(pi*x))^2-rnd/10)+exp(-30*(x+y)^2-rnd/10)");
- gr->SubPlot(1,1,0,"");
- if(big!=3) gr->Title("Detect sample");
- gr->SetRanges(0,a.nx,0,a.ny); gr->SetRange('c',a);
- gr->Alpha(true); gr->Box(); gr->Dens(a);
- mglData r(a.Detect(0.1,5));
- gr->Plot(r.SubData(0), r.SubData(1), ".");
-}
-</pre><div align="center"><img src="png/detect.png" alt="Sample detect">
-</div>
-<hr>
-<a name="dew-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#diffract-sample" accesskey="n" rel="next">diffract sample</a>, Previous: <a href="#detect-sample" accesskey="p" rel="prev">detect sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dew"></a>
-<h3 class="section">10.41 Sample ‘<samp>dew</samp>’</h3>
-
-
-<p>Function <a href="#dew">dew</a> is similar to <a href="#vect">vect</a> but use drops instead of arrows.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2v'
-subplot 1 1 0 '':title 'Dew plot':light on:box:dew a b
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_dew(mglGraph *gr)
-{
- mglData a,b; mgls_prepare2v(&a,&b);
- if(big!=3) {gr->SubPlot(1,1,0,""); gr->Title("Dew plot");}
- gr->Box(); gr->Light(true); gr->Dew(a,b);
-}
-</pre><div align="center"><img src="png/dew.png" alt="Sample dew">
-</div>
-<hr>
-<a name="diffract-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dilate-sample" accesskey="n" rel="next">dilate sample</a>, Previous: <a href="#dew-sample" accesskey="p" rel="prev">dew sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-diffract"></a>
-<h3 class="section">10.42 Sample ‘<samp>diffract</samp>’</h3>
-
-
-
-
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">define n 32 #number of points
-define m 20 # number of iterations
-define dt 0.01 # time step
-new res n m+1
-ranges -1 1 0 m*dt 0 1
-
-#tridmat periodic variant
-new !a n 'i',dt*(n/2)^2/2
-copy !b !(1-2*a)
-
-new !u n 'exp(-6*x^2)'
-put res u all 0
-for $i 0 m
-tridmat u a b a u 'xdc'
-put res u all $i+1
-next
-subplot 2 2 0 '<_':title 'Tridmat, periodic b.c.'
-axis:box:dens res
-
-#fourier variant
-new k n:fillsample k 'xk'
-copy !e !exp(-i1*dt*k^2)
-
-new !u n 'exp(-6*x^2)'
-put res u all 0
-for $i 0 m
-fourier u 'x'
-multo u e
-fourier u 'ix'
-put res u all $i+1
-next
-subplot 2 2 1 '<_':title 'Fourier method'
-axis:box:dens res
-
-#tridmat zero variant
-new !u n 'exp(-6*x^2)'
-put res u all 0
-for $i 0 m
-tridmat u a b a u 'xd'
-put res u all $i+1
-next
-subplot 2 2 2 '<_':title 'Tridmat, zero b.c.'
-axis:box:dens res
-
-#diffract exp variant
-new !u n 'exp(-6*x^2)'
-define q dt*(n/2)^2/8 # need q<0.4 !!!
-put res u all 0
-for $i 0 m
-for $j 1 8 # due to smaller dt
-diffract u 'xe' q
-next
-put res u all $i+1
-next
-subplot 2 2 3 '<_':title 'Diffract, exp b.c.'
-axis:box:dens res
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_diffract(mglGraph *gr)
-{
- long n=32; // number of points
- long m=20; // number of iterations
- double dt=0.01; // time step
- mglData res(n,m+1);
- gr->SetRanges(-1,1, 0,m*dt, 0,1);
-
- // tridmat periodic variant
- mglDataC a(n), b(n); a = dual(0,dt*n*n/8);
- for(long i=0;i<n;i++) b.a[i] = mreal(1)-mreal(2)*a.a[i];
- mglDataC u(n); gr->Fill(u,"exp(-6*x^2)"); res.Put(u,-1,0);
- for(long i=0;i<m;i++)
- {
- u = mglTridMatC(a,b,a,u,"xdc");
- res.Put(u,-1,i+1);
- }
- gr->SubPlot(2,2,0,"<_"); gr->Title("Tridmat, periodic b.c.");
- gr->Axis(); gr->Box(); gr->Dens(res);
-
- // fourier variant
- mglData k(n); k.FillSample("xk");
- mglDataC e(n); for(long i=0;i<n;i++) e.a[i] = exp(-dual(0,dt*k.a[i]*k.a[i]));
- gr->Fill(u,"exp(-6*x^2)"); res.Put(u,-1,0);
- for(long i=0;i<m;i++)
- {
- u.FFT("x"); u *= e; u.FFT("ix");
- res.Put(u,-1,i+1);
- }
- gr->SubPlot(2,2,1,"<_"); gr->Title("Fourier method");
- gr->Axis(); gr->Box(); gr->Dens(res);
-
- // tridmat zero variant
- gr->Fill(u,"exp(-6*x^2)"); res.Put(u,-1,0);
- for(long i=0;i<m;i++)
- {
- u = mglTridMatC(a,b,a,u,"xd");
- res.Put(u,-1,i+1);
- }
- gr->SubPlot(2,2,2,"<_"); gr->Title("Tridmat, zero b.c.");
- gr->Axis(); gr->Box(); gr->Dens(res);
-
- // diffract exp variant
- gr->Fill(u,"exp(-6*x^2)"); res.Put(u,-1,0);
- double q=dt*n*n/4/8; // NOTE: need q<0.4 !!!
- for(long i=0;i<m;i++)
- {
- for(long j=0;j<8;j++) // due to smaller dt
- u.Diffraction("xe",q);
- res.Put(u,-1,i+1);
- }
- gr->SubPlot(2,2,3,"<_"); gr->Title("Diffract, exp b.c.");
- gr->Axis(); gr->Box(); gr->Dens(res);
-}
-</pre><div align="center"><img src="png/diffract.png" alt="Sample diffract">
-</div>
-<hr>
-<a name="dilate-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dots-sample" accesskey="n" rel="next">dots sample</a>, Previous: <a href="#diffract-sample" accesskey="p" rel="prev">diffract sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dilate"></a>
-<h3 class="section">10.43 Sample ‘<samp>dilate</samp>’</h3>
-
-
-<p>Example of <a href="#dilate">dilate</a> and <a href="#erode">erode</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0:title 'Dilate&Erode 1D sample'
-new y 11:put y 1 5
-ranges 0 10 0 1:axis:box
-plot y 'b*'
-dilate y 0.5 2
-plot y 'rs'
-erode y 0.5 1
-plot y 'g#o'
-
-subplot 2 2 1:title 'Dilate&Erode 2D sample':rotate 40 60
-ranges 0 10 0 10 0 3
-axis:box
-new z 11 11:put z 3 5 5
-boxs z 'b':boxs z 'k#'
-dilate z 1 2
-boxs z 'r':boxs z 'k#'
-erode z 1 1
-boxs 2*z 'g':boxs 2*z 'k#'
-
-subplot 2 2 2
-text 0.5 0.7 'initial' 'ba';size -2
-text 0.5 0.5 'dilate=2' 'ra';size -2
-text 0.5 0.3 'erode=1' 'ga';size -2
-
-subplot 2 2 3:title 'Dilate&Erode 3D sample'
-rotate 60 50:light on:alpha on
-ranges 0 10 0 10 0 10:crange 0 3
-axis:box
-new a 11 11 11:put a 3 5 5 5
-surf3a a a 1.5 'b'
-dilate a 1 2
-surf3a a a 0.5 'r'
-erode a 1 1
-surf3a 2*a 2*a 1 'g'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_dilate(mglGraph *gr)
-{
- mglData y(11), z(11,11), a(11,11,11);
- y.a[5]=1; z.a[5+11*5]=a.a[5+11*(5+11*5)] = 3;
-
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("Dilate&Erode 1D sample"); }
- else gr->SubPlot(1,1,0,"");
- gr->SetRanges(0,10,0,1); gr->Axis(); gr->Box(); gr->Plot(y,"b*");
- y.Dilate(1,2); gr->Plot(y,"rs");
- y.Erode(1,1); gr->Plot(y,"g#o");
- if(big==3) return;
-
- gr->SubPlot(2,2,1); gr->Title("Dilate&Erode 2D sample");
- gr->Rotate(40,60); gr->SetRanges(0,10,0,10,0,3);
- gr->Axis(); gr->Box(); gr->Boxs(z,"b"); gr->Boxs(z,"k#");
- z.Dilate(1,2); gr->Boxs(z,"r"); gr->Boxs(z,"k#");
- z.Erode(1,1); z*=2; gr->Boxs(z,"g"); gr->Boxs(z,"k#");
-
- gr->SubPlot(2,2,2);
- gr->Puts(0.5,0.7,"initial","ba",-2);
- gr->Puts(0.5,0.5,"dilate=2","ra",-2);
- gr->Puts(0.5,0.3,"erode=1","ga",-2);
-
- gr->SubPlot(2,2,3); gr->Title("Dilate&Erode 3D sample");
- gr->Rotate(60,50); gr->Alpha(true); gr->Light(true);
- gr->SetRanges(0,10,0,10,0,10); gr->SetRange('c',0,3);
- gr->Axis(); gr->Box(); gr->Surf3A(1.5,a,a,"b");
- a.Dilate(1,2); gr->Surf3A(0.5,a,a,"r");
- a.Erode(1,1); a*=2; gr->Surf3A(1,a,a,"g");
-}
-</pre><div align="center"><img src="png/dilate.png" alt="Sample dilate">
-</div>
-<hr>
-<a name="dots-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#earth-sample" accesskey="n" rel="next">earth sample</a>, Previous: <a href="#dilate-sample" accesskey="p" rel="prev">dilate sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dots"></a>
-<h3 class="section">10.44 Sample ‘<samp>dots</samp>’</h3>
-
-
-<p>Function <a href="#dots">dots</a> is another way to draw irregular points. <code>Dots</code> use color scheme for coloring (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new t 2000 'pi*(rnd-0.5)':new f 2000 '2*pi*rnd'
-copy x 0.9*cos(t)*cos(f):copy y 0.9*cos(t)*sin(f):copy z 0.6*sin(t):copy c cos(2*t)
-subplot 2 2 0:title 'Dots sample':rotate 50 60
-box:dots x y z
-alpha on
-subplot 2 2 1:title 'add transparency':rotate 50 60
-box:dots x y z c
-subplot 2 2 2:title 'add colorings':rotate 50 60
-box:dots x y z x c
-subplot 2 2 3:title 'Only coloring':rotate 50 60
-box:tens x y z x ' .'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_dots(mglGraph *gr)
-{
- int i, n=1000;
- mglData x(n),y(n),z(n),c(n);
- for(i=0;i<n;i++)
- {
- double t=M_PI*(mgl_rnd()-0.5), f=2*M_PI*mgl_rnd();
- x.a[i] = 0.9*cos(t)*cos(f);
- y.a[i] = 0.9*cos(t)*sin(f);
- z.a[i] = 0.6*sin(t);
- c.a[i] = cos(2*t);
- }
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("Dots sample"); }
- gr->Rotate(50,60); gr->Box(); gr->Dots(x,y,z);
- if(big==3) return;
- gr->Alpha(true);
- gr->SubPlot(2,2,1); gr->Title("add transparency"); gr->Rotate(50,60); gr->Box(); gr->Dots(x,y,z,c);
- gr->SubPlot(2,2,2); gr->Title("add coloring"); gr->Rotate(50,60); gr->Box(); gr->Dots(x,y,z,x,c);
- gr->SubPlot(2,2,3); gr->Title("Only coloring"); gr->Rotate(50,60); gr->Box(); gr->Tens(x,y,z,x," .");
-}
-</pre><div align="center"><img src="png/dots.png" alt="Sample dots">
-</div>
-<hr>
-<a name="earth-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#error-sample" accesskey="n" rel="next">error sample</a>, Previous: <a href="#dots-sample" accesskey="p" rel="prev">dots sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-earth"></a>
-<h3 class="section">10.45 Sample ‘<samp>earth</samp>’</h3>
-
-
-<p>Example of Earth map by using <a href="#import">import</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">import dat 'Equirectangular-projection.jpg' 'BbGYw' -1 1
-subplot 1 1 0 '<>':title 'Earth in 3D':rotate 40 60
-copy phi dat 'pi*x':copy tet dat 'pi*y/2'
-copy x cos(tet)*cos(phi)
-copy y cos(tet)*sin(phi)
-copy z sin(tet)
-
-light on
-surfc x y z dat 'BbGYw'
-contp [-0.51,-0.51] x y z dat 'y'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_earth(mglGraph *gr)
-{
- mglData dat; dat.Import("Equirectangular-projection.jpg","BbGYw",-1,1);
- // Calc proper 3d coordinates from projection
- mglData phi(dat.nx,dat.ny); phi.Fill(-M_PI,M_PI);
- mglData tet(dat.nx,dat.ny); tet.Fill(-M_PI/2,M_PI/2,'y');
- mglData x(dat.nx,dat.ny), y(dat.nx,dat.ny), z(dat.nx,dat.ny);
-#pragma omp parallel for
- for(long i=0;i<dat.nx*dat.ny;i++)
- { x.a[i] = cos(tet.a[i])*cos(phi.a[i]);
- y.a[i] = cos(tet.a[i])*sin(phi.a[i]);
- z.a[i] = sin(tet.a[i]); }
-
- gr->SubPlot(1,1,0,"<>");
- if(big!=3) gr->Title("Earth in 3D");
- gr->Rotate(40,60); gr->Light(true);
- gr->SurfC(x,y,z,dat,"BbGYw");
- mglData vals(1); vals.a[0]=-0.51;
- gr->ContP(vals, x,y,z,dat,"y");
-}
-</pre><div align="center"><img src="png/earth.png" alt="Sample earth">
-</div>
-<hr>
-<a name="error-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#error2-sample" accesskey="n" rel="next">error2 sample</a>, Previous: <a href="#earth-sample" accesskey="p" rel="prev">earth sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-error"></a>
-<h3 class="section">10.46 Sample ‘<samp>error</samp>’</h3>
-
-
-<p>Function <a href="#error">error</a> draw error boxes around the points. You can draw default boxes or semi-transparent symbol (like marker, see <a href="#Line-styles">Line styles</a>). Also you can set individual color for each box. See also <a href="#error2-sample">error2 sample</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-new y 50 '0.7*sin(pi*x-pi) + 0.5*cos(3*pi*(x+1)/2) + 0.2*sin(pi*(x+1)/2)'
-new x0 10 'x + 0.1*rnd-0.05':new ex 10 '0.1':new ey 10 '0.2'
-new y0 10 '0.7*sin(pi*x-pi) + 0.5*cos(3*pi*(x+1)/2) + 0.2*sin(pi*(x+1)/2) + 0.2*rnd-0.1'
-subplot 2 2 0 '':title 'Error plot (default)':box:plot y:error x0 y0 ex ey 'k'
-subplot 2 2 1 '':title '"!" style; no e_x':box:plot y:error x0 y0 ey 'o!rgb'
-subplot 2 2 2 '':title '"\@" style':alpha on:box:plot y:error x0 y0 ex ey '@'; alpha 0.5
-subplot 2 2 3:title '3d variant':rotate 50 60:axis
-for $1 0 9
- errbox 2*rnd-1 2*rnd-1 2*rnd-1 0.2 0.2 0.2 'bo'
-next
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_error2(mglGraph *gr)
-{
- mglData x0(10), y0(10), ex(10), ey(10);
- for(int i=0;i<10;i++)
- { x0.a[i] = mgl_rnd(); y0.a[i] = mgl_rnd(); ey.a[i] = ex.a[i] = 0.1; }
- gr->SetRanges(0,1,0,1); gr->Alpha(true);
- gr->SubPlot(4,3,0,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#+@");
- gr->SubPlot(4,3,1,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#x@");
- gr->SubPlot(4,3,2,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#s@","alpha 0.5");
- gr->SubPlot(4,3,3,""); gr->Box(); gr->Error(x0,y0,ex,ey,"s@");
- gr->SubPlot(4,3,4,""); gr->Box(); gr->Error(x0,y0,ex,ey,"d@");
- gr->SubPlot(4,3,5,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#d@","alpha 0.5");
- gr->SubPlot(4,3,6,""); gr->Box(); gr->Error(x0,y0,ex,ey,"+@");
- gr->SubPlot(4,3,7,""); gr->Box(); gr->Error(x0,y0,ex,ey,"x@");
- gr->SubPlot(4,3,8,""); gr->Box(); gr->Error(x0,y0,ex,ey,"o@");
- gr->SubPlot(4,3,9,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#o@","alpha 0.5");
- gr->SubPlot(4,3,10,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#.@");
- gr->SubPlot(4,3,11,""); gr->Box(); gr->Error(x0,y0,ex,ey);
-}
-</pre><div align="center"><img src="png/error.png" alt="Sample error">
-</div>
-<hr>
-<a name="error2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#export-sample" accesskey="n" rel="next">export sample</a>, Previous: <a href="#error-sample" accesskey="p" rel="prev">error sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-error2"></a>
-<h3 class="section">10.47 Sample ‘<samp>error2</samp>’</h3>
-
-
-<p>Example of <a href="#error">error</a> kinds.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x0 10 'rnd':new ex 10 '0.1'
-new y0 10 'rnd':new ey 10 '0.1'
-ranges 0 1 0 1
-subplot 4 3 0 '':box:error x0 y0 ex ey '#+@'
-subplot 4 3 1 '':box:error x0 y0 ex ey '#x@'
-subplot 4 3 2 '':box:error x0 y0 ex ey '#s@'; alpha 0.5
-subplot 4 3 3 '':box:error x0 y0 ex ey 's@'
-subplot 4 3 4 '':box:error x0 y0 ex ey 'd@'
-subplot 4 3 5 '':box:error x0 y0 ex ey '#d@'; alpha 0.5
-subplot 4 3 6 '':box:error x0 y0 ex ey '+@'
-subplot 4 3 7 '':box:error x0 y0 ex ey 'x@'
-subplot 4 3 8 '':box:error x0 y0 ex ey 'o@'
-subplot 4 3 9 '':box:error x0 y0 ex ey '#o@'; alpha 0.5
-subplot 4 3 10 '':box:error x0 y0 ex ey '#.@'
-subplot 4 3 11 '':box:error x0 y0 ex ey; alpha 0.5
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_error2(mglGraph *gr)
-{
- mglData x0(10), y0(10), ex(10), ey(10);
- for(int i=0;i<10;i++)
- { x0.a[i] = mgl_rnd(); y0.a[i] = mgl_rnd(); ey.a[i] = ex.a[i] = 0.1; }
- gr->SetRanges(0,1,0,1); gr->Alpha(true);
- gr->SubPlot(4,3,0,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#+@");
- gr->SubPlot(4,3,1,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#x@");
- gr->SubPlot(4,3,2,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#s@","alpha 0.5");
- gr->SubPlot(4,3,3,""); gr->Box(); gr->Error(x0,y0,ex,ey,"s@");
- gr->SubPlot(4,3,4,""); gr->Box(); gr->Error(x0,y0,ex,ey,"d@");
- gr->SubPlot(4,3,5,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#d@","alpha 0.5");
- gr->SubPlot(4,3,6,""); gr->Box(); gr->Error(x0,y0,ex,ey,"+@");
- gr->SubPlot(4,3,7,""); gr->Box(); gr->Error(x0,y0,ex,ey,"x@");
- gr->SubPlot(4,3,8,""); gr->Box(); gr->Error(x0,y0,ex,ey,"o@");
- gr->SubPlot(4,3,9,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#o@","alpha 0.5");
- gr->SubPlot(4,3,10,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#.@");
- gr->SubPlot(4,3,11,""); gr->Box(); gr->Error(x0,y0,ex,ey);
-}
-</pre><div align="center"><img src="png/error2.png" alt="Sample error2">
-</div>
-<hr>
-<a name="export-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#fall-sample" accesskey="n" rel="next">fall sample</a>, Previous: <a href="#error2-sample" accesskey="p" rel="prev">error2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-export"></a>
-<h3 class="section">10.48 Sample ‘<samp>export</samp>’</h3>
-
-
-<p>Example of data <a href="#export">export</a> and <a href="#import">import</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 100 100 'x^2*y':new b 100 100
-export a 'test_data.png' 'BbcyrR' -1 1
-import b 'test_data.png' 'BbcyrR' -1 1
-subplot 2 1 0 '':title 'initial':box:dens a
-subplot 2 1 1 '':title 'imported':box:dens b
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_export(mglGraph *gr) // basic data operations
-{
- mglData a(100,100), b; gr->Fill(a,"x^2*y");
- a.Export("test_data.png","BbcyrR");
- b.Import("test_data.png","BbcyrR",-1,1);
- gr->SubPlot(2,1,0,""); gr->Title("initial"); gr->Box(); gr->Dens(a);
- gr->SubPlot(2,1,1,""); gr->Title("imported"); gr->Box(); gr->Dens(b);
-}
-</pre><div align="center"><img src="png/export.png" alt="Sample export">
-</div>
-<hr>
-<a name="fall-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#fexport-sample" accesskey="n" rel="next">fexport sample</a>, Previous: <a href="#export-sample" accesskey="p" rel="prev">export sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-fall"></a>
-<h3 class="section">10.49 Sample ‘<samp>fall</samp>’</h3>
-
-
-<p>Function <a href="#fall">fall</a> draw waterfall surface. You can use <a href="#meshnum">meshnum</a> for changing number of lines to be drawn. Also you can use ‘<samp>x</samp>’ style for drawing lines in other direction.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Fall plot':rotate 50 60:box:fall a
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_fall(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- if(big!=3) gr->Title("Fall plot");
- gr->Rotate(50,60); gr->Box(); gr->Fall(a);
-}
-</pre><div align="center"><img src="png/fall.png" alt="Sample fall">
-</div>
-<hr>
-<a name="fexport-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#fit-sample" accesskey="n" rel="next">fit sample</a>, Previous: <a href="#fall-sample" accesskey="p" rel="prev">fall sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-fexport"></a>
-<h3 class="section">10.50 Sample ‘<samp>fexport</samp>’</h3>
-
-
-<p>Example of <a href="#write">write</a> to different file formats.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-write 'fexport.jpg':#write 'fexport.png'
-write 'fexport.bmp':write 'fexport.tga'
-write 'fexport.eps':write 'fexport.svg'
-write 'fexport.gif':write 'fexport.xyz'
-write 'fexport.stl':write 'fexport.off'
-write 'fexport.tex':write 'fexport.obj'
-write 'fexport.prc':write 'fexport.json'
-write 'fexport.mgld'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_fexport(mglGraph *gr) // test file export
-{
- all_prims(gr);
- gr->WriteJPEG("fexport.jpg");
-// gr->WritePNG("fexport.png");
- gr->WriteBMP("fexport.bmp");
- gr->WriteTGA("fexport.tga");
- gr->WriteEPS("fexport.eps");
- gr->WriteSVG("fexport.svg");
- gr->WriteGIF("fexport.gif");
-
- gr->WriteXYZ("fexport.xyz");
- gr->WriteSTL("fexport.stl");
- gr->WriteOFF("fexport.off");
- gr->WriteTEX("fexport.tex");
- gr->WriteOBJ("fexport.obj");
- gr->WritePRC("fexport.prc");
- gr->WriteJSON("fexport.json");
-
- gr->ExportMGLD("fexport.mgld");
- gr->Clf();
- gr->ImportMGLD("fexport.mgld");
-}
-</pre><div align="center"><img src="png/fexport.png" alt="Sample fexport">
-</div>
-<hr>
-<a name="fit-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#flame2d-sample" accesskey="n" rel="next">flame2d sample</a>, Previous: <a href="#fexport-sample" accesskey="p" rel="prev">fexport sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-fit"></a>
-<h3 class="section">10.51 Sample ‘<samp>fit</samp>’</h3>
-
-
-<p>Example of nonlinear <a href="#fit">fit</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new dat 100 '0.4*rnd+0.1+sin(2*pi*x)'
-new in 100 '0.3+sin(2*pi*x)'
-list ini 1 1 3:fit res dat 'a+b*sin(c*x)' 'abc' ini
-title 'Fitting sample':yrange -2 2:box:axis:plot dat 'k. '
-plot res 'r':plot in 'b'
-text -0.9 -1.3 'fitted:' 'r:L'
-putsfit 0 -1.8 'y = ' 'r':text 0 2.2 'initial: y = 0.3+sin(2\pi x)' 'b'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_fit(mglGraph *gr) // nonlinear fitting
-{
- mglData dat(100), in(100), res;
- gr->Fill(dat,"0.4*rnd+0.1+sin(2*pi*x)");
- gr->Fill(in,"0.3+sin(2*pi*x)");
- double ini[3] = {1,1,3};
- mglData Ini(3,ini);
- res = gr->Fit(dat, "a+b*sin(c*x)", "abc", Ini);
- if(big!=3) gr->Title("Fitting sample");
- gr->SetRange('y',-2,2); gr->Box(); gr->Plot(dat, "k. ");
- gr->Axis(); gr->Plot(res, "r"); gr->Plot(in, "b");
- gr->Puts(mglPoint(-0.9, -1.3), "fitted:", "r:L");
- gr->PutsFit(mglPoint(0, -1.8), "y = ", "r");
- gr->Puts(mglPoint(0, 2.2), "initial: y = 0.3+sin(2\\pi x)", "b");
-// gr->SetRanges(mglPoint(-1,-1,-1),mglPoint(1,1,1)); gr->SetOrigin(0,0,0);
-}
-</pre><div align="center"><img src="png/fit.png" alt="Sample fit">
-</div>
-<hr>
-<a name="flame2d-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#flow-sample" accesskey="n" rel="next">flow sample</a>, Previous: <a href="#fit-sample" accesskey="p" rel="prev">fit sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-flame2d"></a>
-<h3 class="section">10.52 Sample ‘<samp>flame2d</samp>’</h3>
-
-
-<p>Function <a href="#flame2d">flame2d</a> generate points for flame fractals in 2d case.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">list A [0.33,0,0,0.33,0,0,0.2] [0.33,0,0,0.33,0.67,0,0.2] [0.33,0,0,0.33,0.33,0.33,0.2]\
- [0.33,0,0,0.33,0,0.67,0.2] [0.33,0,0,0.33,0.67,0.67,0.2]
-new B 2 3 A.ny '0.3'
-put B 3 0 0 -1
-put B 3 0 1 -1
-put B 3 0 2 -1
-flame2d fx fy A B 1000000
-subplot 1 1 0 '<_':title 'Flame2d sample'
-ranges fx fy:box:axis
-plot fx fy 'r#o ';size 0.05
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_flame2d(mglGraph *gr)
-{
- mglData A, B(2,3,5);
- A.SetList(35, 0.33,0.,0.,0.33,0.,0.,0.2, 0.33,0.,0.,0.33,0.67,0.,0.2, 0.33,0.,0.,0.33,0.33,0.33,0.2,
- 0.33,0.,0.,0.33,0.,0.67,0.2, 0.33,0.,0.,0.33,0.67,0.67,0.2);
- A.Rearrange(7);
- for(long i=0;i<2*3*5;i++) B.a[i] = 0.3;
- for(long i=0;i<5;i++) B.a[2*3*i] = B.a[2*3*i+1*2] = B.a[2*3*i+2*2] = 3;
- mglData f(mglFlame2d(A,B,1000000));
- gr->SubPlot(1,1,0,"<_");
- if(big!=3) gr->Title("Flame2d sample");
- gr->SetRanges(f.SubData(0), f.SubData(1));
- gr->Axis(); gr->Box();
- gr->Plot(f.SubData(0), f.SubData(1),"r#o ","size 0.05");
-}
-</pre><div align="center"><img src="png/flame2d.png" alt="Sample flame2d">
-</div>
-<hr>
-<a name="flow-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#flow3-sample" accesskey="n" rel="next">flow3 sample</a>, Previous: <a href="#flame2d-sample" accesskey="p" rel="prev">flame2d sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-flow"></a>
-<h3 class="section">10.53 Sample ‘<samp>flow</samp>’</h3>
-
-
-<p>Function <a href="#flow">flow</a> is another standard way to visualize vector fields – it draw lines (threads) which is tangent to local vector field direction. MathGL draw threads from edges of bounding box and from central slices. Sometimes it is not most appropriate variant – you may want to use <code>flowp</code> to specify manual position of threads. The color scheme is used for coloring (see <a href="#Color-scheme">Color scheme</a>). At this warm color corresponds to normal flow (like attractor), cold one corresponds to inverse flow (like source).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2v'
-call 'prepare3v'
-subplot 2 2 0 '':title 'Flow plot (default)':box:flow a b
-subplot 2 2 1 '':title '"v" style':box:flow a b 'v'
-subplot 2 2 2 '':title '"#" and "." styles':box:flow a b '#':flow a b '.2k'
-subplot 2 2 3:title '3d variant':rotate 50 60:box:flow ex ey ez
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_flow(mglGraph *gr)
-{
- mglData a,b; mgls_prepare2v(&a,&b);
- if(big!=3) {gr->SubPlot(2,2,0,""); gr->Title("Flow plot (default)");}
- gr->Box(); gr->Flow(a,b);
- if(big==3) return;
- gr->SubPlot(2,2,1,""); gr->Title("'v' style");
- gr->Box(); gr->Flow(a,b,"v");
- gr->SubPlot(2,2,2,""); gr->Title("'\\#' and '.' styles");
- gr->Box(); gr->Flow(a,b,"#"); gr->Flow(a,b,".2k");
- mglData ex,ey,ez; mgls_prepare3v(&ex,&ey,&ez);
- gr->SubPlot(2,2,3); gr->Title("3d variant"); gr->Rotate(50,60);
- gr->Box(); gr->Flow(ex,ey,ez);
-}
-</pre><div align="center"><img src="png/flow.png" alt="Sample flow">
-</div>
-<hr>
-<a name="flow3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#fog-sample" accesskey="n" rel="next">fog sample</a>, Previous: <a href="#flow-sample" accesskey="p" rel="prev">flow sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-flow3"></a>
-<h3 class="section">10.54 Sample ‘<samp>flow3</samp>’</h3>
-
-
-<p>Function <a href="#flow3">flow3</a> draw flow threads, which start from given plane.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3v'
-subplot 2 2 0:title 'Flow3 plot (default)':rotate 50 60:box
-flow3 ex ey ez
-subplot 2 2 1:title '"v" style, from boundary':rotate 50 60:box
-flow3 ex ey ez 'v' 0
-subplot 2 2 2:title '"t" style':rotate 50 60:box
-flow3 ex ey ez 't' 0
-subplot 2 2 3:title 'from \i z planes':rotate 50 60:box
-flow3 ex ey ez 'z' 0
-flow3 ex ey ez 'z' 9
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_flow3(mglGraph *gr)
-{
- mglData ex,ey,ez; mgls_prepare3v(&ex,&ey,&ez);
- if(big!=3) {gr->SubPlot(2,2,0); gr->Title("Flow3 plot (default)");}
- gr->Rotate(50,60); gr->Box(); gr->Flow3(ex,ey,ez);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("'v' style, from boundary");
- gr->Rotate(50,60); gr->Box(); gr->Flow3(ex,ey,ez,"v",0);
- gr->SubPlot(2,2,2); gr->Title("'t' style");
- gr->Rotate(50,60); gr->Box(); gr->Flow3(ex,ey,ez,"t",0);
- gr->SubPlot(2,2,3); gr->Title("from \\i z planes");
- gr->Rotate(50,60); gr->Box(); gr->Flow3(ex,ey,ez,"z",0); gr->Flow3(ex,ey,ez,"z",9);
-}
-</pre><div align="center"><img src="png/flow3.png" alt="Sample flow3">
-</div>
-<hr>
-<a name="fog-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#fonts-sample" accesskey="n" rel="next">fonts sample</a>, Previous: <a href="#flow3-sample" accesskey="p" rel="prev">flow3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-fog"></a>
-<h3 class="section">10.55 Sample ‘<samp>fog</samp>’</h3>
-
-
-<p>Example of <a href="#fog">fog</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Fog sample':rotate 50 60:light on:fog 1
-box:surf a:cont a 'y'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_fog(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- if(big!=3) gr->Title("Fog sample");
- gr->Light(true); gr->Rotate(50,60); gr->Fog(1); gr->Box();
- gr->Surf(a); gr->Cont(a,"y");
-}
-</pre><div align="center"><img src="png/fog.png" alt="Sample fog">
-</div>
-<hr>
-<a name="fonts-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#grad-sample" accesskey="n" rel="next">grad sample</a>, Previous: <a href="#fog-sample" accesskey="p" rel="prev">fog sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-fonts"></a>
-<h3 class="section">10.56 Sample ‘<samp>fonts</samp>’</h3>
-
-
-<p>Example of <a href="#font">font</a> typefaces.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">define d 0.25
-loadfont 'STIX':text 0 1.1 'default font (STIX)'
-loadfont 'adventor':text 0 1.1-d 'adventor font'
-loadfont 'bonum':text 0 1.1-2*d 'bonum font'
-loadfont 'chorus':text 0 1.1-3*d 'chorus font'
-loadfont 'cursor':text 0 1.1-4*d 'cursor font'
-loadfont 'heros':text 0 1.1-5*d 'heros font'
-loadfont 'heroscn':text 0 1.1-6*d 'heroscn font'
-loadfont 'pagella':text 0 1.1-7*d 'pagella font'
-loadfont 'schola':text 0 1.1-8*d 'schola font'
-loadfont 'termes':text 0 1.1-9*d 'termes font'
-loadfont ''
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_fonts(mglGraph *gr) // font typefaces
-{
- double h=1.1, d=0.25;
- gr->LoadFont("STIX"); gr->Puts(mglPoint(0,h), "default font (STIX)");
- gr->LoadFont("adventor"); gr->Puts(mglPoint(0,h-d), "adventor font");
- gr->LoadFont("bonum"); gr->Puts(mglPoint(0,h-2*d), "bonum font");
- gr->LoadFont("chorus"); gr->Puts(mglPoint(0,h-3*d), "chorus font");
- gr->LoadFont("cursor"); gr->Puts(mglPoint(0,h-4*d), "cursor font");
- gr->LoadFont("heros"); gr->Puts(mglPoint(0,h-5*d), "heros font");
- gr->LoadFont("heroscn"); gr->Puts(mglPoint(0,h-6*d), "heroscn font");
- gr->LoadFont("pagella"); gr->Puts(mglPoint(0,h-7*d), "pagella font");
- gr->LoadFont("schola"); gr->Puts(mglPoint(0,h-8*d), "schola font");
- gr->LoadFont("termes"); gr->Puts(mglPoint(0,h-9*d), "termes font");
- gr->LoadFont("");
-}
-</pre><div align="center"><img src="png/fonts.png" alt="Sample fonts">
-</div>
-<hr>
-<a name="grad-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#hist-sample" accesskey="n" rel="next">hist sample</a>, Previous: <a href="#fonts-sample" accesskey="p" rel="prev">fonts sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-grad"></a>
-<h3 class="section">10.57 Sample ‘<samp>grad</samp>’</h3>
-
-
-<p>Function <a href="#grad">grad</a> draw gradient lines for matrix.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-subplot 1 1 0 '':title 'Grad plot':box:grad a:dens a '{u8}w{q8}'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_grad(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- if(big!=3) {gr->SubPlot(1,1,0,""); gr->Title("Grad plot");}
- gr->Box(); gr->Grad(a); gr->Dens(a,"{u8}w{q8}");
-}
-</pre><div align="center"><img src="png/grad.png" alt="Sample grad">
-</div>
-<hr>
-<a name="hist-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ifs2d-sample" accesskey="n" rel="next">ifs2d sample</a>, Previous: <a href="#grad-sample" accesskey="p" rel="prev">grad sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-hist"></a>
-<h3 class="section">10.58 Sample ‘<samp>hist</samp>’</h3>
-
-
-<p>Example of <a href="#hist">hist</a> (histogram).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 10000 '2*rnd-1':new y 10000 '2*rnd-1':copy z exp(-6*(x^2+y^2))
-hist xx x z:norm xx 0 1:hist yy y z:norm yy 0 1
-multiplot 3 3 3 2 2 '':ranges -1 1 -1 1 0 1:box:dots x y z 'wyrRk'
-multiplot 3 3 0 2 1 '':ranges -1 1 0 1:box:bars xx
-multiplot 3 3 5 1 2 '':ranges 0 1 -1 1:box:barh yy
-subplot 3 3 2:text 0.5 0.5 'Hist and\n{}MultiPlot\n{}sample' 'a' -3
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_hist(mglGraph *gr)
-{
- mglData x(10000), y(10000), z(10000); gr->Fill(x,"2*rnd-1"); gr->Fill(y,"2*rnd-1"); gr->Fill(z,"exp(-6*(v^2+w^2))",x,y);
- mglData xx=gr->Hist(x,z), yy=gr->Hist(y,z); xx.Norm(0,1); yy.Norm(0,1);
- gr->MultiPlot(3,3,3,2,2,""); gr->SetRanges(-1,1,-1,1,0,1); gr->Box(); gr->Dots(x,y,z,"wyrRk");
- gr->MultiPlot(3,3,0,2,1,""); gr->SetRanges(-1,1,0,1); gr->Box(); gr->Bars(xx);
- gr->MultiPlot(3,3,5,1,2,""); gr->SetRanges(0,1,-1,1); gr->Box(); gr->Barh(yy);
- gr->SubPlot(3,3,2); gr->Puts(mglPoint(0.5,0.5),"Hist and\nMultiPlot\nsample","a",-3);
-}
-</pre><div align="center"><img src="png/hist.png" alt="Sample hist">
-</div>
-<hr>
-<a name="ifs2d-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ifs3d-sample" accesskey="n" rel="next">ifs3d sample</a>, Previous: <a href="#hist-sample" accesskey="p" rel="prev">hist sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ifs2d"></a>
-<h3 class="section">10.59 Sample ‘<samp>ifs2d</samp>’</h3>
-
-
-<p>Function <a href="#ifs2d">ifs2d</a> generate points for fractals using iterated function system in 2d case.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">list A [0.33,0,0,0.33,0,0,0.2] [0.33,0,0,0.33,0.67,0,0.2] [0.33,0,0,0.33,0.33,0.33,0.2]\
- [0.33,0,0,0.33,0,0.67,0.2] [0.33,0,0,0.33,0.67,0.67,0.2]
-ifs2d fx fy A 100000
-subplot 1 1 0 '<_':title 'IFS 2d sample'
-ranges fx fy:axis
-plot fx fy 'r#o ';size 0.05
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_ifs2d(mglGraph *gr)
-{
- mglData A;
- A.SetList(35, 0.33,0.,0.,0.33,0.,0.,0.2, 0.33,0.,0.,0.33,0.67,0.,0.2, 0.33,0.,0.,0.33,0.33,0.33,0.2, 0.33,0.,0.,0.33,0.,0.67,0.2, 0.33,0.,0.,0.33,0.67,0.67,0.2);
- A.Rearrange(7);
- mglData f(mglIFS2d(A,100000));
- gr->SubPlot(1,1,0,"<_");
- if(big!=3) gr->Title("IFS 2d sample");
- gr->SetRanges(f.SubData(0), f.SubData(1));
- gr->Axis(); gr->Plot(f.SubData(0), f.SubData(1),"r#o ","size 0.05");
-}
-</pre><div align="center"><img src="png/ifs2d.png" alt="Sample ifs2d">
-</div>
-<hr>
-<a name="ifs3d-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#indirect-sample" accesskey="n" rel="next">indirect sample</a>, Previous: <a href="#ifs2d-sample" accesskey="p" rel="prev">ifs2d sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ifs3d"></a>
-<h3 class="section">10.60 Sample ‘<samp>ifs3d</samp>’</h3>
-
-
-<p>Function <a href="#ifs3d">ifs3d</a> generate points for fractals using iterated function system in 3d case.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">list A [0,0,0,0,.18,0,0,0,0,0,0,0,.01] [.85,0,0,0,.85,.1,0,-0.1,0.85,0,1.6,0,.85]\
- [.2,-.2,0,.2,.2,0,0,0,0.3,0,0.8,0,.07] [-.2,.2,0,.2,.2,0,0,0,0.3,0,0.8,0,.07]
-ifs3d f A 100000
-title 'IFS 3d sample':rotate 50 60
-ranges f(0) f(1) f(2):axis:box
-dots f(0) f(1) f(2) 'G#o';size 0.05
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_ifs3d(mglGraph *gr)
-{
- mglData A;
- A.SetList(52, 0.,0.,0.,0.,.18,0.,0.,0.,0.,0.,0.,0.,.01, .85,0.,0.,0.,.85,.1,0.,-0.1,0.85,0.,1.6,0.,.85,
- .2,-.2,0.,.2,.2,0.,0.,0.,0.3,0.,0.8,0.,.07, -.2,.2,0.,.2,.2,0.,0.,0.,0.3,0.,0.8,0.,.07);
- A.Rearrange(13);
- mglData f(mglIFS3d(A,100000));
- if(big!=3) gr->Title("IFS 3d sample");
- gr->SetRanges(f.SubData(0), f.SubData(1), f.SubData(2));
- gr->Rotate(50,60); gr->Axis(); gr->Box();
- gr->Dots(f.SubData(0), f.SubData(1), f.SubData(2),"G#o","size 0.05");
-}
-</pre><div align="center"><img src="png/ifs3d.png" alt="Sample ifs3d">
-</div>
-<hr>
-<a name="indirect-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#inplot-sample" accesskey="n" rel="next">inplot sample</a>, Previous: <a href="#ifs3d-sample" accesskey="p" rel="prev">ifs3d sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-indirect"></a>
-<h3 class="section">10.61 Sample ‘<samp>indirect</samp>’</h3>
-
-
-<p>Comparison of <a href="#subdata">subdata</a> vs <a href="#evaluate">evaluate</a>/
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '':title 'SubData vs Evaluate'
-new in 9 'x^3/1.1':plot in 'ko ':box
-new arg 99 '4*x+4'
-evaluate e in arg off:plot e 'b.'; legend 'Evaluate'
-subdata s in arg:plot s 'r.';legend 'SubData'
-legend 2
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_indirect(mglGraph *gr)
-{
- gr->SubPlot(1,1,0,""); gr->Title("SubData vs Evaluate");
- mglData in(9), arg(99), e, s;
- gr->Fill(in,"x^3/1.1"); gr->Fill(arg,"4*x+4");
- gr->Plot(in,"ko "); gr->Box();
- e = in.Evaluate(arg,false); gr->Plot(e,"b.","legend 'Evaluate'");
- s = in.SubData(arg); gr->Plot(s,"r.","legend 'SubData'");
- gr->Legend(2);
-}
-</pre><div align="center"><img src="png/indirect.png" alt="Sample indirect">
-</div>
-<hr>
-<a name="inplot-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#iris-sample" accesskey="n" rel="next">iris sample</a>, Previous: <a href="#indirect-sample" accesskey="p" rel="prev">indirect sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-inplot"></a>
-<h3 class="section">10.62 Sample ‘<samp>inplot</samp>’</h3>
-
-
-<p>Example of <a href="#inplot">inplot</a>, <a href="#multiplot">multiplot</a>, <a href="#columnplot">columnplot</a>, <a href="#gridplot">gridplot</a>, <a href="#shearplot">shearplot</a>, <a href="#stickplot">stickplot</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 3 2 0:title 'StickPlot'
-stickplot 3 0 20 30:box 'r':text 0 0 0 '0' 'r'
-stickplot 3 1 20 30:box 'g':text 0 0 0 '1' 'g'
-stickplot 3 2 20 30:box 'b':text 0 9 0 '2' 'b'
-subplot 3 2 3 '':title 'ColumnPlot'
-columnplot 3 0:box 'r':text 0 0 '0' 'r'
-columnplot 3 1:box 'g':text 0 0 '1' 'g'
-columnplot 3 2:box 'b':text 0 0 '2' 'b'
-subplot 3 2 4 '':title 'GridPlot'
-gridplot 2 2 0:box 'r':text 0 0 '0' 'r'
-gridplot 2 2 1:box 'g':text 0 0 '1' 'g'
-gridplot 2 2 2:box 'b':text 0 0 '2' 'b'
-gridplot 2 2 3:box 'm':text 0 0 '3' 'm'
-subplot 3 2 5 '':title 'InPlot':box
-inplot 0.4 1 0.6 1 on:box 'r'
-multiplot 3 2 1 2 1 '':title 'MultiPlot and ShearPlot':box
-shearplot 3 0 0.2 0.1:box 'r':text 0 0 '0' 'r'
-shearplot 3 1 0.2 0.1:box 'g':text 0 0 '1' 'g'
-shearplot 3 2 0.2 0.1:box 'b':text 0 0 '2' 'b'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_inplot(mglGraph *gr)
-{
- gr->SubPlot(3,2,0); gr->Title("StickPlot");
- gr->StickPlot(3, 0, 20, 30); gr->Box("r"); gr->Puts(mglPoint(0),"0","r");
- gr->StickPlot(3, 1, 20, 30); gr->Box("g"); gr->Puts(mglPoint(0),"1","g");
- gr->StickPlot(3, 2, 20, 30); gr->Box("b"); gr->Puts(mglPoint(0),"2","b");
- gr->SubPlot(3,2,3,""); gr->Title("ColumnPlot");
- gr->ColumnPlot(3, 0); gr->Box("r"); gr->Puts(mglPoint(0),"0","r");
- gr->ColumnPlot(3, 1); gr->Box("g"); gr->Puts(mglPoint(0),"1","g");
- gr->ColumnPlot(3, 2); gr->Box("b"); gr->Puts(mglPoint(0),"2","b");
- gr->SubPlot(3,2,4,""); gr->Title("GridPlot");
- gr->GridPlot(2, 2, 0); gr->Box("r"); gr->Puts(mglPoint(0),"0","r");
- gr->GridPlot(2, 2, 1); gr->Box("g"); gr->Puts(mglPoint(0),"1","g");
- gr->GridPlot(2, 2, 2); gr->Box("b"); gr->Puts(mglPoint(0),"2","b");
- gr->GridPlot(2, 2, 3); gr->Box("m"); gr->Puts(mglPoint(0),"3","m");
- gr->SubPlot(3,2,5,""); gr->Title("InPlot"); gr->Box();
- gr->InPlot(0.4, 1, 0.6, 1, true); gr->Box("r");
- gr->MultiPlot(3,2,1, 2, 1,""); gr->Title("MultiPlot and ShearPlot"); gr->Box();
- gr->ShearPlot(3, 0, 0.2, 0.1); gr->Box("r"); gr->Puts(mglPoint(0),"0","r");
- gr->ShearPlot(3, 1, 0.2, 0.1); gr->Box("g"); gr->Puts(mglPoint(0),"1","g");
- gr->ShearPlot(3, 2, 0.2, 0.1); gr->Box("b"); gr->Puts(mglPoint(0),"2","b");
-}
-</pre><div align="center"><img src="png/inplot.png" alt="Sample inplot">
-</div>
-<hr>
-<a name="iris-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#label-sample" accesskey="n" rel="next">label sample</a>, Previous: <a href="#inplot-sample" accesskey="p" rel="prev">inplot sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-iris"></a>
-<h3 class="section">10.63 Sample ‘<samp>iris</samp>’</h3>
-
-
-<p>Function <a href="#iris">iris</a> draw Iris plot for columns of data array.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">read a 'iris.dat'
-crop a 0 4 'x':rearrange a a.nx 50
-subplot 1 1 0 '':title 'Iris plot'
-iris a 'sepal\n length;sepal\n width;petal\n length;petal\n width' '. ';value -1.5;size -2
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_iris(mglGraph *gr)
-{
- mglData a("iris.dat"); a.Crop(0,4,'x'); a.Rearrange(4,50);
- gr->SubPlot(1,1,0,"");
- if(big!=3) gr->Title("Iris sample");
- gr->Iris(a, "sepal\nlength;sepal\nwidth;petal\nlength;petal\nwidth", ". ", "value -1.5;size -2");
-}
-</pre><div align="center"><img src="png/iris.png" alt="Sample iris">
-</div>
-<hr>
-<a name="label-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#lamerey-sample" accesskey="n" rel="next">lamerey sample</a>, Previous: <a href="#iris-sample" accesskey="p" rel="prev">iris sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-label"></a>
-<h3 class="section">10.64 Sample ‘<samp>label</samp>’</h3>
-
-
-<p>Function <a href="#label">label</a> print text at data points. The string may contain ‘<samp>%x</samp>’, ‘<samp>%y</samp>’, ‘<samp>%z</samp>’ for x-, y-, z-coordinates of points, ‘<samp>%n</samp>’ for point index.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ys 10 '0.2*rnd-0.8*sin(pi*x)'
-subplot 1 1 0 '':title 'Label plot':box:plot ys ' *':label ys 'y=%y'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_label(mglGraph *gr)
-{
- mglData ys(10); ys.Modify("0.8*sin(pi*2*x)+0.2*rnd");
- if(big!=3) { gr->SubPlot(1,1,0,""); gr->Title("Label plot"); }
- gr->Box(); gr->Plot(ys," *"); gr->Label(ys,"y=%y");
-}
-</pre><div align="center"><img src="png/label.png" alt="Sample label">
-</div>
-<hr>
-<a name="lamerey-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#legend-sample" accesskey="n" rel="next">legend sample</a>, Previous: <a href="#label-sample" accesskey="p" rel="prev">label sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-lamerey"></a>
-<h3 class="section">10.65 Sample ‘<samp>lamerey</samp>’</h3>
-
-
-<p>Function <a href="#lamerey">lamerey</a> draw Lamerey diagram.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Lamerey sample'
-axis:xlabel '\i x':ylabel '\bar{\i x} = 2 \i{x}'
-fplot 'x' 'k='
-fplot '2*x' 'b'
-lamerey 0.00097 '2*x' 'rv~';size 2
-lamerey -0.00097 '2*x' 'rv~';size 2
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_lamerey(mglGraph *gr)
-{
- gr->SubPlot(1,1,0,"<_");
- if(big!=3) gr->Title("Lamerey sample");
- gr->Axis(); gr->Label('x',"\\i x"); gr->Label('y',"\\bar{\\i x} = 2 \\i{x}");
- gr->FPlot("x","k="); gr->FPlot("2*x","b");
- gr->Lamerey( 0.00097,"2*x","rv~");
- gr->Lamerey(-0.00097,"2*x","rv~");
-}
-</pre><div align="center"><img src="png/lamerey.png" alt="Sample lamerey">
-</div>
-<hr>
-<a name="legend-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#light-sample" accesskey="n" rel="next">light sample</a>, Previous: <a href="#lamerey-sample" accesskey="p" rel="prev">lamerey sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-legend"></a>
-<h3 class="section">10.66 Sample ‘<samp>legend</samp>’</h3>
-
-
-<p>Example of <a href="#legend">legend</a> styles.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">addlegend 'sin(\pi {x^2})' 'b':addlegend 'sin(\pi x)' 'g*'
-addlegend 'sin(\pi \sqrt{x})' 'rd':addlegend 'jsut text' ' ':addlegend 'no indent for this' ''
-subplot 2 2 0 '':title 'Legend (default)':box:legend
-legend 1 0.5 '^':text 0.49 0.88 'Style "\^"' 'A:L'
-legend 3 'A#':text 0.75 0.65 'Absolute position' 'A'
-subplot 2 2 2 '':title 'coloring':box:legend 0 'r#':legend 1 'Wb#':legend 2 'ygr#'
-subplot 2 2 3 '':title 'manual position':box
-legend 0.5 1:text 0.5 0.5 'at x=0.5, y=1' 'a'
-legend 1 '#-':text 0.75 0.25 'Horizontal legend' 'a'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_legend(mglGraph *gr)
-{
- gr->AddLegend("sin(\\pi {x^2})","b");
- gr->AddLegend("sin(\\pi x)","g*");
- gr->AddLegend("sin(\\pi \\sqrt{x})","rd");
- gr->AddLegend("just text"," ");
- gr->AddLegend("no indent for this","");
- if(big!=3) {gr->SubPlot(2,2,0,""); gr->Title("Legend (default)");}
- gr->Box(); gr->Legend();
- if(big==3) return;
- gr->Legend(1,0.5,"^"); gr->Puts(0.49, 0.88, "Style '\\^'","A:L");
- gr->Legend(3,"A#");
- gr->Puts(mglPoint(0.75,0.65),"Absolute position","A");
- gr->SubPlot(2,2,2,""); gr->Title("coloring"); gr->Box();
- gr->Legend(0,"r#"); gr->Legend(1,"Wb#"); gr->Legend(2,"ygr#");
- gr->SubPlot(2,2,3,""); gr->Title("manual position"); gr->Box();
- gr->Legend(0.5,1);
- gr->Puts(mglPoint(0.5,0.5),"at x=0.5, y=1","a");
- gr->Legend(1,"#-");
- gr->Puts(mglPoint(0.75,0.25),"Horizontal legend","a");
-}
-</pre><div align="center"><img src="png/legend.png" alt="Sample legend">
-</div>
-<hr>
-<a name="light-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#loglog-sample" accesskey="n" rel="next">loglog sample</a>, Previous: <a href="#legend-sample" accesskey="p" rel="prev">legend sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-light"></a>
-<h3 class="section">10.67 Sample ‘<samp>light</samp>’</h3>
-
-
-<p>Example of <a href="#light">light</a> with different types.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">light on:attachlight on
-call 'prepare2d'
-subplot 2 2 0:title 'Default':rotate 50 60:box:surf a
-line -1 -0.7 1.7 -1 -0.7 0.7 'BA'
-
-subplot 2 2 1:title 'Local':rotate 50 60
-light 0 1 0 1 -2 -1 -1
-line 1 0 1 -1 -1 0 'BAO':box:surf a
-
-subplot 2 2 2:title 'no diffuse':rotate 50 60
-diffuse 0
-line 1 0 1 -1 -1 0 'BAO':box:surf a
-
-subplot 2 2 3:title 'diffusive only':rotate 50 60
-diffuse 0.5:light 0 1 0 1 -2 -1 -1 'w' 0
-line 1 0 1 -1 -1 0 'BAO':box:surf a
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_light(mglGraph *gr) // local light sources
-{
- mglData a; mgls_prepare2d(&a);
- gr->Light(true); gr->AttachLight(true);
- if(big==3)
- { gr->Rotate(50,60); gr->Box(); gr->Surf(a); return; }
- gr->SubPlot(2,2,0); gr->Title("Default"); gr->Rotate(50,60);
- gr->Line(mglPoint(-1,-0.7,1.7),mglPoint(-1,-0.7,0.7),"BA"); gr->Box(); gr->Surf(a);
- gr->SubPlot(2,2,1); gr->Title("Local"); gr->Rotate(50,60);
- gr->AddLight(0,mglPoint(1,0,1),mglPoint(-2,-1,-1));
- gr->Line(mglPoint(1,0,1),mglPoint(-1,-1,0),"BAO"); gr->Box(); gr->Surf(a);
- gr->SubPlot(2,2,2); gr->Title("no diffuse"); gr->Rotate(50,60);
- gr->SetDiffuse(0);
- gr->Line(mglPoint(1,0,1),mglPoint(-1,-1,0),"BAO"); gr->Box(); gr->Surf(a);
- gr->SubPlot(2,2,3); gr->Title("diffusive only"); gr->Rotate(50,60);
- gr->SetDiffuse(0.5);
- gr->AddLight(0,mglPoint(1,0,1),mglPoint(-2,-1,-1),'w',0);
- gr->Line(mglPoint(1,0,1),mglPoint(-1,-1,0),"BAO"); gr->Box(); gr->Surf(a);
-}
-</pre><div align="center"><img src="png/light.png" alt="Sample light">
-</div>
-<hr>
-<a name="loglog-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#map-sample" accesskey="n" rel="next">map sample</a>, Previous: <a href="#light-sample" accesskey="p" rel="prev">light sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-loglog"></a>
-<h3 class="section">10.68 Sample ‘<samp>loglog</samp>’</h3>
-
-
-<p>Example of log- and log-log- axis labels.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0 '<_':title 'Semi-log axis':ranges 0.01 100 -1 1:axis 'lg(x)' '' ''
-axis:grid 'xy' 'g':fplot 'sin(1/x)':xlabel 'x' 0:ylabel 'y = sin 1/x' 0
-subplot 2 2 1 '<_':title 'Log-log axis':ranges 0.01 100 0.1 100:axis 'lg(x)' 'lg(y)' ''
-axis:grid '!' 'h=':grid:fplot 'sqrt(1+x^2)'
-xlabel 'x' 0:ylabel 'y = \sqrt{1+x^2}' 0
-subplot 2 2 2 '<_':title 'Minus-log axis':ranges -100 -0.01 -100 -0.1:axis '-lg(-x)' '-lg(-y)' ''
-axis:fplot '-sqrt(1+x^2)':xlabel 'x' 0:ylabel 'y = -\sqrt{1+x^2}' 0
-subplot 2 2 3 '<_':title 'Log-ticks':ranges 0.01 100 0 100:axis 'sqrt(x)' '' ''
-axis:fplot 'x':xlabel 'x' 1:ylabel 'y = x' 0
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_loglog(mglGraph *gr) // log-log axis
-{
- gr->SubPlot(2,2,0,"<_"); gr->Title("Semi-log axis"); gr->SetRanges(0.01,100,-1,1); gr->SetFunc("lg(x)","");
- gr->Axis(); gr->Grid("xy","g"); gr->FPlot("sin(1/x)"); gr->Label('x',"x",0); gr->Label('y', "y = sin 1/x",0);
- gr->SubPlot(2,2,1,"<_"); gr->Title("Log-log axis"); gr->SetRanges(0.01,100,0.1,100); gr->SetFunc("lg(x)","lg(y)");
- gr->Axis(); gr->Grid("!","h="); gr->Grid(); gr->FPlot("sqrt(1+x^2)"); gr->Label('x',"x",0); gr->Label('y', "y = \\sqrt{1+x^2}",0);
- gr->SubPlot(2,2,2,"<_"); gr->Title("Minus-log axis"); gr->SetRanges(-100,-0.01,-100,-0.1); gr->SetFunc("-lg(-x)","-lg(-y)");
- gr->Axis(); gr->FPlot("-sqrt(1+x^2)"); gr->Label('x',"x",0); gr->Label('y', "y = -\\sqrt{1+x^2}",0);
- gr->SubPlot(2,2,3,"<_"); gr->Title("Log-ticks"); gr->SetRanges(0.1,100,0,100); gr->SetFunc("sqrt(x)","");
- gr->Axis(); gr->FPlot("x"); gr->Label('x',"x",1); gr->Label('y', "y = x",0);
-}
-</pre><div align="center"><img src="png/loglog.png" alt="Sample loglog">
-</div>
-<hr>
-<a name="map-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#mark-sample" accesskey="n" rel="next">mark sample</a>, Previous: <a href="#loglog-sample" accesskey="p" rel="prev">loglog sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-map"></a>
-<h3 class="section">10.69 Sample ‘<samp>map</samp>’</h3>
-
-
-<p>Example of <a href="#map">map</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 50 40 'x':new b 50 40 'y':zrange -2 2:text 0 0 '\to'
-subplot 2 1 0:text 0 1.1 '\{x, y\}' '' -2:box:map a b 'brgk'
-subplot 2 1 1:text 0 1.1 '\{\frac{x^3+y^3}{2}, \frac{x-y}{2}\}' '' -2
-box:fill a '(x^3+y^3)/2':fill b '(x-y)/2':map a b 'brgk'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_map(mglGraph *gr) // example of mapping
-{
- mglData a(50, 40), b(50, 40);
- gr->Puts(mglPoint(0, 0), "\\to", ":C", -1.4);
- gr->SetRanges(-1,1,-1,1,-2,2);
-
- gr->SubPlot(2, 1, 0);
- gr->Fill(a,"x"); gr->Fill(b,"y");
- gr->Puts(mglPoint(0, 1.1), "\\{x, y\\}", ":C", -2); gr->Box();
- gr->Map(a, b, "brgk");
-
- gr->SubPlot(2, 1, 1);
- gr->Fill(a,"(x^3+y^3)/2"); gr->Fill(b,"(x-y)/2");
- gr->Puts(mglPoint(0, 1.1), "\\{\\frac{x^3+y^3}{2}, \\frac{x-y}{2}\\}", ":C", -2);
- gr->Box();
- gr->Map(a, b, "brgk");
-}
-</pre><div align="center"><img src="png/map.png" alt="Sample map">
-</div>
-<hr>
-<a name="mark-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#mask-sample" accesskey="n" rel="next">mask sample</a>, Previous: <a href="#map-sample" accesskey="p" rel="prev">map sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-mark"></a>
-<h3 class="section">10.70 Sample ‘<samp>mark</samp>’</h3>
-
-
-<p>Example of <a href="#mark">mark</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 1 1 0 '':title 'Mark plot (default)':box:mark y y1 's'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_mark(mglGraph *gr)
-{
- mglData y,y1; mgls_prepare1d(&y,&y1);
- if(big!=3) { gr->SubPlot(1,1,0,""); gr->Title("Mark plot (default)"); }
- gr->Box(); gr->Mark(y,y1,"s");
-}
-</pre><div align="center"><img src="png/mark.png" alt="Sample mark">
-</div>
-<hr>
-<a name="mask-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#mesh-sample" accesskey="n" rel="next">mesh sample</a>, Previous: <a href="#mark-sample" accesskey="p" rel="prev">mark sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-mask"></a>
-<h3 class="section">10.71 Sample ‘<samp>mask</samp>’</h3>
-
-
-<p>Example of <a href="#mask">mask</a> kinds.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 10 10 'x'
-subplot 5 4 0 '':title '"-" mask':dens a '3-'
-subplot 5 4 1 '':title '"+" mask':dens a '3+'
-subplot 5 4 2 '':title '"=" mask':dens a '3='
-subplot 5 4 3 '':title '";" mask':dens a '3;'
-subplot 5 4 4 '':title '";I" mask':dens a '3;I'
-subplot 5 4 5 '':title '"o" mask':dens a '3o'
-subplot 5 4 6 '':title '"O" mask':dens a '3O'
-subplot 5 4 7 '':title '"s" mask':dens a '3s'
-subplot 5 4 8 '':title '"S" mask':dens a '3S'
-subplot 5 4 9 '':title '";/" mask':dens a '3;/'
-subplot 5 4 10 '':title '"~" mask':dens a '3~'
-subplot 5 4 11 '':title '"<" mask':dens a '3<'
-subplot 5 4 12 '':title '">" mask':dens a '3>'
-subplot 5 4 13 '':title '"j" mask':dens a '3j'
-subplot 5 4 14 '':title '"-;\" mask':dens a '3\;'
-subplot 5 4 15 '':title '"d" mask':dens a '3d'
-subplot 5 4 16 '':title '"D" mask':dens a '3D'
-subplot 5 4 17 '':title '"*" mask':dens a '3*'
-subplot 5 4 18 '':title '"\^" mask':dens a '3^'
-subplot 5 4 19 '':title 'manual mask'
-mask '+' '24242424FF0101FF':dens a '3+'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_mask(mglGraph *gr)
-{
- mglData a(10,10); a.Fill(-1,1);
- gr->SubPlot(5,4,0,""); gr->Title("'-' mask"); gr->Dens(a,"3-");
- gr->SubPlot(5,4,1,""); gr->Title("'+' mask"); gr->Dens(a,"3+");
- gr->SubPlot(5,4,2,""); gr->Title("'=' mask"); gr->Dens(a,"3=");
- gr->SubPlot(5,4,3,""); gr->Title("';' mask"); gr->Dens(a,"3;");
- gr->SubPlot(5,4,4,""); gr->Title("';I' mask"); gr->Dens(a,"3;I");
- gr->SubPlot(5,4,5,""); gr->Title("'o' mask"); gr->Dens(a,"3o");
- gr->SubPlot(5,4,6,""); gr->Title("'O' mask"); gr->Dens(a,"3O");
- gr->SubPlot(5,4,7,""); gr->Title("'s' mask"); gr->Dens(a,"3s");
- gr->SubPlot(5,4,8,""); gr->Title("'S' mask"); gr->Dens(a,"3S");
- gr->SubPlot(5,4,9,""); gr->Title("';/' mask"); gr->Dens(a,"3;/");
- gr->SubPlot(5,4,10,""); gr->Title("'~' mask"); gr->Dens(a,"3~");
- gr->SubPlot(5,4,11,""); gr->Title("'<' mask"); gr->Dens(a,"3<");
- gr->SubPlot(5,4,12,""); gr->Title("'>' mask"); gr->Dens(a,"3>");
- gr->SubPlot(5,4,13,""); gr->Title("'j' mask"); gr->Dens(a,"3j");
- gr->SubPlot(5,4,14,""); gr->Title("';\\\\' mask"); gr->Dens(a,"3;\\");
- gr->SubPlot(5,4,15,""); gr->Title("'d' mask"); gr->Dens(a,"3d");
- gr->SubPlot(5,4,16,""); gr->Title("'D' mask"); gr->Dens(a,"3D");
- gr->SubPlot(5,4,17,""); gr->Title("'*' mask"); gr->Dens(a,"3*");
- gr->SubPlot(5,4,18,""); gr->Title("'\\^' mask"); gr->Dens(a,"3^");
- gr->SubPlot(5,4,19,""); gr->Title("manual mask");
- gr->SetMask('+', "24242424FF0101FF"); gr->Dens(a,"3+");
-}
-</pre><div align="center"><img src="png/mask.png" alt="Sample mask">
-</div>
-<hr>
-<a name="mesh-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#mirror-sample" accesskey="n" rel="next">mirror sample</a>, Previous: <a href="#mask-sample" accesskey="p" rel="prev">mask sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-mesh"></a>
-<h3 class="section">10.72 Sample ‘<samp>mesh</samp>’</h3>
-
-
-<p>Function <a href="#mesh">mesh</a> draw wired surface. You can use <a href="#meshnum">meshnum</a> for changing number of lines to be drawn.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Mesh plot':rotate 50 60:box:mesh a
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_mesh(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- if(big!=3) gr->Title("Mesh plot");
- gr->Rotate(50,60); gr->Box(); gr->Mesh(a);
-}
-</pre><div align="center"><img src="png/mesh.png" alt="Sample mesh">
-</div>
-<hr>
-<a name="mirror-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#molecule-sample" accesskey="n" rel="next">molecule sample</a>, Previous: <a href="#mesh-sample" accesskey="p" rel="prev">mesh sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-mirror"></a>
-<h3 class="section">10.73 Sample ‘<samp>mirror</samp>’</h3>
-
-
-<p>Example of using options.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 31 41 '-pi*x*exp(-(y+1)^2-4*x^2)'
-subplot 2 2 0:title 'Options for coordinates':alpha on:light on:rotate 40 60:box
-surf a 'r';yrange 0 1:surf a 'b';yrange 0 -1
-subplot 2 2 1:title 'Option "meshnum"':rotate 40 60:box
-mesh a 'r'; yrange 0 1:mesh a 'b';yrange 0 -1; meshnum 5
-subplot 2 2 2:title 'Option "alpha"':rotate 40 60:box
-surf a 'r';yrange 0 1; alpha 0.7:surf a 'b';yrange 0 -1; alpha 0.3
-subplot 2 2 3 '<_':title 'Option "legend"'
-fplot 'x^3' 'r'; legend 'y = x^3':fplot 'cos(pi*x)' 'b'; legend 'y = cos \pi x'
-box:axis:legend 2
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_mirror(mglGraph *gr) // flag #
-{
- mglData a(31,41);
- gr->Fill(a,"-pi*x*exp(-(y+1)^2-4*x^2)");
-
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("Options for coordinates"); }
- gr->Alpha(true); gr->Light(true);
- gr->Rotate(40,60); gr->Box();
- gr->Surf(a,"r","yrange 0 1"); gr->Surf(a,"b","yrange 0 -1");
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("Option 'meshnum'");
- gr->Rotate(40,60); gr->Box();
- gr->Mesh(a,"r","yrange 0 1"); gr->Mesh(a,"b","yrange 0 -1; meshnum 5");
- gr->SubPlot(2,2,2); gr->Title("Option 'alpha'");
- gr->Rotate(40,60); gr->Box();
- gr->Surf(a,"r","yrange 0 1; alpha 0.7"); gr->Surf(a,"b","yrange 0 -1; alpha 0.3");
- gr->SubPlot(2,2,3,"<_"); gr->Title("Option 'legend'");
- gr->FPlot("x^3","r","legend 'y = x^3'"); gr->FPlot("cos(pi*x)","b","legend 'y = cos \\pi x'");
- gr->Box(); gr->Axis(); gr->Legend(2,"");
-}
-</pre><div align="center"><img src="png/mirror.png" alt="Sample mirror">
-</div>
-<hr>
-<a name="molecule-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ode-sample" accesskey="n" rel="next">ode sample</a>, Previous: <a href="#mirror-sample" accesskey="p" rel="prev">mirror sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-molecule"></a>
-<h3 class="section">10.74 Sample ‘<samp>molecule</samp>’</h3>
-
-
-<p>Example of drawing molecules.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">alpha on:light on
-subplot 2 2 0 '':title 'Methane, CH_4':rotate 60 120
-sphere 0 0 0 0.25 'k':drop 0 0 0 0 0 1 0.35 'h' 1 2:sphere 0 0 0.7 0.25 'g'
-drop 0 0 0 -0.94 0 -0.33 0.35 'h' 1 2:sphere -0.66 0 -0.23 0.25 'g'
-drop 0 0 0 0.47 0.82 -0.33 0.35 'h' 1 2:sphere 0.33 0.57 -0.23 0.25 'g'
-drop 0 0 0 0.47 -0.82 -0.33 0.35 'h' 1 2:sphere 0.33 -0.57 -0.23 0.25 'g'
-subplot 2 2 1 '':title 'Water, H{_2}O':rotate 60 100
-sphere 0 0 0 0.25 'r':drop 0 0 0 0.3 0.5 0 0.3 'm' 1 2:sphere 0.3 0.5 0 0.25 'g'
-drop 0 0 0 0.3 -0.5 0 0.3 'm' 1 2:sphere 0.3 -0.5 0 0.25 'g'
-subplot 2 2 2 '':title 'Oxygen, O_2':rotate 60 120
-drop 0 0.5 0 0 -0.3 0 0.3 'm' 1 2:sphere 0 0.5 0 0.25 'r'
-drop 0 -0.5 0 0 0.3 0 0.3 'm' 1 2:sphere 0 -0.5 0 0.25 'r'
-subplot 2 2 3 '':title 'Ammonia, NH_3':rotate 60 120
-sphere 0 0 0 0.25 'b':drop 0 0 0 0.33 0.57 0 0.32 'n' 1 2
-sphere 0.33 0.57 0 0.25 'g':drop 0 0 0 0.33 -0.57 0 0.32 'n' 1 2
-sphere 0.33 -0.57 0 0.25 'g':drop 0 0 0 -0.65 0 0 0.32 'n' 1 2
-sphere -0.65 0 0 0.25 'g'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_molecule(mglGraph *gr) // example of moleculas
-{
- gr->VertexColor(false); gr->Compression(false); // per-vertex colors and compression are detrimental to transparency
- gr->DoubleSided(false); // we do not get into atoms, while rendering internal surface has negative impact on trasparency
- gr->Alpha(true); gr->Light(true);
-
- gr->SubPlot(2,2,0,""); gr->Title("Methane, CH_4");
- gr->StartGroup("Methane");
- gr->Rotate(60,120);
- gr->Sphere(mglPoint(0,0,0),0.25,"k");
- gr->Drop(mglPoint(0,0,0),mglPoint(0,0,1),0.35,"h",1,2);
- gr->Sphere(mglPoint(0,0,0.7),0.25,"g");
- gr->Drop(mglPoint(0,0,0),mglPoint(-0.94,0,-0.33),0.35,"h",1,2);
- gr->Sphere(mglPoint(-0.66,0,-0.23),0.25,"g");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.47,0.82,-0.33),0.35,"h",1,2);
- gr->Sphere(mglPoint(0.33,0.57,-0.23),0.25,"g");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.47,-0.82,-0.33),0.35,"h",1,2);
- gr->Sphere(mglPoint(0.33,-0.57,-0.23),0.25,"g");
- gr->EndGroup();
-
- gr->SubPlot(2,2,1,""); gr->Title("Water, H_{2}O");
- gr->StartGroup("Water");
- gr->Rotate(60,100);
- gr->StartGroup("Water_O");
- gr->Sphere(mglPoint(0,0,0),0.25,"r");
- gr->EndGroup();
- gr->StartGroup("Water_Bond_1");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.3,0.5,0),0.3,"m",1,2);
- gr->EndGroup();
- gr->StartGroup("Water_H_1");
- gr->Sphere(mglPoint(0.3,0.5,0),0.25,"g");
- gr->EndGroup();
- gr->StartGroup("Water_Bond_2");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.3,-0.5,0),0.3,"m",1,2);
- gr->EndGroup();
- gr->StartGroup("Water_H_2");
- gr->Sphere(mglPoint(0.3,-0.5,0),0.25,"g");
- gr->EndGroup();
- gr->EndGroup();
-
- gr->SubPlot(2,2,2,""); gr->Title("Oxygen, O_2");
- gr->StartGroup("Oxygen");
- gr->Rotate(60,120);
- gr->Drop(mglPoint(0,0.5,0),mglPoint(0,-0.3,0),0.3,"m",1,2);
- gr->Sphere(mglPoint(0,0.5,0),0.25,"r");
- gr->Drop(mglPoint(0,-0.5,0),mglPoint(0,0.3,0),0.3,"m",1,2);
- gr->Sphere(mglPoint(0,-0.5,0),0.25,"r");
- gr->EndGroup();
-
- gr->SubPlot(2,2,3,""); gr->Title("Ammonia, NH_3");
- gr->StartGroup("Ammonia");
- gr->Rotate(60,120);
- gr->Sphere(mglPoint(0,0,0),0.25,"b");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.33,0.57,0),0.32,"n",1,2);
- gr->Sphere(mglPoint(0.33,0.57,0),0.25,"g");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.33,-0.57,0),0.32,"n",1,2);
- gr->Sphere(mglPoint(0.33,-0.57,0),0.25,"g");
- gr->Drop(mglPoint(0,0,0),mglPoint(-0.65,0,0),0.32,"n",1,2);
- gr->Sphere(mglPoint(-0.65,0,0),0.25,"g");
- gr->EndGroup();
- gr->DoubleSided( true ); // put back
-}
-</pre><div align="center"><img src="png/molecule.png" alt="Sample molecule">
-</div>
-<hr>
-<a name="ode-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ohlc-sample" accesskey="n" rel="next">ohlc sample</a>, Previous: <a href="#molecule-sample" accesskey="p" rel="prev">molecule sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ode"></a>
-<h3 class="section">10.75 Sample ‘<samp>ode</samp>’</h3>
-
-
-<p>Example of phase plain created by <a href="#ode">ode</a> solving, contour lines (<a href="#cont">cont</a>) and <a href="#flow">flow</a> threads.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0 '<_':title 'Cont':box
-axis:xlabel 'x':ylabel '\dot{x}'
-new f 100 100 'y^2+2*x^3-x^2-0.5':cont f
-
-subplot 2 2 1 '<_':title 'Flow':box
-axis:xlabel 'x':ylabel '\dot{x}'
-new fx 100 100 'x-3*x^2'
-new fy 100 100 'y'
-flow fy fx 'v';value 7
-
-subplot 2 2 2 '<_':title 'ODE':box
-axis:xlabel 'x':ylabel '\dot{x}'
-for $x -1 1 0.1
- ode r 'y;x-3*x^2' 'xy' [$x,0]
- plot r(0) r(1)
- ode r '-y;-x+3*x^2' 'xy' [$x,0]
- plot r(0) r(1)
-next
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_ode(mglGraph *gr)
-{
- gr->SubPlot(2,2,0,"<_"); gr->Title("Cont"); gr->Box();
- gr->Axis(); gr->Label('x',"x"); gr->Label('y',"\\dot{x}");
- mglData f(100,100); gr->Fill(f,"y^2+2*x^3-x^2-0.5");
- gr->Cont(f);
- gr->SubPlot(2,2,1,"<_"); gr->Title("Flow"); gr->Box();
- gr->Axis(); gr->Label('x',"x"); gr->Label('y',"\\dot{x}");
- mglData fx(100,100), fy(100,100); gr->Fill(fx,"x-3*x^2"); gr->Fill(fy,"y");
- gr->Flow(fy,fx,"v","value 7");
- gr->SubPlot(2,2,2,"<_"); gr->Title("ODE"); gr->Box();
- gr->Axis(); gr->Label('x',"x"); gr->Label('y',"\\dot{x}");
- for(double x=-1;x<1;x+=0.1)
- {
- mglData in(2), r; in.a[0]=x;
- r = mglODE("y;x-3*x^2","xy",in);
- gr->Plot(r.SubData(0), r.SubData(1));
- r = mglODE("-y;-x+3*x^2","xy",in);
- gr->Plot(r.SubData(0), r.SubData(1));
- }
-}
-</pre><div align="center"><img src="png/ode.png" alt="Sample ode">
-</div>
-<hr>
-<a name="ohlc-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#param1-sample" accesskey="n" rel="next">param1 sample</a>, Previous: <a href="#ode-sample" accesskey="p" rel="prev">ode sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ohlc"></a>
-<h3 class="section">10.76 Sample ‘<samp>ohlc</samp>’</h3>
-
-
-<p>Function <a href="#ohlc">ohlc</a> draw Open-High-Low-Close diagram. This diagram show vertical line for between maximal(high) and minimal(low) values, as well as horizontal lines before/after vertical line for initial(open)/final(close) values of some process.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new o 10 '0.5*sin(pi*x)'
-new c 10 '0.5*sin(pi*(x+2/9))'
-new l 10 '0.3*rnd-0.8'
-new h 10 '0.3*rnd+0.5'
-subplot 1 1 0 '':title 'OHLC plot':box:ohlc o h l c
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_ohlc(mglGraph *gr) // flow threads and density plot
-{
- mglData o(10), h(10), l(10), c(10);
- gr->Fill(o,"0.5*sin(pi*x)"); gr->Fill(c,"0.5*sin(pi*(x+2/9))");
- gr->Fill(l,"0.3*rnd-0.8"); gr->Fill(h,"0.3*rnd+0.5");
- if(big!=3) { gr->SubPlot(1,1,0,""); gr->Title("OHLC plot"); }
- gr->Box(); gr->OHLC(o,h,l,c);
-}
-</pre><div align="center"><img src="png/ohlc.png" alt="Sample ohlc">
-</div>
-<hr>
-<a name="param1-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#param2-sample" accesskey="n" rel="next">param2 sample</a>, Previous: <a href="#ohlc-sample" accesskey="p" rel="prev">ohlc sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-param1"></a>
-<h3 class="section">10.77 Sample ‘<samp>param1</samp>’</h3>
-
-
-<p>Example of parametric plots for 1D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 100 'sin(pi*x)'
-new y 100 'cos(pi*x)'
-new z 100 'sin(2*pi*x)'
-new c 100 'cos(2*pi*x)'
-
-subplot 4 3 0:rotate 40 60:box:plot x y z
-subplot 4 3 1:rotate 40 60:box:area x y z
-subplot 4 3 2:rotate 40 60:box:tens x y z c
-subplot 4 3 3:rotate 40 60:box:bars x y z
-subplot 4 3 4:rotate 40 60:box:stem x y z
-subplot 4 3 5:rotate 40 60:box:textmark x y z c*2 '\alpha'
-subplot 4 3 6:rotate 40 60:box:tube x y z c/10
-subplot 4 3 7:rotate 40 60:box:mark x y z c 's'
-subplot 4 3 8:box:error x y z/10 c/10
-subplot 4 3 9:rotate 40 60:box:step x y z
-subplot 4 3 10:rotate 40 60:box:torus x z 'z';light on
-subplot 4 3 11:rotate 40 60:box:label x y z '%z'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_param1(mglGraph *gr) // 1d parametric plots
-{
- mglData x(100), y(100), z(100), c(100);
- gr->Fill(x,"sin(pi*x)"); gr->Fill(y,"cos(pi*x)");
- gr->Fill(z,"sin(2*pi*x)"); gr->Fill(c,"cos(2*pi*x)");
-
- gr->SubPlot(4,3,0); gr->Rotate(40,60); gr->Box(); gr->Plot(x,y,z);
- gr->SubPlot(4,3,1); gr->Rotate(40,60); gr->Box(); gr->Area(x,y,z);
- gr->SubPlot(4,3,2); gr->Rotate(40,60); gr->Box(); gr->Tens(x,y,z,c);
- gr->SubPlot(4,3,3); gr->Rotate(40,60); gr->Box(); gr->Bars(x,y,z);
- gr->SubPlot(4,3,4); gr->Rotate(40,60); gr->Box(); gr->Stem(x,y,z);
- gr->SubPlot(4,3,5); gr->Rotate(40,60); gr->Box(); gr->TextMark(x,y,z,c*2,"\\alpha");
- gr->SubPlot(4,3,6); gr->Rotate(40,60); gr->Box(); gr->Tube(x,y,z,c/10,"","light on");
- gr->SubPlot(4,3,7); gr->Rotate(40,60); gr->Box(); gr->Mark(x,y,z,c,"s");
- gr->SubPlot(4,3,8); gr->Rotate(40,60); gr->Box(); gr->Error(x,y,z/10,c/10);
- gr->SubPlot(4,3,9); gr->Rotate(40,60); gr->Box(); gr->Step(x,y,z);
- gr->SubPlot(4,3,10);gr->Rotate(40,60); gr->Box(); gr->Torus(x,z,"z","light on");
- gr->SubPlot(4,3,11);gr->Rotate(40,60); gr->Box(); gr->Label(x,y,z,"%z");
-}
-</pre><div align="center"><img src="png/param1.png" alt="Sample param1">
-</div>
-<hr>
-<a name="param2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#param3-sample" accesskey="n" rel="next">param3 sample</a>, Previous: <a href="#param1-sample" accesskey="p" rel="prev">param1 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-param2"></a>
-<h3 class="section">10.78 Sample ‘<samp>param2</samp>’</h3>
-
-
-<p>Example of parametric plots for 2D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 100 100 'sin(pi*(x+y)/2)*cos(pi*y/2)'
-new y 100 100 'cos(pi*(x+y)/2)*cos(pi*y/2)'
-new z 100 100 'sin(pi*y/2)'
-new c 100 100 'cos(pi*x)'
-
-subplot 4 4 0:rotate 40 60:box:surf x y z
-subplot 4 4 1:rotate 40 60:box:surfc x y z c
-subplot 4 4 2:rotate 40 60:box:surfa x y z c;alpha 1
-subplot 4 4 3:rotate 40 60:box:mesh x y z;meshnum 10
-subplot 4 4 4:rotate 40 60:box:tile x y z;meshnum 10
-subplot 4 4 5:rotate 40 60:box:tiles x y z c;meshnum 10
-subplot 4 4 6:rotate 40 60:box:axial x y z;alpha 0.5;light on
-subplot 4 4 7:rotate 40 60:box:cont x y z
-subplot 4 4 8:rotate 40 60:box:contf x y z;light on:contv x y z;light on
-subplot 4 4 9:rotate 40 60:box:belt x y z 'x';meshnum 10;light on
-subplot 4 4 10:rotate 40 60:box:dens x y z;alpha 0.5
-subplot 4 4 11:rotate 40 60:box
-fall x y z 'g';meshnum 10:fall x y z 'rx';meshnum 10
-subplot 4 4 12:rotate 40 60:box:belt x y z '';meshnum 10;light on
-subplot 4 4 13:rotate 40 60:box:boxs x y z '';meshnum 10;light on
-subplot 4 4 14:rotate 40 60:box:boxs x y z '#';meshnum 10;light on
-subplot 4 4 15:rotate 40 60:box:boxs x y z '@';meshnum 10;light on
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_param2(mglGraph *gr) // 2d parametric plots
-{
- mglData x(100,100), y(100,100), z(100,100), c(100,100);
- gr->Fill(x,"sin(pi*(x+y)/2)*cos(pi*y/2)"); gr->Fill(y,"cos(pi*(x+y)/2)*cos(pi*y/2)");
- gr->Fill(z,"sin(pi*y/2)"); gr->Fill(c,"cos(pi*x)");
-
- gr->SubPlot(4,4,0); gr->Rotate(40,60); gr->Box(); gr->Surf(x,y,z);
- gr->SubPlot(4,4,1); gr->Rotate(40,60); gr->Box(); gr->SurfC(x,y,z,c);
- gr->SubPlot(4,4,2); gr->Rotate(40,60); gr->Box(); gr->SurfA(x,y,z,c,"","alpha 1");
- gr->SubPlot(4,4,3); gr->Rotate(40,60); gr->Box(); gr->Mesh(x,y,z,"","meshnum 10");
- gr->SubPlot(4,4,4); gr->Rotate(40,60); gr->Box(); gr->Tile(x,y,z,"","meshnum 10");
- gr->SubPlot(4,4,5); gr->Rotate(40,60); gr->Box(); gr->TileS(x,y,z,c,"","meshnum 10");
- gr->SubPlot(4,4,6); gr->Rotate(40,60); gr->Box(); gr->Axial(x,y,z,"","alpha 0.5;light on");
- gr->SubPlot(4,4,7); gr->Rotate(40,60); gr->Box(); gr->Cont(x,y,z);
- gr->SubPlot(4,4,8); gr->Rotate(40,60); gr->Box(); gr->ContF(x,y,z,"","light on"); gr->ContV(x,y,z,"","light on");
- gr->SubPlot(4,4,9); gr->Rotate(40,60); gr->Box(); gr->Belt(x,y,z,"x","meshnum 10;light on");
- gr->SubPlot(4,4,10);gr->Rotate(40,60); gr->Box(); gr->Dens(x,y,z,"","alpha 0.5");
- gr->SubPlot(4,4,11);gr->Rotate(40,60); gr->Box();
- gr->Fall(x,y,z,"g","meshnum 10"); gr->Fall(x,y,z,"rx","meshnum 10");
- gr->SubPlot(4,4,12); gr->Rotate(40,60); gr->Box(); gr->Belt(x,y,z,"","meshnum 10;light on");
- gr->SubPlot(4,4,13); gr->Rotate(40,60); gr->Box(); gr->Boxs(x,y,z,"","meshnum 10;light on");
- gr->SubPlot(4,4,14); gr->Rotate(40,60); gr->Box(); gr->Boxs(x,y,z,"#","meshnum 10");
- gr->SubPlot(4,4,15); gr->Rotate(40,60); gr->Box(); gr->Boxs(x,y,z,"@","meshnum 10;light on");
-}
-</pre><div align="center"><img src="png/param2.png" alt="Sample param2">
-</div>
-<hr>
-<a name="param3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#paramv-sample" accesskey="n" rel="next">paramv sample</a>, Previous: <a href="#param2-sample" accesskey="p" rel="prev">param2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-param3"></a>
-<h3 class="section">10.79 Sample ‘<samp>param3</samp>’</h3>
-
-
-<p>Example of parametric plots for 3D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 50 50 50 '(x+2)/3*sin(pi*y/2)'
-new y 50 50 50 '(x+2)/3*cos(pi*y/2)'
-new z 50 50 50 'z'
-new c 50 50 50 '-2*(x^2+y^2+z^4-z^2)+0.2'
-new d 50 50 50 '1-2*tanh(2*(x+y)^2)'
-
-alpha on:light on
-subplot 4 3 0:rotate 40 60:box:surf3 x y z c
-subplot 4 3 1:rotate 40 60:box:surf3c x y z c d
-subplot 4 3 2:rotate 40 60:box:surf3a x y z c d
-subplot 4 3 3:rotate 40 60:box:cloud x y z c
-subplot 4 3 4:rotate 40 60:box:cont3 x y z c:cont3 x y z c 'x':cont3 x y z c 'z'
-subplot 4 3 5:rotate 40 60:box:contf3 x y z c:contf3 x y z c 'x':contf3 x y z c 'z'
-subplot 4 3 6:rotate 40 60:box:dens3 x y z c:dens3 x y z c 'x':dens3 x y z c 'z'
-subplot 4 3 7:rotate 40 60:box:dots x y z c;meshnum 15
-subplot 4 3 8:rotate 40 60:box:densx c '' 0:densy c '' 0:densz c '' 0
-subplot 4 3 9:rotate 40 60:box:contx c '' 0:conty c '' 0:contz c '' 0
-subplot 4 3 10:rotate 40 60:box:contfx c '' 0:contfy c '' 0:contfz c '' 0
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_param3(mglGraph *gr) // 3d parametric plots
-{
- mglData x(50,50,50), y(50,50,50), z(50,50,50), c(50,50,50), d(50,50,50);
- gr->Fill(x,"(x+2)/3*sin(pi*y/2)"); gr->Fill(y,"(x+2)/3*cos(pi*y/2)"); gr->Fill(z,"z");
- gr->Fill(c,"-2*(x^2+y^2+z^4-z^2)+0.2"); gr->Fill(d,"1-2*tanh(2*(x+y)^2)");
-
- gr->Light(true); gr->Alpha(true);
- gr->SubPlot(4,3,0); gr->Rotate(40,60); gr->Box(); gr->Surf3(x,y,z,c);
- gr->SubPlot(4,3,1); gr->Rotate(40,60); gr->Box(); gr->Surf3C(x,y,z,c,d);
- gr->SubPlot(4,3,2); gr->Rotate(40,60); gr->Box(); gr->Surf3A(x,y,z,c,d);
- gr->SubPlot(4,3,3); gr->Rotate(40,60); gr->Box(); gr->Cloud(x,y,z,c);
- gr->SubPlot(4,3,4); gr->Rotate(40,60); gr->Box(); gr->Cont3(x,y,z,c); gr->Cont3(x,y,z,c,"x"); gr->Cont3(x,y,z,c,"z");
- gr->SubPlot(4,3,5); gr->Rotate(40,60); gr->Box(); gr->ContF3(x,y,z,c);gr->ContF3(x,y,z,c,"x");gr->ContF3(x,y,z,c,"z");
- gr->SubPlot(4,3,6); gr->Rotate(40,60); gr->Box(); gr->Dens3(x,y,z,c); gr->Dens3(x,y,z,c,"x"); gr->Dens3(x,y,z,c,"z");
- gr->SubPlot(4,3,7); gr->Rotate(40,60); gr->Box(); gr->Dots(x,y,z,c,"","meshnum 15");
- gr->SubPlot(4,3,8); gr->Rotate(40,60); gr->Box(); gr->DensX(c,"",0); gr->DensY(c,"",0); gr->DensZ(c,"",0);
- gr->SubPlot(4,3,9); gr->Rotate(40,60); gr->Box(); gr->ContX(c,"",0); gr->ContY(c,"",0); gr->ContZ(c,"",0);
- gr->SubPlot(4,3,10);gr->Rotate(40,60); gr->Box(); gr->ContFX(c,"",0); gr->ContFY(c,"",0); gr->ContFZ(c,"",0);
-}
-</pre><div align="center"><img src="png/param3.png" alt="Sample param3">
-</div>
-<hr>
-<a name="paramv-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#parser-sample" accesskey="n" rel="next">parser sample</a>, Previous: <a href="#param3-sample" accesskey="p" rel="prev">param3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-paramv"></a>
-<h3 class="section">10.80 Sample ‘<samp>paramv</samp>’</h3>
-
-
-<p>Example of parametric plots for vector fields.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 20 20 20 '(x+2)/3*sin(pi*y/2)'
-new y 20 20 20 '(x+2)/3*cos(pi*y/2)'
-new z 20 20 20 'z+x'
-new ex 20 20 20 'x'
-new ey 20 20 20 'x^2+y'
-new ez 20 20 20 'y^2+z'
-
-new x1 50 50 '(x+2)/3*sin(pi*y/2)'
-new y1 50 50 '(x+2)/3*cos(pi*y/2)'
-new e1 50 50 'x'
-new e2 50 50 'x^2+y'
-
-subplot 3 3 0:rotate 40 60:box:vect x1 y1 e1 e2
-subplot 3 3 1:rotate 40 60:box:flow x1 y1 e1 e2
-subplot 3 3 2:rotate 40 60:box:pipe x1 y1 e1 e2
-subplot 3 3 3:rotate 40 60:box:dew x1 y1 e1 e2
-subplot 3 3 4:rotate 40 60:box:vect x y z ex ey ez
-subplot 3 3 5:rotate 40 60:box
-vect3 x y z ex ey ez:vect3 x y z ex ey ez 'x':vect3 x y z ex ey ez 'z'
-grid3 x y z z '{r9}':grid3 x y z z '{g9}x':grid3 x y z z '{b9}z'
-subplot 3 3 6:rotate 40 60:box:flow x y z ex ey ez
-subplot 3 3 7:rotate 40 60:box:pipe x y z ex ey ez
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_paramv(mglGraph *gr) // parametric plots for vector field
-{
- mglData x(20,20,20), y(20,20,20), z(20,20,20), ex(20,20,20), ey(20,20,20), ez(20,20,20);
- gr->Fill(x,"(x+2)/3*sin(pi*y/2)"); gr->Fill(y,"(x+2)/3*cos(pi*y/2)"); gr->Fill(z,"x+z");
- gr->Fill(ex,"x"); gr->Fill(ey,"x^2+y"); gr->Fill(ez,"y^2+z");
- mglData x1(20,20), y1(20,20), e1(20,20), e2(20,20);
- gr->Fill(x1,"(x+2)/3*sin(pi*y/2)"); gr->Fill(y1,"(x+2)/3*cos(pi*y/2)");
- gr->Fill(e1,"x"); gr->Fill(e2,"x^2+y");
-
- gr->SubPlot(3,3,0); gr->Rotate(40,60); gr->Box(); gr->Vect(x1,y1,e1,e2);
- gr->SubPlot(3,3,1); gr->Rotate(40,60); gr->Box(); gr->Flow(x1,y1,e1,e2);
- gr->SubPlot(3,3,2); gr->Rotate(40,60); gr->Box(); gr->Pipe(x1,y1,e1,e2);
- gr->SubPlot(3,3,3); gr->Rotate(40,60); gr->Box(); gr->Dew(x1,y1,e1,e2);
- gr->SubPlot(3,3,4); gr->Rotate(40,60); gr->Box(); gr->Vect(x,y,z,ex,ey,ez);
- gr->SubPlot(3,3,5); gr->Rotate(40,60); gr->Box();
- gr->Vect3(x,y,z,ex,ey,ez); gr->Vect3(x,y,z,ex,ey,ez,"x"); gr->Vect3(x,y,z,ex,ey,ez,"z");
- gr->Grid3(x,y,z,z,"{r9}"); gr->Grid3(x,y,z,z,"{g9}x"); gr->Grid3(x,y,z,z,"{b9}z");
- gr->SubPlot(3,3,6); gr->Rotate(40,60); gr->Box(); gr->Flow(x,y,z,ex,ey,ez);
- gr->SubPlot(3,3,7); gr->Rotate(40,60); gr->Box(); gr->Pipe(x,y,z,ex,ey,ez);
-}
-</pre><div align="center"><img src="png/paramv.png" alt="Sample paramv">
-</div>
-<hr>
-<a name="parser-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#pde-sample" accesskey="n" rel="next">pde sample</a>, Previous: <a href="#paramv-sample" accesskey="p" rel="prev">paramv sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-parser"></a>
-<h3 class="section">10.81 Sample ‘<samp>parser</samp>’</h3>
-
-
-<p>Basic MGL script.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">title 'MGL parser sample'
-# call function
-call 'sample'
-
-# ordinary for-loop
-for $0 -1 1 0.1
-if $0<0:line 0 0 1 $0 'r':else:line 0 0 1 $0 'g':endif
-next
-
-# if-elseif-else
-for $i -1 1 0.5
-if $i<0
-text 1.1 $i '$i' 'b'
-elseif $i>0
-text 1.1 $i '$i' 'r'
-else
-text 1.1 $i '$i'
-endif
-next
-
-# ordinary do-while
-do
-defnum $i $i-0.2
-line 0 0 $i 1 'b'
-while $i>0
-
-# do-next-break
-do
-defnum $i $i-0.2
-if $i<-1 then break
-line 0 0 $i 1 'm'
-next
-
-# for-while-continue
-for $i -5 10
-text $i/5 1.1 'a'+($i+5)
-if $i<0
-text $i/5-0.06 1.1 '--' 'b'
-elseif mod($i,2)=0
-text $i/5-0.06 1.1 '~' 'r'
-else
-# NOTE: 'continue' bypass the 'while'!
-continue
-endif
-# NOTE: 'while' limit the actual number of iterations
-while $i<5
-
-# nested loops
-for $i 0 1 0.1
-for $j 0 1 0.1
-ball $i $j
-if $j>0.5 then continue
-ball $i $j 'b+'
-next
-next
-
-func 'sample'
-new dat 100 'sin(2*pi*(i/99+1))'
-plot dat;xrange -1 0
-box:axis
-xlabel 'x':ylabel 'y'
-return
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_parser(mglGraph *gr) // example of MGL parsing
-{ // NOTE: MGL version show much more variants of loops and conditions.
- gr->Title("MGL parser sample");
- double a[100]; // let a_i = sin(4*pi*x), x=0...1
- for(int i=0;i<100;i++)a[i]=sin(2*M_PI*i/99);
- mglParse *parser = new mglParse;
- // Add MGL variable and set yours data to it.
- mglData *d = dynamic_cast<mglData*>(parser->AddVar("dat"));
- if(d) d->Set(a,100);
- parser->Execute(gr, "plot dat; xrange -1 0\nbox\naxis");
- // You may break script at any line do something
- // and continue after that.
- parser->Execute(gr, "xlabel 'x'\nylabel 'y'\nbox");
- // Also you may use cycles or conditions in script.
- parser->Execute(gr, "for $0 -1 1 0.1\nif $0<0\n"
- "line 0 0 1 $0 'r':else:line 0 0 1 $0 'g'\n"
- "endif\nnext");
- // You may use for or do-while loops as C/C++ one
- double i=1;
- do {
- char buf[64]; sprintf(buf,"line 0 0 %g 1 'b'",i);
- parser->Execute(gr, buf); i=i-0.2;
- } while(i>0);
- // or as MGL one.
- parser->Execute(gr, "for $i -1 1 0.5\n"
- "if $i<0\ntext 1.1 $i '$i' 'b'\n"
- "elseif $i>0\ntext 1.1 $i '$i' 'r'\n"
- "else\ntext 1.1 $i '$i'\nendif\nnext\n");
- // There are 'break' and 'continue' commands in MGL too.
- // NOTE: 'next' act as "while(1)" in do-while loops.
- parser->Execute(gr, "do\ndefnum $i $i-0.2\n"
- "if $i<-1 then break\nline 0 0 $i 1 'm'\nnext\n");
- // One issue with 'continue' -- it bypass 'while' checking
- parser->Execute(gr, "for $i -5 10\ntext $i/5 1.1 'a'+($i+5)\nif $i<0\n"
- "text $i/5-0.06 1.1 '--' 'b'\n"
- "elseif mod($i,2)=0\ntext $i/5-0.06 1.1 '~' 'r'\n"
- "else\ncontinue\nendif\n"
- // NOTE: 'while' limit the actual number of iterations in for-loop.
- "while $i<5\n");
- // Finally, MGL support nested loops too.
- parser->Execute(gr, "for $i 0 1 0.1\nfor $j 0 1 0.1\nball $i $j\n"
- "if $j>0.5 then continue\nball $i $j 'b+'\nnext\nnext\n");
- // Clean up memory.
- delete parser;
-}
-</pre><div align="center"><img src="png/parser.png" alt="Sample parser">
-</div>
-<hr>
-<a name="pde-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#pendelta-sample" accesskey="n" rel="next">pendelta sample</a>, Previous: <a href="#parser-sample" accesskey="p" rel="prev">parser sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-pde"></a>
-<h3 class="section">10.82 Sample ‘<samp>pde</samp>’</h3>
-
-
-<p>Example of <a href="#pde">pde</a> solver.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new re 128 'exp(-48*(x+0.7)^2)':new im 128
-pde a 'p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)' re im 0.01 30
-transpose a
-subplot 1 1 0 '<_':title 'PDE solver'
-axis:xlabel '\i x':ylabel '\i z'
-crange 0 1:dens a 'wyrRk'
-fplot '-x' 'k|'
-text 0 0.95 'Equation: ik_0\partial_zu + \Delta u + x\cdot u + i \frac{x+z}{2}\cdot u = 0\n{}absorption: (x+z)/2 for x+z>0'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_pde(mglGraph *gr) // PDE sample
-{
- mglData a,re(128),im(128);
- gr->Fill(re,"exp(-48*(x+0.7)^2)");
- a = gr->PDE("p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)", re, im, 0.01, 30);
- a.Transpose("yxz");
- if(big!=3) {gr->SubPlot(1,1,0,"<_"); gr->Title("PDE solver"); }
- gr->SetRange('c',0,1); gr->Dens(a,"wyrRk");
- gr->Axis(); gr->Label('x', "\\i x"); gr->Label('y', "\\i z");
- gr->FPlot("-x", "k|");
- gr->Puts(mglPoint(0, 0.95), "Equation: ik_0\\partial_zu + \\Delta u + x\\cdot u + i \\frac{x+z}{2}\\cdot u = 0\nabsorption: (x+z)/2 for x+z>0");
-}
-</pre><div align="center"><img src="png/pde.png" alt="Sample pde">
-</div>
-<hr>
-<a name="pendelta-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#pipe-sample" accesskey="n" rel="next">pipe sample</a>, Previous: <a href="#pde-sample" accesskey="p" rel="prev">pde sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-pendelta"></a>
-<h3 class="section">10.83 Sample ‘<samp>pendelta</samp>’</h3>
-
-
-<p>Example of <a href="#pendelta">pendelta</a> for lines and glyphs smoothing.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 6
-list a 0.25 0.5 1 2 4
-for $0 0 4
-pendelta a($0)
-define $1 0.5*$0-1
-line -1 $1 1 $1 'r'
-text 0 $1 'delta=',a($0)
-next
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_pendelta(mglGraph *gr)
-{
- double a[5]={0.25,0.5,1,2,4};
- gr->SetQuality(6);
- char buf[64];
- for(int i=0;i<5;i++)
- {
- gr->SetPenDelta(a[i]);
- gr->Line(mglPoint(-1,0.5*i-1), mglPoint(1,0.5*i-1),"r");
- sprintf(buf,"delta=%g",a[i]);
- gr->Puts(mglPoint(0,0.5*i-1),buf);
- }
-}
-</pre><div align="center"><img src="png/pendelta.png" alt="Sample pendelta">
-</div>
-<hr>
-<a name="pipe-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#plot-sample" accesskey="n" rel="next">plot sample</a>, Previous: <a href="#pendelta-sample" accesskey="p" rel="prev">pendelta sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-pipe"></a>
-<h3 class="section">10.84 Sample ‘<samp>pipe</samp>’</h3>
-
-
-<p>Function <a href="#pipe">pipe</a> is similar to <a href="#flow">flow</a> but draw pipes (tubes) which radius is proportional to the amplitude of vector field. The color scheme is used for coloring (see <a href="#Color-scheme">Color scheme</a>). At this warm color corresponds to normal flow (like attractor), cold one corresponds to inverse flow (like source).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2v'
-call 'prepare3v'
-subplot 2 2 0 '':title 'Pipe plot (default)':light on:box:pipe a b
-subplot 2 2 1 '':title '"i" style':box:pipe a b 'i'
-subplot 2 2 2 '':title 'from edges only':box:pipe a b '#'
-subplot 2 2 3:title '3d variant':rotate 50 60:box:pipe ex ey ez '' 0.1
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_pipe(mglGraph *gr)
-{
- mglData a,b; mgls_prepare2v(&a,&b);
- if(big!=3) {gr->SubPlot(2,2,0,""); gr->Title("Pipe plot (default)");}
- gr->Light(true); gr->Box(); gr->Pipe(a,b);
- if(big==3) return;
- gr->SubPlot(2,2,1,""); gr->Title("'i' style"); gr->Box(); gr->Pipe(a,b,"i");
- gr->SubPlot(2,2,2,""); gr->Title("'\\#' style"); gr->Box(); gr->Pipe(a,b,"#");
- mglData ex,ey,ez; mgls_prepare3v(&ex,&ey,&ez);
- gr->SubPlot(2,2,3); gr->Title("3d variant"); gr->Rotate(50,60);
- gr->Box(); gr->Pipe(ex,ey,ez,"",0.1);
-}
-</pre><div align="center"><img src="png/pipe.png" alt="Sample pipe">
-</div>
-<hr>
-<a name="plot-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#pmap-sample" accesskey="n" rel="next">pmap sample</a>, Previous: <a href="#pipe-sample" accesskey="p" rel="prev">pipe sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-plot"></a>
-<h3 class="section">10.85 Sample ‘<samp>plot</samp>’</h3>
-
-
-<p>Function <a href="#plot">plot</a> is most standard way to visualize 1D data array. By default, <code>Plot</code> use colors from palette. However, you can specify manual color/palette, and even set to use new color for each points by using ‘<samp>!</samp>’ style. Another feature is ‘<samp> </samp>’ style which draw only markers without line between points.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 2 2 0 '':title 'Plot plot (default)':box:plot y
-subplot 2 2 2 '':title ''!' style; 'rgb' palette':box:plot y 'o!rgb'
-subplot 2 2 3 '':title 'just markers':box:plot y ' +'
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 2 2 1:title '3d variant':rotate 50 60:box:plot xc yc z 'rs'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_plot(mglGraph *gr)
-{
- mglData y; mgls_prepare1d(&y); gr->SetOrigin(0,0,0);
- if(big!=3) { gr->SubPlot(2,2,0,""); gr->Title("Plot plot (default)"); }
- gr->Box(); gr->Plot(y);
- if(big==3) return;
- gr->SubPlot(2,2,2,""); gr->Title("'!' style; 'rgb' palette"); gr->Box(); gr->Plot(y,"o!rgb");
- gr->SubPlot(2,2,3,""); gr->Title("just markers"); gr->Box(); gr->Plot(y," +");
- gr->SubPlot(2,2,1); gr->Title("3d variant"); gr->Rotate(50,60); gr->Box();
- mglData yc(30), xc(30), z(30); z.Modify("2*x-1");
- yc.Modify("sin(pi*(2*x-1))"); xc.Modify("cos(pi*2*x-pi)");
- gr->Plot(xc,yc,z,"rs");
-}
-</pre><div align="center"><img src="png/plot.png" alt="Sample plot">
-</div>
-<hr>
-<a name="pmap-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#primitives-sample" accesskey="n" rel="next">primitives sample</a>, Previous: <a href="#plot-sample" accesskey="p" rel="prev">plot sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-pmap"></a>
-<h3 class="section">10.86 Sample ‘<samp>pmap</samp>’</h3>
-
-
-<p>Function <a href="#pmap">pmap</a> draw Poincare map – show intersections of the curve and the surface.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_^':title 'Poincare map sample'
-ode r 'cos(y)+sin(z);cos(z)+sin(x);cos(x)+sin(y)' 'xyz' [0.1,0,0] 0.1 100
-rotate 40 60:copy x r(0):copy y r(1):copy z r(2)
-ranges x y z
-axis:plot x y z 'b'
-xlabel '\i x' 0:ylabel '\i y' 0:zlabel '\i z'
-pmap x y z z 'b#o'
-fsurf '0'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_pmap(mglGraph *gr)
-{
- gr->SubPlot(1,1,0,"<_^");
- if(big!=3) gr->Title("Poincare map sample");
- mglData ini(3); ini[0]=0.1;
- mglData r(mglODE("cos(y)+sin(z);cos(z)+sin(x);cos(x)+sin(y)","xyz",ini,0.1,100));
- mglData x(r.SubData(0)),y(r.SubData(1)), z(r.SubData(2));
- gr->Rotate(40,60); gr->SetRanges(x,y,z);
- gr->Axis(); gr->FSurf("0"); gr->Plot(x,y,z,"b");
- gr->Label('x',"\\i x",0); gr->Label('y',"\\i y",0); gr->Label('z',"\\i z",0);
- gr->Pmap(x,y,z,z, "b#o");
-}
-</pre><div align="center"><img src="png/pmap.png" alt="Sample pmap">
-</div>
-<hr>
-<a name="primitives-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#projection-sample" accesskey="n" rel="next">projection sample</a>, Previous: <a href="#pmap-sample" accesskey="p" rel="prev">pmap sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-primitives"></a>
-<h3 class="section">10.87 Sample ‘<samp>primitives</samp>’</h3>
-
-
-<p>Example of primitives: <a href="#line">line</a>, <a href="#curve">curve</a>, <a href="#rhomb">rhomb</a>, <a href="#ellipse">ellipse</a>, <a href="#face">face</a>, <a href="#sphere">sphere</a>, <a href="#drop">drop</a>, <a href="#cone">cone</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0 '':title 'Line, Curve, Rhomb, Ellipse' '' -1.5
-line -1 -1 -0.5 1 'qAI'
-curve -0.6 -1 1 1 0 1 1 1 'rA'
-ball 0 -0.5 '*':ball 1 -0.1 '*'
-rhomb 0 0.4 1 0.9 0.2 'b#'
-rhomb 0 0 1 0.4 0.2 'cg@'
-ellipse 0 -0.5 1 -0.1 0.2 'u#'
-ellipse 0 -1 1 -0.6 0.2 'm@'
-
-subplot 2 3 1 '':title 'Arc, Polygon, Symbol';size -1.2
-arc -0.6 0 -0.6 0.3 180 '2kA':ball -0.6 0
-polygon 0 0 0 0.4 6 'r'
-new x 50 'cos(3*pi*x)':new y 50 'sin(pi*x)'
-addsymbol 'a' x y
-symbol 0.7 0 'a'
-
-light on
-subplot 2 3 3 '<^>' 0 -0.2:title 'Face[xyz]';size -1.5:rotate 50 60:box
-facex 1 0 -1 1 1 'r':facey -1 -1 -1 1 1 'g':facez 1 -1 -1 -1 1 'b'
-face -1 -1 1 -1 1 1 1 -1 0 1 1 1 'bmgr'
-
-subplot 2 3 5 '':title 'Cone';size -1.5
-cone -0.7 -0.3 0 -0.7 0.7 0.5 0.2 0.1 'b':text -0.7 -0.7 'no edges\n(default)';size -1.5
-cone 0 -0.3 0 0 0.7 0.5 0.2 0.1 'g@':text 0 -0.7 'with edges\n("\@" style)';size -1.5
-cone 0.7 -0.3 0 0.7 0.7 0.5 0.2 0 'Ggb':text 0.7 -0.7 '"arrow" with\n{}gradient';size -1.5
-subplot 2 2 2 '':title 'Sphere and Drop'
-line -0.9 0 1 0.9 0 1
-text -0.9 0.4 'sh=0':drop -0.9 0 0 1 0.5 'r' 0:ball -0.9 0 1 'k'
-text -0.3 0.6 'sh=0.33':drop -0.3 0 0 1 0.5 'r' 0.33:ball -0.3 0 1 'k'
-text 0.3 0.8 'sh=0.67':drop 0.3 0 0 1 0.5 'r' 0.67:ball 0.3 0 1 'k'
-text 0.9 1. 'sh=1':drop 0.9 0 0 1 0.5 'r' 1:ball 0.9 0 1 'k'
-
-text -0.9 -1.1 'asp=0.33':drop -0.9 -0.7 0 1 0.5 'b' 0 0.33
-text -0.3 -1.1 'asp=0.67':drop -0.3 -0.7 0 1 0.5 'b' 0 0.67
-text 0.3 -1.1 'asp=1':drop 0.3 -0.7 0 1 0.5 'b' 0 1
-text 0.9 -1.1 'asp=1.5':drop 0.9 -0.7 0 1 0.5 'b' 0 1.5
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_primitives(mglGraph *gr) // flag #
-{
- gr->SubPlot(2,2,0,""); gr->Title("Line, Curve, Rhomb, Ellipse","",-1.5);
- gr->Line(mglPoint(-1,-1),mglPoint(-0.5,1),"qAI");
- gr->Curve(mglPoint(-0.6,-1),mglPoint(1,1),mglPoint(0,1),mglPoint(1,1),"rA");
- gr->Rhomb(mglPoint(0,0.4),mglPoint(1,0.9),0.2,"b#");
- gr->Rhomb(mglPoint(0,0),mglPoint(1,0.4),0.2,"cg@");
- gr->Ellipse(mglPoint(0,-0.5),mglPoint(1,-0.1),0.2,"u#");
- gr->Ellipse(mglPoint(0,-1),mglPoint(1,-0.6),0.2,"m@");
- gr->Mark(mglPoint(0,-0.5),"*"); gr->Mark(mglPoint(1,-0.1),"*");
-
- gr->SubPlot(2,3,1,""); gr->Title("Arc, Polygon, Symbol","", -1.2*2);
- gr->Arc(mglPoint(-0.6,0), mglPoint(-0.6,0.3), 180, "2kA"); gr->Ball(-0.6,0);
- gr->Polygon(mglPoint(), mglPoint(0,0.4), 6, "r");
- mglData x(50), y(50); gr->Fill(x,"cos(3*pi*x)"); gr->Fill(y,"sin(pi*x)");
- gr->DefineSymbol('a',x,y); gr->Symbol(mglPoint(0.7),'a');
-
- gr->Light(true);
- gr->SubPlot(2,3,3,"<^>",0,-0.2); gr->Title("Face[xyz]", "", -1.5*2);
- gr->Rotate(50,60); gr->Box();
- gr->FaceX(mglPoint(1,0,-1),1,1,"r");
- gr->FaceY(mglPoint(-1,-1,-1),1,1,"g");
- gr->FaceZ(mglPoint(1,-1,-1),-1,1,"b");
- gr->Face(mglPoint(-1,-1,1),mglPoint(-1,1,1),mglPoint(1,-1,0),mglPoint(1,1,1),"bmgr");
-
- gr->SubPlot(2,3,5,""); gr->Title("Cone", "", -1.5*2);
- gr->Cone(mglPoint(-0.7,-0.3),mglPoint(-0.7,0.7,0.5),0.2,0.1,"b");
- gr->Puts(mglPoint(-0.7,-0.7),"no edges\n(default)","", -1.5);
- gr->Cone(mglPoint(0,-0.3),mglPoint(0,0.7,0.5),0.2,0.1,"g@");
- gr->Puts(mglPoint(0,-0.7),"with edges\n('\\@' style)","", -1.5);
- gr->Cone(mglPoint(0.7,-0.3),mglPoint(0.7,0.7,0.5),0.2,0,"ry");
- gr->Puts(mglPoint(0.7,-0.7),"'arrow' with\ngradient","", -1.5);
-
- gr->SubPlot(2,2,2,""); gr->Title("Sphere and Drop"); gr->Alpha(false);
- gr->Puts(mglPoint(-0.9,0.4),"sh=0"); gr->Ball(mglPoint(-0.9,0,1),'k');
- gr->Drop(mglPoint(-0.9,0),mglPoint(0,1),0.5,"r",0);
- gr->Puts(mglPoint(-0.3,0.6),"sh=0.33"); gr->Ball(mglPoint(-0.3,0,1),'k');
- gr->Drop(mglPoint(-0.3,0),mglPoint(0,1),0.5,"r",0.33);
- gr->Puts(mglPoint(0.3,0.8),"sh=0.67"); gr->Ball(mglPoint(0.3,0,1),'k');
- gr->Drop(mglPoint(0.3,0),mglPoint(0,1),0.5,"r",0.67);
- gr->Puts(mglPoint(0.9,1),"sh=1"); gr->Ball(mglPoint(0.9,0,1),'k');
- gr->Drop(mglPoint(0.9,0),mglPoint(0,1),0.5,"r",1);
- gr->Line(mglPoint(-0.9,0,1),mglPoint(0.9,0,1),"b");
-
- gr->Puts(mglPoint(-0.9,-1.1),"asp=0.33");
- gr->Drop(mglPoint(-0.9,-0.7),mglPoint(0,1),0.5,"b",0,0.33);
- gr->Puts(mglPoint(-0.3,-1.1),"asp=0.67");
- gr->Drop(mglPoint(-0.3,-0.7),mglPoint(0,1),0.5,"b",0,0.67);
- gr->Puts(mglPoint(0.3,-1.1),"asp=1");
- gr->Drop(mglPoint(0.3,-0.7),mglPoint(0,1),0.5,"b",0,1);
- gr->Puts(mglPoint(0.9,-1.1),"asp=1.5");
- gr->Drop(mglPoint(0.9,-0.7),mglPoint(0,1),0.5,"b",0,1.5);
-}
-</pre><div align="center"><img src="png/primitives.png" alt="Sample primitives">
-</div>
-<hr>
-<a name="projection-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#projection5-sample" accesskey="n" rel="next">projection5 sample</a>, Previous: <a href="#primitives-sample" accesskey="p" rel="prev">primitives sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-projection"></a>
-<h3 class="section">10.88 Sample ‘<samp>projection</samp>’</h3>
-
-
-<p>Example of plot projection (<a href="#ternary">ternary</a>=4).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">ranges 0 1 0 1 0 1
-new x 50 '0.25*(1+cos(2*pi*x))'
-new y 50 '0.25*(1+sin(2*pi*x))'
-new z 50 'x'
-new a 20 30 '30*x*y*(1-x-y)^2*(x+y<1)'
-new rx 10 'rnd':new ry 10:fill ry '(1-v)*rnd' rx
-light on
-
-title 'Projection sample':ternary 4:rotate 50 60
-box:axis:grid
-plot x y z 'r2':surf a '#'
-xlabel 'X':ylabel 'Y':zlabel 'Z'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_projection(mglGraph *gr) // flag #
-{
- gr->SetRanges(0,1,0,1,0,1);
- mglData x(50),y(50),z(50),rx(10),ry(10), a(20,30);
- a.Modify("30*x*y*(1-x-y)^2*(x+y<1)");
- x.Modify("0.25*(1+cos(2*pi*x))");
- y.Modify("0.25*(1+sin(2*pi*x))");
- rx.Modify("rnd"); ry.Modify("(1-v)*rnd",rx);
- z.Modify("x");
-
- if(big!=3) gr->Title("Projection sample");
- gr->Ternary(4);
- gr->Rotate(50,60); gr->Light(true);
- gr->Plot(x,y,z,"r2"); gr->Surf(a,"#");
- gr->Axis(); gr->Grid(); gr->Box();
- gr->Label('x',"X",1); gr->Label('y',"Y",1); gr->Label('z',"Z",1);
-}
-</pre><div align="center"><img src="png/projection.png" alt="Sample projection">
-</div>
-<hr>
-<a name="projection5-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#pulse-sample" accesskey="n" rel="next">pulse sample</a>, Previous: <a href="#projection-sample" accesskey="p" rel="prev">projection sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-projection5"></a>
-<h3 class="section">10.89 Sample ‘<samp>projection5</samp>’</h3>
-
-
-<p>Example of plot projection in ternary coordinates (<a href="#ternary">ternary</a>=5).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">ranges 0 1 0 1 0 1
-new x 50 '0.25*(1+cos(2*pi*x))'
-new y 50 '0.25*(1+sin(2*pi*x))'
-new z 50 'x'
-new a 20 30 '30*x*y*(1-x-y)^2*(x+y<1)'
-new rx 10 'rnd':new ry 10:fill ry '(1-v)*rnd' rx
-light on
-
-title 'Projection sample (ternary)':ternary 5:rotate 50 60
-box:axis:grid
-plot x y z 'r2':surf a '#'
-xlabel 'X':ylabel 'Y':zlabel 'Z'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_projection5(mglGraph *gr) // flag #
-{
- gr->SetRanges(0,1,0,1,0,1);
- mglData x(50),y(50),z(50),rx(10),ry(10), a(20,30);
- a.Modify("30*x*y*(1-x-y)^2*(x+y<1)");
- x.Modify("0.25*(1+cos(2*pi*x))");
- y.Modify("0.25*(1+sin(2*pi*x))");
- rx.Modify("rnd"); ry.Modify("(1-v)*rnd",rx);
- z.Modify("x");
-
- if(big!=3) gr->Title("Projection sample (ternary)");
- gr->Ternary(5);
- gr->Rotate(50,60); gr->Light(true);
- gr->Plot(x,y,z,"r2"); gr->Surf(a,"#");
- gr->Axis(); gr->Grid(); gr->Box();
- gr->Label('x',"X",1); gr->Label('y',"Y",1); gr->Label('z',"Z",1);
-}
-</pre><div align="center"><img src="png/projection5.png" alt="Sample projection5">
-</div>
-<hr>
-<a name="pulse-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#qo2d-sample" accesskey="n" rel="next">qo2d sample</a>, Previous: <a href="#projection5-sample" accesskey="p" rel="prev">projection5 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-pulse"></a>
-<h3 class="section">10.90 Sample ‘<samp>pulse</samp>’</h3>
-
-
-<p>Example of <a href="#pulse">pulse</a> parameter determining.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Pulse sample'
-new a 100 'exp(-6*x^2)':ranges 0 a.nx-1 0 1
-axis:plot a
-
-pulse b a 'x'
-
-define m a.max
-
-line b(1) 0 b(1) m 'r='
-line b(1)-b(3)/2 0 b(1)-b(3)/2 m 'm|'
-line b(1)+b(3)/2 0 b(1)+b(3)/2 m 'm|'
-line 0 0.5*m a.nx-1 0.5*m 'h'
-new x 100 'x'
-plot b(0)*(1-((x-b(1))/b(2))^2) 'g'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_pulse(mglGraph *gr)
-{
- gr->SubPlot(1,1,0,"<_");
- if(big!=3) gr->Title("Pulse sample");
- mglData a(100); gr->Fill(a,"exp(-6*x^2)");
- gr->SetRanges(0, a.nx-1, 0, 1);
- gr->Axis(); gr->Plot(a);
- mglData b(a.Pulse('x'));
- double m = b[0];
- gr->Line(mglPoint(b[1],0), mglPoint(b[1],m),"r=");
- gr->Line(mglPoint(b[1]-b[3]/2,0), mglPoint(b[1]-b[3]/2,m),"m|");
- gr->Line(mglPoint(b[1]+b[3]/2,0), mglPoint(b[1]+b[3]/2,m),"m|");
- gr->Line(mglPoint(0,m/2), mglPoint(a.nx-1,m/2),"h");
- char func[128]; sprintf(func,"%g*(1-((x-%g)/%g)^2)",b[0],b[1],b[2]);
- gr->FPlot(func,"g");
-}
-</pre><div align="center"><img src="png/pulse.png" alt="Sample pulse">
-</div>
-<hr>
-<a name="qo2d-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality0-sample" accesskey="n" rel="next">quality0 sample</a>, Previous: <a href="#pulse-sample" accesskey="p" rel="prev">pulse sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-qo2d"></a>
-<h3 class="section">10.91 Sample ‘<samp>qo2d</samp>’</h3>
-
-
-<p>Example of PDE solving by quasioptical approach <a href="#qo2d">qo2d</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">define $1 'p^2+q^2-x-1+i*0.5*(y+x)*(y>-x)'
-subplot 1 1 0 '<_':title 'Beam and ray tracing'
-ray r $1 -0.7 -1 0 0 0.5 0 0.02 2:plot r(0) r(1) 'k'
-axis:xlabel '\i x':ylabel '\i z'
-new re 128 'exp(-48*x^2)':new im 128
-new xx 1:new yy 1
-qo2d a $1 re im r 1 30 xx yy
-crange 0 1:dens xx yy a 'wyrRk':fplot '-x' 'k|'
-text 0 0.85 'absorption: (x+y)/2 for x+y>0'
-text 0.7 -0.05 'central ray'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_qo2d(mglGraph *gr)
-{
- mglData r, xx, yy, a, im(128), re(128);
- const char *ham = "p^2+q^2-x-1+i*0.5*(y+x)*(y>-x)";
- r = mglRay(ham, mglPoint(-0.7, -1), mglPoint(0, 0.5), 0.02, 2);
- if(big!=3) {gr->SubPlot(1,1,0,"<_"); gr->Title("Beam and ray tracing");}
- gr->Plot(r.SubData(0), r.SubData(1), "k");
- gr->Axis(); gr->Label('x', "\\i x"); gr->Label('y', "\\i y");
- // now start beam tracing
- gr->Fill(re,"exp(-48*x^2)");
- a = mglQO2d(ham, re, im, r, xx, yy, 1, 30);
- gr->SetRange('c',0, 1);
- gr->Dens(xx, yy, a, "wyrRk");
- gr->FPlot("-x", "k|");
- gr->Puts(mglPoint(0, 0.85), "absorption: (x+y)/2 for x+y>0");
- gr->Puts(mglPoint(0.7, -0.05), "central ray");
-}
-</pre><div align="center"><img src="png/qo2d.png" alt="Sample qo2d">
-</div>
-<hr>
-<a name="quality0-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality1-sample" accesskey="n" rel="next">quality1 sample</a>, Previous: <a href="#qo2d-sample" accesskey="p" rel="prev">qo2d sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality0"></a>
-<h3 class="section">10.92 Sample ‘<samp>quality0</samp>’</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=0.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 0
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_quality0(mglGraph *gr) // test file export
-{
- gr->SetQuality(0); all_prims(gr);
-}
-</pre><div align="center"><img src="png/quality0.png" alt="Sample quality0">
-</div>
-<hr>
-<a name="quality1-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality2-sample" accesskey="n" rel="next">quality2 sample</a>, Previous: <a href="#quality0-sample" accesskey="p" rel="prev">quality0 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality1"></a>
-<h3 class="section">10.93 Sample ‘<samp>quality1</samp>’</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=1.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 1
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_quality1(mglGraph *gr) // test file export
-{
- gr->SetQuality(1); all_prims(gr);
-}
-</pre><div align="center"><img src="png/quality1.png" alt="Sample quality1">
-</div>
-<hr>
-<a name="quality2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality4-sample" accesskey="n" rel="next">quality4 sample</a>, Previous: <a href="#quality1-sample" accesskey="p" rel="prev">quality1 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality2"></a>
-<h3 class="section">10.94 Sample ‘<samp>quality2</samp>’</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=2.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 2
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_quality2(mglGraph *gr) // test file export
-{
- gr->SetQuality(2); all_prims(gr);
-}
-</pre><div align="center"><img src="png/quality2.png" alt="Sample quality2">
-</div>
-<hr>
-<a name="quality4-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality5-sample" accesskey="n" rel="next">quality5 sample</a>, Previous: <a href="#quality2-sample" accesskey="p" rel="prev">quality2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality4"></a>
-<h3 class="section">10.95 Sample ‘<samp>quality4</samp>’</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=4.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 4
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_quality4(mglGraph *gr) // test file export
-{
- gr->SetQuality(4); all_prims(gr);
-}
-</pre><div align="center"><img src="png/quality4.png" alt="Sample quality4">
-</div>
-<hr>
-<a name="quality5-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality6-sample" accesskey="n" rel="next">quality6 sample</a>, Previous: <a href="#quality4-sample" accesskey="p" rel="prev">quality4 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality5"></a>
-<h3 class="section">10.96 Sample ‘<samp>quality5</samp>’</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=5.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 5
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_quality5(mglGraph *gr) // test file export
-{
- gr->SetQuality(5); all_prims(gr);
-}
-</pre><div align="center"><img src="png/quality5.png" alt="Sample quality5">
-</div>
-<hr>
-<a name="quality6-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality8-sample" accesskey="n" rel="next">quality8 sample</a>, Previous: <a href="#quality5-sample" accesskey="p" rel="prev">quality5 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality6"></a>
-<h3 class="section">10.97 Sample ‘<samp>quality6</samp>’</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=6.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 6
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_quality6(mglGraph *gr) // test file export
-{
- gr->SetQuality(6); all_prims(gr);
-}
-</pre><div align="center"><img src="png/quality6.png" alt="Sample quality6">
-</div>
-<hr>
-<a name="quality8-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#radar-sample" accesskey="n" rel="next">radar sample</a>, Previous: <a href="#quality6-sample" accesskey="p" rel="prev">quality6 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality8"></a>
-<h3 class="section">10.98 Sample ‘<samp>quality8</samp>’</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=8.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 8
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_quality8(mglGraph *gr) // test file export
-{
- gr->SetQuality(8); all_prims(gr);
-}
-</pre><div align="center"><img src="png/quality8.png" alt="Sample quality8">
-</div>
-<hr>
-<a name="radar-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#refill-sample" accesskey="n" rel="next">refill sample</a>, Previous: <a href="#quality8-sample" accesskey="p" rel="prev">quality8 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-radar"></a>
-<h3 class="section">10.99 Sample ‘<samp>radar</samp>’</h3>
-
-
-<p>The <a href="#radar">radar</a> plot is variant of <a href="#plot">plot</a>, which make plot in polar coordinates and draw radial rays in point directions. If you just need a plot in polar coordinates then I recommend to use <a href="#Curvilinear-coordinates">Curvilinear coordinates</a> or <a href="#plot">plot</a> in parametric form with <code>x=r*cos(fi); y=r*sin(fi);</code>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new yr 10 3 '0.4*sin(pi*(x+1.5+y/2)+0.1*rnd)'
-subplot 1 1 0 '':title 'Radar plot (with grid, "\#")':radar yr '#'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_radar(mglGraph *gr)
-{
- mglData yr(10,3); yr.Modify("0.4*sin(pi*(2*x+y))+0.1*rnd");
- if(big!=3) { gr->SubPlot(1,1,0,""); gr->Title("Radar plot (with grid, '\\#')"); }
- gr->Radar(yr,"#");
-}
-</pre><div align="center"><img src="png/radar.png" alt="Sample radar">
-</div>
-<hr>
-<a name="refill-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#region-sample" accesskey="n" rel="next">region sample</a>, Previous: <a href="#radar-sample" accesskey="p" rel="prev">radar sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-refill"></a>
-<h3 class="section">10.100 Sample ‘<samp>refill</samp>’</h3>
-
-
-<p>Example of <a href="#refill">refill</a> and <a href="#gspline">gspline</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 10 '0.5+rnd':cumsum x 'x':norm x -1 1
-copy y sin(pi*x)/1.5
-subplot 2 2 0 '<_':title 'Refill sample'
-box:axis:plot x y 'o ':fplot 'sin(pi*x)/1.5' 'B:'
-new r 100:refill r x y:plot r 'r'
-
-subplot 2 2 1 '<_':title 'Global spline'
-box:axis:plot x y 'o ':fplot 'sin(pi*x)/1.5' 'B:'
-new r 100:gspline r x y:plot r 'r'
-
-new y 10 '0.5+rnd':cumsum y 'x':norm y -1 1
-copy xx x:extend xx 10
-copy yy y:extend yy 10:transpose yy
-copy z sin(pi*xx*yy)/1.5
-alpha on:light on
-subplot 2 2 2:title '2d regular':rotate 40 60
-box:axis:mesh xx yy z 'k'
-new rr 100 100:refill rr x y z:surf rr
-
-new xx 10 10 '(x+1)/2*cos(y*pi/2-1)':new yy 10 10 '(x+1)/2*sin(y*pi/2-1)'
-copy z sin(pi*xx*yy)/1.5
-subplot 2 2 3:title '2d non-regular':rotate 40 60
-box:axis:plot xx yy z 'ko '
-new rr 100 100:refill rr xx yy z:surf rr
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_refill(mglGraph *gr)
-{
- mglData x(10), y(10), r(100);
- x.Modify("0.5+rnd"); x.CumSum("x"); x.Norm(-1,1);
- y.Modify("sin(pi*v)/1.5",x);
- if(big!=3) { gr->SubPlot(2,2,0,"<_"); gr->Title("Refill sample"); }
- gr->Axis(); gr->Box(); gr->Plot(x,y,"o ");
- gr->Refill(r,x,y); // or you can use r.Refill(x,y,-1,1);
- gr->Plot(r,"r"); gr->FPlot("sin(pi*x)/1.5","B:");
- if(big==3) return;
- gr->SubPlot(2,2,1,"<_"); gr->Title("Global spline");
- gr->Axis(); gr->Box(); gr->Plot(x,y,"o ");
- r.RefillGS(x,y,-1,1); gr->Plot(r,"r");
- gr->FPlot("sin(pi*x)/1.5","B:");
-
- gr->Alpha(true); gr->Light(true);
- mglData z(10,10), xx(10,10), yy(10,10), rr(100,100);
- y.Modify("0.5+rnd"); y.CumSum("x"); y.Norm(-1,1);
- for(int i=0;i<10;i++) for(int j=0;j<10;j++)
- z.a[i+10*j] = sin(M_PI*x.a[i]*y.a[j])/1.5;
- gr->SubPlot(2,2,2); gr->Title("2d regular"); gr->Rotate(40,60);
- gr->Axis(); gr->Box(); gr->Mesh(x,y,z,"k");
- gr->Refill(rr,x,y,z); gr->Surf(rr);
-
- gr->Fill(xx,"(x+1)/2*cos(y*pi/2-1)");
- gr->Fill(yy,"(x+1)/2*sin(y*pi/2-1)");
- for(int i=0;i<10*10;i++)
- z.a[i] = sin(M_PI*xx.a[i]*yy.a[i])/1.5;
- gr->SubPlot(2,2,3); gr->Title("2d non-regular"); gr->Rotate(40,60);
- gr->Axis(); gr->Box(); gr->Plot(xx,yy,z,"ko ");
- gr->Refill(rr,xx,yy,z); gr->Surf(rr);
-}
-</pre><div align="center"><img src="png/refill.png" alt="Sample refill">
-</div>
-<hr>
-<a name="region-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#scanfile-sample" accesskey="n" rel="next">scanfile sample</a>, Previous: <a href="#refill-sample" accesskey="p" rel="prev">refill sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-region"></a>
-<h3 class="section">10.101 Sample ‘<samp>region</samp>’</h3>
-
-
-<p>Function <a href="#region">region</a> fill the area between 2 curves. It support gradient filling if 2 colors per curve is specified. Also it can fill only the region y1<y<y2 if style ‘<samp>i</samp>’ is used.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-copy y1 y(:,1):copy y2 y(:,2)
-subplot 2 2 0 '':title 'Region plot (default)':box:region y1 y2:plot y1 'k2':plot y2 'k2'
-subplot 2 2 1 '':title '2 colors':box:region y1 y2 'yr':plot y1 'k2':plot y2 'k2'
-subplot 2 2 2 '':title '"i" style':box:region y1 y2 'ir':plot y1 'k2':plot y2 'k2'
-subplot 2 2 3 '^_':title '3d variant':rotate 40 60:box
-new x1 100 'sin(pi*x)':new y1 100 'cos(pi*x)':new z 100 'x'
-new x2 100 'sin(pi*x+pi/3)':new y2 100 'cos(pi*x+pi/3)'
-plot x1 y1 z 'r2':plot x2 y2 z 'b2'
-region x1 y1 z x2 y2 z 'cmy!'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_region(mglGraph *gr)
-{
- mglData y; mgls_prepare1d(&y);
- mglData y1 = y.SubData(-1,1), y2 = y.SubData(-1,2); gr->SetOrigin(0,0,0);
- if(big!=3) { gr->SubPlot(2,2,0,""); gr->Title("Region plot (default)"); }
- gr->Box(); gr->Region(y1,y2); gr->Plot(y1,"k2"); gr->Plot(y2,"k2");
- if(big==3) return;
- gr->SubPlot(2,2,1,""); gr->Title("2 colors"); gr->Box(); gr->Region(y1,y2,"yr"); gr->Plot(y1,"k2"); gr->Plot(y2,"k2");
- gr->SubPlot(2,2,2,""); gr->Title("'i' style"); gr->Box(); gr->Region(y1,y2,"ir"); gr->Plot(y1,"k2"); gr->Plot(y2,"k2");
- gr->SubPlot(2,2,3,"^_"); gr->Title("3d variant"); gr->Rotate(40,60); gr->Box();
- gr->Fill(y1,"cos(pi*x)"); gr->Fill(y2,"cos(pi*x+pi/3)");
- mglData x1(y1.nx), x2(y1.nx), z(y1.nx);
- gr->Fill(x1,"sin(pi*x)"); gr->Fill(x2,"sin(pi*x+pi/3)"); gr->Fill(z,"x");
- gr->Plot(x1,y1,z,"r2"); gr->Plot(x2,y2,z,"b2");
- gr->Region(x1,y1,z,x2,y2,z,"cmy!");
-}
-</pre><div align="center"><img src="png/region.png" alt="Sample region">
-</div>
-<hr>
-<a name="scanfile-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#schemes-sample" accesskey="n" rel="next">schemes sample</a>, Previous: <a href="#region-sample" accesskey="p" rel="prev">region sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-scanfile"></a>
-<h3 class="section">10.102 Sample ‘<samp>scanfile</samp>’</h3>
-
-
-<p>Example of <a href="#scanfile">scanfile</a> for reading ’named’ data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Save and scanfile sample'
-list a 1 -1 0
-save 'This is test: 0 -> ',a(0),' q' 'test.txt' 'w'
-save 'This is test: 1 -> ',a(1),' q' 'test.txt'
-save 'This is test: 2 -> ',a(2),' q' 'test.txt'
-
-scanfile a 'test.txt' 'This is test: %g -> %g'
-ranges a(0) a(1):axis:plot a(0) a(1) 'o'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_scanfile(mglGraph *gr)
-{
- gr->SubPlot(1,1,0,"<_");
- if(big!=3) gr->Title("Save and scanfile sample");
- FILE *fp=fopen("test.txt","w");
- fprintf(fp,"This is test: 0 -> 1 q\n");
- fprintf(fp,"This is test: 1 -> -1 q\n");
- fprintf(fp,"This is test: 2 -> 0 q\n");
- fclose(fp);
-
- mglData a;
- a.ScanFile("test.txt","This is test: %g -> %g");
- gr->SetRanges(a.SubData(0), a.SubData(1));
- gr->Axis(); gr->Plot(a.SubData(0),a.SubData(1),"o");
-}
-</pre><div align="center"><img src="png/scanfile.png" alt="Sample scanfile">
-</div>
-<hr>
-<a name="schemes-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#section-sample" accesskey="n" rel="next">section sample</a>, Previous: <a href="#scanfile-sample" accesskey="p" rel="prev">scanfile sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-schemes"></a>
-<h3 class="section">10.103 Sample ‘<samp>schemes</samp>’</h3>
-
-
-<p>Example of popular color schemes.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 100 100 'x':new y 100 100 'y'
-call 'sch' 0 'kw'
-call 'sch' 1 '%gbrw'
-call 'sch' 2 'kHCcw'
-call 'sch' 3 'kBbcw'
-call 'sch' 4 'kRryw'
-call 'sch' 5 'kGgew'
-call 'sch' 6 'BbwrR'
-call 'sch' 7 'BbwgG'
-call 'sch' 8 'GgwmM'
-call 'sch' 9 'UuwqR'
-call 'sch' 10 'QqwcC'
-call 'sch' 11 'CcwyY'
-call 'sch' 12 'bcwyr'
-call 'sch' 13 'bwr'
-call 'sch' 14 'wUrqy'
-call 'sch' 15 'UbcyqR'
-call 'sch' 16 'BbcyrR'
-call 'sch' 17 'bgr'
-call 'sch' 18 'BbcyrR|'
-call 'sch' 19 'b{g,0.3}r'
-stop
-func 'sch' 2
-subplot 2 10 $1 '<>_^' 0.2 0:surfa x y $2
-text 0.07+0.5*mod($1,2) 0.92-0.1*int($1/2) $2 'A'
-return
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_schemes(mglGraph *gr) // Color table
-{
- mglData a(256,2), b(256,2); a.Fill(-1,1); b.Fill(-1,1,'y');
- gr->SubPlot(2,10,0,NULL,0.2); gr->Dens(a,"kw"); gr->Puts(0.07, 0.92, "kw", "A");
- gr->SubPlot(2,10,1,NULL,0.2); gr->SurfA(a,b,"%gbrw"); gr->Puts(0.57, 0.92, "%gbrw", "A");
- gr->SubPlot(2,10,2,NULL,0.2); gr->Dens(a,"kHCcw"); gr->Puts(0.07, 0.82, "kHCcw", "A");
- gr->SubPlot(2,10,3,NULL,0.2); gr->Dens(a,"kBbcw"); gr->Puts(0.57, 0.82, "kBbcw", "A");
- gr->SubPlot(2,10,4,NULL,0.2); gr->Dens(a,"kRryw"); gr->Puts(0.07, 0.72, "kRryw", "A");
- gr->SubPlot(2,10,5,NULL,0.2); gr->Dens(a,"kGgew"); gr->Puts(0.57, 0.72, "kGgew", "A");
- gr->SubPlot(2,10,6,NULL,0.2); gr->Dens(a,"BbwrR"); gr->Puts(0.07, 0.62, "BbwrR", "A");
- gr->SubPlot(2,10,7,NULL,0.2); gr->Dens(a,"BbwgG"); gr->Puts(0.57, 0.62, "BbwgG", "A");
- gr->SubPlot(2,10,8,NULL,0.2); gr->Dens(a,"GgwmM"); gr->Puts(0.07, 0.52, "GgwmM", "A");
- gr->SubPlot(2,10,9,NULL,0.2); gr->Dens(a,"UuwqR"); gr->Puts(0.57, 0.52, "UuwqR", "A");
- gr->SubPlot(2,10,10,NULL,0.2); gr->Dens(a,"QqwcC"); gr->Puts(0.07, 0.42, "QqwcC", "A");
- gr->SubPlot(2,10,11,NULL,0.2); gr->Dens(a,"CcwyY"); gr->Puts(0.57, 0.42, "CcwyY", "A");
- gr->SubPlot(2,10,12,NULL,0.2); gr->Dens(a,"bcwyr"); gr->Puts(0.07, 0.32, "bcwyr", "A");
- gr->SubPlot(2,10,13,NULL,0.2); gr->Dens(a,"bwr"); gr->Puts(0.57, 0.32, "bwr", "A");
- gr->SubPlot(2,10,14,NULL,0.2); gr->Dens(a,"wUrqy"); gr->Puts(0.07, 0.22, "wUrqy", "A");
- gr->SubPlot(2,10,15,NULL,0.2); gr->Dens(a,"UbcyqR"); gr->Puts(0.57, 0.22, "UbcyqR", "A");
- gr->SubPlot(2,10,16,NULL,0.2); gr->Dens(a,"BbcyrR"); gr->Puts(0.07, 0.12, "BbcyrR", "A");
- gr->SubPlot(2,10,17,NULL,0.2); gr->Dens(a,"bgr"); gr->Puts(0.57, 0.12, "bgr", "A");
- gr->SubPlot(2,10,18,NULL,0.2); gr->Dens(a,"BbcyrR|"); gr->Puts(0.07, 0.02, "BbcyrR|", "A");
- gr->SubPlot(2,10,19,NULL,0.2); gr->Dens(a,"b{g,0.3}r"); gr->Puts(0.57, 0.02, "b\\{g,0.3\\}r", "A");
-}
-</pre><div align="center"><img src="png/schemes.png" alt="Sample schemes">
-</div>
-<hr>
-<a name="section-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#several_005flight-sample" accesskey="n" rel="next">several_light sample</a>, Previous: <a href="#schemes-sample" accesskey="p" rel="prev">schemes sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-section"></a>
-<h3 class="section">10.104 Sample ‘<samp>section</samp>’</h3>
-
-
-<p>Example of <a href="#section">section</a> to separate data and <a href="#join">join</a> it back.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Section&Join sample'
-axis:box:line -1 0 1 0 'h:'
-# first lets demonstrate 'join'
-new aa 11 'x^2':new a1 3 '-x':new a2 15 'x^3'
-join aa a1:join aa a2
-# add x-coordinate
-new xx aa.nx 'x':join aa xx
-plot aa(:,1) aa(:,0) '2y'
-# now select 1-st (id=0) section between zeros
-section b1 aa 0 'x' 0
-plot b1(:,1) b1(:,0) 'bo'
-# next, select 3-d (id=2) section between zeros
-section b3 aa 2 'x' 0
-plot b3(:,1) b3(:,0) 'gs'
-# finally, select 2-nd (id=-2) section from the end
-section b4 aa -2 'x' 0
-plot b4(:,1) b4(:,0) 'r#o'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_section(mglGraph *gr)
-{
- gr->SubPlot(1,1,0,"<_");
- if(big!=3) gr->Title("Section&Join sample");
- gr->Axis(); gr->Box(); gr->Line(mglPoint(-1,0),mglPoint(1,0),"h:");
- // first lets demonstrate 'join'
- mglData aa(11), a1(3), a2(15);
- gr->Fill(aa,"x^2"); gr->Fill(a1,"-x"); gr->Fill(a2,"x^3");
- aa.Join(a1); aa.Join(a2);
- // add x-coordinate
- mglData xx(aa.nx); gr->Fill(xx,"x"); aa.Join(xx);
- gr->Plot(aa.SubData(-1,1), aa.SubData(-1,0), "2y");
- // now select 1-st (id=0) section between zeros
- mglData b1(aa.Section(0,'x',0));
- gr->Plot(b1.SubData(-1,1), b1.SubData(-1,0), "bo");
- // next, select 3-d (id=2) section between zeros
- mglData b2(aa.Section(2,'x',0));
- gr->Plot(b2.SubData(-1,1), b2.SubData(-1,0), "gs");
- // finally, select 2-nd (id=-2) section from the end
- mglData b3(aa.Section(-2,'x',0));
- gr->Plot(b3.SubData(-1,1), b3.SubData(-1,0), "r#o");
-}
-</pre><div align="center"><img src="png/section.png" alt="Sample section">
-</div>
-<hr>
-<a name="several_005flight-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#solve-sample" accesskey="n" rel="next">solve sample</a>, Previous: <a href="#section-sample" accesskey="p" rel="prev">section sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-several_005flight"></a>
-<h3 class="section">10.105 Sample ‘<samp>several_light</samp>’</h3>
-
-
-<p>Example of using several <a href="#light">light</a> sources.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Several light sources':rotate 50 60:light on
-light 1 0 1 0 'c':light 2 1 0 0 'y':light 3 0 -1 0 'm'
-box:surf a 'h'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_several_light(mglGraph *gr) // several light sources
-{
- mglData a; mgls_prepare2d(&a);
- if(big!=3) gr->Title("Several light sources");
- gr->Rotate(50,60); gr->Light(true); gr->AddLight(1,mglPoint(0,1,0),'c');
- gr->AddLight(2,mglPoint(1,0,0),'y'); gr->AddLight(3,mglPoint(0,-1,0),'m');
- gr->Box(); gr->Surf(a,"h");
-}
-</pre><div align="center"><img src="png/several_light.png" alt="Sample several_light">
-</div>
-<hr>
-<a name="solve-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#stem-sample" accesskey="n" rel="next">stem sample</a>, Previous: <a href="#several_005flight-sample" accesskey="p" rel="prev">several_light sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-solve"></a>
-<h3 class="section">10.106 Sample ‘<samp>solve</samp>’</h3>
-
-
-<p>Example of <a href="#solve">solve</a> for root finding.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">zrange 0 1
-new x 20 30 '(x+2)/3*cos(pi*y)'
-new y 20 30 '(x+2)/3*sin(pi*y)'
-new z 20 30 'exp(-6*x^2-2*sin(pi*y)^2)'
-
-subplot 2 1 0:title 'Cartesian space':rotate 30 -40
-axis 'xyzU':box
-xlabel 'x':ylabel 'y'
-origin 1 1:grid 'xy'
-mesh x y z
-
-# section along 'x' direction
-solve u x 0.5 'x'
-var v u.nx 0 1
-evaluate yy y u v
-evaluate xx x u v
-evaluate zz z u v
-plot xx yy zz 'k2o'
-
-# 1st section along 'y' direction
-solve u1 x -0.5 'y'
-var v1 u1.nx 0 1
-evaluate yy y v1 u1
-evaluate xx x v1 u1
-evaluate zz z v1 u1
-plot xx yy zz 'b2^'
-
-# 2nd section along 'y' direction
-solve u2 x -0.5 'y' u1
-evaluate yy y v1 u2
-evaluate xx x v1 u2
-evaluate zz z v1 u2
-plot xx yy zz 'r2v'
-
-subplot 2 1 1:title 'Accompanied space'
-ranges 0 1 0 1:origin 0 0
-axis:box:xlabel 'i':ylabel 'j':grid2 z 'h'
-
-plot u v 'k2o':line 0.4 0.5 0.8 0.5 'kA'
-plot v1 u1 'b2^':line 0.5 0.15 0.5 0.3 'bA'
-plot v1 u2 'r2v':line 0.5 0.7 0.5 0.85 'rA'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_solve(mglGraph *gr) // solve and evaluate
-{
- gr->SetRange('z',0,1);
- mglData x(20,30), y(20,30), z(20,30), xx,yy,zz;
- gr->Fill(x,"(x+2)/3*cos(pi*y)");
- gr->Fill(y,"(x+2)/3*sin(pi*y)");
- gr->Fill(z,"exp(-6*x^2-2*sin(pi*y)^2)");
-
- gr->SubPlot(2,1,0); gr->Title("Cartesian space"); gr->Rotate(30,-40);
- gr->Axis("xyzU"); gr->Box(); gr->Label('x',"x"); gr->Label('y',"y");
- gr->SetOrigin(1,1); gr->Grid("xy");
- gr->Mesh(x,y,z);
-
- // section along 'x' direction
- mglData u = x.Solve(0.5,'x');
- mglData v(u.nx); v.Fill(0,1);
- xx = x.Evaluate(u,v); yy = y.Evaluate(u,v); zz = z.Evaluate(u,v);
- gr->Plot(xx,yy,zz,"k2o");
-
- // 1st section along 'y' direction
- mglData u1 = x.Solve(-0.5,'y');
- mglData v1(u1.nx); v1.Fill(0,1);
- xx = x.Evaluate(v1,u1); yy = y.Evaluate(v1,u1); zz = z.Evaluate(v1,u1);
- gr->Plot(xx,yy,zz,"b2^");
-
- // 2nd section along 'y' direction
- mglData u2 = x.Solve(-0.5,'y',u1);
- xx = x.Evaluate(v1,u2); yy = y.Evaluate(v1,u2); zz = z.Evaluate(v1,u2);
- gr->Plot(xx,yy,zz,"r2v");
-
- gr->SubPlot(2,1,1); gr->Title("Accompanied space");
- gr->SetRanges(0,1,0,1); gr->SetOrigin(0,0);
- gr->Axis(); gr->Box(); gr->Label('x',"i"); gr->Label('y',"j");
- gr->Grid(z,"h");
-
- gr->Plot(u,v,"k2o"); gr->Line(mglPoint(0.4,0.5),mglPoint(0.8,0.5),"kA");
- gr->Plot(v1,u1,"b2^"); gr->Line(mglPoint(0.5,0.15),mglPoint(0.5,0.3),"bA");
- gr->Plot(v1,u2,"r2v"); gr->Line(mglPoint(0.5,0.7),mglPoint(0.5,0.85),"rA");
-}
-</pre><div align="center"><img src="png/solve.png" alt="Sample solve">
-</div>
-<hr>
-<a name="stem-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#step-sample" accesskey="n" rel="next">step sample</a>, Previous: <a href="#solve-sample" accesskey="p" rel="prev">solve sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-stem"></a>
-<h3 class="section">10.107 Sample ‘<samp>stem</samp>’</h3>
-
-
-<p>Function <a href="#stem">stem</a> draw vertical bars. It is most attractive if markers are drawn too.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-origin 0 0 0:subplot 2 2 0 '':title 'Stem plot (default)':box:stem y
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 2 2 1:title '3d variant':rotate 50 60:box:stem xc yc z 'rx'
-subplot 2 2 2 '':title '"!" style':box:stem y 'o!rgb'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_stem(mglGraph *gr)
-{
- mglData y; mgls_prepare1d(&y); gr->SetOrigin(0,0,0);
- mglData yc(30), xc(30), z(30); z.Modify("2*x-1");
- yc.Modify("sin(pi*(2*x-1))"); xc.Modify("cos(pi*2*x-pi)");
- if(big!=3) { gr->SubPlot(2,2,0,""); gr->Title("Stem plot (default)"); }
- gr->Box(); gr->Stem(y);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("3d variant"); gr->Rotate(50,60);
- gr->Box(); gr->Stem(xc,yc,z,"rx");
- gr->SubPlot(2,2,2,""); gr->Title("'!' style"); gr->Box(); gr->Stem(y,"o!rgb");
-}
-</pre><div align="center"><img src="png/stem.png" alt="Sample stem">
-</div>
-<hr>
-<a name="step-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#stereo-sample" accesskey="n" rel="next">stereo sample</a>, Previous: <a href="#stem-sample" accesskey="p" rel="prev">stem sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-step"></a>
-<h3 class="section">10.108 Sample ‘<samp>step</samp>’</h3>
-
-
-<p>Function <a href="#step">step</a> plot data as stairs. At this stairs can be centered if sizes are differ by 1.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-origin 0 0 0:subplot 2 2 0 '':title 'Step plot (default)':box:step y
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 2 2 1:title '3d variant':rotate 50 60:box:step xc yc z 'r'
-subplot 2 2 2 '':title '"!" style':box:step y 's!rgb'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_step(mglGraph *gr)
-{
- mglData y; mgls_prepare1d(&y); gr->SetOrigin(0,0,0);
- mglData yc(30), xc(30), z(30); z.Modify("2*x-1");
- yc.Modify("sin(pi*(2*x-1))"); xc.Modify("cos(pi*2*x-pi)");
- if(big!=3) { gr->SubPlot(2,2,0,""); gr->Title("Step plot (default)"); }
- gr->Box(); gr->Step(y);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("3d variant"); gr->Rotate(50,60);
- gr->Box(); gr->Step(xc,yc,z,"r");
- gr->SubPlot(2,2,2,""); gr->Title("'!' style"); gr->Box(); gr->Step(y,"s!rgb");
-}
-</pre><div align="center"><img src="png/step.png" alt="Sample step">
-</div>
-<hr>
-<a name="stereo-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#stfa-sample" accesskey="n" rel="next">stfa sample</a>, Previous: <a href="#step-sample" accesskey="p" rel="prev">step sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-stereo"></a>
-<h3 class="section">10.109 Sample ‘<samp>stereo</samp>’</h3>
-
-
-<p>Example of stereo image of <a href="#surf">surf</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-light on
-subplot 2 1 0:rotate 50 60+1:box:surf a
-subplot 2 1 1:rotate 50 60-1:box:surf a
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_stereo(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- gr->Light(true);
- gr->SubPlot(2,1,0); gr->Rotate(50,60+1);
- gr->Box(); gr->Surf(a);
- gr->SubPlot(2,1,1); gr->Rotate(50,60-1);
- gr->Box(); gr->Surf(a);
-}
-</pre><div align="center"><img src="png/stereo.png" alt="Sample stereo">
-</div>
-<hr>
-<a name="stfa-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#style-sample" accesskey="n" rel="next">style sample</a>, Previous: <a href="#stereo-sample" accesskey="p" rel="prev">stereo sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-stfa"></a>
-<h3 class="section">10.110 Sample ‘<samp>stfa</samp>’</h3>
-
-
-<p>Example of <a href="#stfa">stfa</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 2000:new b 2000
-fill a 'cos(50*pi*x)*(x<-.5)+cos(100*pi*x)*(x<0)*(x>-.5)+\
-cos(200*pi*x)*(x<.5)*(x>0)+cos(400*pi*x)*(x>.5)'
-subplot 1 2 0 '<_':title 'Initial signal':plot a:axis:xlabel '\i t'
-subplot 1 2 1 '<_':title 'STFA plot':stfa a b 64:axis:ylabel '\omega' 0:xlabel '\i t'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_stfa(mglGraph *gr) // STFA sample
-{
- mglData a(2000), b(2000);
- gr->Fill(a,"cos(50*pi*x)*(x<-.5)+cos(100*pi*x)*(x<0)*(x>-.5)+\
- cos(200*pi*x)*(x<.5)*(x>0)+cos(400*pi*x)*(x>.5)");
- gr->SubPlot(1, 2, 0,"<_"); gr->Title("Initial signal");
- gr->Plot(a);
- gr->Axis();
- gr->Label('x', "\\i t");
-
- gr->SubPlot(1, 2, 1,"<_"); gr->Title("STFA plot");
- gr->STFA(a, b, 64);
- gr->Axis();
- gr->Label('x', "\\i t");
- gr->Label('y', "\\omega", 0);
-}
-</pre><div align="center"><img src="png/stfa.png" alt="Sample stfa">
-</div>
-<hr>
-<a name="style-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surf-sample" accesskey="n" rel="next">surf sample</a>, Previous: <a href="#stfa-sample" accesskey="p" rel="prev">stfa sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-style"></a>
-<h3 class="section">10.111 Sample ‘<samp>style</samp>’</h3>
-
-
-<p>Example of colors and styles for plots.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_style(mglGraph *gr) // pen styles
-{
- gr->SubPlot(2,2,0);
- double d,x1,x2,x0,y=1.1, y1=1.15;
- d=0.3, x0=0.2, x1=0.5, x2=0.6;
- gr->Line(mglPoint(x0,y1-0*d),mglPoint(x1,y1-0*d),"k-"); gr->Puts(mglPoint(x2,y-0*d),"Solid '-'",":rL");
- gr->Line(mglPoint(x0,y1-1*d),mglPoint(x1,y1-1*d),"k|"); gr->Puts(mglPoint(x2,y-1*d),"Long Dash '|'",":rL");
- gr->Line(mglPoint(x0,y1-2*d),mglPoint(x1,y1-2*d),"k;"); gr->Puts(mglPoint(x2,y-2*d),"Dash ';'",":rL");
- gr->Line(mglPoint(x0,y1-3*d),mglPoint(x1,y1-3*d),"k="); gr->Puts(mglPoint(x2,y-3*d),"Small dash '='",":rL");
- gr->Line(mglPoint(x0,y1-4*d),mglPoint(x1,y1-4*d),"kj"); gr->Puts(mglPoint(x2,y-4*d),"Dash-dot 'j'",":rL");
- gr->Line(mglPoint(x0,y1-5*d),mglPoint(x1,y1-5*d),"ki"); gr->Puts(mglPoint(x2,y-5*d),"Small dash-dot 'i'",":rL");
- gr->Line(mglPoint(x0,y1-6*d),mglPoint(x1,y1-6*d),"k:"); gr->Puts(mglPoint(x2,y-6*d),"Dots ':'",":rL");
- gr->Line(mglPoint(x0,y1-7*d),mglPoint(x1,y1-7*d),"k "); gr->Puts(mglPoint(x2,y-7*d),"None ' '",":rL");
- gr->Line(mglPoint(x0,y1-8*d),mglPoint(x1,y1-8*d),"k{df090}"); gr->Puts(mglPoint(x2,y-8*d),"Manual '{df090}'",":rL");
-
- d=0.25; x1=-1; x0=-0.8; y = -0.05;
- gr->Mark(mglPoint(x1,5*d),"k."); gr->Puts(mglPoint(x0,y+5*d),"'.'",":rL");
- gr->Mark(mglPoint(x1,4*d),"k+"); gr->Puts(mglPoint(x0,y+4*d),"'+'",":rL");
- gr->Mark(mglPoint(x1,3*d),"kx"); gr->Puts(mglPoint(x0,y+3*d),"'x'",":rL");
- gr->Mark(mglPoint(x1,2*d),"k*"); gr->Puts(mglPoint(x0,y+2*d),"'*'",":rL");
- gr->Mark(mglPoint(x1,d),"ks"); gr->Puts(mglPoint(x0,y+d),"'s'",":rL");
- gr->Mark(mglPoint(x1,0),"kd"); gr->Puts(mglPoint(x0,y),"'d'",":rL");
- gr->Mark(mglPoint(x1,-d,0),"ko"); gr->Puts(mglPoint(x0,y-d),"'o'",":rL");
- gr->Mark(mglPoint(x1,-2*d,0),"k^"); gr->Puts(mglPoint(x0,y-2*d),"'\\^'",":rL");
- gr->Mark(mglPoint(x1,-3*d,0),"kv"); gr->Puts(mglPoint(x0,y-3*d),"'v'",":rL");
- gr->Mark(mglPoint(x1,-4*d,0),"k<"); gr->Puts(mglPoint(x0,y-4*d),"'<'",":rL");
- gr->Mark(mglPoint(x1,-5*d,0),"k>"); gr->Puts(mglPoint(x0,y-5*d),"'>'",":rL");
-
- d=0.25; x1=-0.5; x0=-0.3; y = -0.05;
- gr->Mark(mglPoint(x1,5*d),"k#."); gr->Puts(mglPoint(x0,y+5*d),"'\\#.'",":rL");
- gr->Mark(mglPoint(x1,4*d),"k#+"); gr->Puts(mglPoint(x0,y+4*d),"'\\#+'",":rL");
- gr->Mark(mglPoint(x1,3*d),"k#x"); gr->Puts(mglPoint(x0,y+3*d),"'\\#x'",":rL");
- gr->Mark(mglPoint(x1,2*d),"k#*"); gr->Puts(mglPoint(x0,y+2*d),"'\\#*'",":rL");
- gr->Mark(mglPoint(x1,d),"k#s"); gr->Puts(mglPoint(x0,y+d),"'\\#s'",":rL");
- gr->Mark(mglPoint(x1,0),"k#d"); gr->Puts(mglPoint(x0,y),"'\\#d'",":rL");
- gr->Mark(mglPoint(x1,-d,0),"k#o"); gr->Puts(mglPoint(x0,y-d),"'\\#o'",":rL");
- gr->Mark(mglPoint(x1,-2*d,0),"k#^"); gr->Puts(mglPoint(x0,y-2*d),"'\\#\\^'",":rL");
- gr->Mark(mglPoint(x1,-3*d,0),"k#v"); gr->Puts(mglPoint(x0,y-3*d),"'\\#v'",":rL");
- gr->Mark(mglPoint(x1,-4*d,0),"k#<"); gr->Puts(mglPoint(x0,y-4*d),"'\\#<'",":rL");
- gr->Mark(mglPoint(x1,-5*d,0),"k#>"); gr->Puts(mglPoint(x0,y-5*d),"'\\#>'",":rL");
-
- gr->SubPlot(2,2,1);
- double a=0.1,b=0.4,c=0.5;
- gr->Line(mglPoint(a,1),mglPoint(b,1),"k-A"); gr->Puts(mglPoint(c,1),"Style 'A' or 'A\\_'",":rL");
- gr->Line(mglPoint(a,0.8),mglPoint(b,0.8),"k-V"); gr->Puts(mglPoint(c,0.8),"Style 'V' or 'V\\_'",":rL");
- gr->Line(mglPoint(a,0.6),mglPoint(b,0.6),"k-K"); gr->Puts(mglPoint(c,0.6),"Style 'K' or 'K\\_'",":rL");
- gr->Line(mglPoint(a,0.4),mglPoint(b,0.4),"k-I"); gr->Puts(mglPoint(c,0.4),"Style 'I' or 'I\\_'",":rL");
- gr->Line(mglPoint(a,0.2),mglPoint(b,0.2),"k-D"); gr->Puts(mglPoint(c,0.2),"Style 'D' or 'D\\_'",":rL");
- gr->Line(mglPoint(a,0),mglPoint(b,0),"k-S"); gr->Puts(mglPoint(c,0),"Style 'S' or 'S\\_'",":rL");
- gr->Line(mglPoint(a,-0.2),mglPoint(b,-0.2),"k-O"); gr->Puts(mglPoint(c,-0.2),"Style 'O' or 'O\\_'",":rL");
- gr->Line(mglPoint(a,-0.4),mglPoint(b,-0.4),"k-T"); gr->Puts(mglPoint(c,-0.4),"Style 'T' or 'T\\_'",":rL");
- gr->Line(mglPoint(a,-0.6),mglPoint(b,-0.6),"k-X"); gr->Puts(mglPoint(c,-0.6),"Style 'X' or 'X\\_'",":rL");
- gr->Line(mglPoint(a,-0.8),mglPoint(b,-0.8),"k-_"); gr->Puts(mglPoint(c,-0.8),"Style '\\_' or none",":rL");
- gr->Line(mglPoint(a,-1),mglPoint(b,-1),"k-AS"); gr->Puts(mglPoint(c,-1),"Style 'AS'",":rL");
- gr->Line(mglPoint(a,-1.2),mglPoint(b,-1.2),"k-_A"); gr->Puts(mglPoint(c,-1.2),"Style '\\_A'",":rL");
-
- a=-1; b=-0.7; c=-0.6;
- gr->Line(mglPoint(a,1),mglPoint(b,1),"kAA"); gr->Puts(mglPoint(c,1),"Style 'AA'",":rL");
- gr->Line(mglPoint(a,0.8),mglPoint(b,0.8),"kVV"); gr->Puts(mglPoint(c,0.8),"Style 'VV'",":rL");
- gr->Line(mglPoint(a,0.6),mglPoint(b,0.6),"kKK"); gr->Puts(mglPoint(c,0.6),"Style 'KK'",":rL");
- gr->Line(mglPoint(a,0.4),mglPoint(b,0.4),"kII"); gr->Puts(mglPoint(c,0.4),"Style 'II'",":rL");
- gr->Line(mglPoint(a,0.2),mglPoint(b,0.2),"kDD"); gr->Puts(mglPoint(c,0.2),"Style 'DD'",":rL");
- gr->Line(mglPoint(a,0),mglPoint(b,0),"kSS"); gr->Puts(mglPoint(c,0),"Style 'SS'",":rL");
- gr->Line(mglPoint(a,-0.2),mglPoint(b,-0.2),"kOO"); gr->Puts(mglPoint(c,-0.2),"Style 'OO'",":rL");
- gr->Line(mglPoint(a,-0.4),mglPoint(b,-0.4),"kTT"); gr->Puts(mglPoint(c,-0.4),"Style 'TT'",":rL");
- gr->Line(mglPoint(a,-0.6),mglPoint(b,-0.6),"kXX"); gr->Puts(mglPoint(c,-0.6),"Style 'XX'",":rL");
- gr->Line(mglPoint(a,-0.8),mglPoint(b,-0.8),"k-__"); gr->Puts(mglPoint(c,-0.8),"Style '\\_\\_'",":rL");
- gr->Line(mglPoint(a,-1),mglPoint(b,-1),"k-VA"); gr->Puts(mglPoint(c,-1),"Style 'VA'",":rL");
- gr->Line(mglPoint(a,-1.2),mglPoint(b,-1.2),"k-AV"); gr->Puts(mglPoint(c,-1.2),"Style 'AV'",":rL");
-
- gr->SubPlot(2,2,2);
- //#LENUQ
- gr->FaceZ(mglPoint(-1, -1), 0.4, 0.3, "L#"); gr->Puts(mglPoint(-0.8,-0.9), "L", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,-1), 0.4, 0.3, "E#"); gr->Puts(mglPoint(-0.4,-0.9), "E", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,-1), 0.4, 0.3, "N#"); gr->Puts(mglPoint(0, -0.9), "N", "w:C", -1.4);
- gr->FaceZ(mglPoint(0.2, -1), 0.4, 0.3, "U#"); gr->Puts(mglPoint(0.4,-0.9), "U", "w:C", -1.4);
- gr->FaceZ(mglPoint(0.6, -1), 0.4, 0.3, "Q#"); gr->Puts(mglPoint(0.8,-0.9), "Q", "w:C", -1.4);
- //#lenuq
- gr->FaceZ(mglPoint(-1, -0.7), 0.4, 0.3, "l#"); gr->Puts(mglPoint(-0.8,-0.6), "l", "k:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,-0.7), 0.4, 0.3, "e#"); gr->Puts(mglPoint(-0.4,-0.6), "e", "k:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,-0.7), 0.4, 0.3, "n#"); gr->Puts(mglPoint(0, -0.6), "n", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.2, -0.7), 0.4, 0.3, "u#"); gr->Puts(mglPoint(0.4,-0.6), "u", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.6, -0.7), 0.4, 0.3, "q#"); gr->Puts(mglPoint(0.8,-0.6), "q", "k:C", -1.4);
- //#CMYkP
- gr->FaceZ(mglPoint(-1, -0.4), 0.4, 0.3, "C#"); gr->Puts(mglPoint(-0.8,-0.3), "C", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,-0.4), 0.4, 0.3, "M#"); gr->Puts(mglPoint(-0.4,-0.3), "M", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,-0.4), 0.4, 0.3, "Y#"); gr->Puts(mglPoint(0, -0.3), "Y", "w:C", -1.4);
- gr->FaceZ(mglPoint(0.2, -0.4), 0.4, 0.3, "k#"); gr->Puts(mglPoint(0.4,-0.3), "k", "w:C", -1.4);
- gr->FaceZ(mglPoint(0.6, -0.4), 0.4, 0.3, "P#"); gr->Puts(mglPoint(0.8,-0.3), "P", "w:C", -1.4);
- //#cmywp
- gr->FaceZ(mglPoint(-1, -0.1), 0.4, 0.3, "c#"); gr->Puts(mglPoint(-0.8, 0), "c", "k:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,-0.1), 0.4, 0.3, "m#"); gr->Puts(mglPoint(-0.4, 0), "m", "k:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,-0.1), 0.4, 0.3, "y#"); gr->Puts(mglPoint(0, 0), "y", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.2, -0.1), 0.4, 0.3, "w#"); gr->Puts(mglPoint(0.4, 0), "w", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.6, -0.1), 0.4, 0.3, "p#"); gr->Puts(mglPoint(0.8, 0), "p", "k:C", -1.4);
- //#BGRHW
- gr->FaceZ(mglPoint(-1, 0.2), 0.4, 0.3, "B#"); gr->Puts(mglPoint(-0.8, 0.3), "B", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,0.2), 0.4, 0.3, "G#"); gr->Puts(mglPoint(-0.4, 0.3), "G", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,0.2), 0.4, 0.3, "R#"); gr->Puts(mglPoint(0, 0.3), "R", "w:C", -1.4);
- gr->FaceZ(mglPoint(0.2, 0.2), 0.4, 0.3, "H#"); gr->Puts(mglPoint(0.4, 0.3), "H", "w:C", -1.4);
- gr->FaceZ(mglPoint(0.6, 0.2), 0.4, 0.3, "W#"); gr->Puts(mglPoint(0.8, 0.3), "W", "w:C", -1.4);
- //#bgrhw
- gr->FaceZ(mglPoint(-1, 0.5), 0.4, 0.3, "b#"); gr->Puts(mglPoint(-0.8, 0.6), "b", "k:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,0.5), 0.4, 0.3, "g#"); gr->Puts(mglPoint(-0.4, 0.6), "g", "k:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,0.5), 0.4, 0.3, "r#"); gr->Puts(mglPoint(0, 0.6), "r", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.2, 0.5), 0.4, 0.3, "h#"); gr->Puts(mglPoint(0.4, 0.6), "h", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.6, 0.5), 0.4, 0.3, "w#"); gr->Puts(mglPoint(0.8, 0.6), "w", "k:C", -1.4);
- //#brighted
- gr->FaceZ(mglPoint(-1, 0.8), 0.4, 0.3, "{r1}#"); gr->Puts(mglPoint(-0.8, 0.9), "\\{r1\\}", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,0.8), 0.4, 0.3, "{r3}#"); gr->Puts(mglPoint(-0.4, 0.9), "\\{r3\\}", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,0.8), 0.4, 0.3, "{r5}#"); gr->Puts(mglPoint(0, 0.9), "\\{r5\\}", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.2, 0.8), 0.4, 0.3, "{r7}#"); gr->Puts(mglPoint(0.4, 0.9), "\\{r7\\}", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.6, 0.8), 0.4, 0.3, "{r9}#"); gr->Puts(mglPoint(0.8, 0.9), "\\{r9\\}", "k:C", -1.4);
- // HEX
- gr->FaceZ(mglPoint(-1, -1.3), 1, 0.3, "{xff9966}#"); gr->Puts(mglPoint(-0.5,-1.2), "\\{xff9966\\}", "k:C", -1.4);
- gr->FaceZ(mglPoint(0, -1.3), 1, 0.3, "{x83CAFF}#"); gr->Puts(mglPoint( 0.5,-1.2), "\\{x83CAFF\\}", "k:C", -1.4);
-
- gr->SubPlot(2,2,3);
- char stl[3]="r1", txt[4]="'1'";
- for(int i=0;i<10;i++)
- {
- txt[1]=stl[1]='0'+i;
- gr->Line(mglPoint(-1,0.2*i-1),mglPoint(1,0.2*i-1),stl);
- gr->Puts(mglPoint(1.05,0.2*i-1),txt,":L");
- }
-}
-</pre><div align="center"><img src="png/style.png" alt="Sample style">
-</div>
-<hr>
-<a name="surf-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surf3-sample" accesskey="n" rel="next">surf3 sample</a>, Previous: <a href="#style-sample" accesskey="p" rel="prev">style sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surf"></a>
-<h3 class="section">10.112 Sample ‘<samp>surf</samp>’</h3>
-
-
-<p>Function <a href="#surf">surf</a> is most standard way to visualize 2D data array. <code>Surf</code> use color scheme for coloring (see <a href="#Color-scheme">Color scheme</a>). You can use ‘<samp>#</samp>’ style for drawing black meshes on the surface.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-subplot 2 2 0:title 'Surf plot (default)':rotate 50 60:light on:box:surf a
-subplot 2 2 1:title '"\#" style; meshnum 10':rotate 50 60:box:surf a '#'; meshnum 10
-subplot 2 2 2:title '"." style':rotate 50 60:box:surf a '.'
-new x 50 40 '0.8*sin(pi*x)*sin(pi*(y+1)/2)'
-new y 50 40 '0.8*cos(pi*x)*sin(pi*(y+1)/2)'
-new z 50 40 '0.8*cos(pi*(y+1)/2)'
-subplot 2 2 3:title 'parametric form':rotate 50 60:box:surf x y z 'BbwrR'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_surf3(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("Surf3 plot (default)"); }
- gr->Rotate(50,60); gr->Light(true); gr->Alpha(true);
- gr->Box(); gr->Surf3(c);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("'\\#' style");
- gr->Rotate(50,60); gr->Box(); gr->Surf3(c,"#");
- gr->SubPlot(2,2,2); gr->Title("'.' style");
- gr->Rotate(50,60); gr->Box(); gr->Surf3(c,".");
-}
-</pre><div align="center"><img src="png/surf.png" alt="Sample surf">
-</div>
-<hr>
-<a name="surf3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surf3a-sample" accesskey="n" rel="next">surf3a sample</a>, Previous: <a href="#surf-sample" accesskey="p" rel="prev">surf sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surf3"></a>
-<h3 class="section">10.113 Sample ‘<samp>surf3</samp>’</h3>
-
-
-<p>Function <a href="#surf3">surf3</a> is one of most suitable (for my opinion) functions to visualize 3D data. It draw the isosurface(s) – surface(s) of constant amplitude (3D analogue of contour lines). You can draw wired isosurfaces if specify ‘<samp>#</samp>’ style.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-light on:alpha on
-subplot 2 2 0:title 'Surf3 plot (default)'
-rotate 50 60:box:surf3 c
-subplot 2 2 1:title '"\#" style'
-rotate 50 60:box:surf3 c '#'
-subplot 2 2 2:title '"." style'
-rotate 50 60:box:surf3 c '.'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_surf3(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("Surf3 plot (default)"); }
- gr->Rotate(50,60); gr->Light(true); gr->Alpha(true);
- gr->Box(); gr->Surf3(c);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("'\\#' style");
- gr->Rotate(50,60); gr->Box(); gr->Surf3(c,"#");
- gr->SubPlot(2,2,2); gr->Title("'.' style");
- gr->Rotate(50,60); gr->Box(); gr->Surf3(c,".");
-}
-</pre><div align="center"><img src="png/surf3.png" alt="Sample surf3">
-</div>
-<hr>
-<a name="surf3a-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surf3c-sample" accesskey="n" rel="next">surf3c sample</a>, Previous: <a href="#surf3-sample" accesskey="p" rel="prev">surf3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surf3a"></a>
-<h3 class="section">10.114 Sample ‘<samp>surf3a</samp>’</h3>
-
-
-<p>Function <a href="#surf3c">surf3c</a> is similar to <a href="#surf3">surf3</a> but its transparency is determined by another data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Surf3A plot':rotate 50 60:light on:alpha on:box:surf3a c d
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_surf3a(mglGraph *gr)
-{
- mglData c,d; mgls_prepare3d(&c,&d);
- if(big!=3) gr->Title("Surf3A plot");
- gr->Rotate(50,60); gr->Light(true); gr->Alpha(true);
- gr->Box(); gr->Surf3A(c,d);
-}
-</pre><div align="center"><img src="png/surf3a.png" alt="Sample surf3a">
-</div>
-<hr>
-<a name="surf3c-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surf3ca-sample" accesskey="n" rel="next">surf3ca sample</a>, Previous: <a href="#surf3a-sample" accesskey="p" rel="prev">surf3a sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surf3c"></a>
-<h3 class="section">10.115 Sample ‘<samp>surf3c</samp>’</h3>
-
-
-<p>Function <a href="#surf3c">surf3c</a> is similar to <a href="#surf3">surf3</a> but its coloring is determined by another data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Surf3C plot':rotate 50 60:light on:alpha on:box:surf3c c d
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_surf3c(mglGraph *gr)
-{
- mglData c,d; mgls_prepare3d(&c,&d);
- if(big!=3) gr->Title("Surf3C plot");
- gr->Rotate(50,60); gr->Light(true); gr->Alpha(true);
- gr->Box(); gr->Surf3C(c,d);
-}
-</pre><div align="center"><img src="png/surf3c.png" alt="Sample surf3c">
-</div>
-<hr>
-<a name="surf3ca-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surfa-sample" accesskey="n" rel="next">surfa sample</a>, Previous: <a href="#surf3c-sample" accesskey="p" rel="prev">surf3c sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surf3ca"></a>
-<h3 class="section">10.116 Sample ‘<samp>surf3ca</samp>’</h3>
-
-
-<p>Function <a href="#surf3c">surf3c</a> is similar to <a href="#surf3">surf3</a> but its coloring and transparency is determined by another data arrays.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Surf3CA plot':rotate 50 60:light on:alpha on:box:surf3ca c d c
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_surf3ca(mglGraph *gr)
-{
- mglData c,d; mgls_prepare3d(&c,&d);
- if(big!=3) gr->Title("Surf3CA plot");
- gr->Rotate(50,60); gr->Light(true); gr->Alpha(true);
- gr->Box(); gr->Surf3CA(c,d,c);
-}
-</pre><div align="center"><img src="png/surf3ca.png" alt="Sample surf3ca">
-</div>
-<hr>
-<a name="surfa-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surfc-sample" accesskey="n" rel="next">surfc sample</a>, Previous: <a href="#surf3ca-sample" accesskey="p" rel="prev">surf3ca sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surfa"></a>
-<h3 class="section">10.117 Sample ‘<samp>surfa</samp>’</h3>
-
-
-<p>Function <a href="#surfa">surfa</a> is similar to <a href="#surf">surf</a> but its transparency is determined by another data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'SurfA plot':rotate 50 60:light on:alpha on:box:surfa a b
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_surfa(mglGraph *gr)
-{
- mglData a,b; mgls_prepare2d(&a,&b);
- if(big!=3) gr->Title("SurfA plot");
- gr->Rotate(50,60); gr->Alpha(true); gr->Light(true); gr->Box();
- gr->SurfA(a,b);
-}
-</pre><div align="center"><img src="png/surfa.png" alt="Sample surfa">
-</div>
-<hr>
-<a name="surfc-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surfca-sample" accesskey="n" rel="next">surfca sample</a>, Previous: <a href="#surfa-sample" accesskey="p" rel="prev">surfa sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surfc"></a>
-<h3 class="section">10.118 Sample ‘<samp>surfc</samp>’</h3>
-
-
-<p>Function <a href="#surfc">surfc</a> is similar to <a href="#surf">surf</a> but its coloring is determined by another data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'SurfC plot':rotate 50 60:light on:box:surfc a b
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_surfc(mglGraph *gr)
-{
- mglData a,b; mgls_prepare2d(&a,&b);
- if(big!=3) gr->Title("SurfC plot");
- gr->Rotate(50,60); gr->Light(true); gr->Box(); gr->SurfC(a,b);
-}
-</pre><div align="center"><img src="png/surfc.png" alt="Sample surfc">
-</div>
-<hr>
-<a name="surfca-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#table-sample" accesskey="n" rel="next">table sample</a>, Previous: <a href="#surfc-sample" accesskey="p" rel="prev">surfc sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surfca"></a>
-<h3 class="section">10.119 Sample ‘<samp>surfca</samp>’</h3>
-
-
-<p>Function <a href="#surfca">surfca</a> is similar to <a href="#surf">surf</a> but its coloring and transparency is determined by another data arrays.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'SurfCA plot':rotate 50 60:light on:alpha on:box:surfca a b a
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_surfca(mglGraph *gr)
-{
- mglData a,b; mgls_prepare2d(&a,&b);
- if(big!=3) gr->Title("SurfCA plot");
- gr->Rotate(50,60); gr->Alpha(true); gr->Light(true); gr->Box();
- gr->SurfCA(a,b,a);
-}
-</pre><div align="center"><img src="png/surfca.png" alt="Sample surfca">
-</div>
-<hr>
-<a name="table-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#tape-sample" accesskey="n" rel="next">tape sample</a>, Previous: <a href="#surfca-sample" accesskey="p" rel="prev">surfca sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-table"></a>
-<h3 class="section">10.120 Sample ‘<samp>table</samp>’</h3>
-
-
-<p>Function <a href="#table">table</a> draw table with data values.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ys 10 3 '0.8*sin(pi*(x+y/4+1.25))+0.2*rnd'
-subplot 2 2 0:title 'Table sample':box
-table ys 'y_1\n{}y_2\n{}y_3'
-
-subplot 2 2 1:title 'no borders, colored'
-table ys 'y_1\n{}y_2\n{}y_3' 'r|'
-
-subplot 2 2 2:title 'no font decrease'
-table ys 'y_1\n{}y_2\n{}y_3' '#'
-
-subplot 2 2 3:title 'manual width and position':box
-table 0.5 0.95 ys 'y_1\n{}y_2\n{}y_3' '#';value 0.7
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_table(mglGraph *gr)
-{
- mglData ys(10,3); ys.Modify("0.8*sin(pi*(2*x+y/2))+0.2*rnd");
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("Table plot"); }
- gr->Table(ys,"y_1\ny_2\ny_3"); gr->Box();
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("no borders, colored");
- gr->Table(ys,"y_1\ny_2\ny_3","r|");
- gr->SubPlot(2,2,2); gr->Title("no font decrease");
- gr->Table(ys,"y_1\ny_2\ny_3","#");
- gr->SubPlot(2,2,3); gr->Title("manual width, position");
- gr->Table(0.5, 0.95, ys,"y_1\ny_2\ny_3","#", "value 0.7"); gr->Box();
-}
-</pre><div align="center"><img src="png/table.png" alt="Sample table">
-</div>
-<hr>
-<a name="tape-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#tens-sample" accesskey="n" rel="next">tens sample</a>, Previous: <a href="#table-sample" accesskey="p" rel="prev">table sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-tape"></a>
-<h3 class="section">10.121 Sample ‘<samp>tape</samp>’</h3>
-
-
-<p>Function <a href="#tape">tape</a> draw tapes which rotate around the curve as transverse orts of accompanied coordinates.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-new yc 50 'sin(pi*x)':new xc 50 'cos(pi*x)':new z 50 'x'
-subplot 2 2 0 '':title 'Tape plot (default)':box:tape y:plot y 'k'
-subplot 2 2 1:title '3d variant, 2 colors':rotate 50 60:light on
-box:plot xc yc z 'k':tape xc yc z 'rg'
-subplot 2 2 2:title '3d variant, x only':rotate 50 60
-box:plot xc yc z 'k':tape xc yc z 'xr':tape xc yc z 'xr#'
-subplot 2 2 3:title '3d variant, z only':rotate 50 60
-box:plot xc yc z 'k':tape xc yc z 'zg':tape xc yc z 'zg#'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_tape(mglGraph *gr)
-{
- mglData y; mgls_prepare1d(&y);
- mglData xc(50), yc(50), z(50);
- yc.Modify("sin(pi*(2*x-1))");
- xc.Modify("cos(pi*2*x-pi)"); z.Fill(-1,1);
- if(big!=3) { gr->SubPlot(2,2,0,""); gr->Title("Tape plot (default)"); }
- gr->Box(); gr->Tape(y); gr->Plot(y,"k");
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("3d variant, 2 colors"); gr->Rotate(50,60); gr->Light(true);
- gr->Box(); gr->Plot(xc,yc,z,"k"); gr->Tape(xc,yc,z,"rg");
- gr->SubPlot(2,2,2); gr->Title("3d variant, x only"); gr->Rotate(50,60);
- gr->Box(); gr->Plot(xc,yc,z,"k"); gr->Tape(xc,yc,z,"xr"); gr->Tape(xc,yc,z,"xr#");
- gr->SubPlot(2,2,3); gr->Title("3d variant, z only"); gr->Rotate(50,60);
- gr->Box(); gr->Plot(xc,yc,z,"k"); gr->Tape(xc,yc,z,"zg"); gr->Tape(xc,yc,z,"zg#");
-}
-</pre><div align="center"><img src="png/tape.png" alt="Sample tape">
-</div>
-<hr>
-<a name="tens-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ternary-sample" accesskey="n" rel="next">ternary sample</a>, Previous: <a href="#tape-sample" accesskey="p" rel="prev">tape sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-tens"></a>
-<h3 class="section">10.122 Sample ‘<samp>tens</samp>’</h3>
-
-
-<p>Function <a href="#tens">tens</a> is variant of <a href="#plot">plot</a> with smooth coloring along the curves. At this, color is determined as for surfaces (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 2 2 0 '':title 'Tens plot (default)':box:tens y(:,0) y(:,1)
-subplot 2 2 2 '':title '" " style':box:tens y(:,0) y(:,1) 'o '
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 2 2 1:title '3d variant':rotate 50 60:box:tens xc yc z z 's'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_tens(mglGraph *gr)
-{
- mglData y; mgls_prepare1d(&y); gr->SetOrigin(0,0,0);
- if(big!=3) { gr->SubPlot(2,2,0,""); gr->Title("Tens plot (default)"); }
- gr->Box(); gr->Tens(y.SubData(-1,0), y.SubData(-1,1));
- if(big==3) return;
- gr->SubPlot(2,2,2,""); gr->Title("' ' style"); gr->Box(); gr->Tens(y.SubData(-1,0), y.SubData(-1,1),"o ");
- gr->SubPlot(2,2,1); gr->Title("3d variant"); gr->Rotate(50,60); gr->Box();
- mglData yc(30), xc(30), z(30); z.Modify("2*x-1");
- yc.Modify("sin(pi*(2*x-1))"); xc.Modify("cos(pi*2*x-pi)");
- gr->Tens(xc,yc,z,z,"s");
-}
-</pre><div align="center"><img src="png/tens.png" alt="Sample tens">
-</div>
-<hr>
-<a name="ternary-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#text-sample" accesskey="n" rel="next">text sample</a>, Previous: <a href="#tens-sample" accesskey="p" rel="prev">tens sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ternary"></a>
-<h3 class="section">10.123 Sample ‘<samp>ternary</samp>’</h3>
-
-
-<p>Example of <a href="#ternary">ternary</a> coordinates.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">ranges 0 1 0 1 0 1
-new x 50 '0.25*(1+cos(2*pi*x))'
-new y 50 '0.25*(1+sin(2*pi*x))'
-new z 50 'x'
-new a 20 30 '30*x*y*(1-x-y)^2*(x+y<1)'
-new rx 10 'rnd':new ry 10:fill ry '(1-v)*rnd' rx
-light on
-
-subplot 2 2 0:title 'Ordinary axis 3D':rotate 50 60
-box:axis:grid
-plot x y z 'r2':surf a '#'
-xlabel 'B':ylabel 'C':zlabel 'Z'
-
-subplot 2 2 1:title 'Ternary axis (x+y+t=1)':ternary 1
-box:axis:grid 'xyz' 'B;'
-plot x y 'r2':plot rx ry 'q^ ':cont a:line 0.5 0 0 0.75 'g2'
-xlabel 'B':ylabel 'C':tlabel 'A'
-
-subplot 2 2 2:title 'Quaternary axis 3D':rotate 50 60:ternary 2
-box:axis:grid 'xyz' 'B;'
-plot x y z 'r2':surf a '#'
-xlabel 'B':ylabel 'C':tlabel 'A':zlabel 'D'
-
-subplot 2 2 3:title 'Ternary axis 3D':rotate 50 60:ternary 1
-box:axis:grid 'xyz' 'B;'
-plot x y z 'r2':surf a '#'
-xlabel 'B':ylabel 'C':tlabel 'A':zlabel 'Z'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_ternary(mglGraph *gr) // flag #
-{
- gr->SetRanges(0,1,0,1,0,1);
- mglData x(50),y(50),z(50),rx(10),ry(10), a(20,30);
- a.Modify("30*x*y*(1-x-y)^2*(x+y<1)");
- x.Modify("0.25*(1+cos(2*pi*x))");
- y.Modify("0.25*(1+sin(2*pi*x))");
- rx.Modify("rnd"); ry.Modify("(1-v)*rnd",rx);
- z.Modify("x");
-
- gr->SubPlot(2,2,0); gr->Title("Ordinary axis 3D");
- gr->Rotate(50,60); gr->Light(true);
- gr->Plot(x,y,z,"r2"); gr->Surf(a,"BbcyrR#");
- gr->Axis(); gr->Grid(); gr->Box();
- gr->Label('x',"B",1); gr->Label('y',"C",1); gr->Label('z',"Z",1);
-
- gr->SubPlot(2,2,1); gr->Title("Ternary axis (x+y+t=1)");
- gr->Ternary(1);
- gr->Plot(x,y,"r2"); gr->Plot(rx,ry,"q^ "); gr->Cont(a);
- gr->Line(mglPoint(0.5,0), mglPoint(0,0.75), "g2");
- gr->Axis(); gr->Grid("xyz","B;");
- gr->Label('x',"B"); gr->Label('y',"C"); gr->Label('t',"A");
-
- gr->SubPlot(2,2,2); gr->Title("Quaternary axis 3D");
- gr->Rotate(50,60); gr->Light(true);
- gr->Ternary(2);
- gr->Plot(x,y,z,"r2"); gr->Surf(a,"BbcyrR#");
- gr->Axis(); gr->Grid(); gr->Box();
- gr->Label('t',"A",1); gr->Label('x',"B",1);
- gr->Label('y',"C",1); gr->Label('z',"D",1);
-
- gr->SubPlot(2,2,3); gr->Title("Ternary axis 3D");
- gr->Rotate(50,60); gr->Light(true);
- gr->Ternary(1);
- gr->Plot(x,y,z,"r2"); gr->Surf(a,"BbcyrR#");
- gr->Axis(); gr->Grid(); gr->Box();
- gr->Label('t',"A",1); gr->Label('x',"B",1);
- gr->Label('y',"C",1); gr->Label('z',"Z",1);
-}
-</pre><div align="center"><img src="png/ternary.png" alt="Sample ternary">
-</div>
-<hr>
-<a name="text-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#text2-sample" accesskey="n" rel="next">text2 sample</a>, Previous: <a href="#ternary-sample" accesskey="p" rel="prev">ternary sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-text"></a>
-<h3 class="section">10.124 Sample ‘<samp>text</samp>’</h3>
-
-
-<p>Example of <a href="#text">text</a> possibilities.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 2 2 0 ''
-text 0 1 'Text can be in ASCII and in Unicode'
-text 0 0.6 'It can be \wire{wire}, \big{big} or #r{colored}'
-text 0 0.2 'One can change style in string: \b{bold}, \i{italic, \b{both}}'
-text 0 -0.2 'Easy to \a{overline} or \u{underline}'
-text 0 -0.6 'Easy to change indexes ^{up} _{down} @{center}'
-text 0 -1 'It parse TeX: \int \alpha \cdot \
-\sqrt3{sin(\pi x)^2 + \gamma_{i_k}} dx'
-subplot 2 2 1 ''
- text 0 0.5 '\sqrt{\frac{\alpha^{\gamma^2}+\overset 1{\big\infty}}{\sqrt3{2+b}}}' '@' -2
-text 0 -0.1 'More text position: \frac{a}{b}, \dfrac{a}{b}, [\stack{a}{bbb}], [\stackl{a}{bbb}], [\stackr{a}{bbb}], \sup{a}{sup}, \sub{a}{sub}'text 0 -0.5 'Text can be printed\n{}on several lines'
-text 0 -0.9 'or with color gradient' 'BbcyrR'
-subplot 2 2 2 '':box:plot y(:,0)
-text y 'This is very very long string drawn along a curve' 'k'
-text y 'Another string drawn above a curve' 'Tr'
-subplot 2 2 3 '':line -1 -1 1 -1 'rA':text 0 -1 1 -1 'Horizontal'
-line -1 -1 1 1 'rA':text 0 0 1 1 'At angle' '@'
-line -1 -1 -1 1 'rA':text -1 0 -1 1 'Vertical'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_text(mglGraph *gr) // text drawing
-{
- if(big!=3) gr->SubPlot(2,2,0,"");
- gr->Putsw(mglPoint(0,1),L"Text can be in ASCII and in Unicode");
- gr->Puts(mglPoint(0,0.6),"It can be \\wire{wire}, \\big{big} or #r{colored}");
- gr->Puts(mglPoint(0,0.2),"One can change style in string: "
- "\\b{bold}, \\i{italic, \\b{both}}");
- gr->Puts(mglPoint(0,-0.2),"Easy to \\a{overline} or "
- "\\u{underline}");
- gr->Puts(mglPoint(0,-0.6),"Easy to change indexes ^{up} _{down} @{center}");
- gr->Puts(mglPoint(0,-1),"It parse TeX: \\int \\alpha \\cdot "
- "\\sqrt3{sin(\\pi x)^2 + \\gamma_{i_k}} dx");
- if(big==3) return;
-
- gr->SubPlot(2,2,1,"");
- gr->Puts(mglPoint(0,0.5), "\\sqrt{\\frac{\\alpha^{\\gamma^2}+\\overset 1{\\big\\infty}}{\\sqrt3{2+b}}}", "@", -2);
- gr->Puts(mglPoint(0,-0.1),"More text position: \\frac{a}{b}, \\dfrac{a}{b}, [\\stack{a}{bbb}], [\\stackl{a}{bbb}], [\\stackr{a}{bbb}], \\sup{a}{sup}, \\sub{a}{sub}");
- gr->Puts(mglPoint(0,-0.5),"Text can be printed\non several lines");
- gr->Puts(mglPoint(0,-0.9),"or with col\bor gradient","BbcyrR");
-
- gr->SubPlot(2,2,2,"");
- mglData y; mgls_prepare1d(&y);
- gr->Box(); gr->Plot(y.SubData(-1,0));
- gr->Text(y,"This is very very long string drawn along a curve","k");
- gr->Text(y,"Another string drawn under a curve","Tr");
-
- gr->SubPlot(2,2,3,"");
- gr->Line(mglPoint(-1,-1),mglPoint(1,-1),"rA"); gr->Puts(mglPoint(0,-1),mglPoint(1,-1),"Horizontal");
- gr->Line(mglPoint(-1,-1),mglPoint(1,1),"rA"); gr->Puts(mglPoint(0,0),mglPoint(1,1),"At angle","@");
- gr->Line(mglPoint(-1,-1),mglPoint(-1,1),"rA"); gr->Puts(mglPoint(-1,0),mglPoint(-1,1),"Vertical");
-}
-</pre><div align="center"><img src="png/text.png" alt="Sample text">
-</div>
-<hr>
-<a name="text2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#textmark-sample" accesskey="n" rel="next">textmark sample</a>, Previous: <a href="#text-sample" accesskey="p" rel="prev">text sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-text2"></a>
-<h3 class="section">10.125 Sample ‘<samp>text2</samp>’</h3>
-
-
-<p>Example of <a href="#text">text</a> along curve.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 1 3 0 '':box:plot y(:,0)
-text y 'This is very very long string drawn along a curve' 'k'
-text y 'Another string drawn under a curve' 'Tr'
-subplot 1 3 1 '':box:plot y(:,0)
-text y 'This is very very long string drawn along a curve' 'k:C'
-text y 'Another string drawn under a curve' 'Tr:C'
-subplot 1 3 2 '':box:plot y(:,0)
-text y 'This is very very long string drawn along a curve' 'k:R'
-text y 'Another string drawn under a curve' 'Tr:R'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_text2(mglGraph *gr) // text drawing
-{
- mglData y; mgls_prepare1d(&y);
- if(big!=3) gr->SubPlot(1,3,0,"");
- gr->Box(); gr->Plot(y.SubData(-1,0));
- gr->Text(y,"This is very very long string drawn along a curve","k");
- gr->Text(y,"Another string drawn under a curve","Tr");
- if(big==3) return;
-
- gr->SubPlot(1,3,1,"");
- gr->Box(); gr->Plot(y.SubData(-1,0));
- gr->Text(y,"This is very very long string drawn along a curve","k:C");
- gr->Text(y,"Another string drawn under a curve","Tr:C");
-
- gr->SubPlot(1,3,2,"");
- gr->Box(); gr->Plot(y.SubData(-1,0));
- gr->Text(y,"This is very very long string drawn along a curve","k:R");
- gr->Text(y,"Another string drawn under a curve","Tr:R");
-}
-</pre><div align="center"><img src="png/text2.png" alt="Sample text2">
-</div>
-<hr>
-<a name="textmark-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ticks-sample" accesskey="n" rel="next">ticks sample</a>, Previous: <a href="#text2-sample" accesskey="p" rel="prev">text2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-textmark"></a>
-<h3 class="section">10.126 Sample ‘<samp>textmark</samp>’</h3>
-
-
-<p>Function <a href="#textmark">textmark</a> is similar to <a href="#mark">mark</a> but draw text instead of markers.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 1 1 0 '':title 'TextMark plot (default)':box:textmark y y1 '\gamma' 'r'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_textmark(mglGraph *gr)
-{
- mglData y,y1; mgls_prepare1d(&y,&y1);
- if(big!=3) { gr->SubPlot(1,1,0,""); gr->Title("TextMark plot (default)"); }
- gr->Box(); gr->TextMark(y,y1,"\\gamma","r");
-}
-</pre><div align="center"><img src="png/textmark.png" alt="Sample textmark">
-</div>
-<hr>
-<a name="ticks-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#tile-sample" accesskey="n" rel="next">tile sample</a>, Previous: <a href="#textmark-sample" accesskey="p" rel="prev">textmark sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ticks"></a>
-<h3 class="section">10.127 Sample ‘<samp>ticks</samp>’</h3>
-
-
-<p>Example of <a href="#axis">axis</a> ticks.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 3 3 0:title 'Usual axis with ":" style'
-axis ':'
-
-subplot 3 3 1:title 'Too big/small range'
-ranges -1000 1000 0 0.001:axis
-
-subplot 3 3 2:title 'LaTeX-like labels'
-axis 'F!'
-
-subplot 3 3 3:title 'Too narrow range'
-ranges 100 100.1 10 10.01:axis
-
-subplot 3 3 4:title 'No tuning, manual "+"'
-axis '+!'
-# for version <2.3 you can use
-#tuneticks off:axis
-
-subplot 3 3 5:title 'Template for ticks'
-xtick 'xxx:%g':ytick 'y:%g'
-axis
-
-xtick '':ytick '' # switch it off for other plots
-
-subplot 3 3 6:title 'No tuning, higher precision'
-axis '!4'
-
-subplot 3 3 7:title 'Manual ticks'
-ranges -pi pi 0 2
-xtick pi 3 '\pi'
-xtick 0.886 'x^*' on # note this will disable subticks drawing
-# or you can use
-#xtick -pi '\pi' -pi/2 '-\pi/2' 0 '0' 0.886 'x^*' pi/2 '\pi/2' pi 'pi'
-list v 0 0.5 1 2:ytick v '0
-0.5
-1
-2'
-axis:grid:fplot '2*cos(x^2)^2' 'r2'
-
-subplot 3 3 8:title 'Time ticks'
-xrange 0 3e5:ticktime 'x':axis
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_ticks(mglGraph *gr)
-{
- gr->SubPlot(3,3,0); gr->Title("Usual axis with ':' style"); gr->Axis(":");
- gr->SubPlot(3,3,1); gr->Title("Too big/small range");
- gr->SetRanges(-1000,1000,0,0.001); gr->Axis();
- gr->SubPlot(3,3,2); gr->Title("LaTeX-like labels");
- gr->Axis("F!");
- gr->SubPlot(3,3,3); gr->Title("Too narrow range");
- gr->SetRanges(100,100.1,10,10.01); gr->Axis();
- gr->SubPlot(3,3,4); gr->Title("No tuning, manual '+'");
- // for version<2.3 you need first call gr->SetTuneTicks(0);
- gr->Axis("+!");
- gr->SubPlot(3,3,5); gr->Title("Template for ticks");
- gr->SetTickTempl('x',"xxx:%g"); gr->SetTickTempl('y',"y:%g");
- gr->Axis();
- // now switch it off for other plots
- gr->SetTickTempl('x',""); gr->SetTickTempl('y',"");
- gr->SubPlot(3,3,6); gr->Title("No tuning, higher precision");
- gr->Axis("!4");
- gr->SubPlot(3,3,7); gr->Title("Manual ticks"); gr->SetRanges(-M_PI,M_PI, 0, 2);
- gr->SetTicks('x',M_PI,0,0,"\\pi"); gr->AddTick('x',0.886,"x^*");
- // alternatively you can use following lines
- double val[]={0, 0.5, 1, 2};
- gr->SetTicksVal('y', mglData(4,val), "0\n0.5\n1\n2");
- gr->Axis(); gr->Grid(); gr->FPlot("2*cos(x^2)^2", "r2");
- gr->SubPlot(3,3,8); gr->Title("Time ticks"); gr->SetRange('x',0,3e5);
- gr->SetTicksTime('x',0); gr->Axis();
-}
-</pre><div align="center"><img src="png/ticks.png" alt="Sample ticks">
-</div>
-<hr>
-<a name="tile-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#tiles-sample" accesskey="n" rel="next">tiles sample</a>, Previous: <a href="#ticks-sample" accesskey="p" rel="prev">ticks sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-tile"></a>
-<h3 class="section">10.128 Sample ‘<samp>tile</samp>’</h3>
-
-
-<p>Function <a href="#tile">tile</a> draw surface by tiles.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Tile plot':rotate 50 60:box:tile a
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_tile(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- if(big!=3) gr->Title("Tile plot");
- gr->Rotate(40,60); gr->Box(); gr->Tile(a);
-}
-</pre><div align="center"><img src="png/tile.png" alt="Sample tile">
-</div>
-<hr>
-<a name="tiles-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#torus-sample" accesskey="n" rel="next">torus sample</a>, Previous: <a href="#tile-sample" accesskey="p" rel="prev">tile sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-tiles"></a>
-<h3 class="section">10.129 Sample ‘<samp>tiles</samp>’</h3>
-
-
-<p>Function <a href="#tiles">tiles</a> is similar to <a href="#tile">tile</a> but tile sizes is determined by another data. This allows one to simulate transparency of the plot.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-subplot 1 1 0 '':title 'Tiles plot':box:tiles a b
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_tiles(mglGraph *gr)
-{
- mglData a,b; mgls_prepare2d(&a,&b);
- if(big!=3) {gr->SubPlot(1,1,0,""); gr->Title("TileS plot");}
- gr->Box(); gr->TileS(a,b);
-}
-</pre><div align="center"><img src="png/tiles.png" alt="Sample tiles">
-</div>
-<hr>
-<a name="torus-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#traj-sample" accesskey="n" rel="next">traj sample</a>, Previous: <a href="#tiles-sample" accesskey="p" rel="prev">tiles sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-torus"></a>
-<h3 class="section">10.130 Sample ‘<samp>torus</samp>’</h3>
-
-
-<p>Function <a href="#torus">torus</a> draw surface of the curve rotation.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 2 2 0:title 'Torus plot (default)':light on:rotate 50 60:box:torus y1 y2
-subplot 2 2 1:title '"x" style':light on:rotate 50 60:box:torus y1 y2 'x'
-subplot 2 2 2:title '"z" style':light on:rotate 50 60:box:torus y1 y2 'z'
-subplot 2 2 3:title '"\#" style':light on:rotate 50 60:box:torus y1 y2 '#'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_torus(mglGraph *gr)
-{
- mglData y1,y2; mgls_prepare1d(0,&y1,&y2);
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("Torus plot (default)"); }
- gr->Light(true); gr->Rotate(50,60); gr->Box(); gr->Torus(y1,y2);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("'x' style"); gr->Rotate(50,60); gr->Box(); gr->Torus(y1,y2,"x");
- gr->SubPlot(2,2,2); gr->Title("'z' style"); gr->Rotate(50,60); gr->Box(); gr->Torus(y1,y2,"z");
- gr->SubPlot(2,2,3); gr->Title("'\\#' style"); gr->Rotate(50,60); gr->Box(); gr->Torus(y1,y2,"#");
-}
-</pre><div align="center"><img src="png/torus.png" alt="Sample torus">
-</div>
-<hr>
-<a name="traj-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#triangulation-sample" accesskey="n" rel="next">triangulation sample</a>, Previous: <a href="#torus-sample" accesskey="p" rel="prev">torus sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-traj"></a>
-<h3 class="section">10.131 Sample ‘<samp>traj</samp>’</h3>
-
-
-<p>Function <a href="#traj">traj</a> is 1D analogue of <a href="#vect">vect</a>. It draw vectors from specified points.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 1 1 0 '':title 'Traj plot':box:plot x1 y:traj x1 y y1 y2
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_traj(mglGraph *gr)
-{
- mglData x,y,y1,y2; mgls_prepare1d(&y,&y1,&y2,&x);
- if(big!=3) {gr->SubPlot(1,1,0,""); gr->Title("Traj plot");}
- gr->Box(); gr->Plot(x,y); gr->Traj(x,y,y1,y2);
-}
-</pre><div align="center"><img src="png/traj.png" alt="Sample traj">
-</div>
-<hr>
-<a name="triangulation-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#triplot-sample" accesskey="n" rel="next">triplot sample</a>, Previous: <a href="#traj-sample" accesskey="p" rel="prev">traj sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-triangulation"></a>
-<h3 class="section">10.132 Sample ‘<samp>triangulation</samp>’</h3>
-
-
-<p>Example of use <a href="#triangulate">triangulate</a> for arbitrary placed points.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 100 '2*rnd-1':new y 100 '2*rnd-1':copy z x^2-y^2
-new g 30 30:triangulate d x y
-title 'Triangulation'
-rotate 50 60:box:light on
-triplot d x y z:triplot d x y z '#k'
-datagrid g x y z:mesh g 'm'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_triangulation(mglGraph *gr) // surface triangulation
-{
- mglData x(100), y(100), z(100);
- gr->Fill(x,"2*rnd-1"); gr->Fill(y,"2*rnd-1"); gr->Fill(z,"v^2-w^2",x,y);
- mglData d = mglTriangulation(x,y), g(30,30);
-
- if(big!=3) gr->Title("Triangulation");
- gr->Rotate(40,60); gr->Box(); gr->Light(true);
- gr->TriPlot(d,x,y,z); gr->TriPlot(d,x,y,z,"#k");
-
- gr->DataGrid(g,x,y,z); gr->Mesh(g,"m");
-}
-</pre><div align="center"><img src="png/triangulation.png" alt="Sample triangulation">
-</div>
-<hr>
-<a name="triplot-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#tube-sample" accesskey="n" rel="next">tube sample</a>, Previous: <a href="#triangulation-sample" accesskey="p" rel="prev">triangulation sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-triplot"></a>
-<h3 class="section">10.133 Sample ‘<samp>triplot</samp>’</h3>
-
-
-<p>Functions <a href="#triplot">triplot</a> and <a href="#quadplot">quadplot</a> draw set of triangles (or quadrangles, correspondingly) for irregular data arrays. Note, that you have to provide not only vertexes, but also the indexes of triangles or quadrangles. I.e. perform triangulation by some other library. See also <a href="#triangulate">triangulate</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">list q 0 1 2 3 | 4 5 6 7 | 0 2 4 6 | 1 3 5 7 | 0 4 1 5 | 2 6 3 7
-list xq -1 1 -1 1 -1 1 -1 1
-list yq -1 -1 1 1 -1 -1 1 1
-list zq -1 -1 -1 -1 1 1 1 1
-light on
-subplot 2 2 0:title 'QuadPlot sample':rotate 50 60
-quadplot q xq yq zq 'yr'
-quadplot q xq yq zq '#k'
-subplot 2 2 2:title 'QuadPlot coloring':rotate 50 60
-quadplot q xq yq zq yq 'yr'
-quadplot q xq yq zq '#k'
-list t 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0
-list yt -1 -1 1 0
-list zt -1 -1 -1 1
-subplot 2 2 1:title 'TriPlot sample':rotate 50 60
-triplot t xt yt zt 'b'
-triplot t xt yt zt '#k'
-subplot 2 2 3:title 'TriPlot coloring':rotate 50 60
-triplot t xt yt zt yt 'cb'
-triplot t xt yt zt '#k'
-tricont t xt yt zt 'B'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_triplot(mglGraph *gr)
-{
- double q[] = {0,1,2,3, 4,5,6,7, 0,2,4,6, 1,3,5,7, 0,4,1,5, 2,6,3,7};
- double xc[] = {-1,1,-1,1,-1,1,-1,1}, yc[] = {-1,-1,1,1,-1,-1,1,1}, zc[] = {-1,-1,-1,-1,1,1,1,1};
- mglData qq(6,4,q), xx(8,xc), yy(8,yc), zz(8,zc);
- gr->Light(true); //gr->Alpha(true);
- gr->SubPlot(2,2,0); gr->Title("QuadPlot sample"); gr->Rotate(50,60);
- gr->QuadPlot(qq,xx,yy,zz,"yr");
- gr->QuadPlot(qq,xx,yy,zz,"k#");
- gr->SubPlot(2,2,2); gr->Title("QuadPlot coloring"); gr->Rotate(50,60);
- gr->QuadPlot(qq,xx,yy,zz,yy,"yr");
- gr->QuadPlot(qq,xx,yy,zz,"k#");
-
- double t[] = {0,1,2, 0,1,3, 0,2,3, 1,2,3};
- double xt[] = {-1,1,0,0}, yt[] = {-1,-1,1,0}, zt[] = {-1,-1,-1,1};
- mglData tt(4,3,t), uu(4,xt), vv(4,yt), ww(4,zt);
- gr->SubPlot(2,2,1); gr->Title("TriPlot sample"); gr->Rotate(50,60);
- gr->TriPlot(tt,uu,vv,ww,"b");
- gr->TriPlot(tt,uu,vv,ww,"k#");
- gr->SubPlot(2,2,3); gr->Title("TriPlot coloring"); gr->Rotate(50,60);
- gr->TriPlot(tt,uu,vv,ww,vv,"cb");
- gr->TriPlot(tt,uu,vv,ww,"k#");
- gr->TriCont(tt,uu,vv,ww,"B");
-}
-</pre><div align="center"><img src="png/triplot.png" alt="Sample triplot">
-</div>
-<hr>
-<a name="tube-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#type0-sample" accesskey="n" rel="next">type0 sample</a>, Previous: <a href="#triplot-sample" accesskey="p" rel="prev">triplot sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-tube"></a>
-<h3 class="section">10.134 Sample ‘<samp>tube</samp>’</h3>
-
-
-<p>Function <a href="#tube">tube</a> draw tube with variable radius.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-light on
-new yc 50 'sin(pi*x)':new xc 50 'cos(pi*x)':new z 50 'x':divto y1 20
-subplot 2 2 0 '':title 'Tube plot (default)':box:tube y 0.05
-subplot 2 2 1 '':title 'variable radius':box:tube y y1
-subplot 2 2 2 '':title '"\#" style':box:tube y 0.05 '#'
-subplot 2 2 3:title '3d variant':rotate 50 60:box:tube xc yc z y2 'r'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_tube(mglGraph *gr)
-{
- mglData y,y1,y2; mgls_prepare1d(&y,&y1,&y2); y1/=20;
- if(big!=3) { gr->SubPlot(2,2,0,""); gr->Title("Tube plot (default)"); }
- gr->Light(true); gr->Box(); gr->Tube(y,0.05);
- if(big==3) return;
- gr->SubPlot(2,2,1,""); gr->Title("variable radius"); gr->Box(); gr->Tube(y,y1);
- gr->SubPlot(2,2,2,""); gr->Title("'\\#' style"); gr->Box(); gr->Tube(y,0.05,"#");
- mglData yc(50), xc(50), z(50); z.Modify("2*x-1");
- yc.Modify("sin(pi*(2*x-1))"); xc.Modify("cos(pi*2*x-pi)");
- gr->SubPlot(2,2,3); gr->Title("3d variant"); gr->Rotate(50,60); gr->Box(); gr->Tube(xc,yc,z,y2,"r");
-}
-</pre><div align="center"><img src="png/tube.png" alt="Sample tube">
-</div>
-<hr>
-<a name="type0-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#type1-sample" accesskey="n" rel="next">type1 sample</a>, Previous: <a href="#tube-sample" accesskey="p" rel="prev">tube sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-type0"></a>
-<h3 class="section">10.135 Sample ‘<samp>type0</samp>’</h3>
-
-
-<p>Example of ordinary transparency (<a href="#transptype">transptype</a>=0).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-alpha on:light on:transptype 0:clf
-subplot 2 2 0:rotate 50 60:surf a:box
-subplot 2 2 1:rotate 50 60:dens a:box
-subplot 2 2 2:rotate 50 60:cont a:box
-subplot 2 2 3:rotate 50 60:axial a:box
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_type0(mglGraph *gr) // TranspType = 0
-{
- gr->Alpha(true); gr->Light(true);
- mglData a; mgls_prepare2d(&a);
- gr->SetTranspType(0); gr->Clf();
- gr->SubPlot(2,2,0); gr->Rotate(50,60); gr->Surf(a); gr->Box();
- gr->SubPlot(2,2,1); gr->Rotate(50,60); gr->Dens(a); gr->Box();
- gr->SubPlot(2,2,2); gr->Rotate(50,60); gr->Cont(a); gr->Box();
- gr->SubPlot(2,2,3); gr->Rotate(50,60); gr->Axial(a); gr->Box();
-}
-</pre><div align="center"><img src="png/type0.png" alt="Sample type0">
-</div>
-<hr>
-<a name="type1-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#type2-sample" accesskey="n" rel="next">type2 sample</a>, Previous: <a href="#type0-sample" accesskey="p" rel="prev">type0 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-type1"></a>
-<h3 class="section">10.136 Sample ‘<samp>type1</samp>’</h3>
-
-
-<p>Example of glass-like transparency (<a href="#transptype">transptype</a>=1).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-alpha on:light on:transptype 1:clf
-subplot 2 2 0:rotate 50 60:surf a:box
-subplot 2 2 1:rotate 50 60:dens a:box
-subplot 2 2 2:rotate 50 60:cont a:box
-subplot 2 2 3:rotate 50 60:axial a:box
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_type1(mglGraph *gr) // TranspType = 1
-{
- gr->Alpha(true); gr->Light(true);
- mglData a; mgls_prepare2d(&a);
- gr->SetTranspType(1); gr->Clf();
- gr->SubPlot(2,2,0); gr->Rotate(50,60); gr->Surf(a); gr->Box();
- gr->SubPlot(2,2,1); gr->Rotate(50,60); gr->Dens(a); gr->Box();
- gr->SubPlot(2,2,2); gr->Rotate(50,60); gr->Cont(a); gr->Box();
- gr->SubPlot(2,2,3); gr->Rotate(50,60); gr->Axial(a); gr->Box();
-}
-</pre><div align="center"><img src="png/type1.png" alt="Sample type1">
-</div>
-<hr>
-<a name="type2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#vect-sample" accesskey="n" rel="next">vect sample</a>, Previous: <a href="#type1-sample" accesskey="p" rel="prev">type1 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-type2"></a>
-<h3 class="section">10.137 Sample ‘<samp>type2</samp>’</h3>
-
-
-<p>Example of lamp-like transparency (<a href="#transptype">transptype</a>=2).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-alpha on:light on:transptype 2:clf
-subplot 2 2 0:rotate 50 60:surf a:box
-subplot 2 2 1:rotate 50 60:dens a:box
-subplot 2 2 2:rotate 50 60:cont a:box
-subplot 2 2 3:rotate 50 60:axial a:box
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_type2(mglGraph *gr) // TranspType = 2
-{
- gr->Alpha(true); gr->Light(true);
- mglData a; mgls_prepare2d(&a);
- gr->SetTranspType(2); gr->Clf();
- gr->SubPlot(2,2,0); gr->Rotate(50,60); gr->Surf(a); gr->Box();
- gr->SubPlot(2,2,1); gr->Rotate(50,60); gr->Dens(a); gr->Box();
- gr->SubPlot(2,2,2); gr->Rotate(50,60); gr->Cont(a); gr->Box();
- gr->SubPlot(2,2,3); gr->Rotate(50,60); gr->Axial(a); gr->Box();
-}
-</pre><div align="center"><img src="png/type2.png" alt="Sample type2">
-</div>
-<hr>
-<a name="vect-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#vect3-sample" accesskey="n" rel="next">vect3 sample</a>, Previous: <a href="#type2-sample" accesskey="p" rel="prev">type2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-vect"></a>
-<h3 class="section">10.138 Sample ‘<samp>vect</samp>’</h3>
-
-
-<p>Function <a href="#vect">vect</a> is most standard way to visualize vector fields – it draw a lot of arrows or hachures for each data cell. It have a lot of options which can be seen on the figure (and in the sample code), and use color scheme for coloring (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2v'
-call 'prepare3v'
-subplot 3 2 0 '':title 'Vect plot (default)':box:vect a b
-subplot 3 2 1 '':title '"." style; "=" style':box:vect a b '.='
-subplot 3 2 2 '':title '"f" style':box:vect a b 'f'
-subplot 3 2 3 '':title '">" style':box:vect a b '>'
-subplot 3 2 4 '':title '"<" style':box:vect a b '<'
-subplot 3 2 5:title '3d variant':rotate 50 60:box:vect ex ey ez
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_vect3(mglGraph *gr)
-{
- mglData ex,ey,ez; mgls_prepare3v(&ex,&ey,&ez);
- if(big!=3) { gr->SubPlot(2,1,0); gr->Title("Vect3 sample"); }
- gr->Rotate(50,60); gr->SetOrigin(0,0,0); gr->Axis("_xyz"); gr->Box();
- gr->Vect3(ex,ey,ez,"x"); gr->Vect3(ex,ey,ez); gr->Vect3(ex,ey,ez,"z");
- if(big==3) return;
- gr->SubPlot(2,1,1); gr->Title("'f' style");
- gr->Rotate(50,60); gr->SetOrigin(0,0,0); gr->Axis("_xyz"); gr->Box();
- gr->Vect3(ex,ey,ez,"fx"); gr->Vect3(ex,ey,ez,"f"); gr->Vect3(ex,ey,ez,"fz");
- gr->Grid3(ex,"Wx"); gr->Grid3(ex,"W"); gr->Grid3(ex,"Wz");
-}
-</pre><div align="center"><img src="png/vect.png" alt="Sample vect">
-</div>
-<hr>
-<a name="vect3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#venn-sample" accesskey="n" rel="next">venn sample</a>, Previous: <a href="#vect-sample" accesskey="p" rel="prev">vect sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-vect3"></a>
-<h3 class="section">10.139 Sample ‘<samp>vect3</samp>’</h3>
-
-
-<p>Function <a href="#vect3">vect3</a> draw ordinary vector field plot but at slices of 3D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3v'
-subplot 2 1 0:title 'Vect3 sample':rotate 50 60
-origin 0 0 0:box:axis '_xyz'
-vect3 ex ey ez 'x':vect3 ex ey ez:vect3 ex ey ez 'z'
-subplot 2 1 1:title '"f" style':rotate 50 60
-origin 0 0 0:box:axis '_xyz'
-vect3 ex ey ez 'fx':vect3 ex ey ez 'f':vect3 ex ey ez 'fz'
-grid3 ex 'Wx':grid3 ex 'W':grid3 ex 'Wz'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_vect3(mglGraph *gr)
-{
- mglData ex,ey,ez; mgls_prepare3v(&ex,&ey,&ez);
- if(big!=3) { gr->SubPlot(2,1,0); gr->Title("Vect3 sample"); }
- gr->Rotate(50,60); gr->SetOrigin(0,0,0); gr->Axis("_xyz"); gr->Box();
- gr->Vect3(ex,ey,ez,"x"); gr->Vect3(ex,ey,ez); gr->Vect3(ex,ey,ez,"z");
- if(big==3) return;
- gr->SubPlot(2,1,1); gr->Title("'f' style");
- gr->Rotate(50,60); gr->SetOrigin(0,0,0); gr->Axis("_xyz"); gr->Box();
- gr->Vect3(ex,ey,ez,"fx"); gr->Vect3(ex,ey,ez,"f"); gr->Vect3(ex,ey,ez,"fz");
- gr->Grid3(ex,"Wx"); gr->Grid3(ex,"W"); gr->Grid3(ex,"Wz");
-}
-</pre><div align="center"><img src="png/vect3.png" alt="Sample vect3">
-</div>
-<hr>
-<a name="venn-sample"></a>
-<div class="header">
-<p>
-Previous: <a href="#vect3-sample" accesskey="p" rel="prev">vect3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-_0027venn_0027"></a>
-<h3 class="section">10.140 Sample ’venn’</h3>
-
-
-<p>Example of venn-like diagram.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">list x -0.3 0 0.3:list y 0.3 -0.3 0.3:list e 0.7 0.7 0.7
-subplot 1 1 0:title 'Venn-like diagram'
-transptype 1:alpha on:error x y e e '!rgb@#o';alpha 0.1
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_venn(mglGraph *gr)
-{
- double xx[3]={-0.3,0,0.3}, yy[3]={0.3,-0.3,0.3}, ee[3]={0.7,0.7,0.7};
- mglData x(3,xx), y(3,yy), e(3,ee);
- gr->SubPlot(1,1,0); gr->Title("Venn-like diagram");
- gr->SetTranspType(1); gr->Alpha(true); gr->Error(x,y,e,e,"!rgb@#o","alpha 0.1");
-}
-</pre><div align="center"><img src="png/venn.png" alt="Sample venn">
-</div>
-
-<hr>
-<a name="Symbols-and-hot_002dkeys"></a>
-<div class="header">
-<p>
-Next: <a href="#File-formats" accesskey="n" rel="next">File formats</a>, Previous: <a href="#All-samples" accesskey="p" rel="prev">All samples</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Symbols-and-hot_002dkeys-1"></a>
-<h2 class="appendix">Appendix A Symbols and hot-keys</h2>
-
-
-<p>This appendix contain the full list of symbols (characters) used by MathGL for setting up plot. Also it contain sections for full list of hot-keys supported by mglview tool and by UDAV program.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Symbols-for-styles" accesskey="1">Symbols for styles</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Hot_002dkeys-for-mglview" accesskey="2">Hot-keys for mglview</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Hot_002dkeys-for-UDAV" accesskey="3">Hot-keys for UDAV</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Symbols-for-styles"></a>
-<div class="header">
-<p>
-Next: <a href="#Hot_002dkeys-for-mglview" accesskey="n" rel="next">Hot-keys for mglview</a>, Up: <a href="#Symbols-and-hot_002dkeys" accesskey="u" rel="up">Symbols and hot-keys</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Symbols-for-styles-1"></a>
-<h3 class="section">A.1 Symbols for styles</h3>
-
-
-<p>Below is full list of all characters (symbols) which MathGL use for setting up the plot.
-</p>
-<dl compact="compact">
-<dt>‘<samp>space ' '</samp>’</dt>
-<dd><p>empty line style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>empty color in <a href="#chart">chart</a>.
-</p>
-</dd>
-<dt>‘<samp>!</samp>’</dt>
-<dd><p>set to use new color from palette for each point (not for each curve, as default) in <a href="#g_t1D-plotting">1D plotting</a>;
-</p>
-<p>set to disable ticks tuning in <a href="#axis">axis</a> and <a href="#colorbar">colorbar</a>;
-</p>
-<p>set to draw <a href="#grid">grid</a> lines at subticks coordinates too;
-</p>
-<p>define complex variable/expression in MGL script if placed at beginning.
-</p>
-</dd>
-<dt>‘<samp>#</samp>’</dt>
-<dd><p>set to use solid marks (see <a href="#Line-styles">Line styles</a>) or solid <a href="#error">error</a> boxes;
-</p>
-<p>set to draw wired plot for <a href="#axial">axial</a>, <a href="#surf3">surf3</a>, <a href="#surf3a">surf3a</a>, <a href="#surf3c">surf3c</a>, <a href="#triplot">triplot</a>, <a href="#quadplot">quadplot</a>, <a href="#area">area</a>, <a href="#region">region</a>, <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#tube">tube</a>, <a href="#tape">tape</a>, <a href="#cone">cone</a>, <a href="#boxs">boxs</a> and draw boundary only for <a href="#circle">circle</a>, <a href="#ellipse">ellipse</a>, <a href="#rhomb">rhomb</a>;
-</p>
-<p>set to draw also mesh lines for <a href="#surf">surf</a>, <a href="#surfc">surfc</a>, <a href="#surfa">surfa</a>, <a href="#dens">dens</a>, <a href="#densx">densx</a>, <a href="#densy">densy</a>, <a href="#densz">densz</a>, <a href="#dens3">dens3</a>, or boundary for <a href="#chart">chart</a>, <a href="#facex">facex</a>, <a href="#facey">facey</a>, <a href="#facez">facez</a>, <a href="#rect">rect</a>;
-</p>
-<p>set to draw boundary and box for <a href="#legend">legend</a>, <a href="#title">title</a>, or grid lines for <a href="#table">table</a>;
-</p>
-<p>set to draw grid for <a href="#radar">radar</a>;
-</p>
-<p>set to start flow threads and pipes from edges only for <a href="#flow">flow</a>, <a href="#pipe">pipe</a>;
-</p>
-<p>set to use whole are for axis range in <a href="#subplot">subplot</a>, <a href="#inplot">inplot</a>;
-</p>
-<p>change text color inside a string (see <a href="#Font-styles">Font styles</a>);
-</p>
-<p>start comment in <a href="#MGL-scripts">MGL scripts</a> or in <a href="#Command-options">Command options</a>.
-</p>
-</dd>
-<dt>‘<samp>$</samp>’</dt>
-<dd><p>denote parameter of <a href="#MGL-scripts">MGL scripts</a>.
-</p>
-</dd>
-<dt>‘<samp>%</samp>’</dt>
-<dd><p>set color scheme along 2 coordinates <a href="#Color-scheme">Color scheme</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>&</samp>’</dt>
-<dd>
-<p>set to pass long integer number in tick template <a href="#xtick">xtick</a>, <a href="#ytick">ytick</a>, <a href="#ztick">ztick</a>, <a href="#ctick">ctick</a>;
-</p>
-<p>specifier of drawing user-defined symbols as mark (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>’</samp>’</dt>
-<dd><p>denote string in <a href="#MGL-scripts">MGL scripts</a> or in <a href="#Command-options">Command options</a>.
-</p>
-</dd>
-<dt>‘<samp>*</samp>’</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>set to start flow threads from 2d array inside data (see <a href="#flow">flow</a>);
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>+</samp>’</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>set to print ‘<samp>+</samp>’ for positive numbers in <a href="#axis">axis</a>, <a href="#label">label</a>, <a href="#table">table</a>;
-</p>
-<p>operation of increasing last character value in MGL strings;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>,</samp>’</dt>
-<dd><p>separator for color positions (see <a href="#Color-styles">Color styles</a>) or items in a list
-</p>
-<p>concatenation of MGL string with another string or numerical value.
-</p>
-</dd>
-<dt>‘<samp>-</samp>’</dt>
-<dd><p>solid line style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>place entries horizontally in <a href="#legend">legend</a>;
-</p>
-<p>set to use usual ‘<samp>-</samp>’ for negative numbers in <a href="#axis">axis</a>, <a href="#label">label</a>, <a href="#table">table</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>.</samp>’</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>set to draw hachures instead of arrows for <a href="#vect">vect</a>, <a href="#vect3">vect3</a>;
-</p>
-<p>set to use dots instead of faces for <a href="#cloud">cloud</a>, <a href="#torus">torus</a>, <a href="#axial">axial</a>, <a href="#surf3">surf3</a>, <a href="#surf3a">surf3a</a>, <a href="#surf3c">surf3c</a>, <a href="#surf">surf</a>, <a href="#surfa">surfa</a>, <a href="#surfc">surfc</a>, <a href="#dens">dens</a>, <a href="#map">map</a>;
-</p>
-<p>delimiter of fractional parts for numbers.
-</p>
-</dd>
-<dt>‘<samp>/</samp>’</dt>
-<dd><p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>:</samp>’</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>stop color scheme parsing (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>range operation in <a href="#MGL-scripts">MGL scripts</a>;
-</p>
-<p>style for <a href="#axis">axis</a>;
-</p>
-<p>separator of commands in <a href="#MGL-scripts">MGL scripts</a>.
-</p>
-</dd>
-<dt>‘<samp>;</samp>’</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>start of an option in <a href="#MGL-scripts">MGL scripts</a> or in <a href="#Command-options">Command options</a>;
-</p>
-<p>separator of equations in <a href="#ode">ode</a>;
-</p>
-<p>separator of labels in <a href="#iris">iris</a>.
-</p>
-</dd>
-<dt>‘<samp><</samp>’</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>style of <a href="#subplot">subplot</a> and <a href="#inplot">inplot</a>;
-</p>
-<p>set position of <a href="#colorbar">colorbar</a>;
-</p>
-<p>style of <a href="#vect">vect</a>, <a href="#vect3">vect3</a>;
-</p>
-<p>align left in <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#boxplot">boxplot</a>, <a href="#cones">cones</a>, <a href="#candle">candle</a>, <a href="#ohlc">ohlc</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-
-</dd>
-<dt>‘<samp>></samp>’</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>style of <a href="#subplot">subplot</a> and <a href="#inplot">inplot</a>;
-</p>
-<p>set position of <a href="#colorbar">colorbar</a>;
-</p>
-<p>style of <a href="#vect">vect</a>, <a href="#vect3">vect3</a>;
-</p>
-<p>align right in <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#boxplot">boxplot</a>, <a href="#cones">cones</a>, <a href="#candle">candle</a>, <a href="#ohlc">ohlc</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>=</samp>’</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>set to use equidistant columns for <a href="#table">table</a>;
-</p>
-<p>set to use color gradient for <a href="#vect">vect</a>, <a href="#vect3">vect3</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>@</samp>’</dt>
-<dd><p>set to draw box around text for <a href="#text">text</a> and similar functions;
-</p>
-<p>set to draw boundary and fill it for <a href="#circle">circle</a>, <a href="#ellipse">ellipse</a>, <a href="#rhomb">rhomb</a>;
-</p>
-<p>set to fill faces for <a href="#box">box</a>;
-</p>
-<p>set to draw large semitransparent mark instead of error box for <a href="#error">error</a>;
-</p>
-<p>set to draw edges for <a href="#cone">cone</a>;
-</p>
-<p>set to draw filled boxes for <a href="#boxs">boxs</a>;
-</p>
-<p>reduce text size inside a string (see <a href="#Font-styles">Font styles</a>);
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>^</samp>’</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>style of <a href="#subplot">subplot</a> and <a href="#inplot">inplot</a>;
-</p>
-<p>set position of <a href="#colorbar">colorbar</a>;
-</p>
-<p>set outer position for <a href="#legend">legend</a>;
-</p>
-<p>inverse default position for <a href="#axis">axis</a>;
-</p>
-<p>switch to upper index inside a string (see <a href="#Font-styles">Font styles</a>);
-</p>
-<p>align center in <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#boxplot">boxplot</a>, <a href="#cones">cones</a>, <a href="#candle">candle</a>, <a href="#ohlc">ohlc</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>_</samp>’</dt>
-<dd><p>empty arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>disable drawing of tick labels for <a href="#axis">axis</a>;
-</p>
-<p>style of <a href="#subplot">subplot</a> and <a href="#inplot">inplot</a>;
-</p>
-<p>set position of <a href="#colorbar">colorbar</a>;
-</p>
-<p>set to draw contours at bottom for <a href="#cont">cont</a>, <a href="#contf">contf</a>, <a href="#contd">contd</a>, <a href="#contv">contv</a>, <a href="#tricont">tricont</a>;
-</p>
-<p>switch to lower index inside a string (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>‘<samp>[]</samp>’</dt>
-<dd><p>contain symbols excluded from color scheme parsing (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>operation of getting n-th character from MGL string.
-</p>
-</dd>
-<dt>‘<samp>{}</samp>’</dt>
-<dd><p>contain extended specification of color (see <a href="#Color-styles">Color styles</a>), dashing (see <a href="#Line-styles">Line styles</a>) or mask (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>denote special operation in <a href="#MGL-scripts">MGL scripts</a>;
-</p>
-<p>denote ’meta-symbol’ for LaTeX like string parsing (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>‘<samp>|</samp>’</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>set to use sharp color scheme (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>set to limit width by subplot width for <a href="#table">table</a>;
-</p>
-<p>delimiter in <a href="#list">list</a> command;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>\</samp>’</dt>
-<dd><p>string continuation symbol on next line for <a href="#MGL-scripts">MGL scripts</a>.
-</p>
-</dd>
-<dt>‘<samp>~</samp>’</dt>
-<dd><p>disable drawing of tick labels for <a href="#axis">axis</a> and <a href="#colorbar">colorbar</a>;
-</p>
-<p>disable first segment in <a href="#lamerey">lamerey</a>;
-</p>
-<p>reduce number of segments in <a href="#plot">plot</a> and <a href="#tens">tens</a>;
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-</dd>
-<dt>‘<samp>0,1,2,3,4,5,6,7,8,9</samp>’</dt>
-<dd><p>line width (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>brightness of a color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>precision of numbers in <a href="#axis">axis</a>, <a href="#label">label</a>, <a href="#table">table</a>;
-</p>
-<p>kind of smoothing (for digits 1,3,5) in <a href="#smooth">smooth</a>;
-</p>
-<p>digits for a value.
-</p>
-</dd>
-<dt>‘<samp>4,6,8</samp>’</dt>
-<dd><p>set to draw square, hex- or octo-pyramids instead of cones in <a href="#cone">cone</a>, <a href="#cones">cones</a>.
-</p>
-</dd>
-<dt>‘<samp>A,B,C,D,E,F,a,b,c,d,e,f</samp>’</dt>
-<dd><p>can be hex-digit for color specification if placed inside {} (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>A</samp>’</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>set to use absolute position in whole picture for <a href="#text">text</a>, <a href="#colorbar">colorbar</a>, <a href="#legend">legend</a>.
-</p>
-</dd>
-<dt>‘<samp>a</samp>’</dt>
-<dd><p>set to use absolute position in subplot for <a href="#text">text</a>;
-</p>
-<p>style of <a href="#plot">plot</a>, <a href="#radar">radar</a>, <a href="#tens">tens</a>, <a href="#area">area</a>, <a href="#region">region</a> to draw segments between points outside of axis range;
-</p>
-<p>style of <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#cones">cones</a>.
-</p>
-</dd>
-<dt>‘<samp>B</samp>’</dt>
-<dd><p>dark blue color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>b</samp>’</dt>
-<dd><p>blue color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>bold font face if placed after ‘<samp>:</samp>’ (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>‘<samp>C</samp>’</dt>
-<dd><p>dark cyan color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>align text to center if placed after ‘<samp>:</samp>’ (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>‘<samp>c</samp>’</dt>
-<dd><p>cyan color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>name of color axis;
-</p>
-<p>cosine transform for <a href="#transform">transform</a>.
-</p>
-</dd>
-<dt>‘<samp>D</samp>’</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-</dd>
-<dt>‘<samp>d</samp>’</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>start hex-dash description if placed inside {} (see <a href="#Line-styles">Line styles</a>).
-</p>
-</dd>
-<dt>‘<samp>E</samp>’</dt>
-<dd><p>dark green-yellow color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>e</samp>’</dt>
-<dd><p>green-yellow color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>F</samp>’</dt>
-<dd>
-<p>set fixed bar widths in <a href="#bars">bars</a>, <a href="#barh">barh</a>;
-</p>
-<p>set LaTeX-like format for numbers in <a href="#axis">axis</a>, <a href="#label">label</a>, <a href="#table">table</a>.
-</p>
-</dd>
-<dt>‘<samp>f</samp>’</dt>
-<dd><p>style of <a href="#bars">bars</a>, <a href="#barh">barh</a>;
-</p>
-<p>style of <a href="#vect">vect</a>, <a href="#vect3">vect3</a>;
-</p>
-<p>set fixed format for numbers in <a href="#axis">axis</a>, <a href="#label">label</a>, <a href="#table">table</a>;
-</p>
-<p>Fourier transform for <a href="#transform">transform</a>.
-</p>
-</dd>
-<dt>‘<samp>G</samp>’</dt>
-<dd><p>dark green color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>g</samp>’</dt>
-<dd><p>green color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>H</samp>’</dt>
-<dd><p>dark gray color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>h</samp>’</dt>
-<dd><p>gray color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>Hankel transform for <a href="#transform">transform</a>.
-</p>
-</dd>
-<dt>‘<samp>I</samp>’</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>set <a href="#colorbar">colorbar</a> position near boundary.
-</p>
-</dd>
-<dt>‘<samp>i</samp>’</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>italic font face if placed after ‘<samp>:</samp>’ (see <a href="#Font-styles">Font styles</a>).
-</p>
-<p>set to use inverse values for <a href="#cloud">cloud</a>, <a href="#pipe">pipe</a>, <a href="#dew">dew</a>;
-</p>
-<p>set to fill only area with y1<y<y2 for <a href="#region">region</a>;
-</p>
-<p>inverse Fourier transform for <a href="#transform">transform</a>, <a href="#transforma">transforma</a>, <a href="#fourier">fourier</a>.
-</p>
-</dd>
-<dt>‘<samp>j</samp>’</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-</dd>
-<dt>‘<samp>K</samp>’</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>).
-</p>
-</dd>
-<dt>‘<samp>k</samp>’</dt>
-<dd><p>black color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>L</samp>’</dt>
-<dd><p>dark green-blue color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>align text to left if placed after ‘<samp>:</samp>’ (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>‘<samp>l</samp>’</dt>
-<dd><p>green-blue color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>M</samp>’</dt>
-<dd><p>dark magenta color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>m</samp>’</dt>
-<dd><p>magenta color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>N</samp>’</dt>
-<dd><p>dark sky-blue color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>n</samp>’</dt>
-<dd><p>sky-blue color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>O</samp>’</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-</dd>
-<dt>‘<samp>o</samp>’</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>over-line text if placed after ‘<samp>:</samp>’ (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>‘<samp>P</samp>’</dt>
-<dd><p>dark purple color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>p</samp>’</dt>
-<dd><p>purple color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>Q</samp>’</dt>
-<dd><p>dark orange or brown color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>q</samp>’</dt>
-<dd><p>orange color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>R</samp>’</dt>
-<dd><p>dark red color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>align text to right if placed after ‘<samp>:</samp>’ (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>‘<samp>r</samp>’</dt>
-<dd><p>red color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>S</samp>’</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-</dd>
-<dt>‘<samp>s</samp>’</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>start hex-mask description if placed inside {} (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>sine transform for <a href="#transform">transform</a>.
-</p>
-</dd>
-<dt>‘<samp>t</samp>’</dt>
-<dd><p>draw tubes instead of cones in <a href="#cone">cone</a>, <a href="#cones">cones</a>;
-</p>
-</dd>
-<dt>‘<samp>T</samp>’</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>place text under the curve for <a href="#text">text</a>, <a href="#cont">cont</a>, <a href="#cont3">cont3</a>.
-</p>
-</dd>
-<dt>‘<samp>t</samp>’</dt>
-<dd><p>set to draw text labels for <a href="#cont">cont</a>, <a href="#cont3">cont3</a>;
-</p>
-<p>name of t-axis (one of ternary axis);
-</p>
-<p>variable in <a href="#Textual-formulas">Textual formulas</a>, which usually is varied in range [0,1].
-</p>
-</dd>
-<dt>‘<samp>U</samp>’</dt>
-<dd><p>dark blue-violet color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>disable rotation of tick labels for <a href="#axis">axis</a>.
-</p>
-</dd>
-<dt>‘<samp>u</samp>’</dt>
-<dd><p>blue-violet color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>under-line text if placed after ‘<samp>:</samp>’ (see <a href="#Font-styles">Font styles</a>);
-</p>
-<p>name of u-axis (one of ternary axis);
-</p>
-<p>variable in <a href="#Textual-formulas">Textual formulas</a>, which usually denote array itself.
-</p>
-</dd>
-<dt>‘<samp>V</samp>’</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>place text centering on vertical direction for <a href="#text">text</a>.
-</p>
-</dd>
-<dt>‘<samp>v</samp>’</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>set to draw vectors on flow threads for <a href="#flow">flow</a> and on segments for <a href="#lamerey">lamerey</a>.
-</p>
-</dd>
-<dt>‘<samp>W</samp>’</dt>
-<dd><p>bright gray color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>w</samp>’</dt>
-<dd><p>white color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>wired text if placed after ‘<samp>:</samp>’ (see <a href="#Font-styles">Font styles</a>);
-</p>
-<p>name of w-axis (one of ternary axis);
-</p>
-</dd>
-<dt>‘<samp>X</samp>’</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>).
-</p>
-</dd>
-<dt>‘<samp>x</samp>’</dt>
-<dd>
-<p>name of x-axis or x-direction or 1st dimension of a data array;
-</p>
-<p>start hex-color description if placed inside {} (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>tiles orientation perpendicular to x-axis in <a href="#tile">tile</a>, <a href="#tiles">tiles</a>;
-</p>
-<p>style of <a href="#tape">tape</a>.
-</p>
-</dd>
-<dt>‘<samp>Y</samp>’</dt>
-<dd><p>dark yellow or gold color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>y</samp>’</dt>
-<dd><p>yellow color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>name of y-axis or y-direction or 2nd dimension of a data array;
-</p>
-<p>tiles orientation perpendicular to y-axis in <a href="#tile">tile</a>, <a href="#tiles">tiles</a>.
-</p>
-</dd>
-<dt>‘<samp>z</samp>’</dt>
-<dd>
-<p>name of z-axis or z-direction or 3d dimension of a data array;
-</p>
-<p>style of <a href="#tape">tape</a>.
-</p>
-</dd>
-</dl>
-
-
-
-<hr>
-<a name="Hot_002dkeys-for-mglview"></a>
-<div class="header">
-<p>
-Next: <a href="#Hot_002dkeys-for-UDAV" accesskey="n" rel="next">Hot-keys for UDAV</a>, Previous: <a href="#Symbols-for-styles" accesskey="p" rel="prev">Symbols for styles</a>, Up: <a href="#Symbols-and-hot_002dkeys" accesskey="u" rel="up">Symbols and hot-keys</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Hot_002dkeys-for-mglview-1"></a>
-<h3 class="section">A.2 Hot-keys for mglview</h3>
-
-
-<table>
-<thead><tr><th width="30%">Key</th><th width="70%">Description</th></tr></thead>
-<tr><td width="30%"><tt class="key">Ctrl-P</tt></td><td width="70%">Open printer dialog and print graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-W</tt></td><td width="70%">Close window.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-T</tt></td><td width="70%">Switch on/off transparency for the graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-L</tt></td><td width="70%">Switch on/off additional lightning for the graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Space</tt></td><td width="70%">Restore default graphics rotation, zoom and perspective.</td></tr>
-<tr><td width="30%"><tt class="key">F5</tt></td><td width="70%">Execute script and redraw graphics.</td></tr>
-<tr><td width="30%"><tt class="key">F6</tt></td><td width="70%">Change canvas size to fill whole region.</td></tr>
-<tr><td width="30%"><tt class="key">F7</tt></td><td width="70%">Stop drawing and script execution.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-F5</tt></td><td width="70%">Run slideshow. If no parameter specified then the dialog with slideshow options will appear.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Comma</tt>, <tt class="key">Ctrl-Period</tt></td><td width="70%">Show next/previous slide. If no parameter specified then the dialog with slideshow options will appear.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-G</tt></td><td width="70%">Copy graphics to clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-P</tt></td><td width="70%">Export as semitransparent PNG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-F</tt></td><td width="70%">Export as solid PNG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-J</tt></td><td width="70%">Export as JPEG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-E</tt></td><td width="70%">Export as vector EPS.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-S</tt></td><td width="70%">Export as vector SVG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-L</tt></td><td width="70%">Export as LaTeX/Tikz image.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-M</tt></td><td width="70%">Export as MGLD.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-D</tt></td><td width="70%">Export as PRC/PDF.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-O</tt></td><td width="70%">Export as OBJ.</td></tr>
-</table>
-
-
-<hr>
-<a name="Hot_002dkeys-for-UDAV"></a>
-<div class="header">
-<p>
-Previous: <a href="#Hot_002dkeys-for-mglview" accesskey="p" rel="prev">Hot-keys for mglview</a>, Up: <a href="#Symbols-and-hot_002dkeys" accesskey="u" rel="up">Symbols and hot-keys</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Hot_002dkeys-for-UDAV-1"></a>
-<h3 class="section">A.3 Hot-keys for UDAV</h3>
-
-
-<table>
-<thead><tr><th width="30%">Key</th><th width="70%">Description</th></tr></thead>
-<tr><td width="30%"><tt class="key">Ctrl-N</tt></td><td width="70%">Create new window with empty script. Note, all scripts share variables. So, second window can be used to see some additional information of existed variables.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-O</tt></td><td width="70%">Open and execute/show script or data from file. You may switch off automatic exection in UDAV properties</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-S</tt></td><td width="70%">Save script to a file.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-P</tt></td><td width="70%">Open printer dialog and print graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Z</tt></td><td width="70%">Undo changes in script editor.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-Z</tt></td><td width="70%">Redo changes in script editor.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-X</tt></td><td width="70%">Cut selected text into clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-C</tt></td><td width="70%">Copy selected text into clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-V</tt></td><td width="70%">Paste selected text from clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-A</tt></td><td width="70%">Select all text in editor.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-F</tt></td><td width="70%">Show dialog for text finding.</td></tr>
-<tr><td width="30%"><tt class="key">F3</tt></td><td width="70%">Find next occurrence of the text.</td></tr>
-<tr><td width="30%"><tt class="key">Win-C</tt> or <tt class="key">Meta-C</tt></td><td width="70%">Show dialog for new command and put it into the script.</td></tr>
-<tr><td width="30%"><tt class="key">Win-F</tt> or <tt class="key">Meta-F</tt></td><td width="70%">Insert last fitted formula with found coefficients.</td></tr>
-<tr><td width="30%"><tt class="key">Win-S</tt> or <tt class="key">Meta-S</tt></td><td width="70%">Show dialog for styles and put it into the script. Styles define the plot view (color scheme, marks, dashing and so on).</td></tr>
-<tr><td width="30%"><tt class="key">Win-O</tt> or <tt class="key">Meta-O</tt></td><td width="70%">Show dialog for options and put it into the script. Options are used for additional setup the plot.</td></tr>
-<tr><td width="30%"><tt class="key">Win-N</tt> or <tt class="key">Meta-N</tt></td><td width="70%">Replace selected expression by its numerical value.</td></tr>
-<tr><td width="30%"><tt class="key">Win-P</tt> or <tt class="key">Meta-P</tt></td><td width="70%">Select file and insert its file name into the script.</td></tr>
-<tr><td width="30%"><tt class="key">Win-G</tt> or <tt class="key">Meta-G</tt></td><td width="70%">Show dialog for plot setup and put resulting code into the script. This dialog setup axis, labels, lighting and other general things.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-O</tt></td><td width="70%">Load data from file. Data will be deleted only at exit but UDAV will not ask to save it.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-S</tt></td><td width="70%">Save data to a file.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-C</tt></td><td width="70%">Copy range of numbers to clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-V</tt></td><td width="70%">Paste range of numbers from clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-N</tt></td><td width="70%">Recreate the data with new sizes and fill it by zeros.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-R</tt></td><td width="70%">Resize (interpolate) the data to specified sizes.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-T</tt></td><td width="70%">Transform data along dimension(s).</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-M</tt></td><td width="70%">Make another data.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-H</tt></td><td width="70%">Find histogram of data.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-T</tt></td><td width="70%">Switch on/off transparency for the graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-L</tt></td><td width="70%">Switch on/off additional lightning for the graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-G</tt></td><td width="70%">Switch on/off grid of absolute coordinates.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Space</tt></td><td width="70%">Restore default graphics rotation, zoom and perspective.</td></tr>
-<tr><td width="30%"><tt class="key">F5</tt></td><td width="70%">Execute script and redraw graphics.</td></tr>
-<tr><td width="30%"><tt class="key">F6</tt></td><td width="70%">Change canvas size to fill whole region.</td></tr>
-<tr><td width="30%"><tt class="key">F7</tt></td><td width="70%">Stop script execution and drawing.</td></tr>
-<tr><td width="30%"><tt class="key">F8</tt></td><td width="70%">Show/hide tool window with list of hidden plots.</td></tr>
-<tr><td width="30%"><tt class="key">F9</tt></td><td width="70%">Restore status for ’once’ command and reload data.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-F5</tt></td><td width="70%">Run slideshow. If no parameter specified then the dialog with slideshow options will appear.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Comma</tt>, <tt class="key">Ctrl-Period</tt></td><td width="70%">Show next/previous slide. If no parameter specified then the dialog with slideshow options will appear.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-W</tt></td><td width="70%">Open dialog with slideshow options.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-G</tt></td><td width="70%">Copy graphics to clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">F1</tt></td><td width="70%">Show help on MGL commands</td></tr>
-<tr><td width="30%"><tt class="key">F2</tt></td><td width="70%">Show/hide tool window with messages and information.</td></tr>
-<tr><td width="30%"><tt class="key">F4</tt></td><td width="70%">Show/hide calculator which evaluate and help to type textual formulas. Textual formulas may contain data variables too.</td></tr>
-<tr><td width="30%"><tt class="key">Meta-Shift-Up</tt>, <tt class="key">Meta-Shift-Down</tt></td><td width="70%">Change view angle <em>\theta</em>.</td></tr>
-<tr><td width="30%"><tt class="key">Meta-Shift-Left</tt>, <tt class="key">Meta-Shift-Right</tt></td><td width="70%">Change view angle <em>\phi</em>.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-Minus</tt>, <tt class="key">Alt-Equal</tt></td><td width="70%">Zoom in/out whole image.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-Up</tt>, <tt class="key">Alt-Down</tt>, <tt class="key">Alt-Right</tt>, <tt class="key">Alt-Left</tt></td><td width="70%">Shift whole image.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-P</tt></td><td width="70%">Export as semitransparent PNG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-F</tt></td><td width="70%">Export as solid PNG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-J</tt></td><td width="70%">Export as JPEG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-E</tt></td><td width="70%">Export as vector EPS.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-S</tt></td><td width="70%">Export as vector SVG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-L</tt></td><td width="70%">Export as LaTeX/Tikz image.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-M</tt></td><td width="70%">Export as MGLD.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-D</tt></td><td width="70%">Export as PRC/PDF.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-O</tt></td><td width="70%">Export as OBJ.</td></tr>
-</table>
-
-
-
-<hr>
-<a name="File-formats"></a>
-<div class="header">
-<p>
-Next: <a href="#Plotting-time" accesskey="n" rel="next">Plotting time</a>, Previous: <a href="#Symbols-and-hot_002dkeys" accesskey="p" rel="prev">Symbols and hot-keys</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="File-formats-1"></a>
-<h2 class="appendix">Appendix B File formats</h2>
-
-
-<p>This appendix contain description of file formats used by MathGL.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Font-files" accesskey="1">Font files</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#MGLD-format" accesskey="2">MGLD format</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#JSON-format" accesskey="3">JSON format</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#IFS-format" accesskey="4">IFS format</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Font-files"></a>
-<div class="header">
-<p>
-Next: <a href="#MGLD-format" accesskey="n" rel="next">MGLD format</a>, Up: <a href="#File-formats" accesskey="u" rel="up">File formats</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Font-files-1"></a>
-<h3 class="section">B.1 Font files</h3>
-
-
-<p>Starting from v.1.6 the MathGL library uses new font files. The font is defined in 4 files with suffixes ‘<samp>*.vfm</samp>’, ‘<samp>*_b.vfm</samp>’, ‘<samp>*_i.vfm</samp>’, ‘<samp>*_bi.vfm</samp>’. These files are text files containing the data for roman font, bold font, italic font and bold italic font. The files (or some symbols in the files) for bold, italic or bold italic fonts can be absent. In this case the roman glyph will be used for them. By analogy, if the bold italic font is absent but the bold font is present then bold glyph will be used for bold italic. You may create these font files by yourself from *.ttf, *.otf files with the help of program <code>font_tools</code>. This program can be found at MathGL home site.
-</p>
-<p>The format of font files (*.vfm – vector font for MathGL) is the following.
-</p><ol>
-<li> First string contains human readable comment and is always ignored.
-</li><li> Second string contains 3 numbers, delimited by space or tabulation. The order of numbers is the following: <var>numg</var> – the number of glyphs in the file (integer), <var>fact</var> – the factor for glyph sizing (mreal), <var>size</var> – the size of buffer for glyph description (integer).
-</li><li> After it <var>numg</var>-th strings with glyphs description are placed. Each string contains 6 positive numbers, delimited by space of tabulation. The order of numbers is the following: Unicode glyph ID, glyph width, number of lines in glyph, position of lines coordinates in the buffer (length is 2*number of lines), number of triangles in glyph, position of triangles coordinates in the buffer (length is 6*number of triangles).
-</li><li> The end of file contains the buffer with point coordinates at lines or triangles vertexes. The size of buffer (the number of integer) is <var>size</var>.
-</li></ol>
-
-<p>Each font file can be compressed by gzip.
-</p>
-<p>Note: the closing contour line is done automatically (so the last segment may be absent). For starting new contour use a point with coordinates <code>{0x3fff, 0x3fff}</code>.
-</p>
-
-
-<hr>
-<a name="MGLD-format"></a>
-<div class="header">
-<p>
-Next: <a href="#JSON-format" accesskey="n" rel="next">JSON format</a>, Previous: <a href="#Font-files" accesskey="p" rel="prev">Font files</a>, Up: <a href="#File-formats" accesskey="u" rel="up">File formats</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="MGLD-format-1"></a>
-<h3 class="section">B.2 MGLD format</h3>
-
-
-<p>MGLD is textual file, which contain all required information for drawing 3D image, i.e. it contain vertexes with colors and normales, primitives with all properties, textures, and glyph descriptions. MGLD file can be imported or viewed separately, without parsing data files itself.
-</p>
-<p>MGLD file start from string
-</p><pre class="verbatim">MGLD npnts nprim ntxtr nglfs # optional description
-</pre><p>which contain signature ‘<samp>MGLD</samp>’ and number of points <var>npnts</var>, number of primitives <var>nprim</var>, number of textures <var>ntxtr</var>, number of glyph descriptions <var>nglfs</var>, and optional description. Empty strings and string with ‘<samp>#</samp>’ are ignored.
-</p>
-<p>Next, file contain <var>npnts</var> strings with points coordinates and colors. The format of each string is
-</p><pre class="verbatim">x y z c t ta u v w r g b a
-</pre><p>Here <var>x</var>, <var>y</var>, <var>z</var> are coordinates, <var>c</var>, <var>t</var> are color indexes in texture, <var>ta</var> is normalized <var>t</var> according to current alpha setting, <var>u</var>, <var>v</var>, <var>w</var> are coordinates of normal vector (can be <code>NAN</code> if disabled), <var>r</var>, <var>g</var>, <var>b</var>, <var>a</var> are RGBA color values.
-</p>
-<p>Next, file contain <var>nprim</var> strings with properties of primitives. The format of each string is
-</p><pre class="verbatim">type n1 n2 n3 n4 id s w p
-</pre><p>Here <var>type</var> is kind of primitive (0 - mark, 1 - line, 2 - triangle, 3 - quadrangle, 4 - glyph), <var>n1</var>...<var>n4</var> is index of point for vertexes, <var>id</var> is primitive identification number, <var>s</var> and <var>w</var> are size and width if applicable, <var>p</var> is scaling factor for glyphs.
-</p>
-<p>Next, file contain <var>ntxtr</var> strings with descriptions of textures. The format of each string is
-</p><pre class="verbatim">smooth alpha colors
-</pre><p>Here <var>smooth</var> set to enable smoothing between colors, <var>alpha</var> set to use half-transparent texture, <var>colors</var> contain color scheme itself as it described in <a href="#Color-scheme">Color scheme</a>.
-</p>
-<p>Finally, file contain <var>nglfs</var> entries with description of each glyph used in the figure. The format of entries are
-</p><pre class="verbatim">nT nL
-xA yA xB yB xC yC ...
-xP yP ...
-</pre><p>Here nT is the number of triangles; nL is the number of line vertexes; xA, yA, xB, yB, xC, yC are coordinates of triangles; and xP, yP, xQ, yQ are coordinates of lines. Line coordinate xP=0x3fff, yP=0x3fff denote line breaking.
-</p>
-
-<hr>
-<a name="JSON-format"></a>
-<div class="header">
-<p>
-Next: <a href="#IFS-format" accesskey="n" rel="next">IFS format</a>, Previous: <a href="#MGLD-format" accesskey="p" rel="prev">MGLD format</a>, Up: <a href="#File-formats" accesskey="u" rel="up">File formats</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="JSON-format-1"></a>
-<h3 class="section">B.3 JSON format</h3>
-
-
-<p>MathGL can save points and primitives of 3D object. It contain a set of variables listed below.
-</p>
-<dl compact="compact">
-<dt>‘<samp>width</samp>’</dt>
-<dd><p>width of the image;
-</p></dd>
-<dt>‘<samp>height</samp>’</dt>
-<dd><p>height of the image
-</p></dd>
-<dt>‘<samp>depth</samp>’</dt>
-<dd><p>depth of the image, usually =sqrt(width*height);
-</p>
-</dd>
-<dt>‘<samp>npnts</samp>’</dt>
-<dd><p>number of points (vertexes);
-</p></dd>
-<dt>‘<samp>pnts</samp>’</dt>
-<dd><p>array of coordinates of points (vertexes), each element is array in form [x, y, z];
-</p>
-</dd>
-<dt>‘<samp>nprim</samp>’</dt>
-<dd><p>number of primitives;
-</p></dd>
-<dt>‘<samp>prim</samp>’</dt>
-<dd><p>array of primitives, each element is array in form [type, n1, n2, n3, n4, id, s, w, p, z, color].
-</p>
-<p>Here <var>type</var> is kind of primitive (0 - mark, 1 - line, 2 - triangle, 3 - quadrangle, 4 - glyph), <var>n1</var>...<var>n4</var> is index of point for vertexes and <var>n2</var> can be index of glyph coordinate, <var>s</var> and <var>w</var> are size and width if applicable, <var>z</var> is average z-coordinate, <var>id</var> is primitive identification number, <var>p</var> is scaling factor for glyphs.
-</p>
-</dd>
-<dt>‘<samp>ncoor</samp>’</dt>
-<dd><p>number of glyph positions
-</p></dd>
-<dt>‘<samp>coor</samp>’</dt>
-<dd><p>array of glyph positions, each element is array in form [dx,dy]
-</p>
-</dd>
-<dt>‘<samp>nglfs</samp>’</dt>
-<dd><p>number of glyph descriptions
-</p></dd>
-<dt>‘<samp>glfs</samp>’</dt>
-<dd><p>array of glyph descriptions, each element is array in form <code>[nL, [xP0, yP0, xP1, yP1 ...]]</code>. Here <code>nL</code> is the number of line vertexes; and <code>xP, yP, xQ, yQ</code> are coordinates of lines. Line coordinate xP=0x3fff, yP=0x3fff denote line breaking.
-</p>
-</dd>
-</dl>
-
-
-<hr>
-<a name="IFS-format"></a>
-<div class="header">
-<p>
-Previous: <a href="#JSON-format" accesskey="p" rel="prev">JSON format</a>, Up: <a href="#File-formats" accesskey="u" rel="up">File formats</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="IFS-format-1"></a>
-<h3 class="section">B.4 IFS format</h3>
-
-
-<p>MathGL can read IFS fractal parameters (see <a href="#ifsfile">ifsfile</a>) from a IFS file. Let remind IFS file format. File may contain several records. Each record contain the name of fractal (‘<samp>binary</samp>’ in the example below) and the body of fractal, which is enclosed in curly braces {}. Symbol ‘<samp>;</samp>’ start the comment. If the name of fractal contain ‘<samp>(3D)</samp>’ or ‘<samp>(3d)</samp>’ then the 3d IFS fractal is specified. The sample below contain two fractals: ‘<samp>binary</samp>’ – usual 2d fractal, and ‘<samp>3dfern (3D)</samp>’ – 3d fractal.
-</p>
-<pre class="verbatim"> binary
- { ; comment allowed here
- ; and here
- .5 .0 .0 .5 -2.563477 -0.000003 .333333 ; also comment allowed here
- .5 .0 .0 .5 2.436544 -0.000003 .333333
- .0 -.5 .5 .0 4.873085 7.563492 .333333
- }
-
- 3dfern (3D) {
- .00 .00 0 .0 .18 .0 0 0.0 0.00 0 0.0 0 .01
- .85 .00 0 .0 .85 .1 0 -0.1 0.85 0 1.6 0 .85
- .20 -.20 0 .2 .20 .0 0 0.0 0.30 0 0.8 0 .07
- -.20 .20 0 .2 .20 .0 0 0.0 0.30 0 0.8 0 .07
- }
-</pre>
-
-<hr>
-<a name="Plotting-time"></a>
-<div class="header">
-<p>
-Next: <a href="#TeX_002dlike-symbols" accesskey="n" rel="next">TeX-like symbols</a>, Previous: <a href="#File-formats" accesskey="p" rel="prev">File formats</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Plotting-time-1"></a>
-<h2 class="appendix">Appendix C Plotting time</h2>
-
-<p>Table below show plotting time in seconds for all samples in file <a href="http://sourceforge.net/p/mathgl/code/HEAD/tree/mathgl-2x/examples/samples.cpp">examples/samples.cpp</a>. The test was done in my laptop (i5-2430M) with 64-bit Debian.
-</p>
-<p>Few words about the speed. Firstly, direct bitmap drawing (Quality=4,5,6) is faster than buffered one (Quality=0,1,2), but sometimes it give incorrect result (see <a href="#cloud">cloud</a>) and don’t allow to export in vector or 3d formats (like EPS, SVG, PDF ...). Secondly, lower quality is faster than high one generally, i.e. Quality=1 is faster than Quality=2, and Quality=0 is faster than Quality=1. However, if plot contain a lot of faces (like <a href="#cloud">cloud</a>, <a href="#surf3">surf3</a>, <a href="#pipe">pipe</a>, <a href="#dew">dew</a>) then Quality=0 may become slow, especially for small images. Finally, smaller images are drawn faster than larger ones.
-</p>
-<p>Results for image size 800*600 (default one).
-</p><table>
-<thead><tr><th width="16%">Name</th><th width="12%">q=0</th><th width="12%">q=1</th><th width="12%">q=2</th><th width="12%">q=4</th><th width="12%">q=5</th><th width="12%">q=6</th><th width="12%">q=8</th></tr></thead>
-<tr><td width="16%">3wave</td><td width="12%">0.0322</td><td width="12%">0.0627</td><td width="12%">0.0721</td><td width="12%">0.0425</td><td width="12%">0.11</td><td width="12%">0.136</td><td width="12%">0.0271</td></tr>
-<tr><td width="16%">alpha</td><td width="12%">0.0892</td><td width="12%">0.108</td><td width="12%">0.113</td><td width="12%">0.0473</td><td width="12%">0.124</td><td width="12%">0.145</td><td width="12%">0.0297</td></tr>
-<tr><td width="16%">apde</td><td width="12%">48.2</td><td width="12%">47.4</td><td width="12%">47.6</td><td width="12%">47.4</td><td width="12%">47.8</td><td width="12%">48.4</td><td width="12%">47.9</td></tr>
-<tr><td width="16%">area</td><td width="12%">0.0376</td><td width="12%">0.0728</td><td width="12%">0.0752</td><td width="12%">0.033</td><td width="12%">0.141</td><td width="12%">0.165</td><td width="12%">0.0186</td></tr>
-<tr><td width="16%">aspect</td><td width="12%">0.0442</td><td width="12%">0.0572</td><td width="12%">0.0551</td><td width="12%">0.031</td><td width="12%">0.0999</td><td width="12%">0.103</td><td width="12%">0.0146</td></tr>
-<tr><td width="16%">axial</td><td width="12%">0.639</td><td width="12%">0.917</td><td width="12%">0.926</td><td width="12%">0.195</td><td width="12%">0.525</td><td width="12%">0.552</td><td width="12%">0.119</td></tr>
-<tr><td width="16%">axis</td><td width="12%">0.0683</td><td width="12%">0.107</td><td width="12%">0.108</td><td width="12%">0.0466</td><td width="12%">0.196</td><td width="12%">0.202</td><td width="12%">0.0169</td></tr>
-<tr><td width="16%">barh</td><td width="12%">0.0285</td><td width="12%">0.0547</td><td width="12%">0.0603</td><td width="12%">0.0292</td><td width="12%">0.101</td><td width="12%">0.115</td><td width="12%">0.0114</td></tr>
-<tr><td width="16%">bars</td><td width="12%">0.0414</td><td width="12%">0.0703</td><td width="12%">0.0843</td><td width="12%">0.1</td><td width="12%">0.185</td><td width="12%">0.184</td><td width="12%">0.0295</td></tr>
-<tr><td width="16%">belt</td><td width="12%">0.0286</td><td width="12%">0.0532</td><td width="12%">0.0577</td><td width="12%">0.0384</td><td width="12%">0.0735</td><td width="12%">0.1</td><td width="12%">0.0131</td></tr>
-<tr><td width="16%">bifurcation</td><td width="12%">0.589</td><td width="12%">0.635</td><td width="12%">0.609</td><td width="12%">0.531</td><td width="12%">0.572</td><td width="12%">0.579</td><td width="12%">0.512</td></tr>
-<tr><td width="16%">box</td><td width="12%">0.0682</td><td width="12%">0.0805</td><td width="12%">0.0828</td><td width="12%">0.0314</td><td width="12%">0.124</td><td width="12%">0.121</td><td width="12%">0.0169</td></tr>
-<tr><td width="16%">boxplot</td><td width="12%">0.0102</td><td width="12%">0.0317</td><td width="12%">0.0347</td><td width="12%">0.02</td><td width="12%">0.0499</td><td width="12%">0.0554</td><td width="12%">0.0167</td></tr>
-<tr><td width="16%">boxs</td><td width="12%">0.239</td><td width="12%">0.363</td><td width="12%">0.4</td><td width="12%">0.0798</td><td width="12%">0.216</td><td width="12%">0.234</td><td width="12%">0.0721</td></tr>
-<tr><td width="16%">candle</td><td width="12%">0.0286</td><td width="12%">0.0549</td><td width="12%">0.053</td><td width="12%">0.0263</td><td width="12%">0.0483</td><td width="12%">0.0564</td><td width="12%">0.0109</td></tr>
-<tr><td width="16%">chart</td><td width="12%">0.416</td><td width="12%">0.613</td><td width="12%">0.707</td><td width="12%">0.26</td><td width="12%">1.07</td><td width="12%">1.59</td><td width="12%">0.191</td></tr>
-<tr><td width="16%">cloud</td><td width="12%">0.0312</td><td width="12%">4.15</td><td width="12%">4.11</td><td width="12%">0.0306</td><td width="12%">0.715</td><td width="12%">0.924</td><td width="12%">0.0168</td></tr>
-<tr><td width="16%">colorbar</td><td width="12%">0.108</td><td width="12%">0.172</td><td width="12%">0.177</td><td width="12%">0.0787</td><td width="12%">0.258</td><td width="12%">0.266</td><td width="12%">0.0452</td></tr>
-<tr><td width="16%">combined</td><td width="12%">0.36</td><td width="12%">0.336</td><td width="12%">0.332</td><td width="12%">0.198</td><td width="12%">0.316</td><td width="12%">0.33</td><td width="12%">0.196</td></tr>
-<tr><td width="16%">cones</td><td width="12%">0.145</td><td width="12%">0.139</td><td width="12%">0.14</td><td width="12%">0.0937</td><td width="12%">0.248</td><td width="12%">0.276</td><td width="12%">0.0363</td></tr>
-<tr><td width="16%">cont</td><td width="12%">0.0987</td><td width="12%">0.141</td><td width="12%">0.141</td><td width="12%">0.0585</td><td width="12%">0.207</td><td width="12%">0.194</td><td width="12%">0.0455</td></tr>
-<tr><td width="16%">cont3</td><td width="12%">0.0323</td><td width="12%">0.058</td><td width="12%">0.0587</td><td width="12%">0.0304</td><td width="12%">0.0726</td><td width="12%">0.0837</td><td width="12%">0.0162</td></tr>
-<tr><td width="16%">cont_xyz</td><td width="12%">0.0417</td><td width="12%">0.0585</td><td width="12%">0.0612</td><td width="12%">0.0417</td><td width="12%">0.0833</td><td width="12%">0.0845</td><td width="12%">0.0294</td></tr>
-<tr><td width="16%">contd</td><td width="12%">0.191</td><td width="12%">0.245</td><td width="12%">0.236</td><td width="12%">0.104</td><td width="12%">0.189</td><td width="12%">0.201</td><td width="12%">0.0902</td></tr>
-<tr><td width="16%">contf</td><td width="12%">0.162</td><td width="12%">0.179</td><td width="12%">0.182</td><td width="12%">0.0789</td><td width="12%">0.166</td><td width="12%">0.177</td><td width="12%">0.067</td></tr>
-<tr><td width="16%">contf3</td><td width="12%">0.123</td><td width="12%">0.12</td><td width="12%">0.134</td><td width="12%">0.065</td><td width="12%">0.123</td><td width="12%">0.155</td><td width="12%">0.0538</td></tr>
-<tr><td width="16%">contf_xyz</td><td width="12%">0.0751</td><td width="12%">0.0922</td><td width="12%">0.111</td><td width="12%">0.0756</td><td width="12%">0.0879</td><td width="12%">0.0956</td><td width="12%">0.0462</td></tr>
-<tr><td width="16%">contv</td><td width="12%">0.0947</td><td width="12%">0.123</td><td width="12%">0.136</td><td width="12%">0.0757</td><td width="12%">0.163</td><td width="12%">0.18</td><td width="12%">0.0469</td></tr>
-<tr><td width="16%">correl</td><td width="12%">0.0339</td><td width="12%">0.0629</td><td width="12%">0.0599</td><td width="12%">0.0288</td><td width="12%">0.115</td><td width="12%">0.138</td><td width="12%">0.0165</td></tr>
-<tr><td width="16%">curvcoor</td><td width="12%">0.112</td><td width="12%">0.164</td><td width="12%">0.171</td><td width="12%">0.0864</td><td width="12%">0.296</td><td width="12%">0.298</td><td width="12%">0.0739</td></tr>
-<tr><td width="16%">cut</td><td width="12%">0.695</td><td width="12%">0.465</td><td width="12%">0.484</td><td width="12%">0.303</td><td width="12%">0.385</td><td width="12%">0.371</td><td width="12%">0.316</td></tr>
-<tr><td width="16%">dat_diff</td><td width="12%">0.0457</td><td width="12%">0.079</td><td width="12%">0.0825</td><td width="12%">0.0346</td><td width="12%">0.136</td><td width="12%">0.158</td><td width="12%">0.0186</td></tr>
-<tr><td width="16%">dat_extra</td><td width="12%">0.175</td><td width="12%">0.181</td><td width="12%">0.173</td><td width="12%">0.0877</td><td width="12%">0.163</td><td width="12%">0.173</td><td width="12%">0.0463</td></tr>
-<tr><td width="16%">data1</td><td width="12%">2.39</td><td width="12%">1.76</td><td width="12%">1.75</td><td width="12%">1.33</td><td width="12%">1.38</td><td width="12%">1.37</td><td width="12%">1.4</td></tr>
-<tr><td width="16%">data2</td><td width="12%">1.42</td><td width="12%">1.26</td><td width="12%">1.28</td><td width="12%">1.17</td><td width="12%">1.24</td><td width="12%">1.29</td><td width="12%">1.14</td></tr>
-<tr><td width="16%">dens</td><td width="12%">0.0867</td><td width="12%">0.122</td><td width="12%">0.131</td><td width="12%">0.0615</td><td width="12%">0.145</td><td width="12%">0.168</td><td width="12%">0.032</td></tr>
-<tr><td width="16%">dens3</td><td width="12%">0.0722</td><td width="12%">0.0769</td><td width="12%">0.0937</td><td width="12%">0.0437</td><td width="12%">0.0947</td><td width="12%">0.151</td><td width="12%">0.0797</td></tr>
-<tr><td width="16%">dens_xyz</td><td width="12%">0.0599</td><td width="12%">0.0875</td><td width="12%">0.0961</td><td width="12%">0.0463</td><td width="12%">0.089</td><td width="12%">0.0897</td><td width="12%">0.0315</td></tr>
-<tr><td width="16%">detect</td><td width="12%">0.133</td><td width="12%">0.151</td><td width="12%">0.176</td><td width="12%">0.0861</td><td width="12%">0.116</td><td width="12%">0.138</td><td width="12%">0.0721</td></tr>
-<tr><td width="16%">dew</td><td width="12%">1.48</td><td width="12%">1.07</td><td width="12%">0.971</td><td width="12%">0.473</td><td width="12%">0.537</td><td width="12%">0.416</td><td width="12%">0.195</td></tr>
-<tr><td width="16%">diffract</td><td width="12%">0.0878</td><td width="12%">0.127</td><td width="12%">0.139</td><td width="12%">0.0607</td><td width="12%">0.219</td><td width="12%">0.237</td><td width="12%">0.0274</td></tr>
-<tr><td width="16%">dilate</td><td width="12%">0.0778</td><td width="12%">0.128</td><td width="12%">0.138</td><td width="12%">0.0592</td><td width="12%">0.242</td><td width="12%">0.232</td><td width="12%">0.0298</td></tr>
-<tr><td width="16%">dots</td><td width="12%">0.0685</td><td width="12%">0.1</td><td width="12%">0.101</td><td width="12%">0.0694</td><td width="12%">0.134</td><td width="12%">0.129</td><td width="12%">0.0261</td></tr>
-<tr><td width="16%">earth</td><td width="12%">0.0147</td><td width="12%">0.033</td><td width="12%">0.0218</td><td width="12%">0.0168</td><td width="12%">0.0168</td><td width="12%">0.0191</td><td width="12%">0.00177</td></tr>
-<tr><td width="16%">error</td><td width="12%">0.0312</td><td width="12%">0.0707</td><td width="12%">0.0709</td><td width="12%">0.0288</td><td width="12%">0.135</td><td width="12%">0.137</td><td width="12%">0.016</td></tr>
-<tr><td width="16%">error2</td><td width="12%">0.0581</td><td width="12%">0.0964</td><td width="12%">0.0958</td><td width="12%">0.0595</td><td width="12%">0.173</td><td width="12%">0.187</td><td width="12%">0.0444</td></tr>
-<tr><td width="16%">export</td><td width="12%">0.116</td><td width="12%">0.158</td><td width="12%">0.167</td><td width="12%">0.0799</td><td width="12%">0.132</td><td width="12%">0.133</td><td width="12%">0.0685</td></tr>
-<tr><td width="16%">fall</td><td width="12%">0.035</td><td width="12%">0.051</td><td width="12%">0.0577</td><td width="12%">0.018</td><td width="12%">0.0585</td><td width="12%">0.0709</td><td width="12%">0.0142</td></tr>
-<tr><td width="16%">fexport</td><td width="12%">1.52</td><td width="12%">1.76</td><td width="12%">1.78</td><td width="12%">0.278</td><td width="12%">0.604</td><td width="12%">0.606</td><td width="12%">1.35</td></tr>
-<tr><td width="16%">fit</td><td width="12%">0.0371</td><td width="12%">0.0653</td><td width="12%">0.0666</td><td width="12%">0.0277</td><td width="12%">0.081</td><td width="12%">0.0837</td><td width="12%">0.014</td></tr>
-<tr><td width="16%">flame2d</td><td width="12%">5.37</td><td width="12%">5.54</td><td width="12%">5.5</td><td width="12%">3.04</td><td width="12%">3.21</td><td width="12%">3.09</td><td width="12%">1.13</td></tr>
-<tr><td width="16%">flow</td><td width="12%">0.368</td><td width="12%">0.451</td><td width="12%">0.444</td><td width="12%">0.36</td><td width="12%">0.5</td><td width="12%">0.48</td><td width="12%">0.352</td></tr>
-<tr><td width="16%">fog</td><td width="12%">0.0406</td><td width="12%">0.0645</td><td width="12%">0.0688</td><td width="12%">0.0379</td><td width="12%">0.0793</td><td width="12%">0.0894</td><td width="12%">0.0156</td></tr>
-<tr><td width="16%">fonts</td><td width="12%">0.0477</td><td width="12%">0.0926</td><td width="12%">0.112</td><td width="12%">0.0347</td><td width="12%">0.0518</td><td width="12%">0.0519</td><td width="12%">0.0413</td></tr>
-<tr><td width="16%">grad</td><td width="12%">0.0607</td><td width="12%">0.104</td><td width="12%">0.129</td><td width="12%">0.0715</td><td width="12%">0.103</td><td width="12%">0.12</td><td width="12%">0.0633</td></tr>
-<tr><td width="16%">hist</td><td width="12%">0.125</td><td width="12%">0.148</td><td width="12%">0.159</td><td width="12%">0.0919</td><td width="12%">0.116</td><td width="12%">0.129</td><td width="12%">0.0372</td></tr>
-<tr><td width="16%">ifs2d</td><td width="12%">0.594</td><td width="12%">0.623</td><td width="12%">0.62</td><td width="12%">0.315</td><td width="12%">0.349</td><td width="12%">0.33</td><td width="12%">0.109</td></tr>
-<tr><td width="16%">ifs3d</td><td width="12%">0.787</td><td width="12%">0.777</td><td width="12%">0.784</td><td width="12%">0.294</td><td width="12%">0.353</td><td width="12%">0.366</td><td width="12%">0.117</td></tr>
-<tr><td width="16%">indirect</td><td width="12%">0.0286</td><td width="12%">0.0517</td><td width="12%">0.0543</td><td width="12%">0.031</td><td width="12%">0.0612</td><td width="12%">0.104</td><td width="12%">0.0144</td></tr>
-<tr><td width="16%">inplot</td><td width="12%">0.0687</td><td width="12%">0.0979</td><td width="12%">0.0993</td><td width="12%">0.0622</td><td width="12%">0.181</td><td width="12%">0.195</td><td width="12%">0.0444</td></tr>
-<tr><td width="16%">iris</td><td width="12%">0.00846</td><td width="12%">0.025</td><td width="12%">0.0198</td><td width="12%">0.00349</td><td width="12%">0.0172</td><td width="12%">0.0182</td><td width="12%">0.0018</td></tr>
-<tr><td width="16%">label</td><td width="12%">0.0285</td><td width="12%">0.045</td><td width="12%">0.058</td><td width="12%">0.0267</td><td width="12%">0.0525</td><td width="12%">0.0618</td><td width="12%">0.014</td></tr>
-<tr><td width="16%">lamerey</td><td width="12%">0.0305</td><td width="12%">0.0372</td><td width="12%">0.0455</td><td width="12%">0.019</td><td width="12%">0.0604</td><td width="12%">0.0633</td><td width="12%">0.0024</td></tr>
-<tr><td width="16%">legend</td><td width="12%">0.0764</td><td width="12%">0.202</td><td width="12%">0.207</td><td width="12%">0.0455</td><td width="12%">0.138</td><td width="12%">0.148</td><td width="12%">0.0162</td></tr>
-<tr><td width="16%">light</td><td width="12%">0.0903</td><td width="12%">0.129</td><td width="12%">0.122</td><td width="12%">0.0573</td><td width="12%">0.132</td><td width="12%">0.144</td><td width="12%">0.021</td></tr>
-<tr><td width="16%">loglog</td><td width="12%">0.103</td><td width="12%">0.168</td><td width="12%">0.16</td><td width="12%">0.0806</td><td width="12%">0.228</td><td width="12%">0.235</td><td width="12%">0.0802</td></tr>
-<tr><td width="16%">map</td><td width="12%">0.0303</td><td width="12%">0.0653</td><td width="12%">0.0721</td><td width="12%">0.0337</td><td width="12%">0.0821</td><td width="12%">0.0866</td><td width="12%">0.015</td></tr>
-<tr><td width="16%">mark</td><td width="12%">0.0191</td><td width="12%">0.0324</td><td width="12%">0.0368</td><td width="12%">0.0261</td><td width="12%">0.0533</td><td width="12%">0.045</td><td width="12%">0.0072</td></tr>
-<tr><td width="16%">mask</td><td width="12%">0.0442</td><td width="12%">0.0964</td><td width="12%">0.101</td><td width="12%">0.0343</td><td width="12%">0.205</td><td width="12%">0.211</td><td width="12%">0.0115</td></tr>
-<tr><td width="16%">mesh</td><td width="12%">0.034</td><td width="12%">0.0774</td><td width="12%">0.0682</td><td width="12%">0.0192</td><td width="12%">0.0765</td><td width="12%">0.0742</td><td width="12%">0.0145</td></tr>
-<tr><td width="16%">mirror</td><td width="12%">0.092</td><td width="12%">0.128</td><td width="12%">0.142</td><td width="12%">0.0607</td><td width="12%">0.174</td><td width="12%">0.176</td><td width="12%">0.0312</td></tr>
-<tr><td width="16%">molecule</td><td width="12%">0.0827</td><td width="12%">0.0842</td><td width="12%">0.0859</td><td width="12%">0.0443</td><td width="12%">0.0997</td><td width="12%">0.146</td><td width="12%">0.0115</td></tr>
-<tr><td width="16%">ode</td><td width="12%">0.149</td><td width="12%">0.202</td><td width="12%">0.202</td><td width="12%">0.147</td><td width="12%">0.282</td><td width="12%">0.316</td><td width="12%">0.133</td></tr>
-<tr><td width="16%">ohlc</td><td width="12%">0.0059</td><td width="12%">0.0278</td><td width="12%">0.0271</td><td width="12%">0.0152</td><td width="12%">0.0517</td><td width="12%">0.045</td><td width="12%">0.0152</td></tr>
-<tr><td width="16%">param1</td><td width="12%">0.161</td><td width="12%">0.252</td><td width="12%">0.26</td><td width="12%">0.0941</td><td width="12%">0.301</td><td width="12%">0.341</td><td width="12%">0.0466</td></tr>
-<tr><td width="16%">param2</td><td width="12%">0.535</td><td width="12%">0.58</td><td width="12%">0.539</td><td width="12%">0.26</td><td width="12%">0.452</td><td width="12%">0.475</td><td width="12%">0.189</td></tr>
-<tr><td width="16%">param3</td><td width="12%">1.75</td><td width="12%">2.37</td><td width="12%">2.32</td><td width="12%">0.677</td><td width="12%">0.899</td><td width="12%">0.907</td><td width="12%">0.758</td></tr>
-<tr><td width="16%">paramv</td><td width="12%">1.21</td><td width="12%">1.39</td><td width="12%">1.36</td><td width="12%">0.788</td><td width="12%">0.974</td><td width="12%">0.968</td><td width="12%">0.69</td></tr>
-<tr><td width="16%">parser</td><td width="12%">0.0346</td><td width="12%">0.0582</td><td width="12%">0.0687</td><td width="12%">0.0317</td><td width="12%">0.108</td><td width="12%">0.11</td><td width="12%">0.0275</td></tr>
-<tr><td width="16%">pde</td><td width="12%">0.329</td><td width="12%">0.358</td><td width="12%">0.373</td><td width="12%">0.272</td><td width="12%">0.311</td><td width="12%">0.364</td><td width="12%">0.264</td></tr>
-<tr><td width="16%">pendelta</td><td width="12%">0.0653</td><td width="12%">0.0525</td><td width="12%">0.0648</td><td width="12%">0.0517</td><td width="12%">0.0531</td><td width="12%">0.0522</td><td width="12%">0.0653</td></tr>
-<tr><td width="16%">pipe</td><td width="12%">0.598</td><td width="12%">0.737</td><td width="12%">0.738</td><td width="12%">0.382</td><td width="12%">0.493</td><td width="12%">0.505</td><td width="12%">0.34</td></tr>
-<tr><td width="16%">plot</td><td width="12%">0.0397</td><td width="12%">0.0642</td><td width="12%">0.114</td><td width="12%">0.0444</td><td width="12%">0.123</td><td width="12%">0.118</td><td width="12%">0.0194</td></tr>
-<tr><td width="16%">pmap</td><td width="12%">0.0913</td><td width="12%">0.115</td><td width="12%">0.125</td><td width="12%">0.0572</td><td width="12%">0.0999</td><td width="12%">0.113</td><td width="12%">0.0469</td></tr>
-<tr><td width="16%">primitives</td><td width="12%">0.0581</td><td width="12%">0.108</td><td width="12%">0.128</td><td width="12%">0.0649</td><td width="12%">0.181</td><td width="12%">0.21</td><td width="12%">0.00928</td></tr>
-<tr><td width="16%">projection</td><td width="12%">0.13</td><td width="12%">0.264</td><td width="12%">0.286</td><td width="12%">0.0704</td><td width="12%">0.351</td><td width="12%">0.349</td><td width="12%">0.0683</td></tr>
-<tr><td width="16%">projection5</td><td width="12%">0.117</td><td width="12%">0.207</td><td width="12%">0.215</td><td width="12%">0.0717</td><td width="12%">0.3</td><td width="12%">0.312</td><td width="12%">0.0437</td></tr>
-<tr><td width="16%">pulse</td><td width="12%">0.0273</td><td width="12%">0.0395</td><td width="12%">0.0413</td><td width="12%">0.0183</td><td width="12%">0.0576</td><td width="12%">0.0635</td><td width="12%">0.0023</td></tr>
-<tr><td width="16%">qo2d</td><td width="12%">0.218</td><td width="12%">0.246</td><td width="12%">0.274</td><td width="12%">0.198</td><td width="12%">0.243</td><td width="12%">0.255</td><td width="12%">0.177</td></tr>
-<tr><td width="16%">quality0</td><td width="12%">0.0859</td><td width="12%">0.0902</td><td width="12%">0.087</td><td width="12%">0.0808</td><td width="12%">0.0808</td><td width="12%">0.0823</td><td width="12%">0.0796</td></tr>
-<tr><td width="16%">quality1</td><td width="12%">0.189</td><td width="12%">0.166</td><td width="12%">0.171</td><td width="12%">0.175</td><td width="12%">0.17</td><td width="12%">0.173</td><td width="12%">0.166</td></tr>
-<tr><td width="16%">quality2</td><td width="12%">0.183</td><td width="12%">0.183</td><td width="12%">0.175</td><td width="12%">0.172</td><td width="12%">0.171</td><td width="12%">0.183</td><td width="12%">0.184</td></tr>
-<tr><td width="16%">quality4</td><td width="12%">0.082</td><td width="12%">0.0713</td><td width="12%">0.0728</td><td width="12%">0.0636</td><td width="12%">0.0843</td><td width="12%">0.0651</td><td width="12%">0.0592</td></tr>
-<tr><td width="16%">quality5</td><td width="12%">0.366</td><td width="12%">0.359</td><td width="12%">0.363</td><td width="12%">0.366</td><td width="12%">0.354</td><td width="12%">0.356</td><td width="12%">0.357</td></tr>
-<tr><td width="16%">quality6</td><td width="12%">0.373</td><td width="12%">0.367</td><td width="12%">0.365</td><td width="12%">0.366</td><td width="12%">0.368</td><td width="12%">0.383</td><td width="12%">0.366</td></tr>
-<tr><td width="16%">quality8</td><td width="12%">0.0193</td><td width="12%">0.019</td><td width="12%">0.0289</td><td width="12%">0.0298</td><td width="12%">0.0165</td><td width="12%">0.0244</td><td width="12%">0.0229</td></tr>
-<tr><td width="16%">radar</td><td width="12%">0.0193</td><td width="12%">0.0369</td><td width="12%">0.0545</td><td width="12%">0.0158</td><td width="12%">0.0525</td><td width="12%">0.0532</td><td width="12%">0.0115</td></tr>
-<tr><td width="16%">refill</td><td width="12%">0.153</td><td width="12%">0.168</td><td width="12%">0.166</td><td width="12%">0.0746</td><td width="12%">0.239</td><td width="12%">0.258</td><td width="12%">0.0467</td></tr>
-<tr><td width="16%">region</td><td width="12%">0.0396</td><td width="12%">0.0723</td><td width="12%">0.0859</td><td width="12%">0.0342</td><td width="12%">0.133</td><td width="12%">0.159</td><td width="12%">0.017</td></tr>
-<tr><td width="16%">scanfile</td><td width="12%">0.0315</td><td width="12%">0.036</td><td width="12%">0.0497</td><td width="12%">0.0169</td><td width="12%">0.0486</td><td width="12%">0.053</td><td width="12%">0.014</td></tr>
-<tr><td width="16%">schemes</td><td width="12%">0.0703</td><td width="12%">0.114</td><td width="12%">0.117</td><td width="12%">0.062</td><td width="12%">0.204</td><td width="12%">0.21</td><td width="12%">0.019</td></tr>
-<tr><td width="16%">section</td><td width="12%">0.0294</td><td width="12%">0.0483</td><td width="12%">0.054</td><td width="12%">0.0221</td><td width="12%">0.0804</td><td width="12%">0.0821</td><td width="12%">0.00568</td></tr>
-<tr><td width="16%">several_light</td><td width="12%">0.0441</td><td width="12%">0.0541</td><td width="12%">0.0701</td><td width="12%">0.0299</td><td width="12%">0.0602</td><td width="12%">0.0815</td><td width="12%">0.0117</td></tr>
-<tr><td width="16%">solve</td><td width="12%">0.0461</td><td width="12%">0.109</td><td width="12%">0.105</td><td width="12%">0.0462</td><td width="12%">0.18</td><td width="12%">0.191</td><td width="12%">0.0184</td></tr>
-<tr><td width="16%">stem</td><td width="12%">0.0418</td><td width="12%">0.0599</td><td width="12%">0.0591</td><td width="12%">0.0308</td><td width="12%">0.126</td><td width="12%">0.139</td><td width="12%">0.015</td></tr>
-<tr><td width="16%">step</td><td width="12%">0.0399</td><td width="12%">0.0614</td><td width="12%">0.0554</td><td width="12%">0.0315</td><td width="12%">0.0958</td><td width="12%">0.113</td><td width="12%">0.0145</td></tr>
-<tr><td width="16%">stereo</td><td width="12%">0.0569</td><td width="12%">0.0652</td><td width="12%">0.0811</td><td width="12%">0.031</td><td width="12%">0.0807</td><td width="12%">0.093</td><td width="12%">0.0163</td></tr>
-<tr><td width="16%">stfa</td><td width="12%">0.0425</td><td width="12%">0.117</td><td width="12%">0.111</td><td width="12%">0.0416</td><td width="12%">0.115</td><td width="12%">0.121</td><td width="12%">0.0157</td></tr>
-<tr><td width="16%">style</td><td width="12%">0.0892</td><td width="12%">0.197</td><td width="12%">0.204</td><td width="12%">0.0596</td><td width="12%">0.349</td><td width="12%">0.369</td><td width="12%">0.0158</td></tr>
-<tr><td width="16%">surf</td><td width="12%">0.109</td><td width="12%">0.133</td><td width="12%">0.157</td><td width="12%">0.0657</td><td width="12%">0.16</td><td width="12%">0.158</td><td width="12%">0.0315</td></tr>
-<tr><td width="16%">surf3</td><td width="12%">1.79</td><td width="12%">2.6</td><td width="12%">2.57</td><td width="12%">0.949</td><td width="12%">2.36</td><td width="12%">2.44</td><td width="12%">0.625</td></tr>
-<tr><td width="16%">surf3a</td><td width="12%">0.431</td><td width="12%">0.281</td><td width="12%">0.297</td><td width="12%">0.176</td><td width="12%">0.235</td><td width="12%">0.252</td><td width="12%">0.178</td></tr>
-<tr><td width="16%">surf3c</td><td width="12%">0.423</td><td width="12%">0.285</td><td width="12%">0.301</td><td width="12%">0.175</td><td width="12%">0.202</td><td width="12%">0.265</td><td width="12%">0.177</td></tr>
-<tr><td width="16%">surf3ca</td><td width="12%">0.428</td><td width="12%">0.303</td><td width="12%">0.31</td><td width="12%">0.176</td><td width="12%">0.203</td><td width="12%">0.265</td><td width="12%">0.19</td></tr>
-<tr><td width="16%">surfa</td><td width="12%">0.0409</td><td width="12%">0.0577</td><td width="12%">0.0714</td><td width="12%">0.0265</td><td width="12%">0.062</td><td width="12%">0.0725</td><td width="12%">0.0154</td></tr>
-<tr><td width="16%">surfc</td><td width="12%">0.0422</td><td width="12%">0.0453</td><td width="12%">0.058</td><td width="12%">0.0282</td><td width="12%">0.0628</td><td width="12%">0.0749</td><td width="12%">0.0161</td></tr>
-<tr><td width="16%">surfca</td><td width="12%">0.0416</td><td width="12%">0.0598</td><td width="12%">0.058</td><td width="12%">0.0254</td><td width="12%">0.0541</td><td width="12%">0.0671</td><td width="12%">0.015</td></tr>
-<tr><td width="16%">table</td><td width="12%">0.103</td><td width="12%">0.213</td><td width="12%">0.214</td><td width="12%">0.0484</td><td width="12%">0.112</td><td width="12%">0.117</td><td width="12%">0.0156</td></tr>
-<tr><td width="16%">tape</td><td width="12%">0.0409</td><td width="12%">0.0784</td><td width="12%">0.0836</td><td width="12%">0.0347</td><td width="12%">0.124</td><td width="12%">0.138</td><td width="12%">0.0164</td></tr>
-<tr><td width="16%">tens</td><td width="12%">0.0329</td><td width="12%">0.0485</td><td width="12%">0.0441</td><td width="12%">0.0279</td><td width="12%">0.0805</td><td width="12%">0.0757</td><td width="12%">0.00561</td></tr>
-<tr><td width="16%">ternary</td><td width="12%">0.104</td><td width="12%">0.218</td><td width="12%">0.214</td><td width="12%">0.0634</td><td width="12%">0.393</td><td width="12%">0.425</td><td width="12%">0.0352</td></tr>
-<tr><td width="16%">text</td><td width="12%">0.0827</td><td width="12%">0.156</td><td width="12%">0.15</td><td width="12%">0.0261</td><td width="12%">0.114</td><td width="12%">0.127</td><td width="12%">0.015</td></tr>
-<tr><td width="16%">text2</td><td width="12%">0.0719</td><td width="12%">0.12</td><td width="12%">0.131</td><td width="12%">0.115</td><td width="12%">0.129</td><td width="12%">0.137</td><td width="12%">0.016</td></tr>
-<tr><td width="16%">textmark</td><td width="12%">0.0403</td><td width="12%">0.0749</td><td width="12%">0.0788</td><td width="12%">0.0223</td><td width="12%">0.0607</td><td width="12%">0.0653</td><td width="12%">0.014</td></tr>
-<tr><td width="16%">ticks</td><td width="12%">0.0868</td><td width="12%">0.193</td><td width="12%">0.195</td><td width="12%">0.0611</td><td width="12%">0.259</td><td width="12%">0.249</td><td width="12%">0.0275</td></tr>
-<tr><td width="16%">tile</td><td width="12%">0.0349</td><td width="12%">0.0444</td><td width="12%">0.0597</td><td width="12%">0.0308</td><td width="12%">0.0546</td><td width="12%">0.0547</td><td width="12%">0.0111</td></tr>
-<tr><td width="16%">tiles</td><td width="12%">0.0393</td><td width="12%">0.0585</td><td width="12%">0.0534</td><td width="12%">0.0205</td><td width="12%">0.0648</td><td width="12%">0.0597</td><td width="12%">0.0174</td></tr>
-<tr><td width="16%">torus</td><td width="12%">0.114</td><td width="12%">0.197</td><td width="12%">0.193</td><td width="12%">0.0713</td><td width="12%">0.394</td><td width="12%">0.457</td><td width="12%">0.0306</td></tr>
-<tr><td width="16%">traj</td><td width="12%">0.0251</td><td width="12%">0.0413</td><td width="12%">0.043</td><td width="12%">0.0178</td><td width="12%">0.0628</td><td width="12%">0.0968</td><td width="12%">0.0129</td></tr>
-<tr><td width="16%">triangulation</td><td width="12%">0.0328</td><td width="12%">0.0659</td><td width="12%">0.0792</td><td width="12%">0.0319</td><td width="12%">0.0966</td><td width="12%">0.0888</td><td width="12%">0.0155</td></tr>
-<tr><td width="16%">triplot</td><td width="12%">0.0302</td><td width="12%">0.0705</td><td width="12%">0.102</td><td width="12%">0.0198</td><td width="12%">0.0973</td><td width="12%">0.127</td><td width="12%">0.0143</td></tr>
-<tr><td width="16%">tube</td><td width="12%">0.077</td><td width="12%">0.143</td><td width="12%">0.192</td><td width="12%">0.0593</td><td width="12%">0.191</td><td width="12%">0.21</td><td width="12%">0.0197</td></tr>
-<tr><td width="16%">type0</td><td width="12%">0.177</td><td width="12%">0.172</td><td width="12%">0.198</td><td width="12%">0.0673</td><td width="12%">0.141</td><td width="12%">0.2</td><td width="12%">0.0576</td></tr>
-<tr><td width="16%">type1</td><td width="12%">0.174</td><td width="12%">0.173</td><td width="12%">0.2</td><td width="12%">0.0648</td><td width="12%">0.153</td><td width="12%">0.17</td><td width="12%">0.0571</td></tr>
-<tr><td width="16%">type2</td><td width="12%">0.188</td><td width="12%">0.198</td><td width="12%">0.197</td><td width="12%">0.0773</td><td width="12%">0.186</td><td width="12%">0.193</td><td width="12%">0.0647</td></tr>
-<tr><td width="16%">vect</td><td width="12%">0.129</td><td width="12%">0.336</td><td width="12%">0.194</td><td width="12%">0.0608</td><td width="12%">0.174</td><td width="12%">0.177</td><td width="12%">0.043</td></tr>
-<tr><td width="16%">vect3</td><td width="12%">0.0317</td><td width="12%">0.0781</td><td width="12%">0.0869</td><td width="12%">0.0366</td><td width="12%">0.155</td><td width="12%">0.159</td><td width="12%">0.0174</td></tr>
-<tr><td width="16%">venn</td><td width="12%">0.0153</td><td width="12%">0.0503</td><td width="12%">0.0787</td><td width="12%">0.0115</td><td width="12%">0.0665</td><td width="12%">0.075</td><td width="12%">0.00249</td></tr>
-</table>
-
-<p>Results for image size 1920*1440 (print quality)
-</p><table>
-<thead><tr><th width="16%">Name</th><th width="12%">q=0</th><th width="12%">q=1</th><th width="12%">q=2</th><th width="12%">q=4</th><th width="12%">q=5</th><th width="12%">q=6</th><th width="12%">q=8</th></tr></thead>
-<tr><td width="16%">3wave</td><td width="12%">0.0763</td><td width="12%">0.134</td><td width="12%">0.157</td><td width="12%">0.0764</td><td width="12%">0.198</td><td width="12%">0.207</td><td width="12%">0.0598</td></tr>
-<tr><td width="16%">alpha</td><td width="12%">0.111</td><td width="12%">0.176</td><td width="12%">0.254</td><td width="12%">0.104</td><td width="12%">0.244</td><td width="12%">0.272</td><td width="12%">0.0591</td></tr>
-<tr><td width="16%">apde</td><td width="12%">48</td><td width="12%">47.6</td><td width="12%">47.5</td><td width="12%">47.1</td><td width="12%">47.2</td><td width="12%">47.7</td><td width="12%">47</td></tr>
-<tr><td width="16%">area</td><td width="12%">0.0783</td><td width="12%">0.169</td><td width="12%">0.245</td><td width="12%">0.107</td><td width="12%">0.277</td><td width="12%">0.335</td><td width="12%">0.0408</td></tr>
-<tr><td width="16%">aspect</td><td width="12%">0.0622</td><td width="12%">0.105</td><td width="12%">0.129</td><td width="12%">0.0638</td><td width="12%">0.185</td><td width="12%">0.234</td><td width="12%">0.0478</td></tr>
-<tr><td width="16%">axial</td><td width="12%">0.681</td><td width="12%">1.38</td><td width="12%">1.61</td><td width="12%">0.297</td><td width="12%">0.878</td><td width="12%">1.12</td><td width="12%">0.141</td></tr>
-<tr><td width="16%">axis</td><td width="12%">0.0863</td><td width="12%">0.153</td><td width="12%">0.17</td><td width="12%">0.0773</td><td width="12%">0.274</td><td width="12%">0.297</td><td width="12%">0.0479</td></tr>
-<tr><td width="16%">barh</td><td width="12%">0.0631</td><td width="12%">0.118</td><td width="12%">0.134</td><td width="12%">0.0661</td><td width="12%">0.218</td><td width="12%">0.259</td><td width="12%">0.049</td></tr>
-<tr><td width="16%">bars</td><td width="12%">0.0654</td><td width="12%">0.126</td><td width="12%">0.153</td><td width="12%">0.0803</td><td width="12%">0.28</td><td width="12%">0.318</td><td width="12%">0.0479</td></tr>
-<tr><td width="16%">belt</td><td width="12%">0.0624</td><td width="12%">0.11</td><td width="12%">0.133</td><td width="12%">0.0614</td><td width="12%">0.228</td><td width="12%">0.354</td><td width="12%">0.0454</td></tr>
-<tr><td width="16%">bifurcation</td><td width="12%">0.604</td><td width="12%">0.696</td><td width="12%">0.758</td><td width="12%">0.602</td><td width="12%">0.656</td><td width="12%">0.692</td><td width="12%">0.572</td></tr>
-<tr><td width="16%">box</td><td width="12%">0.081</td><td width="12%">0.152</td><td width="12%">0.211</td><td width="12%">0.0754</td><td width="12%">0.204</td><td width="12%">0.238</td><td width="12%">0.0516</td></tr>
-<tr><td width="16%">boxplot</td><td width="12%">0.0458</td><td width="12%">0.072</td><td width="12%">0.108</td><td width="12%">0.0493</td><td width="12%">0.106</td><td width="12%">0.12</td><td width="12%">0.0329</td></tr>
-<tr><td width="16%">boxs</td><td width="12%">0.276</td><td width="12%">0.623</td><td width="12%">0.823</td><td width="12%">0.131</td><td width="12%">0.387</td><td width="12%">0.52</td><td width="12%">0.0935</td></tr>
-<tr><td width="16%">candle</td><td width="12%">0.0566</td><td width="12%">0.1</td><td width="12%">0.113</td><td width="12%">0.059</td><td width="12%">0.126</td><td width="12%">0.154</td><td width="12%">0.0435</td></tr>
-<tr><td width="16%">chart</td><td width="12%">0.46</td><td width="12%">1.08</td><td width="12%">1.78</td><td width="12%">0.377</td><td width="12%">2.57</td><td width="12%">3.84</td><td width="12%">0.19</td></tr>
-<tr><td width="16%">cloud</td><td width="12%">0.0618</td><td width="12%">5.78</td><td width="12%">6.76</td><td width="12%">0.061</td><td width="12%">1.49</td><td width="12%">2.72</td><td width="12%">0.0441</td></tr>
-<tr><td width="16%">colorbar</td><td width="12%">0.144</td><td width="12%">0.259</td><td width="12%">0.297</td><td width="12%">0.142</td><td width="12%">0.383</td><td width="12%">0.455</td><td width="12%">0.075</td></tr>
-<tr><td width="16%">combined</td><td width="12%">0.429</td><td width="12%">0.457</td><td width="12%">0.556</td><td width="12%">0.286</td><td width="12%">0.474</td><td width="12%">0.564</td><td width="12%">0.245</td></tr>
-<tr><td width="16%">cones</td><td width="12%">0.17</td><td width="12%">0.226</td><td width="12%">0.272</td><td width="12%">0.157</td><td width="12%">0.521</td><td width="12%">0.667</td><td width="12%">0.0624</td></tr>
-<tr><td width="16%">cont</td><td width="12%">0.0989</td><td width="12%">0.193</td><td width="12%">0.235</td><td width="12%">0.0952</td><td width="12%">0.285</td><td width="12%">0.304</td><td width="12%">0.0637</td></tr>
-<tr><td width="16%">cont3</td><td width="12%">0.0645</td><td width="12%">0.11</td><td width="12%">0.122</td><td width="12%">0.0629</td><td width="12%">0.13</td><td width="12%">0.152</td><td width="12%">0.0479</td></tr>
-<tr><td width="16%">cont_xyz</td><td width="12%">0.0676</td><td width="12%">0.105</td><td width="12%">0.129</td><td width="12%">0.0628</td><td width="12%">0.134</td><td width="12%">0.148</td><td width="12%">0.0523</td></tr>
-<tr><td width="16%">contd</td><td width="12%">0.237</td><td width="12%">0.307</td><td width="12%">0.368</td><td width="12%">0.151</td><td width="12%">0.294</td><td width="12%">0.346</td><td width="12%">0.106</td></tr>
-<tr><td width="16%">contf</td><td width="12%">0.193</td><td width="12%">0.262</td><td width="12%">0.305</td><td width="12%">0.136</td><td width="12%">0.274</td><td width="12%">0.322</td><td width="12%">0.0921</td></tr>
-<tr><td width="16%">contf3</td><td width="12%">0.169</td><td width="12%">0.206</td><td width="12%">0.3</td><td width="12%">0.117</td><td width="12%">0.232</td><td width="12%">0.353</td><td width="12%">0.0796</td></tr>
-<tr><td width="16%">contf_xyz</td><td width="12%">0.118</td><td width="12%">0.18</td><td width="12%">0.206</td><td width="12%">0.103</td><td width="12%">0.177</td><td width="12%">0.231</td><td width="12%">0.0661</td></tr>
-<tr><td width="16%">contv</td><td width="12%">0.131</td><td width="12%">0.226</td><td width="12%">0.259</td><td width="12%">0.114</td><td width="12%">0.282</td><td width="12%">0.334</td><td width="12%">0.0753</td></tr>
-<tr><td width="16%">correl</td><td width="12%">0.0578</td><td width="12%">0.108</td><td width="12%">0.115</td><td width="12%">0.0616</td><td width="12%">0.193</td><td width="12%">0.216</td><td width="12%">0.0463</td></tr>
-<tr><td width="16%">curvcoor</td><td width="12%">0.125</td><td width="12%">0.203</td><td width="12%">0.219</td><td width="12%">0.12</td><td width="12%">0.454</td><td width="12%">0.504</td><td width="12%">0.0933</td></tr>
-<tr><td width="16%">cut</td><td width="12%">0.768</td><td width="12%">0.661</td><td width="12%">0.73</td><td width="12%">0.43</td><td width="12%">0.53</td><td width="12%">0.669</td><td width="12%">0.431</td></tr>
-<tr><td width="16%">dat_diff</td><td width="12%">0.0922</td><td width="12%">0.151</td><td width="12%">0.193</td><td width="12%">0.092</td><td width="12%">0.235</td><td width="12%">0.274</td><td width="12%">0.0439</td></tr>
-<tr><td width="16%">dat_extra</td><td width="12%">0.202</td><td width="12%">0.236</td><td width="12%">0.263</td><td width="12%">0.132</td><td width="12%">0.254</td><td width="12%">0.292</td><td width="12%">0.0747</td></tr>
-<tr><td width="16%">data1</td><td width="12%">2.62</td><td width="12%">2.07</td><td width="12%">2.14</td><td width="12%">1.43</td><td width="12%">1.69</td><td width="12%">1.83</td><td width="12%">1.56</td></tr>
-<tr><td width="16%">data2</td><td width="12%">1.51</td><td width="12%">1.41</td><td width="12%">1.49</td><td width="12%">1.22</td><td width="12%">1.43</td><td width="12%">1.44</td><td width="12%">1.24</td></tr>
-<tr><td width="16%">dens</td><td width="12%">0.115</td><td width="12%">0.236</td><td width="12%">0.32</td><td width="12%">0.134</td><td width="12%">0.271</td><td width="12%">0.327</td><td width="12%">0.0746</td></tr>
-<tr><td width="16%">dens3</td><td width="12%">0.101</td><td width="12%">0.154</td><td width="12%">0.214</td><td width="12%">0.0981</td><td width="12%">0.173</td><td width="12%">0.244</td><td width="12%">0.0429</td></tr>
-<tr><td width="16%">dens_xyz</td><td width="12%">0.102</td><td width="12%">0.179</td><td width="12%">0.242</td><td width="12%">0.119</td><td width="12%">0.164</td><td width="12%">0.22</td><td width="12%">0.0495</td></tr>
-<tr><td width="16%">detect</td><td width="12%">0.17</td><td width="12%">0.283</td><td width="12%">0.357</td><td width="12%">0.129</td><td width="12%">0.217</td><td width="12%">0.293</td><td width="12%">0.0927</td></tr>
-<tr><td width="16%">dew</td><td width="12%">1.63</td><td width="12%">1.1</td><td width="12%">1.19</td><td width="12%">0.557</td><td width="12%">0.797</td><td width="12%">0.881</td><td width="12%">0.288</td></tr>
-<tr><td width="16%">diffract</td><td width="12%">0.0961</td><td width="12%">0.253</td><td width="12%">0.346</td><td width="12%">0.114</td><td width="12%">0.382</td><td width="12%">0.43</td><td width="12%">0.0508</td></tr>
-<tr><td width="16%">dilate</td><td width="12%">0.098</td><td width="12%">0.231</td><td width="12%">0.259</td><td width="12%">0.101</td><td width="12%">0.347</td><td width="12%">0.404</td><td width="12%">0.0539</td></tr>
-<tr><td width="16%">dots</td><td width="12%">0.0986</td><td width="12%">0.139</td><td width="12%">0.167</td><td width="12%">0.106</td><td width="12%">0.24</td><td width="12%">0.221</td><td width="12%">0.223</td></tr>
-<tr><td width="16%">earth</td><td width="12%">0.0455</td><td width="12%">0.0532</td><td width="12%">0.0659</td><td width="12%">0.0448</td><td width="12%">0.0404</td><td width="12%">0.0592</td><td width="12%">0.0294</td></tr>
-<tr><td width="16%">error</td><td width="12%">0.0764</td><td width="12%">0.128</td><td width="12%">0.134</td><td width="12%">0.0758</td><td width="12%">0.203</td><td width="12%">0.227</td><td width="12%">0.076</td></tr>
-<tr><td width="16%">error2</td><td width="12%">0.0739</td><td width="12%">0.166</td><td width="12%">0.188</td><td width="12%">0.0934</td><td width="12%">0.374</td><td width="12%">0.416</td><td width="12%">0.0608</td></tr>
-<tr><td width="16%">export</td><td width="12%">0.177</td><td width="12%">0.273</td><td width="12%">0.382</td><td width="12%">0.131</td><td width="12%">0.244</td><td width="12%">0.312</td><td width="12%">0.0968</td></tr>
-<tr><td width="16%">fall</td><td width="12%">0.0481</td><td width="12%">0.127</td><td width="12%">0.114</td><td width="12%">0.051</td><td width="12%">0.115</td><td width="12%">0.125</td><td width="12%">0.0442</td></tr>
-<tr><td width="16%">fexport</td><td width="12%">2.33</td><td width="12%">2.69</td><td width="12%">2.81</td><td width="12%">1.12</td><td width="12%">1.43</td><td width="12%">1.52</td><td width="12%">2.19</td></tr>
-<tr><td width="16%">fit</td><td width="12%">0.072</td><td width="12%">0.112</td><td width="12%">0.121</td><td width="12%">0.0657</td><td width="12%">0.154</td><td width="12%">0.166</td><td width="12%">0.0442</td></tr>
-<tr><td width="16%">flame2d</td><td width="12%">6.16</td><td width="12%">6.34</td><td width="12%">6.31</td><td width="12%">3.71</td><td width="12%">3.91</td><td width="12%">3.75</td><td width="12%">1.26</td></tr>
-<tr><td width="16%">flow</td><td width="12%">0.43</td><td width="12%">0.529</td><td width="12%">0.557</td><td width="12%">0.403</td><td width="12%">0.582</td><td width="12%">0.599</td><td width="12%">0.372</td></tr>
-<tr><td width="16%">fog</td><td width="12%">0.0651</td><td width="12%">0.146</td><td width="12%">0.209</td><td width="12%">0.07</td><td width="12%">0.172</td><td width="12%">0.242</td><td width="12%">0.0466</td></tr>
-<tr><td width="16%">fonts</td><td width="12%">0.0842</td><td width="12%">0.13</td><td width="12%">0.135</td><td width="12%">0.0669</td><td width="12%">0.0969</td><td width="12%">0.0965</td><td width="12%">0.0696</td></tr>
-<tr><td width="16%">grad</td><td width="12%">0.111</td><td width="12%">0.223</td><td width="12%">0.318</td><td width="12%">0.133</td><td width="12%">0.216</td><td width="12%">0.284</td><td width="12%">0.0783</td></tr>
-<tr><td width="16%">hist</td><td width="12%">0.185</td><td width="12%">0.227</td><td width="12%">0.25</td><td width="12%">0.136</td><td width="12%">0.234</td><td width="12%">0.253</td><td width="12%">0.0632</td></tr>
-<tr><td width="16%">ifs2d</td><td width="12%">0.7</td><td width="12%">0.777</td><td width="12%">0.762</td><td width="12%">0.396</td><td width="12%">0.457</td><td width="12%">0.443</td><td width="12%">0.133</td></tr>
-<tr><td width="16%">ifs3d</td><td width="12%">0.827</td><td width="12%">0.835</td><td width="12%">0.893</td><td width="12%">0.369</td><td width="12%">0.45</td><td width="12%">0.484</td><td width="12%">0.127</td></tr>
-<tr><td width="16%">indirect</td><td width="12%">0.0579</td><td width="12%">0.0904</td><td width="12%">0.116</td><td width="12%">0.0599</td><td width="12%">0.128</td><td width="12%">0.152</td><td width="12%">0.0316</td></tr>
-<tr><td width="16%">inplot</td><td width="12%">0.0931</td><td width="12%">0.151</td><td width="12%">0.19</td><td width="12%">0.107</td><td width="12%">0.32</td><td width="12%">0.329</td><td width="12%">0.0601</td></tr>
-<tr><td width="16%">iris</td><td width="12%">0.0446</td><td width="12%">0.0544</td><td width="12%">0.0751</td><td width="12%">0.0468</td><td width="12%">0.0457</td><td width="12%">0.0578</td><td width="12%">0.0371</td></tr>
-<tr><td width="16%">label</td><td width="12%">0.0484</td><td width="12%">0.0879</td><td width="12%">0.105</td><td width="12%">0.0601</td><td width="12%">0.112</td><td width="12%">0.164</td><td width="12%">0.078</td></tr>
-<tr><td width="16%">lamerey</td><td width="12%">0.0723</td><td width="12%">0.0728</td><td width="12%">0.0978</td><td width="12%">0.0611</td><td width="12%">0.104</td><td width="12%">0.154</td><td width="12%">0.0522</td></tr>
-<tr><td width="16%">legend</td><td width="12%">0.123</td><td width="12%">0.282</td><td width="12%">0.3</td><td width="12%">0.0796</td><td width="12%">0.232</td><td width="12%">0.311</td><td width="12%">0.041</td></tr>
-<tr><td width="16%">light</td><td width="12%">0.12</td><td width="12%">0.186</td><td width="12%">0.448</td><td width="12%">0.104</td><td width="12%">0.22</td><td width="12%">0.417</td><td width="12%">0.0528</td></tr>
-<tr><td width="16%">loglog</td><td width="12%">0.136</td><td width="12%">0.252</td><td width="12%">0.252</td><td width="12%">0.125</td><td width="12%">0.405</td><td width="12%">0.481</td><td width="12%">0.0956</td></tr>
-<tr><td width="16%">map</td><td width="12%">0.0768</td><td width="12%">0.157</td><td width="12%">0.195</td><td width="12%">0.0734</td><td width="12%">0.168</td><td width="12%">0.232</td><td width="12%">0.0471</td></tr>
-<tr><td width="16%">mark</td><td width="12%">0.0659</td><td width="12%">0.0909</td><td width="12%">0.0881</td><td width="12%">0.0718</td><td width="12%">0.239</td><td width="12%">0.151</td><td width="12%">0.0372</td></tr>
-<tr><td width="16%">mask</td><td width="12%">0.0878</td><td width="12%">0.207</td><td width="12%">0.326</td><td width="12%">0.0944</td><td width="12%">0.279</td><td width="12%">0.347</td><td width="12%">0.0511</td></tr>
-<tr><td width="16%">mesh</td><td width="12%">0.0719</td><td width="12%">0.131</td><td width="12%">0.163</td><td width="12%">0.0683</td><td width="12%">0.147</td><td width="12%">0.181</td><td width="12%">0.0418</td></tr>
-<tr><td width="16%">mirror</td><td width="12%">0.135</td><td width="12%">0.217</td><td width="12%">0.259</td><td width="12%">0.105</td><td width="12%">0.296</td><td width="12%">0.308</td><td width="12%">0.0548</td></tr>
-<tr><td width="16%">molecule</td><td width="12%">0.0979</td><td width="12%">0.146</td><td width="12%">0.237</td><td width="12%">0.0953</td><td width="12%">0.241</td><td width="12%">0.361</td><td width="12%">0.044</td></tr>
-<tr><td width="16%">ode</td><td width="12%">0.193</td><td width="12%">0.28</td><td width="12%">0.29</td><td width="12%">0.191</td><td width="12%">0.419</td><td width="12%">0.436</td><td width="12%">0.163</td></tr>
-<tr><td width="16%">ohlc</td><td width="12%">0.0482</td><td width="12%">0.071</td><td width="12%">0.0936</td><td width="12%">0.0574</td><td width="12%">0.109</td><td width="12%">0.121</td><td width="12%">0.0447</td></tr>
-<tr><td width="16%">param1</td><td width="12%">0.186</td><td width="12%">0.348</td><td width="12%">0.424</td><td width="12%">0.15</td><td width="12%">0.545</td><td width="12%">0.845</td><td width="12%">0.0861</td></tr>
-<tr><td width="16%">param2</td><td width="12%">0.57</td><td width="12%">0.732</td><td width="12%">0.806</td><td width="12%">0.313</td><td width="12%">0.698</td><td width="12%">0.827</td><td width="12%">0.23</td></tr>
-<tr><td width="16%">param3</td><td width="12%">1.91</td><td width="12%">2.56</td><td width="12%">2.93</td><td width="12%">0.767</td><td width="12%">1.17</td><td width="12%">1.58</td><td width="12%">0.844</td></tr>
-<tr><td width="16%">paramv</td><td width="12%">1.29</td><td width="12%">1.55</td><td width="12%">1.5</td><td width="12%">0.816</td><td width="12%">1.12</td><td width="12%">1.11</td><td width="12%">0.718</td></tr>
-<tr><td width="16%">parser</td><td width="12%">0.0631</td><td width="12%">0.112</td><td width="12%">0.14</td><td width="12%">0.0643</td><td width="12%">0.209</td><td width="12%">0.232</td><td width="12%">0.0467</td></tr>
-<tr><td width="16%">pde</td><td width="12%">0.37</td><td width="12%">0.511</td><td width="12%">0.554</td><td width="12%">0.318</td><td width="12%">0.429</td><td width="12%">0.455</td><td width="12%">0.284</td></tr>
-<tr><td width="16%">pendelta</td><td width="12%">0.108</td><td width="12%">0.115</td><td width="12%">0.102</td><td width="12%">0.108</td><td width="12%">0.115</td><td width="12%">0.104</td><td width="12%">0.105</td></tr>
-<tr><td width="16%">pipe</td><td width="12%">0.661</td><td width="12%">0.922</td><td width="12%">1.04</td><td width="12%">0.414</td><td width="12%">0.669</td><td width="12%">0.828</td><td width="12%">0.36</td></tr>
-<tr><td width="16%">plot</td><td width="12%">0.0961</td><td width="12%">0.116</td><td width="12%">0.142</td><td width="12%">0.0932</td><td width="12%">0.22</td><td width="12%">0.237</td><td width="12%">0.0457</td></tr>
-<tr><td width="16%">pmap</td><td width="12%">0.137</td><td width="12%">0.184</td><td width="12%">0.216</td><td width="12%">0.0994</td><td width="12%">0.165</td><td width="12%">0.21</td><td width="12%">0.0737</td></tr>
-<tr><td width="16%">primitives</td><td width="12%">0.0978</td><td width="12%">0.191</td><td width="12%">0.289</td><td width="12%">0.0971</td><td width="12%">0.304</td><td width="12%">0.353</td><td width="12%">0.0386</td></tr>
-<tr><td width="16%">projection</td><td width="12%">0.166</td><td width="12%">0.403</td><td width="12%">0.484</td><td width="12%">0.124</td><td width="12%">0.578</td><td width="12%">0.626</td><td width="12%">0.078</td></tr>
-<tr><td width="16%">projection5</td><td width="12%">0.149</td><td width="12%">0.323</td><td width="12%">0.36</td><td width="12%">0.117</td><td width="12%">0.496</td><td width="12%">0.546</td><td width="12%">0.0722</td></tr>
-<tr><td width="16%">pulse</td><td width="12%">0.0488</td><td width="12%">0.0751</td><td width="12%">0.0911</td><td width="12%">0.0503</td><td width="12%">0.112</td><td width="12%">0.13</td><td width="12%">0.0347</td></tr>
-<tr><td width="16%">qo2d</td><td width="12%">0.252</td><td width="12%">0.389</td><td width="12%">0.455</td><td width="12%">0.244</td><td width="12%">0.354</td><td width="12%">0.414</td><td width="12%">0.208</td></tr>
-<tr><td width="16%">quality0</td><td width="12%">0.112</td><td width="12%">0.112</td><td width="12%">0.119</td><td width="12%">0.119</td><td width="12%">0.11</td><td width="12%">0.123</td><td width="12%">0.114</td></tr>
-<tr><td width="16%">quality1</td><td width="12%">0.239</td><td width="12%">0.254</td><td width="12%">0.24</td><td width="12%">0.24</td><td width="12%">0.252</td><td width="12%">0.26</td><td width="12%">0.232</td></tr>
-<tr><td width="16%">quality2</td><td width="12%">0.276</td><td width="12%">0.273</td><td width="12%">0.272</td><td width="12%">0.277</td><td width="12%">0.275</td><td width="12%">0.274</td><td width="12%">0.278</td></tr>
-<tr><td width="16%">quality4</td><td width="12%">0.107</td><td width="12%">0.104</td><td width="12%">0.103</td><td width="12%">0.104</td><td width="12%">0.104</td><td width="12%">0.112</td><td width="12%">0.107</td></tr>
-<tr><td width="16%">quality5</td><td width="12%">0.455</td><td width="12%">0.448</td><td width="12%">0.46</td><td width="12%">0.466</td><td width="12%">0.45</td><td width="12%">0.45</td><td width="12%">0.456</td></tr>
-<tr><td width="16%">quality6</td><td width="12%">0.489</td><td width="12%">0.478</td><td width="12%">0.48</td><td width="12%">0.489</td><td width="12%">0.48</td><td width="12%">0.479</td><td width="12%">0.492</td></tr>
-<tr><td width="16%">quality8</td><td width="12%">0.0575</td><td width="12%">0.0467</td><td width="12%">0.0453</td><td width="12%">0.0439</td><td width="12%">0.047</td><td width="12%">0.0462</td><td width="12%">0.0486</td></tr>
-<tr><td width="16%">radar</td><td width="12%">0.058</td><td width="12%">0.0675</td><td width="12%">0.0872</td><td width="12%">0.07</td><td width="12%">0.0969</td><td width="12%">0.123</td><td width="12%">0.0284</td></tr>
-<tr><td width="16%">refill</td><td width="12%">0.186</td><td width="12%">0.232</td><td width="12%">0.278</td><td width="12%">0.129</td><td width="12%">0.356</td><td width="12%">0.389</td><td width="12%">0.07</td></tr>
-<tr><td width="16%">region</td><td width="12%">0.0706</td><td width="12%">0.166</td><td width="12%">0.21</td><td width="12%">0.0803</td><td width="12%">0.274</td><td width="12%">0.3</td><td width="12%">0.0442</td></tr>
-<tr><td width="16%">scanfile</td><td width="12%">0.0563</td><td width="12%">0.0769</td><td width="12%">0.0884</td><td width="12%">0.0469</td><td width="12%">0.0891</td><td width="12%">0.106</td><td width="12%">0.0341</td></tr>
-<tr><td width="16%">schemes</td><td width="12%">0.121</td><td width="12%">0.227</td><td width="12%">0.283</td><td width="12%">0.189</td><td width="12%">0.284</td><td width="12%">0.338</td><td width="12%">0.0454</td></tr>
-<tr><td width="16%">section</td><td width="12%">0.0593</td><td width="12%">0.0948</td><td width="12%">0.0974</td><td width="12%">0.0622</td><td width="12%">0.159</td><td width="12%">0.175</td><td width="12%">0.0417</td></tr>
-<tr><td width="16%">several_light</td><td width="12%">0.076</td><td width="12%">0.109</td><td width="12%">0.244</td><td width="12%">0.0697</td><td width="12%">0.123</td><td width="12%">0.246</td><td width="12%">0.0442</td></tr>
-<tr><td width="16%">solve</td><td width="12%">0.0925</td><td width="12%">0.188</td><td width="12%">0.195</td><td width="12%">0.108</td><td width="12%">0.344</td><td width="12%">0.334</td><td width="12%">0.0485</td></tr>
-<tr><td width="16%">stem</td><td width="12%">0.0633</td><td width="12%">0.129</td><td width="12%">0.145</td><td width="12%">0.0827</td><td width="12%">0.203</td><td width="12%">0.212</td><td width="12%">0.0407</td></tr>
-<tr><td width="16%">step</td><td width="12%">0.0632</td><td width="12%">0.102</td><td width="12%">0.114</td><td width="12%">0.112</td><td width="12%">0.183</td><td width="12%">0.194</td><td width="12%">0.0447</td></tr>
-<tr><td width="16%">stereo</td><td width="12%">0.0901</td><td width="12%">0.126</td><td width="12%">0.206</td><td width="12%">0.0807</td><td width="12%">0.151</td><td width="12%">0.237</td><td width="12%">0.0441</td></tr>
-<tr><td width="16%">stfa</td><td width="12%">0.0925</td><td width="12%">0.245</td><td width="12%">0.291</td><td width="12%">0.0801</td><td width="12%">0.214</td><td width="12%">0.299</td><td width="12%">0.0438</td></tr>
-<tr><td width="16%">style</td><td width="12%">0.114</td><td width="12%">0.271</td><td width="12%">0.321</td><td width="12%">0.102</td><td width="12%">0.44</td><td width="12%">0.468</td><td width="12%">0.0451</td></tr>
-<tr><td width="16%">surf</td><td width="12%">0.149</td><td width="12%">0.241</td><td width="12%">0.303</td><td width="12%">0.12</td><td width="12%">0.24</td><td width="12%">0.319</td><td width="12%">0.0498</td></tr>
-<tr><td width="16%">surf3</td><td width="12%">2.01</td><td width="12%">3.41</td><td width="12%">3.44</td><td width="12%">1.41</td><td width="12%">3.34</td><td width="12%">3.33</td><td width="12%">0.667</td></tr>
-<tr><td width="16%">surf3a</td><td width="12%">0.514</td><td width="12%">0.397</td><td width="12%">0.537</td><td width="12%">0.24</td><td width="12%">0.397</td><td width="12%">0.74</td><td width="12%">0.205</td></tr>
-<tr><td width="16%">surf3c</td><td width="12%">0.482</td><td width="12%">0.4</td><td width="12%">0.533</td><td width="12%">0.235</td><td width="12%">0.423</td><td width="12%">0.728</td><td width="12%">0.208</td></tr>
-<tr><td width="16%">surf3ca</td><td width="12%">0.494</td><td width="12%">0.401</td><td width="12%">0.536</td><td width="12%">0.26</td><td width="12%">0.402</td><td width="12%">0.709</td><td width="12%">0.243</td></tr>
-<tr><td width="16%">surfa</td><td width="12%">0.0643</td><td width="12%">0.105</td><td width="12%">0.181</td><td width="12%">0.0572</td><td width="12%">0.122</td><td width="12%">0.192</td><td width="12%">0.0456</td></tr>
-<tr><td width="16%">surfc</td><td width="12%">0.0644</td><td width="12%">0.111</td><td width="12%">0.184</td><td width="12%">0.0609</td><td width="12%">0.128</td><td width="12%">0.199</td><td width="12%">0.0399</td></tr>
-<tr><td width="16%">surfca</td><td width="12%">0.0645</td><td width="12%">0.106</td><td width="12%">0.181</td><td width="12%">0.0696</td><td width="12%">0.128</td><td width="12%">0.201</td><td width="12%">0.044</td></tr>
-<tr><td width="16%">table</td><td width="12%">0.128</td><td width="12%">0.263</td><td width="12%">0.29</td><td width="12%">0.0813</td><td width="12%">0.176</td><td width="12%">0.197</td><td width="12%">0.0481</td></tr>
-<tr><td width="16%">tape</td><td width="12%">0.0779</td><td width="12%">0.143</td><td width="12%">0.167</td><td width="12%">0.0788</td><td width="12%">0.224</td><td width="12%">0.242</td><td width="12%">0.0463</td></tr>
-<tr><td width="16%">tens</td><td width="12%">0.0605</td><td width="12%">0.0956</td><td width="12%">0.0935</td><td width="12%">0.0699</td><td width="12%">0.146</td><td width="12%">0.162</td><td width="12%">0.046</td></tr>
-<tr><td width="16%">ternary</td><td width="12%">0.13</td><td width="12%">0.334</td><td width="12%">0.357</td><td width="12%">0.116</td><td width="12%">0.589</td><td width="12%">0.65</td><td width="12%">0.061</td></tr>
-<tr><td width="16%">text</td><td width="12%">0.11</td><td width="12%">0.214</td><td width="12%">0.225</td><td width="12%">0.0678</td><td width="12%">0.172</td><td width="12%">0.19</td><td width="12%">0.0438</td></tr>
-<tr><td width="16%">text2</td><td width="12%">0.0809</td><td width="12%">0.175</td><td width="12%">0.189</td><td width="12%">0.0797</td><td width="12%">0.22</td><td width="12%">0.235</td><td width="12%">0.0425</td></tr>
-<tr><td width="16%">textmark</td><td width="12%">0.0742</td><td width="12%">0.129</td><td width="12%">0.14</td><td width="12%">0.0574</td><td width="12%">0.126</td><td width="12%">0.143</td><td width="12%">0.0438</td></tr>
-<tr><td width="16%">ticks</td><td width="12%">0.126</td><td width="12%">0.252</td><td width="12%">0.274</td><td width="12%">0.111</td><td width="12%">0.329</td><td width="12%">0.359</td><td width="12%">0.0488</td></tr>
-<tr><td width="16%">tile</td><td width="12%">0.062</td><td width="12%">0.091</td><td width="12%">0.135</td><td width="12%">0.0605</td><td width="12%">0.11</td><td width="12%">0.156</td><td width="12%">0.0613</td></tr>
-<tr><td width="16%">tiles</td><td width="12%">0.06</td><td width="12%">0.119</td><td width="12%">0.158</td><td width="12%">0.0604</td><td width="12%">0.129</td><td width="12%">0.163</td><td width="12%">0.0466</td></tr>
-<tr><td width="16%">torus</td><td width="12%">0.148</td><td width="12%">0.277</td><td width="12%">0.391</td><td width="12%">0.121</td><td width="12%">0.817</td><td width="12%">1.19</td><td width="12%">0.0653</td></tr>
-<tr><td width="16%">traj</td><td width="12%">0.0476</td><td width="12%">0.0899</td><td width="12%">0.108</td><td width="12%">0.0559</td><td width="12%">0.153</td><td width="12%">0.162</td><td width="12%">0.0336</td></tr>
-<tr><td width="16%">triangulation</td><td width="12%">0.0622</td><td width="12%">0.159</td><td width="12%">0.218</td><td width="12%">0.0667</td><td width="12%">0.173</td><td width="12%">0.244</td><td width="12%">0.0451</td></tr>
-<tr><td width="16%">triplot</td><td width="12%">0.0494</td><td width="12%">0.181</td><td width="12%">0.371</td><td width="12%">0.0608</td><td width="12%">0.181</td><td width="12%">0.32</td><td width="12%">0.0308</td></tr>
-<tr><td width="16%">tube</td><td width="12%">0.108</td><td width="12%">0.286</td><td width="12%">0.373</td><td width="12%">0.104</td><td width="12%">0.311</td><td width="12%">0.379</td><td width="12%">0.0493</td></tr>
-<tr><td width="16%">type0</td><td width="12%">0.238</td><td width="12%">0.326</td><td width="12%">0.5</td><td width="12%">0.144</td><td width="12%">0.314</td><td width="12%">0.479</td><td width="12%">0.108</td></tr>
-<tr><td width="16%">type1</td><td width="12%">0.237</td><td width="12%">0.34</td><td width="12%">0.531</td><td width="12%">0.137</td><td width="12%">0.317</td><td width="12%">0.5</td><td width="12%">0.102</td></tr>
-<tr><td width="16%">type2</td><td width="12%">0.243</td><td width="12%">0.335</td><td width="12%">0.509</td><td width="12%">0.148</td><td width="12%">0.317</td><td width="12%">0.484</td><td width="12%">0.115</td></tr>
-<tr><td width="16%">vect</td><td width="12%">0.11</td><td width="12%">0.248</td><td width="12%">0.328</td><td width="12%">0.127</td><td width="12%">0.354</td><td width="12%">0.325</td><td width="12%">0.0732</td></tr>
-<tr><td width="16%">vect3</td><td width="12%">0.0692</td><td width="12%">0.153</td><td width="12%">0.173</td><td width="12%">0.0884</td><td width="12%">0.526</td><td width="12%">0.366</td><td width="12%">0.0356</td></tr>
-<tr><td width="16%">venn</td><td width="12%">0.0494</td><td width="12%">0.194</td><td width="12%">0.289</td><td width="12%">0.0664</td><td width="12%">0.158</td><td width="12%">0.236</td><td width="12%">0.044</td></tr>
-</table>
-
-<hr>
-<a name="TeX_002dlike-symbols"></a>
-<div class="header">
-<p>
-Next: <a href="#Copying-This-Manual" accesskey="n" rel="next">Copying This Manual</a>, Previous: <a href="#Plotting-time" accesskey="p" rel="prev">Plotting time</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="TeX_002dlike-symbols-1"></a>
-<h2 class="appendix">Appendix D TeX-like symbols</h2>
-
-
-<p>The full list of TeX-like commands recognizable by MathGL is shown below. If command is not recognized then it will be printed as is by ommitting ‘<samp>\</samp>’ symbol. For example, ‘<samp>\#</samp>’ produce “#”, ‘<samp>\\</samp>’ produce “\”, ‘<samp>\qq</samp>’ produce “qq”.
-</p>
-<p><strong>Change case</strong>: _, ^, @.
-</p>
-<p><strong>Text style</strong>: \big, \b, \textbf, \i, \textit, \bi, \r, \textrm, \a, \overline, \u, \underline, \w, \wire, #, \color[wkrgbcymhRGBCYMHWlenupqLENUPQ]
-</p>
-<p><strong>Roots</strong>: \sqrt, \sqrt3, \sqrt4
-</p>
-<p><strong>Fractions</strong>: \frac, \dfrac, \stack, \overset, \underset, \stackr, \stackl
-</p>
-<p><strong>Accents</strong>: \hat, \tilde, \dot, \ddot, \dddot, \ddddot, \acute, \check, \grave, \vec, \bar, \breve
-</p>
-<p><strong>Special symbols</strong>:
-</p>
-<p>\# (#), \% (%), \& (&), \^ (^).
-</p>
-<p>\AA (Å), \AE (Æ), \APLboxquestion (⍰), \APLboxupcaret (⍓), \APLnotbackslash (⍀), \APLnotslash (⌿), \Alpha (Α), \And (&), \Angstrom (Å), \Barv (⫧), \BbbC (ℂ), \BbbGamma (ℾ), \BbbH (ℍ), \BbbN (ℕ), \BbbP (ℙ), \BbbPi (ℿ), \BbbQ (ℚ), \BbbR (ℝ), \BbbZ (ℤ), \Bbbgamma (ℽ), \Bbbpi (ℼ), \Bbbsum (⅀), \Beta (Β), \Bumpeq (≎), \Cap (⋒), \Chi (Χ), \Colon (∷), \Coloneq (⩴), \Cup (⋓), \DDownarrow (⟱), \DH (Ð), \DJ (Đ), \DashV (⫥), \DashVDash (⟚), \Dashv (⫤), \Ddownarrow (⤋), \Delta (Δ), \Digamma (Ϝ), \Doteq (≑), \Downarrow (⇓), \Epsilon (Ε), \Equiv (≣), \Eta (Η), \Eulerconst (ℇ), \Exclam (‼), \Finv (Ⅎ), \Game (⅁), \Gamma (Γ), \Gt (⪢), \Hermaphrodite (⚥), \Im (ℑ), \Iota (Ι), \Kappa (Κ), \Koppa (Ϟ), \L (Ł), \LLeftarrow (⭅), \Lambda (Λ), \Lbrbrak (⟬), \Ldsh (↲), \Leftarrow (⇐), \Leftrightarrow (⇔), \Lleftarrow (⇚), \Longleftarrow (⟸), \Longleftrightarrow (⟺), \Longmapsfrom (⟽), \Longmapsto (⟾), \Longrightarrow (⟹), \Lparengtr (⦕), \Lsh (↰), \Lt (⪡), \Lvzigzag (⧚), \Mapsfrom (⤆), \Mapsto (⤇), \Mu (Μ), \NG (Ŋ), \Nearrow (⇗), \Not (⫬), \Nu (Ν), \Nwarrow (⇖), \O (Ø), \OE (Œ), \Ohorn (Ơ), \Omega (Ω), \Omicron (Ο), \Otimes (⨷), \P (¶), \Phi (Φ), \Pi (Π), \Planckconst (ℎ), \Prec (⪻), \PropertyLine (⅊), \Psi (Ψ), \QED (∎), \Question (⁇), \RRightarrow (⭆), \Rbrbrak (⟭), \Rdsh (↳), \Re (ℜ), \Rho (Ρ), \Rightarrow (⇒), \Rparenless (⦖), \Rrightarrow (⇛), \Rsh (↱), \Rvzigzag (⧛), \S (§), \Sc (⪼), \Searrow (⇘), \Sigma (Σ), \Sqcap (⩎), \Sqcup (⩏), \Stigma (Ϛ), \Subset (⋐), \Supset (⋑), \Swarrow (⇙), \TH (Þ), \Tau (Τ), \Theta (Θ), \UUparrow (⟰), \Uhorn (Ư), \Uparrow (⇑), \Updownarrow (⇕), \Uuparrow (⤊), \VDash (⊫), \Vbar (⫫), \Vdash (⊩), \Vee (⩔), \Vert (‖), \Vvdash (⊪), \Vvert (⦀), \Wedge (⩓), \XBox (☒), \Xi (Ξ), \Yup (⅄), \Zbar (Ƶ), \Zeta (Ζ).
-</p>
-<p>\aa (å), \ac (∾), \accurrent (⏦), \acidfree (♾), \acwcirclearrow (⥀), \acwgapcirclearrow (⟲), \acwleftarcarrow (⤹), \acwopencirclearrow (↺), \acwoverarcarrow (⤺), \acwundercurvearrow (⤻), \adots (⋰), \ae (æ), \aleph (ℵ), \alpha (α), \amalg (⨿), \angdnr (⦟), \angle (∠), \angles (⦞), \angleubar (⦤), \approx (≈), \approxeq (≊), \approxeqq (⩰), \approxident (≋), \arceq (≘), \aries (♈), \assert (⊦), \ast (∗), \asteq (⩮), \astrosun (☉), \asymp (≍), \awint (⨑).
-</p>
-<p>\bNot (⫭), \backcong (≌), \backdprime (‶), \backepsilon (϶), \backprime (‵), \backsim (∽), \backsimeq (⋍), \backslash (\), \backtrprime (‷), \bagmember (⋿), \barV (⫪), \barcap (⩃), \barcup (⩂), \bardownharpoonleft (⥡), \bardownharpoonright (⥝), \barleftarrow (⇤), \barleftarrowrightarrowbar (↹), \barleftharpoondown (⥖), \barleftharpoonup (⥒), \barovernorthwestarrow (↸), \barrightarrowdiamond (⤠), \barrightharpoondown (⥟), \barrightharpoonup (⥛), \baruparrow (⤒), \barupharpoonleft (⥘), \barupharpoonright (⥔), \barvee (⊽), \barwedge (⊼), \bbrktbrk (⎶), \bdHrule (═), \bdVrule (║), \bdbVbH (╬), \bdbVbh (╫), \bdbVlH (╣), \bdbVlh (╢), \bdbVrH (╠), \bdbVrh (╟), \bdbvbH (╪), \bdbvbh (┼), \bdbvlH (╡), \bdbvlh (┤), \bdbvrH (╞), \bdbvrh (├), \bddVbH (╦), \bddVbh (╥), \bddVlH (╗), \bddVlh (╖), \bddVrH (╔), \bddVrh (╓), \bddvbH (╤), \bddvbh (┬), \bddvlH (╕), \bddvlh (┐), \bddvrH (╒), \bddvrh (┌), \bdhrule (─), \bdnesw (╱), \bdnwse (╲), \bdquadhdash (┈), \bdquadvdash (┊), \bdtriplevdash (┆), \bduVbH (╩), \bduVbh (╨), \bduVlH (╝), \bduVlh (╜), \bduVrH (╚), \bduVrh (╙), \bduvbH (╧), \bduvbh (┴), \bduvlH (╛), \bduvlh (┘), \bduvrH (╘), \bduvrh (└), \bdvrule (│), \because (∵), \benzenr (⏣), \beta (β), \beth (ℶ), \between (≬), \bigblacktriangledown (▼), \bigblacktriangleup (▲), \bigbot (⟘), \bigcap (⋂), \bigcup (⋃), \bigslopedvee (⩗), \bigslopedwedge (⩘), \bigstar (★), \bigtop (⟙), \bigtriangledown (▽), \bigtriangleup (△), \bigvee (⋁), \bigwedge (⋀), \bigwhitestar (☆), \blackcircledownarrow (⧭), \blackcircledrightdot (⚈), \blackcircledsanseight (➑), \blackcircledsansfive (➎), \blackcircledsansfour (➍), \blackcircledsansnine (➒), \blackcircledsansone (➊), \blackcircledsansseven (➐), \blackcircledsanssix (➏), \blackcircledsansten (➓), \blackcircledsansthree (➌), \blackcircledsanstwo (➋), \blackcircledtwodots (⚉), \blackcircleulquadwhite (◕), \blackdiamonddownarrow (⧪), \blackhourglass (⧗), \blackinwhitediamond (◈), \blackinwhitesquare (▣), \blacklefthalfcircle (◖), \blackpointerleft (◄), \blackpointerright (►), \blackrighthalfcircle (◗), \blacksmiley (☻), \blacktriangle (▴), \blacktriangledown (▾), \blacktriangleleft (◀), \blacktriangleright (▶), \blkhorzoval (⬬), \blkvertoval (⬮), \blockfull (█), \blockhalfshaded (▒), \blocklefthalf (▌), \blocklowhalf (▄), \blockqtrshaded (░), \blockrighthalf (▐), \blockthreeqtrshaded (▓), \blockuphalf (▀), \bot (⊥), \botsemicircle (◡), \bowtie (⋈), \box (◻), \boxast (⧆), \boxbar (◫), \boxbox (⧈), \boxbslash (⧅), \boxcircle (⧇), \boxdiag (⧄), \boxdot (⊡), \boxminus (⊟), \boxonbox (⧉), \boxplus (⊞), \boxtimes (⊠), \bsimilarleftarrow (⭁), \bsimilarrightarrow (⭇), \bsolhsub (⟈), \btimes (⨲), \bullet (∙), \bullseye (◎), \bumpeq (≏), \bumpeqq (⪮).
-</p>
-<p>\calB (ℬ), \calE (ℰ), \calF (ℱ), \calH (ℋ), \calM (ℳ), \calR (ℛ), \cap (∩), \capdot (⩀), \capwedge (⩄), \caretinsert (‸), \carreturn (⏎), \carriagereturn (↵), \ccwundercurvearrow (⤿), \cdot (⋅), \cdotp (·), \cdots (⋯), \cdprime (ʺ), \checkmark (✓), \chi (χ), \cirE (⧃), \cirbot (⟟), \circ (∘), \circeq (≗), \circfint (⨐), \circlebottomhalfblack (◒), \circledA (Ⓐ), \circledB (Ⓑ), \circledC (Ⓒ), \circledD (Ⓓ), \circledE (Ⓔ), \circledF (Ⓕ), \circledG (Ⓖ), \circledH (Ⓗ), \circledI (Ⓘ), \circledJ (Ⓙ), \circledK (Ⓚ), \circledL (Ⓛ), \circledM (Ⓜ), \circledN (Ⓝ), \circledO (Ⓞ), \circledP (Ⓟ), \circledQ (Ⓠ), \circledR (Ⓡ), \circledS (Ⓢ), \circledT (Ⓣ), \circledU (Ⓤ), \circledV (Ⓥ), \circledW (Ⓦ), \circledX (Ⓧ), \circledY (Ⓨ), \circledZ (Ⓩ), \circleda (ⓐ), \circledast (⊛), \circledb (ⓑ), \circledbullet (⦿), \circledc (ⓒ), \circledcirc (⊚), \circledd (ⓓ), \circleddash (⊝), \circlede (ⓔ), \circledeight (⑧), \circledequal (⊜), \circledf (ⓕ), \circledfive (⑤), \circledfour (④), \circledg (ⓖ), \circledh (ⓗ), \circledi (ⓘ), \circledj (ⓙ), \circledk (ⓚ), \circledl (ⓛ), \circledm (ⓜ), \circledn (ⓝ), \circlednine (⑨), \circledo (ⓞ), \circledone (①), \circledownarrow (⧬), \circledp (ⓟ), \circledparallel (⦷), \circledq (ⓠ), \circledr (ⓡ), \circledrightdot (⚆), \circleds (ⓢ), \circledsanseight (➇), \circledsansfive (➄), \circledsansfour (➃), \circledsansnine (➈), \circledsansone (➀), \circledsansseven (➆), \circledsanssix (➅), \circledsansten (➉), \circledsansthree (➂), \circledsanstwo (➁), \circledseven (⑦), \circledsix (⑥), \circledstar (✪), \circledt (ⓣ), \circledthree (③), \circledtwo (②), \circledtwodots (⚇), \circledu (ⓤ), \circledv (ⓥ), \circledvert (⦶), \circledw (ⓦ), \circledwhitebullet (⦾), \circledx (ⓧ), \circledy (ⓨ), \circledz (ⓩ), \circledzero (⓪), \circlehbar (⦵), \circlelefthalfblack (◐), \circlellquad (◵), \circlelrquad (◶), \circleonleftarrow (⬰), \circleonrightarrow (⇴), \circlerighthalfblack (◑), \circletophalfblack (◓), \circleulquad (◴), \circleurquad (◷), \circleurquadblack (◔), \circlevertfill (◍), \cirmid (⫯), \cirscir (⧂), \clangle (〈), \closedvarcap (⩍), \closedvarcup (⩌), \closedvarcupsmashprod (⩐), \closure (⁐), \cloverleaf (⌘), \clubsuit (♣), \colon (:), \colon (∶), \coloneq (≔), \commaminus (⨩), \complement (∁), \concavediamond (⟡), \concavediamondtickleft (⟢), \concavediamondtickright (⟣), \cong (≅), \congdot (⩭), \conictaper (⌲), \conjunction (☌), \coprod (∐), \cprime (ʹ), \crangle (〉), \csub (⫏), \csube (⫑), \csup (⫐), \csupe (⫒), \cuberoot (∛), \cup (∪), \cupdot (⊍), \cupleftarrow (⊌), \cupvee (⩅), \curlyeqprec (⋞), \curlyeqsucc (⋟), \curlyvee (⋎), \curlywedge (⋏), \curvearrowleft (↶), \curvearrowleftplus (⤽), \curvearrowright (↷), \curvearrowrightminus (⤼), \cwcirclearrow (⥁), \cwgapcirclearrow (⟳), \cwopencirclearrow (↻), \cwrightarcarrow (⤸), \cwundercurvearrow (⤾), \cylcty (⌭).
-</p>
-<p>\dag (†), \dagger (†), \daleth (ℸ), \danger (☡), \dashV (⫣), \dashVdash (⟛), \dashcolon (∹), \dashleftharpoondown (⥫), \dashrightharpoondown (⥭), \dashv (⊣), \dbkarow (⤏), \ddag (‡), \ddagger (‡), \ddots (⋱), \ddotseq (⩷), \delta (δ), \dh (ð), \diameter (⌀), \diamond (◇), \diamondbotblack (⬙), \diamondcdot (⟐), \diamondleftarrow (⤝), \diamondleftarrowbar (⤟), \diamondleftblack (⬖), \diamondrightblack (⬗), \diamondsuit (♢), \diamondtopblack (⬘), \dicei (⚀), \diceii (⚁), \diceiii (⚂), \diceiv (⚃), \dicev (⚄), \dicevi (⚅), \digamma (ϝ), \dingasterisk (✽), \dircurrent (⎓), \disin (⋲), \div (÷), \divideontimes (⋇), \dj (đ), \dlcrop (⌍), \doteq (≐), \dotequiv (⩧), \dotminus (∸), \dotplus (∔), \dots (…), \dotsim (⩪), \dotsminusdots (∺), \dottedcircle (◌), \dottedsquare (⬚), \dottimes (⨰), \doublebarvee (⩢), \doublebarwedge (⩞), \doubleplus (⧺), \downarrow (↓), \downarrowbar (⤓), \downarrowbarred (⤈), \downdasharrow (⇣), \downdownarrows (⇊), \downfishtail (⥿), \downharpoonleft (⇃), \downharpoonleftbar (⥙), \downharpoonright (⇂), \downharpoonrightbar (⥕), \downharpoonsleftright (⥥), \downrightcurvedarrow (⤵), \downtriangleleftblack (⧨), \downtrianglerightblack (⧩), \downuparrows (⇵), \downupharpoonsleftright (⥯), \downwhitearrow (⇩), \downzigzagarrow (↯), \dprime (″), \draftingarrow (➛), \drbkarow (⤐), \drcrop (⌌), \dsol (⧶), \dsub (⩤), \dualmap (⧟).
-</p>
-<p>\earth (♁), \egsdot (⪘), \eighthnote (♪), \elinters (⏧), \ell (ℓ), \elsdot (⪗), \emdash (—), \emptyset (∅), \emptysetoarr (⦳), \emptysetoarrl (⦴), \emptysetobar (⦱), \emptysetocirc (⦲), \endash (–), \enleadertwodots (‥), \envelope (✉), \eparsl (⧣), \epsilon (ϵ), \eqcirc (≖), \eqcolon (≕), \eqdef (≝), \eqdot (⩦), \eqeq (⩵), \eqeqeq (⩶), \eqgtr (⋝), \eqless (⋜), \eqqgtr (⪚), \eqqless (⪙), \eqqplus (⩱), \eqqsim (⩳), \eqqslantgtr (⪜), \eqqslantless (⪛), \eqsim (≂), \eqslantgtr (⪖), \eqslantless (⪕), \equalleftarrow (⭀), \equalparallel (⋕), \equalrightarrow (⥱), \equiv (≡), \equivDD (⩸), \equivVert (⩨), \equivVvert (⩩), \eqvparsl (⧥), \errbarblackcircle (⧳), \errbarblackdiamond (⧱), \errbarblacksquare (⧯), \errbarcircle (⧲), \errbardiamond (⧰), \errbarsquare (⧮), \eta (η), \euro (€), \exists (∃).
-</p>
-<p>\fallingdotseq (≒), \fbowtie (⧓), \fcmp (⨾), \fdiagovnearrow (⤯), \fdiagovrdiag (⤬), \female (♀), \figdash (‒), \fint (⨏), \fisheye (◉), \flat (♭), \fltns (⏥), \forall (∀), \forks (⫝̸), \forksnot (⫝), \forkv (⫙), \fourthroot (∜), \fourvdots (⦙), \fracfiveeighths (⅝), \fracfivesixths (⅚), \fracfourfifths (⅘), \fraconeeighth (⅛), \fraconefifth (⅕), \fraconesixth (⅙), \fraconethird (⅓), \fracseveneights (⅞), \fracslash (⁄), \fracthreeeighths (⅜), \fracthreefifths (⅗), \fractwofifths (⅖), \fractwothirds (⅔), \frakC (ℭ), \frakH (ℌ), \frakZ (ℨ), \frown (⌢), \frownie (☹), \fullouterjoin (⟗).
-</p>
-<p>\gamma (γ), \ge (≥), \geq (≥), \geqq (≧), \geqslant (⩾), \gescc (⪩), \gesdot (⪀), \gesdoto (⪂), \gesdotol (⪄), \gesles (⪔), \gets (←), \gg (≫), \ggg (⋙), \gggnest (⫸), \gimel (ℷ), \glE (⪒), \gla (⪥), \gleichstark (⧦), \glj (⪤), \gnapprox (⪊), \gneq (⪈), \gneqq (≩), \gnsim (⋧), \greater (>), \gsime (⪎), \gsiml (⪐), \gtcc (⪧), \gtcir (⩺), \gtlpar (⦠), \gtquest (⩼), \gtrapprox (⪆), \gtrarr (⥸), \gtrdot (⋗), \gtreqless (⋛), \gtreqqless (⪌), \gtrless (≷), \gtrsim (≳), \guillemotleft («), \guillemotright (»), \guilsinglleft (‹), \guilsinglright (›).
-</p>
-<p>\harrowextender (⎯), \hatapprox (⩯), \hbar (ℏ), \heartsuit (♡), \hermitmatrix (⊹), \hexagon (⎔), \hexagonblack (⬣), \hiraganano (の), \hknearrow (⤤), \hknwarrow (⤣), \hksearow (⤥), \hkswarow (⤦), \hookleftarrow (↩), \hookrightarrow (↪), \horizbar (―), \hourglass (⧖), \house (⌂), \hrectangle (▭), \hrectangleblack (▬), \hslash (ℏ), \hyphenbullet (⁃), \hzigzag (〰).
-</p>
-<p>\iiiint (⨌), \iiint (∭), \iinfin (⧜), \iint (∬), \imageof (⊷), \in (∈), \incare (℅), \increment (∆), \infty (∞), \int (∫), \intBar (⨎), \intbar (⨍), \intbottom (⌡), \intcap (⨙), \intclockwise (∱), \intcup (⨚), \intercal (⊺), \interleave (⫴), \intextender (⎮), \intlharhk (⨗), \intprod (⨼), \intprodr (⨽), \inttop (⌠), \intx (⨘), \inversebullet (◘), \inversewhitecircle (◙), \invnot (⌐), \invwhitelowerhalfcircle (◛), \invwhiteupperhalfcircle (◚), \iota (ι), \ipasupgamma (ˠ), \ipasupl (ˡ), \ipasuprerglotstpp (ˤ), \ipasups (ˢ), \ipasupx (ˣ), \ipaunaspirated (˭), \ipavoicing (ˬ), \isinE (⋹), \isindot (⋵), \isinobar (⋷), \isins (⋴), \isinvb (⋸), \itBbbD (ⅅ), \itBbbd (ⅆ), \itBbbe (ⅇ), \itBbbi (ⅈ), \itBbbj (ⅉ).
-</p>
-<p>\jupiter (♃), \kappa (κ), \kernelcontraction (∻), \koppa (ϟ).
-</p>
-<p>\l (ł), \lAngle (⟪), \lBrace (⦃), \lBrack (⟦), \lParen (⦅), \lambda (λ), \lambdabar (ƛ), \langle (⟨), \langledot (⦑), \laplac (⧠), \lasp (ʽ), \lat (⪫), \late (⪭), \lbag (⟅), \lblkbrbrak (⦗), \lbrace ({), \lbracelend (⎩), \lbracemid (⎨), \lbraceuend (⎧), \lbrack ([), \lbrackextender (⎢), \lbracklend (⎣), \lbracklltick (⦏), \lbrackubar (⦋), \lbrackuend (⎡), \lbrackultick (⦍), \lbrbrak (❲), \lceil (⌈), \lcurvyangle (⧼), \ldasharrhead (⇠), \le (≤), \leadsto (↝), \leftarrow (←), \leftarrowapprox (⭊), \leftarrowbackapprox (⭂), \leftarrowbsimilar (⭋), \leftarrowless (⥷), \leftarrowonoplus (⬲), \leftarrowplus (⥆), \leftarrowshortrightarrow (⥃), \leftarrowsimilar (⥳), \leftarrowsubset (⥺), \leftarrowtail (↢), \leftarrowtriangle (⇽), \leftarrowx (⬾), \leftbkarrow (⤌), \leftcurvedarrow (⬿), \leftdasharrow (⇠), \leftdasharrowhead (⇡), \leftdbkarrow (⤎), \leftdbltail (⤛), \leftdotarrow (⬸), \leftdowncurvedarrow (⤶), \leftfishtail (⥼), \leftharpoondown (↽), \leftharpoondownbar (⥞), \leftharpoonsupdown (⥢), \leftharpoonup (↼), \leftharpoonupbar (⥚), \leftharpoonupdash (⥪), \leftleftarrows (⇇), \leftmoon (☾), \leftouterjoin (⟕), \leftrightarrow (↔), \leftrightarrowcircle (⥈), \leftrightarrows (⇆), \leftrightarrowtriangle (⇿), \leftrightharpoondowndown (⥐), \leftrightharpoondownup (⥋), \leftrightharpoons (⇋), \leftrightharpoonsdown (⥧), \leftrightharpoonsup (⥦), \leftrightharpoonupdown (⥊), \leftrightharpoonupup (⥎), \leftrightsquigarrow (↭), \leftsquigarrow (↜), \leftsquigarrow (⇜), \lefttail (⤙), \leftthreearrows (⬱), \leftthreetimes (⋋), \leftwhitearrow (⇦), \leq (≤), \leqq (≦), \leqqslant (⫹), \leqqslant (⫺), \leqslant (⩽), \lescc (⪨), \lesdot (⩿), \lesdoto (⪁), \lesdotor (⪃), \lesges (⪓), \less (<), \lessapprox (⪅), \lessdot (⋖), \lesseqgtr (⋚), \lesseqqgtr (⪋), \lessgtr (≶), \lesssim (≲), \lfbowtie (⧑), \lfloor (⌊), \lftimes (⧔), \lgE (⪑), \lgblkcircle (⬤), \lgblksquare (⬛), \lgwhtcircle (◯), \lgwhtsquare (⬜), \lhd (⊲), \linefeed (↴), \ll (≪), \llangle (⦉), \llarc (◟), \llblacktriangle (◣), \llcorner (⌞), \lll (⋘), \lllnest (⫷), \llparenthesis (⦇), \lltriangle (◺), \lmoustache (⎰), \lnapprox (⪉), \lneq (⪇), \lneqq (≨), \lnsim (⋦), \longdashv (⟞), \longdivision (⟌), \longleftarrow (⟵), \longleftrightarrow (⟷), \longleftsquigarrow (⬳), \longmapsfrom (⟻), \longmapsto (⟼), \longrightarrow (⟶), \longrightsquigarrow (⟿), \looparrowleft (↫), \looparrowright (↬), \lowint (⨜), \lozenge (◊), \lozengeminus (⟠), \lparenextender (⎜), \lparenlend (⎝), \lparenless (⦓), \lparenuend (⎛), \lq (‘), \lrarc (◞), \lrblacktriangle (◢), \lrcorner (⌟), \lrtriangle (◿), \lrtriangleeq (⧡), \lsime (⪍), \lsimg (⪏), \lsqhook (⫍), \ltcc (⪦), \ltcir (⩹), \ltimes (⋉), \ltlarr (⥶), \ltquest (⩻), \ltrivb (⧏), \lvboxline (⎸), \lvzigzag (⧘).
-</p>
-<p>\male (♂), \maltese (✠), \mapsdown (↧), \mapsfrom (↤), \mapsto (↦), \mapsup (↥), \mdblkdiamond (⬥), \mdblklozenge (⬧), \mdblkrcl (⚫), \mdblksquare (◼), \mdlgblkcircle (●), \mdlgblkdiamond (◆), \mdlgblklozenge (⧫), \mdlgblksquare (■), \mdlgwhtcircle (○), \mdlgwhtdiamond (◇), \mdlgwhtsquare (□), \mdsmblkcircle (⦁), \mdsmblksquare (◾), \mdsmwhtcircl (⚬), \mdsmwhtsquare (◽), \mdwhtcircl (⚪), \mdwhtdiamond (⬦), \mdwhtlozenge (⬨), \mdwhtsquare (◻), \measangledltosw (⦯), \measangledrtose (⦮), \measangleldtosw (⦫), \measanglelutonw (⦩), \measanglerdtose (⦪), \measanglerutone (⦨), \measangleultonw (⦭), \measangleurtone (⦬), \measeq (≞), \measuredangle (∡), \measuredangleleft (⦛), \measuredrightangle (⊾), \medblackstar (⭑), \medmathspace ( ), \medwhitestar (⭐), \mercury (☿), \mho (℧), \mid (∣), \midbarvee (⩝), \midbarwedge (⩜), \midcir (⫰), \minus (−), \minusdot (⨪), \minusfdots (⨫), \minusrdots (⨬), \mlcp (⫛), \models (⊧), \mp (∓), \mu (μ), \multimap (⊸), \multimapinv (⟜).
-</p>
-<p>\nHdownarrow (⇟), \nHuparrow (⇞), \nLeftarrow (⇍), \nLeftrightarrow (⇎), \nRightarrow (⇏), \nVDash (⊯), \nVdash (⊮), \nVleftarrow (⇺), \nVleftarrowtail (⬺), \nVleftrightarrow (⇼), \nVrightarrow (⇻), \nVrightarrowtail (⤕), \nVtwoheadleftarrow (⬵), \nVtwoheadleftarrowtail (⬽), \nVtwoheadrightarrow (⤁), \nVtwoheadrightarrowtail (⤘), \nabla (∇), \napprox (≉), \nasymp (≭), \natural (♮), \ncong (≇), \ne (≠), \nearrow (↗), \neg (¬), \neovnwarrow (⤱), \neovsearrow (⤮), \neptune (♆), \neq (≠), \nequiv (≢), \neswarrow (⤢), \neuter (⚲), \nexists (∄), \ng (ŋ), \ngeq (≱), \ngtr (≯), \ngtrless (≹), \ngtrsim (≵), \nhVvert (⫵), \nhpar (⫲), \ni (∋), \niobar (⋾), \nis (⋼), \nisd (⋺), \nleftarrow (↚), \nleftrightarrow (↮), \nleq (≰), \nless (≮), \nlessgtr (≸), \nlesssim (≴), \nmid (∤), \nni (∌), \nobreakhyphen (‑), \notin (∉), \nparallel (∦), \npolint (⨔), \nprec (⊀), \npreccurlyeq (⋠), \nrightarrow (↛), \nsim (≁), \nsime (≄), \nsqsubseteq (⋢), \nsqsupseteq (⋣), \nsubset (⊄), \nsubseteq (⊈), \nsucc (⊁), \nsucccurlyeq (⋡), \nsupset (⊅), \nsupseteq (⊉), \ntriangleleft (⋪), \ntrianglelefteq (⋬), \ntriangleright (⋫), \ntrianglerighteq (⋭), \nu (ν), \nvDash (⊭), \nvLeftarrow (⤂), \nvLeftrightarrow (⤄), \nvRightarrow (⤃), \nvdash (⊬), \nvinfty (⧞), \nvleftarrow (⇷), \nvleftarrowtail (⬹), \nvleftrightarrow (⇹), \nvrightarrow (⇸), \nvrightarrowtail (⤔), \nvtwoheadleftarrow (⬴), \nvtwoheadleftarrowtail (⬼), \nvtwoheadrightarrow (⤀), \nvtwoheadrightarrowtail (⤗), \nwarrow (↖), \nwovnearrow (⤲), \nwsearrow (⤡).
-</p>
-<p>\o (ø), \obar (⌽), \obot (⦺), \obrbrak (⏠), \obslash (⦸), \odiv (⨸), \odot (⊙), \odotslashdot (⦼), \oe (œ), \ogreaterthan (⧁), \ohorn (ơ), \oiiint (∰), \oiint (∯), \oint (∮), \ointctrclockwise (∳), \olcross (⦻), \oldKoppa (Ϙ), \oldkoppa (ϙ), \olessthan (⧀), \omega (ω), \omicron (ο), \ominus (⊖), \operp (⦹), \oplus (⊕), \opluslhrim (⨭), \oplusrhrim (⨮), \origof (⊶), \oslash (⊘), \otimes (⊗), \otimeshat (⨶), \otimeslhrim (⨴), \otimesrhrim (⨵), \overbrace (⏞), \overbracket (⎴), \overline (‾), \overparen (⏜), \owns (∋).
-</p>
-<p>\parallel (∥), \parallelogram (▱), \parallelogramblack (▰), \parsim (⫳), \partial (∂), \partialmeetcontraction (⪣), \pentagon (⬠), \pentagonblack (⬟), \perp (⟂), \perps (⫡), \phi (ϕ), \phone (☎), \pi (π), \pitchfork (⋔), \plusdot (⨥), \pluseqq (⩲), \plushat (⨣), \plussim (⨦), \plussubtwo (⨧), \plustrif (⨨), \pluto (♇), \pm (±), \pointnt (⨕), \postalmark (〒), \prec (≺), \precapprox (⪷), \preccurlyeq (≼), \preceq (⪯), \preceqq (⪳), \precnapprox (⪹), \precneq (⪱), \precneqq (⪵), \precnsim (⋨), \precsim (≾), \prime (′), \prod (∏), \profalar (⌮), \profline (⌒), \profsurf (⌓), \propto (∝), \prurel (⊰), \psi (ψ), \pullback (⟓), \pushout (⟔).
-</p>
-<p>\qprime (⁗), \quarternote (♩), \questeq (≟), \quotdblbase („), \quotdblright (‟), \quotsinglbase (‚), \quotsinglright (‛).
-</p>
-<p>\rAngle (⟫), \rBrace (⦄), \rBrack (⟧), \rParen (⦆), \rangle (⟩), \rangledot (⦒), \rangledownzigzagarrow (⍼), \rasp (ʼ), \rbag (⟆), \rblkbrbrak (⦘), \rbrace (}), \rbracelend (⎭), \rbracemid (⎬), \rbraceuend (⎫), \rbrack (]), \rbrackextender (⎥), \rbracklend (⎦), \rbracklrtick (⦎), \rbrackubar (⦌), \rbrackuend (⎤), \rbrackurtick (⦐), \rbrbrak (❳), \rceil (⌉), \rcurvyangle (⧽), \rdiagovfdiag (⤫), \rdiagovsearrow (⤰), \recorder (⌕), \revangle (⦣), \revangleubar (⦥), \revemptyset (⦰), \revnmid (⫮), \rfbowtie (⧒), \rfloor (⌋), \rftimes (⧕), \rhd (⊳), \rho (ρ), \righarrowbsimilar (⭌), \rightangle (∟), \rightanglemdot (⦝), \rightanglesqr (⦜), \rightarrow (→), \rightarrowapprox (⥵), \rightarrowbackapprox (⭈), \rightarrowbar (⇥), \rightarrowdiamond (⤞), \rightarrowgtr (⭃), \rightarrowonoplus (⟴), \rightarrowplus (⥅), \rightarrowshortleftarrow (⥂), \rightarrowsimilar (⥴), \rightarrowsupset (⭄), \rightarrowtail (↣), \rightarrowtriangle (⇾), \rightarrowx (⥇), \rightbkarrow (⤍), \rightcurvedarrow (⤳), \rightdasharrow (⇢), \rightdbltail (⤜), \rightdotarrow (⤑), \rightdowncurvedarrow (⤷), \rightfishtail (⥽), \rightharpoondown (⇁), \rightharpoondownbar (⥗), \rightharpoonsupdown (⥤), \rightharpoonup (⇀), \rightharpoonupbar (⥓), \rightharpoonupdash (⥬), \rightimply (⥰), \rightleftarrows (⇄), \rightleftharpoons (⇌), \rightleftharpoonsdown (⥩), \rightleftharpoonsup (⥨), \rightmoon (☽), \rightouterjoin (⟖), \rightpentagon (⭔), \rightpentagonblack (⭓), \rightrightarrows (⇉), \rightsquigarrow (↝), \rightsquigarrow (⇝), \righttail (⤚), \rightthreearrows (⇶), \rightthreetimes (⋌), \rightwhitearrow (⇨), \ringplus (⨢), \risingdotseq (≓), \rmoustache (⎱), \rparenextender (⎟), \rparengtr (⦔), \rparenlend (⎠), \rparenuend (⎞), \rppolint (⨒), \rq (’), \rrangle (⦊), \rrparenthesis (⦈), \rsolbar (⧷), \rsqhook (⫎), \rsub (⩥), \rtimes (⋊), \rtriltri (⧎), \ruledelayed (⧴), \rvboxline (⎹), \rvzigzag (⧙).
-</p>
-<p>\sampi (ϡ), \sansLmirrored (⅃), \sansLturned (⅂), \saturn (♄), \scissors (✂), \scpolint (⨓), \scrB (ℬ), \scrE (ℰ), \scrF (ℱ), \scrH (ℋ), \scrI (ℐ), \scrL (ℒ), \scrM (ℳ), \scrR (ℛ), \scre (ℯ), \scrg (ℊ), \scro (ℴ), \scurel (⊱), \searrow (↘), \seovnearrow (⤭), \setminus (∖), \setminus (⧵), \sharp (♯), \shortdowntack (⫟), \shortleftarrow (←), \shortlefttack (⫞), \shortrightarrow (→), \shortrightarrowleftarrow (⥄), \shortuptack (⫠), \shuffle (⧢), \sigma (σ), \silon (υ), \silon (ϒ), \sim (∼), \simeq (≃), \simgE (⪠), \simgtr (⪞), \similarleftarrow (⭉), \similarrightarrow (⥲), \simlE (⪟), \simless (⪝), \simminussim (⩬), \simneqq (≆), \simplus (⨤), \simrdots (⩫), \sinewave (∿), \slash (∕), \smallblacktriangleleft (◂), \smallblacktriangleright (▸), \smalldiamond (⋄), \smallin (∊), \smallint (∫), \smallni (∍), \smallsetminus (∖), \smalltriangleleft (◃), \smalltriangleright (▹), \smashtimes (⨳), \smblkdiamond (⬩), \smblklozenge (⬪), \smblksquare (▪), \smeparsl (⧤), \smile (⌣), \smiley (☺), \smt (⪪), \smte (⪬), \smwhitestar (⭒), \smwhtcircle (◦), \smwhtlozenge (⬫), \smwhtsquare (▫), \spadesuit (♠), \sphericalangle (∢), \sphericalangleup (⦡), \sqcap (⊓), \sqcup (⊔), \sqint (⨖), \sqlozenge (⌑), \sqrt (√), \sqrt3 (∛), \sqrt4 (∜), \sqrtbottom (⎷), \sqsubset (⊏), \sqsubseteq (⊑), \sqsubsetneq (⋤), \sqsupset (⊐), \sqsupseteq (⊒), \sqsupsetneq (⋥), \squarecrossfill (▩), \squaregrayfill (▩), \squarehfill (▤), \squarehvfill (▦), \squareleftblack (◧), \squareleftblack (◨), \squarellblack (⬕), \squarellquad (◱), \squarelrblack (◪), \squarelrquad (◲), \squareneswfill (▨), \squarenwsefill (▧), \squareulblack (◩), \squareulquad (◰), \squareurblack (⬔), \squareurquad (◳), \squarevfill (▥), \squoval (▢), \ss (ß), \star (⋆), \stareq (≛), \sterling (£), \stigma (ϛ), \strns (⏤), \subedot (⫃), \submult (⫁), \subrarr (⥹), \subset (⊂), \subsetapprox (⫉), \subsetcirc (⟃), \subsetdot (⪽), \subseteq (⊆), \subseteqq (⫅), \subsetneq (⊊), \subsetneqq (⫋), \subsetplus (⪿), \subsim (⫇), \subsub (⫕), \subsup (⫓), \succ (≻), \succapprox (⪸), \succcurlyeq (≽), \succeq (⪰), \succeqq (⪴), \succnapprox (⪺), \succneq (⪲), \succneqq (⪶), \succnsim (⋩), \succsim (≿), \sum (∑), \sumbottom (⎳), \sumint (⨋), \sumtop (⎲), \sun (☼), \supdsub (⫘), \supedot (⫄), \suphsol (⟉), \suphsub (⫗), \suplarr (⥻), \supmult (⫂), \supn (ⁿ), \supset (⊃), \supsetapprox (⫊), \supsetcirc (⟄), \supsetdot (⪾), \supseteq (⊇), \supseteqq (⫆), \supsetneq (⊋), \supsetneqq (⫌), \supsetplus (⫀), \supsim (⫈), \supsub (⫔), \supsup (⫖), \surd (√), \swarrow (↙).
-</p>
-<p>\talloblong (⫾), \target (⌖), \tau (τ), \taurus (♉), \testhookx (ᶍ), \textAsterisks (⁑), \textacute (ˊ), \textadvanced (˖), \textain (ʿ), \textasciiacute (´), \textasciicircum (^), \textasciidieresis (¨), \textasciigrave (‘), \textasciimacron (¯), \textasciitilde (~), \textasterisklow (⁎), \textbackdprime (‶), \textbackprime (‵), \textbacktrprime (‷), \textbardotlessj (ɟ), \textbardotlessjvar (ʄ), \textbarglotstop (ʡ), \textbari (ɨ), \textbarl (ƚ), \textbaro (ɵ), \textbarrevglotstop (ʢ), \textbaru (ʉ), \textbeltl (ɬ), \textbenttailyogh (ƺ), \textbreve (˘), \textbrokenbar (¦), \textbullet (•), \textbullseye (ʘ), \textcent (¢), \textcircledP (℗), \textcloseepsilon (ʚ), \textcloseomega (ɷ), \textcloserevepsilon (ɞ), \textcopyright (©), \textcrb (ƀ), \textcrh (ħ), \textcrinvglotstop (ƾ), \textcrlambda (ƛ), \textcrtwo (ƻ), \textctc (ɕ), \textctd (ȡ), \textctesh (ʆ), \textctj (ʝ), \textctl (ȴ), \textctn (ȵ), \textctt (ȶ), \textctyogh (ʓ), \textctz (ʑ), \textcurrency (¤), \textdctzlig (ʥ), \textdegree (°), \textdiscount (⁒), \textdollar ($), \textdotaccent (˙), \textdotlessj (ȷ), \textdoubleacute (˝), \textdoublebarpipe (ǂ), \textdoublepipe (ǁ), \textdprime (″), \textdptr (˅), \textdyoghlig (ʤ), \textdzlig (ʣ), \textepsilon (ɛ), \textesh (ʃ), \textestimated (℮), \textexclam (ǃ), \textexclamdown (¡), \textfishhookr (ɾ), \textflorin (ƒ), \textfranc (₣), \textgamma (ɣ), \textglotstop (ʔ), \textgrave (ˋ), \texthalflength (ˑ), \texthamza (ʾ), \texthen (ꜧ), \textheng (ꜧ), \texthooks (ᶊ), \texthookz (ᶎ), \texthtb (ɓ), \texthtc (ƈ), \texthtd (ɗ), \texthtg (ɠ), \texthth (ɦ), \texththeng (ɧ), \texthtk (ƙ), \texthtp (ƥ), \texthtq (ʠ), \texthtscg (ʛ), \texthtt (ƭ), \texthvlig (ƕ), \texthyphen (‐), \textinvglotstop (ʖ), \textinvscr (ʁ), \textiota (ɩ), \textlengthmark (ː), \textlhalfring (˓), \textlhookd (ᶁ), \textlhookk (ᶄ), \textlhookl (ᶅ), \textlhookt (ƫ), \textlhti (ɿ), \textlira (₤), \textlonglegr (ɼ), \textlongy (ʮ), \textlongy (ʯ), \textlooptoprevesh (ƪ), \textlowacute (ˏ), \textlowered (˕), \textlowgrave (ˎ), \textlowmacron (ˍ), \textlptr (˂), \textltailm (ɱ), \textltailn (ɲ), \textltilde (ɫ), \textlyoghlig (ɮ), \textmacron (ˉ), \textmu (µ), \textnumero (№), \textogonek (˛), \textohm (Ω), \textonehalf (½), \textonequarter (¼), \textonesuperior (¹), \textopeno (ɔ), \textordfeminine (ª), \textordmasculine (º), \textovercross (˟), \textoz (℥), \textpertenthousand (‱), \textperthousand (‰), \textpesetas (₧), \textphi (ɸ), \textpipe (ǀ), \textprime (′), \textprimstress (ˈ), \textqprime (⁗), \textquestiondown (¿), \textquotedbl ("), \textquotedblleft (“), \textquotedblright (”), \textraised (˔), \textraiseglotstop (ˀ), \textraiserevglotstop (ˁ), \textramshorns (ɤ), \textrecipe (℞), \textreferencemark (※), \textregistered (®), \textretracted (˗), \textreve (ɘ), \textrevepsilon (ɜ), \textrevglotstop (ʕ), \textrhalfring (˒), \textrhookrevepsilon (ɝ), \textrhookschwa (ɚ), \textrhoticity (˞), \textringaccent (˚), \textrptr (˃), \textrtaild (ɖ), \textrtaill (ɭ), \textrtailn (ɳ), \textrtailr (ɽ), \textrtails (ʂ), \textrtailt (ʈ), \textrtailz (ʐ), \textsca (ᴀ), \textscb (ʙ), \textsce (ᴇ), \textscg (ɢ), \textsch (ʜ), \textschwa (ə), \textsci (ɪ), \textscl (ʟ), \textscn (ɴ), \textscoelig (ɶ), \textscr (ʀ), \textscripta (ɑ), \textscriptg (ɡ), \textscriptv (ʋ), \textscu (ᴜ), \textscy (ʏ), \textsecstress (ˌ), \textsemicolonreversed (⁏), \textsilon (Υ), \textsmalltilde (˜), \textstretchcvar (ʗ), \textsubw (w), \textsuph (ʰ), \textsuphth (ʱ), \textsupinvscr (ʶ), \textsupj (ʲ), \textsupr (ʳ), \textsupturnr (ʴ), \textsupturnrrtail (ʵ), \textsupw (ʷ), \textsupy (ʸ), \texttctctlig (ʧ), \texttctctlig (ʨ), \textthreequarters (¾), \textthreesuperior (³), \texttrademark (™), \texttrprime (‴), \texttslig (ʦ), \textturna (ɐ), \textturncomma (ʻ), \textturnh (ɥ), \textturnk (ʞ), \textturnlonglegr (ɺ), \textturnm (ɯ), \textturnmrleg (ɰ), \textturnr (ɹ), \textturnrrtail (ɻ), \textturnscripta (ɒ), \textturnt (ʇ), \textturnv (ʌ), \textturnw (ʍ), \textturny (ʎ), \texttwosuperior (²), \textupsilon (ʊ), \textuptr (˄), \textvibyi (ʅ), \textvisiblespace (␣), \textyogh (ʒ), \th (þ), \therefore (∴), \thermod (⧧), \theta (θ), \thickapprox (≈), \thicksim (∼), \threedangle (⟀), \threedotcolon (⫶), \tieconcat (⁀), \tieinfty (⧝), \times (×), \timesbar (⨱), \tminus (⧿), \to (→), \toea (⤨), \tona (⤧), \tonebarextrahigh (˥), \tonebarextralow (˩), \tonebarhigh (˦), \tonebarlow (˨), \tonebarmid (˧), \top (⊤), \topbot (⌶), \topcir (⫱), \topfork (⫚), \topsemicircle (◠), \tosa (⤩), \towa (⤪), \tplus (⧾), \trapezium (⏢), \trianglecdot (◬), \triangledown (▿), \triangleexclam (⚠), \triangleleft (◁), \triangleleftblack (◭), \trianglelefteq (⊴), \triangleminus (⨺), \triangleodot (⧊), \triangleplus (⨹), \triangleq (≜), \triangleright (▷), \trianglerightblack (◮), \trianglerighteq (⊵), \triangles (⧌), \triangleserifs (⧍), \triangletimes (⨻), \triangleubar (⧋), \tripleplus (⧻), \trprime (‴), \turnangle (⦢), \turnediota (℩), \turnednot (⌙), \twocaps (⩋), \twocups (⩊), \twoheaddownarrow (↡), \twoheadleftarrow (↞), \twoheadleftarrowtail (⬻), \twoheadleftdbkarrow (⬷), \twoheadmapsfrom (⬶), \twoheadmapsto (⤅), \twoheadrightarrow (↠), \twoheadrightarrowtail (⤖), \twoheaduparrow (↟), \twoheaduparrowcircle (⥉), \twolowline (‗), \twonotes (♫), \typecolon (⦂).
-</p>
-<p>\ubrbrak (⏡), \uhorn (ư), \ularc (◜), \ulblacktriangle (◤), \ulcorner (⌜), \ulcrop (⌏), \ultriangle (◸), \uminus (⩁), \underbrace (⏟), \underbracket (⎵), \underparen (⏝), \unlhd (⊴), \unrhd (⊵), \upand (⅋), \uparrow (↑), \uparrowbarred (⤉), \uparrowoncircle (⦽), \updasharrow (⇢), \updownarrow (↕), \updownarrowbar (↨), \updownarrows (⇅), \updownharpoonleftleft (⥑), \updownharpoonleftright (⥍), \updownharpoonrightleft (⥌), \updownharpoonrightright (⥏), \updownharpoonsleftright (⥮), \upfishtail (⥾), \upharpoonleft (↿), \upharpoonleftbar (⥠), \upharpoonright (↾), \upharpoonrightbar (⥜), \upharpoonsleftright (⥣), \upin (⟒), \upint (⨛), \uplus (⊎), \uprightcurvearrow (⤴), \upuparrows (⇈), \upwhitearrow (⇧), \urarc (◝), \urblacktriangle (◥), \urcorner (⌝), \urcrop (⌎), \urtriangle (◹).
-</p>
-<p>\v (ˇ), \vBar (⫨), \vBarv (⫩), \vDash (⊨), \vDdash (⫢), \varTheta (ϴ), \varVdash (⫦), \varbarwedge (⌅), \varbeta (ϐ), \varclubsuit (♧), \vardiamondsuit (♦), \vardoublebarwedge (⌆), \varepsilon (ε), \varheartsuit (♥), \varhexagon (⬡), \varhexagonblack (⬢), \varhexagonlrbonds (⌬), \varin (∈), \varisinobar (⋶), \varisins (⋳), \varkappa (ϰ), \varlrtriangle (⊿), \varni (∋), \varniobar (⋽), \varnis (⋻), \varnothing (∅), \varointclockwise (∲), \varphi (φ), \varpi (ϖ), \varpropto (∝), \varrho (ϱ), \varrowextender (⏐), \varsigma (ς), \varspadesuit (♤), \varstar (✶), \vartheta (ϑ), \vartriangle (▵), \vartriangleleft (⊲), \vartriangleright (⊳), \varveebar (⩡), \vbraceextender (⎪), \vbrtri (⧐), \vdash (⊢), \vdots (⋮), \vectimes (⨯), \vee (∨), \veebar (⊻), \veedot (⟇), \veedoublebar (⩣), \veeeq (≚), \veemidvert (⩛), \veeodot (⩒), \veeonvee (⩖), \veeonwedge (⩙), \vert (|), \viewdata (⌗), \vlongdash (⟝), \vrectangle (▯), \vrectangleblack (▮), \vysmlblksquare (⬝), \vysmlwhtsquare (⬞), \vzigzag (⦚).
-</p>
-<p>\watchicon (⌚), \wedge (∧), \wedgebar (⩟), \wedgedot (⟑), \wedgedoublebar (⩠), \wedgemidvert (⩚), \wedgeodot (⩑), \wedgeonwedge (⩕), \wedgeq (≙), \whitearrowupfrombar (⇪), \whiteinwhitetriangle (⟁), \whitepointerleft (◅), \whitepointerright (▻), \whitesquaretickleft (⟤), \whitesquaretickright (⟥), \whthorzoval (⬭), \whtvertoval (⬯), \wideangledown (⦦), \wideangleup (⦧), \wp (℘), \wr (≀).
-</p>
-<p>\xbsol (⧹), \xi (ξ), \xsol (⧸), \yen (¥), \zeta (ζ), \zpipe (⨠),
-</p>
-<p>IF ANYBODY WILL CHECK WHETHER ALL NAMES CORRESPOND TO RIGHT TEX SYMBOLS I SHALL APPRECIATE IT GREATLY.
-</p>
-<hr>
-<a name="Copying-This-Manual"></a>
-<div class="header">
-<p>
-Next: <a href="#Index" accesskey="n" rel="next">Index</a>, Previous: <a href="#TeX_002dlike-symbols" accesskey="p" rel="prev">TeX-like symbols</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="GNU-Free-Documentation-License"></a>
-<h2 class="appendix">Appendix E GNU Free Documentation License</h2>
-<div align="center">Version 1.2, November 2002
-</div>
-
-<div class="display">
-<pre class="display">Copyright © 2000,2001,2002 Free Software Foundation, Inc.
-51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-</pre></div>
-
-<ol start="0">
-<li> PREAMBLE
-
-<p>The purpose of this License is to make a manual, textbook, or other
-functional and useful document <em>free</em> in the sense of freedom: to
-assure everyone the effective freedom to copy and redistribute it,
-with or without modifying it, either commercially or noncommercially.
-Secondarily, this License preserves for the author and publisher a way
-to get credit for their work, while not being considered responsible
-for modifications made by others.
-</p>
-<p>This License is a kind of “copyleft”, which means that derivative
-works of the document must themselves be free in the same sense. It
-complements the GNU General Public License, which is a copyleft
-license designed for free software.
-</p>
-<p>We have designed this License in order to use it for manuals for free
-software, because free software needs free documentation: a free
-program should come with manuals providing the same freedoms that the
-software does. But this License is not limited to software manuals;
-it can be used for any textual work, regardless of subject matter or
-whether it is published as a printed book. We recommend this License
-principally for works whose purpose is instruction or reference.
-</p>
-</li><li> APPLICABILITY AND DEFINITIONS
-
-<p>This License applies to any manual or other work, in any medium, that
-contains a notice placed by the copyright holder saying it can be
-distributed under the terms of this License. Such a notice grants a
-world-wide, royalty-free license, unlimited in duration, to use that
-work under the conditions stated herein. The “Document”, below,
-refers to any such manual or work. Any member of the public is a
-licensee, and is addressed as “you”. You accept the license if you
-copy, modify or distribute the work in a way requiring permission
-under copyright law.
-</p>
-<p>A “Modified Version” of the Document means any work containing the
-Document or a portion of it, either copied verbatim, or with
-modifications and/or translated into another language.
-</p>
-<p>A “Secondary Section” is a named appendix or a front-matter section
-of the Document that deals exclusively with the relationship of the
-publishers or authors of the Document to the Document’s overall
-subject (or to related matters) and contains nothing that could fall
-directly within that overall subject. (Thus, if the Document is in
-part a textbook of mathematics, a Secondary Section may not explain
-any mathematics.) The relationship could be a matter of historical
-connection with the subject or with related matters, or of legal,
-commercial, philosophical, ethical or political position regarding
-them.
-</p>
-<p>The “Invariant Sections” are certain Secondary Sections whose titles
-are designated, as being those of Invariant Sections, in the notice
-that says that the Document is released under this License. If a
-section does not fit the above definition of Secondary then it is not
-allowed to be designated as Invariant. The Document may contain zero
-Invariant Sections. If the Document does not identify any Invariant
-Sections then there are none.
-</p>
-<p>The “Cover Texts” are certain short passages of text that are listed,
-as Front-Cover Texts or Back-Cover Texts, in the notice that says that
-the Document is released under this License. A Front-Cover Text may
-be at most 5 words, and a Back-Cover Text may be at most 25 words.
-</p>
-<p>A “Transparent” copy of the Document means a machine-readable copy,
-represented in a format whose specification is available to the
-general public, that is suitable for revising the document
-straightforwardly with generic text editors or (for images composed of
-pixels) generic paint programs or (for drawings) some widely available
-drawing editor, and that is suitable for input to text formatters or
-for automatic translation to a variety of formats suitable for input
-to text formatters. A copy made in an otherwise Transparent file
-format whose markup, or absence of markup, has been arranged to thwart
-or discourage subsequent modification by readers is not Transparent.
-An image format is not Transparent if used for any substantial amount
-of text. A copy that is not “Transparent” is called “Opaque”.
-</p>
-<p>Examples of suitable formats for Transparent copies include plain
-<small>ASCII</small> without markup, Texinfo input format, LaTeX input
-format, <acronym>SGML</acronym> or <acronym>XML</acronym> using a publicly available
-<acronym>DTD</acronym>, and standard-conforming simple <acronym>HTML</acronym>,
-PostScript or <acronym>PDF</acronym> designed for human modification. Examples
-of transparent image formats include <acronym>PNG</acronym>, <acronym>XCF</acronym> and
-<acronym>JPG</acronym>. Opaque formats include proprietary formats that can be
-read and edited only by proprietary word processors, <acronym>SGML</acronym> or
-<acronym>XML</acronym> for which the <acronym>DTD</acronym> and/or processing tools are
-not generally available, and the machine-generated <acronym>HTML</acronym>,
-PostScript or <acronym>PDF</acronym> produced by some word processors for
-output purposes only.
-</p>
-<p>The “Title Page” means, for a printed book, the title page itself,
-plus such following pages as are needed to hold, legibly, the material
-this License requires to appear in the title page. For works in
-formats which do not have any title page as such, “Title Page” means
-the text near the most prominent appearance of the work’s title,
-preceding the beginning of the body of the text.
-</p>
-<p>A section “Entitled XYZ” means a named subunit of the Document whose
-title either is precisely XYZ or contains XYZ in parentheses following
-text that translates XYZ in another language. (Here XYZ stands for a
-specific section name mentioned below, such as “Acknowledgements”,
-“Dedications”, “Endorsements”, or “History”.) To “Preserve the Title”
-of such a section when you modify the Document means that it remains a
-section “Entitled XYZ” according to this definition.
-</p>
-<p>The Document may include Warranty Disclaimers next to the notice which
-states that this License applies to the Document. These Warranty
-Disclaimers are considered to be included by reference in this
-License, but only as regards disclaiming warranties: any other
-implication that these Warranty Disclaimers may have is void and has
-no effect on the meaning of this License.
-</p>
-</li><li> VERBATIM COPYING
-
-<p>You may copy and distribute the Document in any medium, either
-commercially or noncommercially, provided that this License, the
-copyright notices, and the license notice saying this License applies
-to the Document are reproduced in all copies, and that you add no other
-conditions whatsoever to those of this License. You may not use
-technical measures to obstruct or control the reading or further
-copying of the copies you make or distribute. However, you may accept
-compensation in exchange for copies. If you distribute a large enough
-number of copies you must also follow the conditions in section 3.
-</p>
-<p>You may also lend copies, under the same conditions stated above, and
-you may publicly display copies.
-</p>
-</li><li> COPYING IN QUANTITY
-
-<p>If you publish printed copies (or copies in media that commonly have
-printed covers) of the Document, numbering more than 100, and the
-Document’s license notice requires Cover Texts, you must enclose the
-copies in covers that carry, clearly and legibly, all these Cover
-Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
-the back cover. Both covers must also clearly and legibly identify
-you as the publisher of these copies. The front cover must present
-the full title with all words of the title equally prominent and
-visible. You may add other material on the covers in addition.
-Copying with changes limited to the covers, as long as they preserve
-the title of the Document and satisfy these conditions, can be treated
-as verbatim copying in other respects.
-</p>
-<p>If the required texts for either cover are too voluminous to fit
-legibly, you should put the first ones listed (as many as fit
-reasonably) on the actual cover, and continue the rest onto adjacent
-pages.
-</p>
-<p>If you publish or distribute Opaque copies of the Document numbering
-more than 100, you must either include a machine-readable Transparent
-copy along with each Opaque copy, or state in or with each Opaque copy
-a computer-network location from which the general network-using
-public has access to download using public-standard network protocols
-a complete Transparent copy of the Document, free of added material.
-If you use the latter option, you must take reasonably prudent steps,
-when you begin distribution of Opaque copies in quantity, to ensure
-that this Transparent copy will remain thus accessible at the stated
-location until at least one year after the last time you distribute an
-Opaque copy (directly or through your agents or retailers) of that
-edition to the public.
-</p>
-<p>It is requested, but not required, that you contact the authors of the
-Document well before redistributing any large number of copies, to give
-them a chance to provide you with an updated version of the Document.
-</p>
-</li><li> MODIFICATIONS
-
-<p>You may copy and distribute a Modified Version of the Document under
-the conditions of sections 2 and 3 above, provided that you release
-the Modified Version under precisely this License, with the Modified
-Version filling the role of the Document, thus licensing distribution
-and modification of the Modified Version to whoever possesses a copy
-of it. In addition, you must do these things in the Modified Version:
-</p>
-<ol type="A" start="1">
-<li> Use in the Title Page (and on the covers, if any) a title distinct
-from that of the Document, and from those of previous versions
-(which should, if there were any, be listed in the History section
-of the Document). You may use the same title as a previous version
-if the original publisher of that version gives permission.
-
-</li><li> List on the Title Page, as authors, one or more persons or entities
-responsible for authorship of the modifications in the Modified
-Version, together with at least five of the principal authors of the
-Document (all of its principal authors, if it has fewer than five),
-unless they release you from this requirement.
-
-</li><li> State on the Title page the name of the publisher of the
-Modified Version, as the publisher.
-
-</li><li> Preserve all the copyright notices of the Document.
-
-</li><li> Add an appropriate copyright notice for your modifications
-adjacent to the other copyright notices.
-
-</li><li> Include, immediately after the copyright notices, a license notice
-giving the public permission to use the Modified Version under the
-terms of this License, in the form shown in the Addendum below.
-
-</li><li> Preserve in that license notice the full lists of Invariant Sections
-and required Cover Texts given in the Document’s license notice.
-
-</li><li> Include an unaltered copy of this License.
-
-</li><li> Preserve the section Entitled “History”, Preserve its Title, and add
-to it an item stating at least the title, year, new authors, and
-publisher of the Modified Version as given on the Title Page. If
-there is no section Entitled “History” in the Document, create one
-stating the title, year, authors, and publisher of the Document as
-given on its Title Page, then add an item describing the Modified
-Version as stated in the previous sentence.
-
-</li><li> Preserve the network location, if any, given in the Document for
-public access to a Transparent copy of the Document, and likewise
-the network locations given in the Document for previous versions
-it was based on. These may be placed in the “History” section.
-You may omit a network location for a work that was published at
-least four years before the Document itself, or if the original
-publisher of the version it refers to gives permission.
-
-</li><li> For any section Entitled “Acknowledgements” or “Dedications”, Preserve
-the Title of the section, and preserve in the section all the
-substance and tone of each of the contributor acknowledgements and/or
-dedications given therein.
-
-</li><li> Preserve all the Invariant Sections of the Document,
-unaltered in their text and in their titles. Section numbers
-or the equivalent are not considered part of the section titles.
-
-</li><li> Delete any section Entitled “Endorsements”. Such a section
-may not be included in the Modified Version.
-
-</li><li> Do not retitle any existing section to be Entitled “Endorsements” or
-to conflict in title with any Invariant Section.
-
-</li><li> Preserve any Warranty Disclaimers.
-</li></ol>
-
-<p>If the Modified Version includes new front-matter sections or
-appendices that qualify as Secondary Sections and contain no material
-copied from the Document, you may at your option designate some or all
-of these sections as invariant. To do this, add their titles to the
-list of Invariant Sections in the Modified Version’s license notice.
-These titles must be distinct from any other section titles.
-</p>
-<p>You may add a section Entitled “Endorsements”, provided it contains
-nothing but endorsements of your Modified Version by various
-parties—for example, statements of peer review or that the text has
-been approved by an organization as the authoritative definition of a
-standard.
-</p>
-<p>You may add a passage of up to five words as a Front-Cover Text, and a
-passage of up to 25 words as a Back-Cover Text, to the end of the list
-of Cover Texts in the Modified Version. Only one passage of
-Front-Cover Text and one of Back-Cover Text may be added by (or
-through arrangements made by) any one entity. If the Document already
-includes a cover text for the same cover, previously added by you or
-by arrangement made by the same entity you are acting on behalf of,
-you may not add another; but you may replace the old one, on explicit
-permission from the previous publisher that added the old one.
-</p>
-<p>The author(s) and publisher(s) of the Document do not by this License
-give permission to use their names for publicity for or to assert or
-imply endorsement of any Modified Version.
-</p>
-</li><li> COMBINING DOCUMENTS
-
-<p>You may combine the Document with other documents released under this
-License, under the terms defined in section 4 above for modified
-versions, provided that you include in the combination all of the
-Invariant Sections of all of the original documents, unmodified, and
-list them all as Invariant Sections of your combined work in its
-license notice, and that you preserve all their Warranty Disclaimers.
-</p>
-<p>The combined work need only contain one copy of this License, and
-multiple identical Invariant Sections may be replaced with a single
-copy. If there are multiple Invariant Sections with the same name but
-different contents, make the title of each such section unique by
-adding at the end of it, in parentheses, the name of the original
-author or publisher of that section if known, or else a unique number.
-Make the same adjustment to the section titles in the list of
-Invariant Sections in the license notice of the combined work.
-</p>
-<p>In the combination, you must combine any sections Entitled “History”
-in the various original documents, forming one section Entitled
-“History”; likewise combine any sections Entitled “Acknowledgements”,
-and any sections Entitled “Dedications”. You must delete all
-sections Entitled “Endorsements.”
-</p>
-</li><li> COLLECTIONS OF DOCUMENTS
-
-<p>You may make a collection consisting of the Document and other documents
-released under this License, and replace the individual copies of this
-License in the various documents with a single copy that is included in
-the collection, provided that you follow the rules of this License for
-verbatim copying of each of the documents in all other respects.
-</p>
-<p>You may extract a single document from such a collection, and distribute
-it individually under this License, provided you insert a copy of this
-License into the extracted document, and follow this License in all
-other respects regarding verbatim copying of that document.
-</p>
-</li><li> AGGREGATION WITH INDEPENDENT WORKS
-
-<p>A compilation of the Document or its derivatives with other separate
-and independent documents or works, in or on a volume of a storage or
-distribution medium, is called an “aggregate” if the copyright
-resulting from the compilation is not used to limit the legal rights
-of the compilation’s users beyond what the individual works permit.
-When the Document is included in an aggregate, this License does not
-apply to the other works in the aggregate which are not themselves
-derivative works of the Document.
-</p>
-<p>If the Cover Text requirement of section 3 is applicable to these
-copies of the Document, then if the Document is less than one half of
-the entire aggregate, the Document’s Cover Texts may be placed on
-covers that bracket the Document within the aggregate, or the
-electronic equivalent of covers if the Document is in electronic form.
-Otherwise they must appear on printed covers that bracket the whole
-aggregate.
-</p>
-</li><li> TRANSLATION
-
-<p>Translation is considered a kind of modification, so you may
-distribute translations of the Document under the terms of section 4.
-Replacing Invariant Sections with translations requires special
-permission from their copyright holders, but you may include
-translations of some or all Invariant Sections in addition to the
-original versions of these Invariant Sections. You may include a
-translation of this License, and all the license notices in the
-Document, and any Warranty Disclaimers, provided that you also include
-the original English version of this License and the original versions
-of those notices and disclaimers. In case of a disagreement between
-the translation and the original version of this License or a notice
-or disclaimer, the original version will prevail.
-</p>
-<p>If a section in the Document is Entitled “Acknowledgements”,
-“Dedications”, or “History”, the requirement (section 4) to Preserve
-its Title (section 1) will typically require changing the actual
-title.
-</p>
-</li><li> TERMINATION
-
-<p>You may not copy, modify, sublicense, or distribute the Document except
-as expressly provided for under this License. Any other attempt to
-copy, modify, sublicense or distribute the Document is void, and will
-automatically terminate your rights under this License. However,
-parties who have received copies, or rights, from you under this
-License will not have their licenses terminated so long as such
-parties remain in full compliance.
-</p>
-</li><li> FUTURE REVISIONS OF THIS LICENSE
-
-<p>The Free Software Foundation may publish new, revised versions
-of the GNU Free Documentation License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns. See
-<a href="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</a>.
-</p>
-<p>Each version of the License is given a distinguishing version number.
-If the Document specifies that a particular numbered version of this
-License “or any later version” applies to it, you have the option of
-following the terms and conditions either of that specified version or
-of any later version that has been published (not as a draft) by the
-Free Software Foundation. If the Document does not specify a version
-number of this License, you may choose any version ever published (not
-as a draft) by the Free Software Foundation.
-</p></li></ol>
-
-<a name="ADDENDUM_003a-How-to-use-this-License-for-your-documents"></a>
-<h3 class="heading">ADDENDUM: How to use this License for your documents</h3>
-
-<p>To use this License in a document you have written, include a copy of
-the License in the document and put the following copyright and
-license notices just after the title page:
-</p>
-<div class="smallexample">
-<pre class="smallexample"> Copyright (C) <var>year</var> <var>your name</var>.
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.2
- or any later version published by the Free Software Foundation;
- with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
- Texts. A copy of the license is included in the section entitled ``GNU
- Free Documentation License''.
-</pre></div>
-
-<p>If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
-replace the “with…Texts.” line with this:
-</p>
-<div class="smallexample">
-<pre class="smallexample"> with the Invariant Sections being <var>list their titles</var>, with
- the Front-Cover Texts being <var>list</var>, and with the Back-Cover Texts
- being <var>list</var>.
-</pre></div>
-
-<p>If you have Invariant Sections without Cover Texts, or some other
-combination of the three, merge those two alternatives to suit the
-situation.
-</p>
-<p>If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License,
-to permit their use in free software.
-</p>
-
-
-<hr>
-<a name="Index"></a>
-<div class="header">
-<p>
-Previous: <a href="#Copying-This-Manual" accesskey="p" rel="prev">Copying This Manual</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Index-1"></a>
-<h2 class="unnumbered">Index</h2>
-
-<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Index_cp_letter-A"><b>A</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-B"><b>B</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-C"><b>C</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-D"><b>D</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-E"><b>E</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-F"><b>F</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-G"><b>G</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-H"><b>H</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-I"><b>I</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-J"><b>J</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-L"><b>L</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-M"><b>M</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-N"><b>N</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-O"><b>O</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-P"><b>P</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Q"><b>Q</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-R"><b>R</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-S"><b>S</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-T"><b>T</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-V"><b>V</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-W"><b>W</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-X"><b>X</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Y"><b>Y</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Z"><b>Z</b></a>
-
-</td></tr></table>
-<table class="index-cp" border="0">
-<tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-A">A</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-AddLegend">AddLegend</a>:</td><td> </td><td valign="top"><a href="#Legend">Legend</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-AddLight">AddLight</a>:</td><td> </td><td valign="top"><a href="#Lighting">Lighting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-AddTick">AddTick</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Adjust">Adjust</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-alpha">alpha</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Alpha">Alpha</a>:</td><td> </td><td valign="top"><a href="#Transparency">Transparency</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-alphadef">alphadef</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-AlphaDef">AlphaDef</a>:</td><td> </td><td valign="top"><a href="#Transparency">Transparency</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Ambient">Ambient</a>:</td><td> </td><td valign="top"><a href="#Lighting">Lighting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Area">Area</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Arrows">Arrows</a>:</td><td> </td><td valign="top"><a href="#Line-styles">Line styles</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ArrowSize">ArrowSize</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ask">ask</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Aspect">Aspect</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-AutoCorrel">AutoCorrel</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Axial">Axial</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Axis">Axis</a>:</td><td> </td><td valign="top"><a href="#Curved-coordinates">Curved coordinates</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Axis-1">Axis</a>:</td><td> </td><td valign="top"><a href="#Axis-and-Colorbar">Axis and Colorbar</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-AxisStl">AxisStl</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-B">B</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Ball">Ball</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Barh">Barh</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Bars">Bars</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-BarWidth">BarWidth</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Beam">Beam</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Belt">Belt</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Box">Box</a>:</td><td> </td><td valign="top"><a href="#Axis-and-Colorbar">Axis and Colorbar</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-BoxPlot">BoxPlot</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Boxs">Boxs</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-C">C</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-call">call</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Candle">Candle</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Chart">Chart</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-chdir">chdir</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Clean">Clean</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ClearLegend">ClearLegend</a>:</td><td> </td><td valign="top"><a href="#Legend">Legend</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Clf">Clf</a>:</td><td> </td><td valign="top"><a href="#Background">Background</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CloseGIF">CloseGIF</a>:</td><td> </td><td valign="top"><a href="#Frames_002fAnimation">Frames/Animation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cloud">Cloud</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Color-scheme">Color scheme</a>:</td><td> </td><td valign="top"><a href="#Color-scheme">Color scheme</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Colorbar">Colorbar</a>:</td><td> </td><td valign="top"><a href="#Axis-and-Colorbar">Axis and Colorbar</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Column">Column</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ColumnPlot">ColumnPlot</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Combine">Combine</a>:</td><td> </td><td valign="top"><a href="#Parallelization">Parallelization</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Combine-1">Combine</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cone">Cone</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cones">Cones</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cont">Cont</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cont3">Cont3</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ContD">ContD</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ContF">ContF</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ContF3">ContF3</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ContFXYZ">ContFXYZ</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ContXYZ">ContXYZ</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CopyFont">CopyFont</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Correl">Correl</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CosFFT">CosFFT</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CRange">CRange</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Create">Create</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Crop">Crop</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Crust">Crust</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CTick">CTick</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CumSum">CumSum</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Curve">Curve</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-cut">cut</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cut">Cut</a>:</td><td> </td><td valign="top"><a href="#Cutting">Cutting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CutOff">CutOff</a>:</td><td> </td><td valign="top"><a href="#Cutting">Cutting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-D">D</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-DataGrid">DataGrid</a>:</td><td> </td><td valign="top"><a href="#Data-manipulation">Data manipulation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-defchr">defchr</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-define">define</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-defnum">defnum</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Delete">Delete</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Dens">Dens</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Dens3">Dens3</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-DensXYZ">DensXYZ</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Dew">Dew</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Diff">Diff</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Diff2">Diff2</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-do">do</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Dots">Dots</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Drop">Drop</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-E">E</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-else">else</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-elseif">elseif</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-EndFrame">EndFrame</a>:</td><td> </td><td valign="top"><a href="#Frames_002fAnimation">Frames/Animation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-endif">endif</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Envelop">Envelop</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Error">Error</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Error-1">Error</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Evaluate">Evaluate</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Export">Export</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Extend">Extend</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-F">F</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Face">Face</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FaceX">FaceX</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FaceY">FaceY</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FaceZ">FaceZ</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fall">Fall</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-fgets">fgets</a>:</td><td> </td><td valign="top"><a href="#Text-printing">Text printing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fill">Fill</a>:</td><td> </td><td valign="top"><a href="#Data-manipulation">Data manipulation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fill-1">Fill</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Find">Find</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FindAny">FindAny</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fit">Fit</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fit2">Fit2</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fit3">Fit3</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FitS">FitS</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Flow">Flow</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FlowP">FlowP</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fl_005fMathGL">Fl_MathGL</a>:</td><td> </td><td valign="top"><a href="#Widget-classes">Widget classes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fl_005fMathGL-1">Fl_MathGL</a>:</td><td> </td><td valign="top"><a href="#Fl_005fMathGL-class">Fl_MathGL class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fog">Fog</a>:</td><td> </td><td valign="top"><a href="#Fog">Fog</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Font">Font</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Font-styles">Font styles</a>:</td><td> </td><td valign="top"><a href="#Font-styles">Font styles</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-fontsize">fontsize</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-for">for</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FPlot">FPlot</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FSurf">FSurf</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-func">func</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-G">G</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-GetNumFrame">GetNumFrame</a>:</td><td> </td><td valign="top"><a href="#Frames_002fAnimation">Frames/Animation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-GetNx">GetNx</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-GetNy">GetNy</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-GetNz">GetNz</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-GetWarn">GetWarn</a>:</td><td> </td><td valign="top"><a href="#Error-handling">Error handling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Glyph">Glyph</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Grad">Grad</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Grid">Grid</a>:</td><td> </td><td valign="top"><a href="#Axis-and-Colorbar">Axis and Colorbar</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Grid-1">Grid</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Grid3">Grid3</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-H">H</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Hankel">Hankel</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Hist">Hist</a>:</td><td> </td><td valign="top"><a href="#Data-manipulation">Data manipulation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Hist-1">Hist</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-I">I</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-if">if</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Import">Import</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-InPlot">InPlot</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Insert">Insert</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Integral">Integral</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-J">J</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Join">Join</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-L">L</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Label">Label</a>:</td><td> </td><td valign="top"><a href="#Text-printing">Text printing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Label-1">Label</a>:</td><td> </td><td valign="top"><a href="#Axis-and-Colorbar">Axis and Colorbar</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Label-2">Label</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Last">Last</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-legend">legend</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Legend">Legend</a>:</td><td> </td><td valign="top"><a href="#Legend">Legend</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Light">Light</a>:</td><td> </td><td valign="top"><a href="#Lighting">Lighting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Line">Line</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Line-style">Line style</a>:</td><td> </td><td valign="top"><a href="#Line-styles">Line styles</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Linear">Linear</a>:</td><td> </td><td valign="top"><a href="#Interpolation">Interpolation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Linear1">Linear1</a>:</td><td> </td><td valign="top"><a href="#Interpolation">Interpolation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Linear1-1">Linear1</a>:</td><td> </td><td valign="top"><a href="#Interpolation">Interpolation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-List">List</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-load">load</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-LoadBackground">LoadBackground</a>:</td><td> </td><td valign="top"><a href="#Background">Background</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-LoadFont">LoadFont</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-M">M</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Map">Map</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Mark">Mark</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Mark-1">Mark</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Mark-style">Mark style</a>:</td><td> </td><td valign="top"><a href="#Line-styles">Line styles</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-MarkSize">MarkSize</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-MathGL-overview">MathGL overview</a>:</td><td> </td><td valign="top"><a href="#Overview">Overview</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-MathGL-setup">MathGL setup</a>:</td><td> </td><td valign="top"><a href="#Graphics-setup">Graphics setup</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Max">Max</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Maximal">Maximal</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Mesh">Mesh</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-meshnum">meshnum</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-MeshNum">MeshNum</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Message">Message</a>:</td><td> </td><td valign="top"><a href="#Error-handling">Error handling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglColor">mglColor</a>:</td><td> </td><td valign="top"><a href="#mglColor-class">mglColor class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglData">mglData</a>:</td><td> </td><td valign="top"><a href="#Data-constructor">Data constructor</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglDraw">mglDraw</a>:</td><td> </td><td valign="top"><a href="#mglDraw-class">mglDraw class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglExpr">mglExpr</a>:</td><td> </td><td valign="top"><a href="#Evaluate-expression">Evaluate expression</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglExprC">mglExprC</a>:</td><td> </td><td valign="top"><a href="#Evaluate-expression">Evaluate expression</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglFitPnts">mglFitPnts</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglGLUT">mglGLUT</a>:</td><td> </td><td valign="top"><a href="#Widget-classes">Widget classes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglGraph">mglGraph</a>:</td><td> </td><td valign="top"><a href="#MathGL-core">MathGL core</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglParse">mglParse</a>:</td><td> </td><td valign="top"><a href="#mglParse-class">mglParse class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglPoint">mglPoint</a>:</td><td> </td><td valign="top"><a href="#mglPoint-class">mglPoint class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglWnd">mglWnd</a>:</td><td> </td><td valign="top"><a href="#Widget-classes">Widget classes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglWnd-1">mglWnd</a>:</td><td> </td><td valign="top"><a href="#mglWnd-class">mglWnd class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Min">Min</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Minimal">Minimal</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Mirror">Mirror</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Modify">Modify</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Momentum">Momentum</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Momentum-1">Momentum</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-MPI_005fRecv">MPI_Recv</a>:</td><td> </td><td valign="top"><a href="#Parallelization">Parallelization</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-MPI_005fSend">MPI_Send</a>:</td><td> </td><td valign="top"><a href="#Parallelization">Parallelization</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-MultiPlot">MultiPlot</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-N">N</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-NeedStop">NeedStop</a>:</td><td> </td><td valign="top"><a href="#Stop-drawing">Stop drawing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-NewFrame">NewFrame</a>:</td><td> </td><td valign="top"><a href="#Frames_002fAnimation">Frames/Animation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-next">next</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Norm">Norm</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-NormSl">NormSl</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-O">O</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-once">once</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Origin">Origin</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-P">P</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Palette">Palette</a>:</td><td> </td><td valign="top"><a href="#Palette-and-colors">Palette and colors</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Perspective">Perspective</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Pipe">Pipe</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Plot">Plot</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Pop">Pop</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-PrintInfo">PrintInfo</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Push">Push</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Puts">Puts</a>:</td><td> </td><td valign="top"><a href="#Text-printing">Text printing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-PutsFit">PutsFit</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Putsw">Putsw</a>:</td><td> </td><td valign="top"><a href="#Text-printing">Text printing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-Q">Q</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-QMathGL">QMathGL</a>:</td><td> </td><td valign="top"><a href="#Widget-classes">Widget classes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-QMathGL-1">QMathGL</a>:</td><td> </td><td valign="top"><a href="#QMathGL-class">QMathGL class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-QuadPlot">QuadPlot</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-R">R</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Radar">Radar</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Ranges">Ranges</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Rasterize">Rasterize</a>:</td><td> </td><td valign="top"><a href="#Background">Background</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Read">Read</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ReadAll">ReadAll</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ReadHDF">ReadHDF</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ReadMat">ReadMat</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ReadRange">ReadRange</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Rearrange">Rearrange</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Refill">Refill</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Region">Region</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ResetFrames">ResetFrames</a>:</td><td> </td><td valign="top"><a href="#Frames_002fAnimation">Frames/Animation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Resize">Resize</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-RestoreFont">RestoreFont</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-return">return</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-rkstep">rkstep</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Roll">Roll</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Roots">Roots</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Rotate">Rotate</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-RotateN">RotateN</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-RotateText">RotateText</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-S">S</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Save">Save</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SaveHDF">SaveHDF</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Set">Set</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetAlphaDef">SetAlphaDef</a>:</td><td> </td><td valign="top"><a href="#Transparency">Transparency</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetAmbient">SetAmbient</a>:</td><td> </td><td valign="top"><a href="#Lighting">Lighting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetArrowSize">SetArrowSize</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetAxisStl">SetAxisStl</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetBarWidth">SetBarWidth</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetCoor">SetCoor</a>:</td><td> </td><td valign="top"><a href="#Curved-coordinates">Curved coordinates</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetCut">SetCut</a>:</td><td> </td><td valign="top"><a href="#Cutting">Cutting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetCutBox">SetCutBox</a>:</td><td> </td><td valign="top"><a href="#Cutting">Cutting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetEventFunc">SetEventFunc</a>:</td><td> </td><td valign="top"><a href="#Stop-drawing">Stop drawing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetFontDef">SetFontDef</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetFontSize">SetFontSize</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetFontSizeCM">SetFontSizeCM</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetFontSizeIN">SetFontSizeIN</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetFontSizePT">SetFontSizePT</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetFunc">SetFunc</a>:</td><td> </td><td valign="top"><a href="#Curved-coordinates">Curved coordinates</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetLegendBox">SetLegendBox</a>:</td><td> </td><td valign="top"><a href="#Legend">Legend</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetLegendMarks">SetLegendMarks</a>:</td><td> </td><td valign="top"><a href="#Legend">Legend</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetMarkSize">SetMarkSize</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetMask">SetMask</a>:</td><td> </td><td valign="top"><a href="#Masks">Masks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetMaskAngle">SetMaskAngle</a>:</td><td> </td><td valign="top"><a href="#Masks">Masks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetMeshNum">SetMeshNum</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetOrigin">SetOrigin</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetOriginTick">SetOriginTick</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetPalette">SetPalette</a>:</td><td> </td><td valign="top"><a href="#Palette-and-colors">Palette and colors</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetPlotId">SetPlotId</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetRange">SetRange</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetRanges">SetRanges</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetRotatedText">SetRotatedText</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetSize">SetSize</a>:</td><td> </td><td valign="top"><a href="#Export-picture">Export picture</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetTickLen">SetTickLen</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetTickRotate">SetTickRotate</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetTicks">SetTicks</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetTickSkip">SetTickSkip</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetTicksVal">SetTicksVal</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetTickTempl">SetTickTempl</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetTickTime">SetTickTime</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetTranspType">SetTranspType</a>:</td><td> </td><td valign="top"><a href="#Transparency">Transparency</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetTuneTicks">SetTuneTicks</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetWarn">SetWarn</a>:</td><td> </td><td valign="top"><a href="#Error-handling">Error handling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Sew">Sew</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ShowImage">ShowImage</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SinFFT">SinFFT</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Smooth">Smooth</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Sort">Sort</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Sphere">Sphere</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Spline">Spline</a>:</td><td> </td><td valign="top"><a href="#Interpolation">Interpolation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Spline1">Spline1</a>:</td><td> </td><td valign="top"><a href="#Interpolation">Interpolation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Spline1-1">Spline1</a>:</td><td> </td><td valign="top"><a href="#Interpolation">Interpolation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Squeeze">Squeeze</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-StartGIF">StartGIF</a>:</td><td> </td><td valign="top"><a href="#Frames_002fAnimation">Frames/Animation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Stem">Stem</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Step">Step</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-STFA">STFA</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-StickPlot">StickPlot</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Stop">Stop</a>:</td><td> </td><td valign="top"><a href="#Stop-drawing">Stop drawing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-stop">stop</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SubData">SubData</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SubPlot">SubPlot</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Sum">Sum</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Surf">Surf</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Surf3">Surf3</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Surf3A">Surf3A</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Surf3C">Surf3C</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SurfA">SurfA</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SurfC">SurfC</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Swap">Swap</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-T">T</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Tape">Tape</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Tens">Tens</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Ternary">Ternary</a>:</td><td> </td><td valign="top"><a href="#Curved-coordinates">Curved coordinates</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Text">Text</a>:</td><td> </td><td valign="top"><a href="#Text-printing">Text printing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TextMark">TextMark</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Textual-formulas">Textual formulas</a>:</td><td> </td><td valign="top"><a href="#Textual-formulas">Textual formulas</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TickLen">TickLen</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Tile">Tile</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TileS">TileS</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Title">Title</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Torus">Torus</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Trace">Trace</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Traj">Traj</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Transpose">Transpose</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TranspType">TranspType</a>:</td><td> </td><td valign="top"><a href="#Transparency">Transparency</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TriCont">TriCont</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TriPlot">TriPlot</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Tube">Tube</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-V">V</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-value">value</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Var">Var</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-variant">variant</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Vect">Vect</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-View">View</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-W">W</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-while">while</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-widgets">widgets</a>:</td><td> </td><td valign="top"><a href="#Using-MathGL-window">Using MathGL window</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-widgets-1">widgets</a>:</td><td> </td><td valign="top"><a href="#Widget-classes">Widget classes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-widgets-2">widgets</a>:</td><td> </td><td valign="top"><a href="#Fl_005fMathGL-class">Fl_MathGL class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-widgets-3">widgets</a>:</td><td> </td><td valign="top"><a href="#QMathGL-class">QMathGL class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-widgets-4">widgets</a>:</td><td> </td><td valign="top"><a href="#wxMathGL-class">wxMathGL class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-window">window</a>:</td><td> </td><td valign="top"><a href="#Using-MathGL-window">Using MathGL window</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-window-1">window</a>:</td><td> </td><td valign="top"><a href="#Widget-classes">Widget classes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-window-2">window</a>:</td><td> </td><td valign="top"><a href="#mglWnd-class">mglWnd class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Write">Write</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteBMP">WriteBMP</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteBPS">WriteBPS</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteEPS">WriteEPS</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteFrame">WriteFrame</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteGIF">WriteGIF</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteJPEG">WriteJPEG</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteOBJ">WriteOBJ</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WritePNG">WritePNG</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WritePRC">WritePRC</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteSVG">WriteSVG</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteTEX">WriteTEX</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteTGA">WriteTGA</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteWGL">WriteWGL</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-wxMathGL">wxMathGL</a>:</td><td> </td><td valign="top"><a href="#wxMathGL-class">wxMathGL class</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-X">X</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-xrange">xrange</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-XRange">XRange</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-XTick">XTick</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-Y">Y</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-yrange">yrange</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-YRange">YRange</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-YTick">YTick</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-Z">Z</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-zrange">zrange</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ZRange">ZRange</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ZTick">ZTick</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-</table>
-<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Index_cp_letter-A"><b>A</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-B"><b>B</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-C"><b>C</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-D"><b>D</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-E"><b>E</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-F"><b>F</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-G"><b>G</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-H"><b>H</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-I"><b>I</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-J"><b>J</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-L"><b>L</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-M"><b>M</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-N"><b>N</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-O"><b>O</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-P"><b>P</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Q"><b>Q</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-R"><b>R</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-S"><b>S</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-T"><b>T</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-V"><b>V</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-W"><b>W</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-X"><b>X</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Y"><b>Y</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Z"><b>Z</b></a>
-
-</td></tr></table>
-
-<hr>
-
-
-
-</div><script type="text/javascript" src="accordion.js"></script></body>
-</html>
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<!-- Это документация для MathGL (версии 2.4.3) - библиотеки классов и функций для построения научной графики. Пожалуйста сообщайте о любых ошибках в этом руководстве на mathgl.abalakin@gmail.org.
-
-Copyright (C) 2008-2012 Alexey A. Balakin.
-
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
-Texts. A copy of the license is included in the section entitled "GNU
-Free Documentation License."
- -->
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
-<head><link rel="stylesheet" href="styles.css">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>MathGL 2.4.3</title>
-
-<meta name="description" content="MathGL 2.4.3">
-<meta name="keywords" content="MathGL 2.4.3">
-<meta name="resource-type" content="document">
-<meta name="distribution" content="global">
-<meta name="Generator" content="texi2any">
-<link href="#Top" rel="start" title="Top">
-<link href="#Index" rel="index" title="Index">
-<link href="#SEC_Contents" rel="contents" title="Table of Contents">
-<link href="dir.html#Top" rel="up" title="(dir)">
-<style type="text/css">
-<!--
-a.summary-letter {text-decoration: none}
-blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
-div.display {margin-left: 3.2em}
-div.example {margin-left: 3.2em}
-div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
-kbd {font-style: oblique}
-pre.display {font-family: inherit}
-pre.format {font-family: inherit}
-pre.menu-comment {font-family: serif}
-pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
-span.nolinebreak {white-space: nowrap}
-span.roman {font-family: initial; font-weight: normal}
-span.sansserif {font-family: sans-serif; font-weight: normal}
-ul.no-bullet {list-style: none}
--->
-</style>
-
-
-</head>
-
-<body lang="ru"><div class="topnav" id="myTopnav"></div><div class="main">
-<h1 class="settitle" align="center">MathGL 2.4.3</h1>
-
-
-
-
-<a name="SEC_Contents"></a>
-<h2 class="contents-heading">Table of Contents</h2>
-
-<div class="contents">
-
-<ul class="no-bullet">
- <li><a name="toc-Obzor-MathGL" href="#Overview">1 Обзор MathGL</a>
- <ul class="no-bullet">
- <li><a name="toc-Chto-takoe-MathGL_003f" href="#What-is-MathGL_003f">1.1 Что такое MathGL?</a></li>
- <li><a name="toc-Vozmozhnosti-MathGL" href="#MathGL-features">1.2 Возможности MathGL</a></li>
- <li><a name="toc-Ustanovka-MathGL" href="#Installation">1.3 Установка MathGL</a></li>
- <li><a name="toc-Quick-guide-1" href="#Quick-guide">1.4 Quick guide</a></li>
- <li><a name="toc-Changes-from-v_002e1_002e_002a" href="#Changes-from-v_002e1">1.5 Changes from v.1.*</a></li>
- <li><a name="toc-Utilities-for-parsing-MGL" href="#Utilities">1.6 Utilities for parsing MGL</a></li>
- <li><a name="toc-Blagodarnosti" href="#Thanks">1.7 Благодарности</a></li>
- </ul></li>
- <li><a name="toc-Primery-MathGL" href="#Examples">2 Примеры MathGL</a>
- <ul class="no-bullet">
- <li><a name="toc-Osnovy-ispolxzovaniya" href="#Basic-usage">2.1 Основы использования</a>
- <ul class="no-bullet">
- <li><a name="toc-Ispolxzovanie-okon-MathGL" href="#Using-MathGL-window">2.1.1 Использование окон MathGL</a></li>
- <li><a name="toc-Drawing-to-file-1" href="#Drawing-to-file">2.1.2 Drawing to file</a></li>
- <li><a name="toc-Animation-1" href="#Animation">2.1.3 Animation</a></li>
- <li><a name="toc-Drawing-in-memory-1" href="#Drawing-in-memory">2.1.4 Drawing in memory</a></li>
- <li><a name="toc-Draw-and-calculate-1" href="#Draw-and-calculate">2.1.5 Draw and calculate</a></li>
- <li><a name="toc-Using-QMathGL-1" href="#Using-QMathGL">2.1.6 Using QMathGL</a></li>
- <li><a name="toc-OpenGL-output-1" href="#OpenGL-output">2.1.7 OpenGL output</a></li>
- <li><a name="toc-MathGL-and-PyQt-1" href="#MathGL-and-PyQt">2.1.8 MathGL and PyQt</a></li>
- <li><a name="toc-MathGL-and-MPI-1" href="#MathGL-and-MPI">2.1.9 MathGL and MPI</a></li>
- </ul></li>
- <li><a name="toc-Advanced-usage-1" href="#Advanced-usage">2.2 Advanced usage</a>
- <ul class="no-bullet">
- <li><a name="toc-Subplots-1" href="#Subplots">2.2.1 Subplots</a></li>
- <li><a name="toc-Axis-and-ticks-1" href="#Axis-and-ticks">2.2.2 Axis and ticks</a></li>
- <li><a name="toc-Curvilinear-coordinates-1" href="#Curvilinear-coordinates">2.2.3 Curvilinear coordinates</a></li>
- <li><a name="toc-Colorbars-1" href="#Colorbars">2.2.4 Colorbars</a></li>
- <li><a name="toc-Bounding-box-1" href="#Bounding-box">2.2.5 Bounding box</a></li>
- <li><a name="toc-Ternary-axis-1" href="#Ternary-axis">2.2.6 Ternary axis</a></li>
- <li><a name="toc-Text-features-1" href="#Text-features">2.2.7 Text features</a></li>
- <li><a name="toc-Legend-sample-1" href="#Legend-sample">2.2.8 Legend sample</a></li>
- <li><a name="toc-Cutting-sample-1" href="#Cutting-sample">2.2.9 Cutting sample</a></li>
- </ul></li>
- <li><a name="toc-Data-handling-1" href="#Data-handling">2.3 Data handling</a>
- <ul class="no-bullet">
- <li><a name="toc-Array-creation-1" href="#Array-creation">2.3.1 Array creation</a></li>
- <li><a name="toc-Linking-array-1" href="#Linking-array">2.3.2 Linking array</a></li>
- <li><a name="toc-Change-data-1" href="#Change-data">2.3.3 Change data</a></li>
- </ul></li>
- <li><a name="toc-Data-plotting-1" href="#Data-plotting">2.4 Data plotting</a></li>
- <li><a name="toc-Hints-1" href="#Hints">2.5 Hints</a>
- <ul class="no-bullet">
- <li><a name="toc-_0060_0060Compound_0027_0027-graphics-1" href="#g_t_0060_0060Compound_0027_0027-graphics">2.5.1 “Compound” graphics</a></li>
- <li><a name="toc-Transparency-and-lighting-1" href="#Transparency-and-lighting">2.5.2 Transparency and lighting</a></li>
- <li><a name="toc-Types-of-transparency-1" href="#Types-of-transparency">2.5.3 Types of transparency</a></li>
- <li><a name="toc-Axis-projection-1" href="#Axis-projection">2.5.4 Axis projection</a></li>
- <li><a name="toc-Adding-fog-1" href="#Adding-fog">2.5.5 Adding fog</a></li>
- <li><a name="toc-Lighting-sample-1" href="#Lighting-sample">2.5.6 Lighting sample</a></li>
- <li><a name="toc-Using-primitives-1" href="#Using-primitives">2.5.7 Using primitives</a></li>
- <li><a name="toc-STFA-sample-1" href="#STFA-sample">2.5.8 STFA sample</a></li>
- <li><a name="toc-Mapping-visualization-1" href="#Mapping-visualization">2.5.9 Mapping visualization</a></li>
- <li><a name="toc-Data-interpolation-1" href="#Data-interpolation">2.5.10 Data interpolation</a></li>
- <li><a name="toc-Making-regular-data-1" href="#Making-regular-data">2.5.11 Making regular data</a></li>
- <li><a name="toc-Making-histogram-1" href="#Making-histogram">2.5.12 Making histogram</a></li>
- <li><a name="toc-Nonlinear-fitting-hints-1" href="#Nonlinear-fitting-hints">2.5.13 Nonlinear fitting hints</a></li>
- <li><a name="toc-PDE-solving-hints-1" href="#PDE-solving-hints">2.5.14 PDE solving hints</a></li>
- <li><a name="toc-Drawing-phase-plain-1" href="#Drawing-phase-plain">2.5.15 Drawing phase plain</a></li>
- <li><a name="toc-Pulse-properties-1" href="#Pulse-properties">2.5.16 Pulse properties</a></li>
- <li><a name="toc-Using-MGL-parser-1" href="#Using-MGL-parser">2.5.17 Using MGL parser</a></li>
- <li><a name="toc-Using-options-1" href="#Using-options">2.5.18 Using options</a></li>
- <li><a name="toc-_0060_0060Templates_0027_0027-1" href="#g_t_0060_0060Templates_0027_0027">2.5.19 “Templates”</a></li>
- <li><a name="toc-Stereo-image-1" href="#Stereo-image">2.5.20 Stereo image</a></li>
- <li><a name="toc-Reduce-memory-usage-1" href="#Reduce-memory-usage">2.5.21 Reduce memory usage</a></li>
- <li><a name="toc-Scanning-file" href="#Saving-and-scanning-file">2.5.22 Scanning file</a></li>
- <li><a name="toc-Mixing-bitmap-and-vector-output-1" href="#Mixing-bitmap-and-vector-output">2.5.23 Mixing bitmap and vector output</a></li>
- </ul></li>
- <li><a name="toc-FAQ-1" href="#FAQ">2.6 FAQ</a></li>
- </ul></li>
- <li><a name="toc-Osnovnye-principy" href="#General-concepts">3 Основные принципы</a>
- <ul class="no-bullet">
- <li><a name="toc-Osi-koordinat" href="#Coordinate-axes">3.1 Оси координат</a></li>
- <li><a name="toc-Cveta" href="#Color-styles">3.2 Цвета</a></li>
- <li><a name="toc-Stilx-linii" href="#Line-styles">3.3 Стиль линий</a></li>
- <li><a name="toc-Cvetovaya-skhema" href="#Color-scheme">3.4 Цветовая схема</a></li>
- <li><a name="toc-Stilx-teksta" href="#Font-styles">3.5 Стиль текста</a></li>
- <li><a name="toc-Tekstovye-formuly" href="#Textual-formulas">3.6 Текстовые формулы</a></li>
- <li><a name="toc-Opcii-komand" href="#Command-options">3.7 Опции команд</a></li>
- <li><a name="toc-Interfeisy" href="#Interfaces">3.8 Интерфейсы</a>
- <ul class="no-bullet">
- <li><a name="toc-C_002fFortran-interfeis" href="#C-interface">3.8.1 C/Fortran интерфейс</a></li>
- <li><a name="toc-C_002b_002b_002fPython-interfeis" href="#C_002b_002b-interface">3.8.2 C++/Python интерфейс</a></li>
- </ul></li>
- </ul></li>
- <li><a name="toc-YAdro-MathGL" href="#MathGL-core">4 Ядро MathGL</a>
- <ul class="no-bullet">
- <li><a name="toc-Sozdanie-i-udalenie-graficheskogo-obwekta" href="#Constructor">4.1 Создание и удаление графического объекта</a></li>
- <li><a name="toc-Nastroika-grafika" href="#Graphics-setup">4.2 Настройка графика</a>
- <ul class="no-bullet">
- <li><a name="toc-Prozrachnostx" href="#Transparency">4.2.1 Прозрачность</a></li>
- <li><a name="toc-Osveshchenie" href="#Lighting">4.2.2 Освещение</a></li>
- <li><a name="toc-Tuman" href="#Fog">4.2.3 Туман</a></li>
- <li><a name="toc-Bazovye-razmery" href="#Default-sizes">4.2.4 Базовые размеры</a></li>
- <li><a name="toc-Obrezanie" href="#Cutting">4.2.5 Обрезание</a></li>
- <li><a name="toc-Shrifty" href="#Font-settings">4.2.6 Шрифты</a></li>
- <li><a name="toc-Palitra-i-cveta" href="#Palette-and-colors">4.2.7 Палитра и цвета</a></li>
- <li><a name="toc-Maski" href="#Masks">4.2.8 Маски</a></li>
- <li><a name="toc-Obrabotka-oshibok" href="#Error-handling">4.2.9 Обработка ошибок</a></li>
- <li><a name="toc-Ostanovka-risovaniya" href="#Stop-drawing">4.2.10 Остановка рисования</a></li>
- </ul></li>
- <li><a name="toc-Nastroiki-osei-koordinat" href="#Axis-settings">4.3 Настройки осей координат</a>
- <ul class="no-bullet">
- <li><a name="toc-Masshtab-osei-koordinat" href="#Ranges-_0028bounding-box_0029">4.3.1 Масштаб осей координат</a></li>
- <li><a name="toc-Krivolineinye-koordinaty" href="#Curved-coordinates">4.3.2 Криволинейные координаты</a></li>
- <li><a name="toc-Metki-osei" href="#Ticks">4.3.3 Метки осей</a></li>
- </ul></li>
- <li><a name="toc-Matrica-preobrazovaniya" href="#Subplots-and-rotation">4.4 Матрица преобразования</a></li>
- <li><a name="toc-Eksport-risunka" href="#Export-picture">4.5 Экспорт рисунка</a>
- <ul class="no-bullet">
- <li><a name="toc-Eksport-v-fail" href="#Export-to-file">4.5.1 Экспорт в файл</a></li>
- <li><a name="toc-Kadry_002fAnimaciya" href="#Frames_002fAnimation">4.5.2 Кадры/Анимация</a></li>
- <li><a name="toc-Risovanie-v-pamyati" href="#Bitmap-in-memory">4.5.3 Рисование в памяти</a></li>
- <li><a name="toc-Rasparallelivanie" href="#Parallelization">4.5.4 Распараллеливание</a></li>
- </ul></li>
- <li><a name="toc-Fonovoe-izobrazhenie" href="#Background">4.6 Фоновое изображение</a></li>
- <li><a name="toc-Risovanie-primitivov" href="#Primitives">4.7 Рисование примитивов</a></li>
- <li><a name="toc-Vyvod-teksta" href="#Text-printing">4.8 Вывод текста</a></li>
- <li><a name="toc-Osi-i-Colorbar" href="#Axis-and-Colorbar">4.9 Оси и Colorbar</a></li>
- <li><a name="toc-Legenda" href="#Legend">4.10 Легенда</a></li>
- <li><a name="toc-1D-grafiki" href="#g_t1D-plotting">4.11 1D графики</a></li>
- <li><a name="toc-2D-grafiki" href="#g_t2D-plotting">4.12 2D графики</a></li>
- <li><a name="toc-3D-grafiki" href="#g_t3D-plotting">4.13 3D графики</a></li>
- <li><a name="toc-Parnye-grafiki" href="#Dual-plotting">4.14 Парные графики</a></li>
- <li><a name="toc-Vektornye-polya" href="#Vector-fields">4.15 Векторные поля</a></li>
- <li><a name="toc-Prochie-grafiki" href="#Other-plotting">4.16 Прочие графики</a></li>
- <li><a name="toc-Nonlinear-fitting-1" href="#Nonlinear-fitting">4.17 Nonlinear fitting</a></li>
- <li><a name="toc-Raspredelenie-dannykh" href="#Data-manipulation">4.18 Распределение данных</a></li>
- </ul></li>
- <li><a name="toc-_0060_0060Okonnye_0027_0027-klassy" href="#Widget-classes">5 “Оконные” классы</a>
- <ul class="no-bullet">
- <li><a name="toc-Klass-mglWnd" href="#mglWnd-class">5.1 Класс mglWnd</a></li>
- <li><a name="toc-mglDraw-class-1" href="#mglDraw-class">5.2 mglDraw class</a></li>
- <li><a name="toc-Klass-Fl_005fMathGL" href="#Fl_005fMathGL-class">5.3 Класс Fl_MathGL</a></li>
- <li><a name="toc-Klass-QMathGL" href="#QMathGL-class">5.4 Класс QMathGL</a></li>
- <li><a name="toc-Klass-wxMathGL" href="#wxMathGL-class">5.5 Класс wxMathGL</a></li>
- </ul></li>
- <li><a name="toc-Obrabotka-dannykh" href="#Data-processing">6 Обработка данных</a>
- <ul class="no-bullet">
- <li><a name="toc-Peremennye" href="#Public-variables">6.1 Переменные</a></li>
- <li><a name="toc-Sozdanie-i-udalenie-dannykh" href="#Data-constructor">6.2 Создание и удаление данных</a></li>
- <li><a name="toc-Izmenenie-razmerov-dannykh" href="#Data-resizing">6.3 Изменение размеров данных</a></li>
- <li><a name="toc-Zapolnenie-dannykh" href="#Data-filling">6.4 Заполнение данных</a></li>
- <li><a name="toc-Chtenie_002fsokhranenie-dannykh" href="#File-I_002fO">6.5 Чтение/сохранение данных</a></li>
- <li><a name="toc-Make-another-data-1" href="#Make-another-data">6.6 Make another data</a></li>
- <li><a name="toc-Izmenenie-dannykh" href="#Data-changing">6.7 Изменение данных</a></li>
- <li><a name="toc-Interpolyaciya" href="#Interpolation">6.8 Интерполяция</a></li>
- <li><a name="toc-Informacionnye-funkcii" href="#Data-information">6.9 Информационные функции</a></li>
- <li><a name="toc-Operatory" href="#Operators">6.10 Операторы</a></li>
- <li><a name="toc-Globalxnye-funkcii" href="#Global-functions">6.11 Глобальные функции</a></li>
- <li><a name="toc-Vychislenie-vyrazhenii" href="#Evaluate-expression">6.12 Вычисление выражений</a></li>
- <li><a name="toc-Special-data-classes-1" href="#Special-data-classes">6.13 Special data classes</a></li>
- </ul></li>
- <li><a name="toc-Skripty-MGL" href="#MGL-scripts">7 Скрипты MGL</a>
- <ul class="no-bullet">
- <li><a name="toc-Osnovy-MGL" href="#MGL-definition">7.1 Основы MGL</a></li>
- <li><a name="toc-Upravlenie-khodom-vypolneniya" href="#Program-flow-commands">7.2 Управление ходом выполнения</a></li>
- <li><a name="toc-Specialxnye-kommentarii" href="#Special-comments">7.3 Специальные комментарии</a></li>
- <li><a name="toc-LaTeX-package-1" href="#LaTeX-package">7.4 LaTeX package</a></li>
- <li><a name="toc-mglParse-class-1" href="#mglParse-class">7.5 mglParse class</a></li>
- </ul></li>
- <li><a name="toc-UDAV-1" href="#UDAV">8 UDAV</a>
- <ul class="no-bullet">
- <li><a name="toc-UDAV-overview-1" href="#UDAV-overview">8.1 UDAV overview</a></li>
- <li><a name="toc-UDAV-dialogs-1" href="#UDAV-dialogs">8.2 UDAV dialogs</a></li>
- <li><a name="toc-UDAV-hints-1" href="#UDAV-hints">8.3 UDAV hints</a></li>
- </ul></li>
- <li><a name="toc-Other-classes-1" href="#Other-classes">9 Other classes</a>
- <ul class="no-bullet">
- <li><a name="toc-Define-new-kind-of-plot-_0028mglBase-class_0029" href="#mglBase-class">9.1 Define new kind of plot (mglBase class)</a></li>
- <li><a name="toc-User-defined-types-_0028mglDataA-class_0029" href="#mglDataA-class">9.2 User defined types (mglDataA class)</a></li>
- <li><a name="toc-mglColor-class-1" href="#mglColor-class">9.3 mglColor class</a></li>
- <li><a name="toc-mglPoint-class-1" href="#mglPoint-class">9.4 mglPoint class</a></li>
- </ul></li>
- <li><a name="toc-All-samples-1" href="#All-samples">10 All samples</a>
- <ul class="no-bullet">
- <li><a name="toc-Functions-for-initialization" href="#initialization-sample">10.1 Functions for initialization</a></li>
- <li><a name="toc-Sample-3wave" href="#g_t3wave-sample">10.2 Sample ‘<samp>3wave</samp>’</a></li>
- <li><a name="toc-Sample-alpha" href="#alpha-sample">10.3 Sample ‘<samp>alpha</samp>’</a></li>
- <li><a name="toc-Sample-apde" href="#apde-sample">10.4 Sample ‘<samp>apde</samp>’</a></li>
- <li><a name="toc-Sample-area" href="#area-sample">10.5 Sample ‘<samp>area</samp>’</a></li>
- <li><a name="toc-Sample-aspect" href="#aspect-sample">10.6 Sample ‘<samp>aspect</samp>’</a></li>
- <li><a name="toc-Sample-axial" href="#axial-sample">10.7 Sample ‘<samp>axial</samp>’</a></li>
- <li><a name="toc-Sample-axis" href="#axis-sample">10.8 Sample ‘<samp>axis</samp>’</a></li>
- <li><a name="toc-Sample-barh" href="#barh-sample">10.9 Sample ‘<samp>barh</samp>’</a></li>
- <li><a name="toc-Sample-bars" href="#bars-sample">10.10 Sample ‘<samp>bars</samp>’</a></li>
- <li><a name="toc-Sample-belt" href="#belt-sample">10.11 Sample ‘<samp>belt</samp>’</a></li>
- <li><a name="toc-Sample-bifurcation" href="#bifurcation-sample">10.12 Sample ‘<samp>bifurcation</samp>’</a></li>
- <li><a name="toc-Sample-box" href="#box-sample">10.13 Sample ‘<samp>box</samp>’</a></li>
- <li><a name="toc-Sample-boxplot" href="#boxplot-sample">10.14 Sample ‘<samp>boxplot</samp>’</a></li>
- <li><a name="toc-Sample-boxs" href="#boxs-sample">10.15 Sample ‘<samp>boxs</samp>’</a></li>
- <li><a name="toc-Sample-candle" href="#candle-sample">10.16 Sample ‘<samp>candle</samp>’</a></li>
- <li><a name="toc-Sample-chart" href="#chart-sample">10.17 Sample ‘<samp>chart</samp>’</a></li>
- <li><a name="toc-Sample-cloud" href="#cloud-sample">10.18 Sample ‘<samp>cloud</samp>’</a></li>
- <li><a name="toc-Sample-colorbar" href="#colorbar-sample">10.19 Sample ‘<samp>colorbar</samp>’</a></li>
- <li><a name="toc-Sample-combined" href="#combined-sample">10.20 Sample ‘<samp>combined</samp>’</a></li>
- <li><a name="toc-Sample-cones" href="#cones-sample">10.21 Sample ‘<samp>cones</samp>’</a></li>
- <li><a name="toc-Sample-cont" href="#cont-sample">10.22 Sample ‘<samp>cont</samp>’</a></li>
- <li><a name="toc-Sample-cont3" href="#cont3-sample">10.23 Sample ‘<samp>cont3</samp>’</a></li>
- <li><a name="toc-Sample-cont_005fxyz" href="#cont_005fxyz-sample">10.24 Sample ‘<samp>cont_xyz</samp>’</a></li>
- <li><a name="toc-Sample-contd" href="#contd-sample">10.25 Sample ‘<samp>contd</samp>’</a></li>
- <li><a name="toc-Sample-contf" href="#contf-sample">10.26 Sample ‘<samp>contf</samp>’</a></li>
- <li><a name="toc-Sample-contf3" href="#contf3-sample">10.27 Sample ‘<samp>contf3</samp>’</a></li>
- <li><a name="toc-Sample-contf_005fxyz" href="#contf_005fxyz-sample">10.28 Sample ‘<samp>contf_xyz</samp>’</a></li>
- <li><a name="toc-Sample-contv" href="#contv-sample">10.29 Sample ‘<samp>contv</samp>’</a></li>
- <li><a name="toc-Sample-correl" href="#correl-sample">10.30 Sample ‘<samp>correl</samp>’</a></li>
- <li><a name="toc-Sample-curvcoor" href="#curvcoor-sample">10.31 Sample ‘<samp>curvcoor</samp>’</a></li>
- <li><a name="toc-Sample-cut" href="#cut-sample">10.32 Sample ‘<samp>cut</samp>’</a></li>
- <li><a name="toc-Sample-dat_005fdiff" href="#dat_005fdiff-sample">10.33 Sample ‘<samp>dat_diff</samp>’</a></li>
- <li><a name="toc-Sample-dat_005fextra" href="#dat_005fextra-sample">10.34 Sample ‘<samp>dat_extra</samp>’</a></li>
- <li><a name="toc-Sample-data1" href="#data1-sample">10.35 Sample ‘<samp>data1</samp>’</a></li>
- <li><a name="toc-Sample-data2" href="#data2-sample">10.36 Sample ‘<samp>data2</samp>’</a></li>
- <li><a name="toc-Sample-dens" href="#dens-sample">10.37 Sample ‘<samp>dens</samp>’</a></li>
- <li><a name="toc-Sample-dens3" href="#dens3-sample">10.38 Sample ‘<samp>dens3</samp>’</a></li>
- <li><a name="toc-Sample-dens_005fxyz" href="#dens_005fxyz-sample">10.39 Sample ‘<samp>dens_xyz</samp>’</a></li>
- <li><a name="toc-Sample-detect" href="#detect-sample">10.40 Sample ‘<samp>detect</samp>’</a></li>
- <li><a name="toc-Sample-dew" href="#dew-sample">10.41 Sample ‘<samp>dew</samp>’</a></li>
- <li><a name="toc-Sample-diffract" href="#diffract-sample">10.42 Sample ‘<samp>diffract</samp>’</a></li>
- <li><a name="toc-Sample-dilate" href="#dilate-sample">10.43 Sample ‘<samp>dilate</samp>’</a></li>
- <li><a name="toc-Sample-dots" href="#dots-sample">10.44 Sample ‘<samp>dots</samp>’</a></li>
- <li><a name="toc-Sample-earth" href="#earth-sample">10.45 Sample ‘<samp>earth</samp>’</a></li>
- <li><a name="toc-Sample-error" href="#error-sample">10.46 Sample ‘<samp>error</samp>’</a></li>
- <li><a name="toc-Sample-error2" href="#error2-sample">10.47 Sample ‘<samp>error2</samp>’</a></li>
- <li><a name="toc-Sample-export" href="#export-sample">10.48 Sample ‘<samp>export</samp>’</a></li>
- <li><a name="toc-Sample-fall" href="#fall-sample">10.49 Sample ‘<samp>fall</samp>’</a></li>
- <li><a name="toc-Sample-fexport" href="#fexport-sample">10.50 Sample ‘<samp>fexport</samp>’</a></li>
- <li><a name="toc-Sample-fit" href="#fit-sample">10.51 Sample ‘<samp>fit</samp>’</a></li>
- <li><a name="toc-Sample-flame2d" href="#flame2d-sample">10.52 Sample ‘<samp>flame2d</samp>’</a></li>
- <li><a name="toc-Sample-flow" href="#flow-sample">10.53 Sample ‘<samp>flow</samp>’</a></li>
- <li><a name="toc-Sample-flow3" href="#flow3-sample">10.54 Sample ‘<samp>flow3</samp>’</a></li>
- <li><a name="toc-Sample-fog" href="#fog-sample">10.55 Sample ‘<samp>fog</samp>’</a></li>
- <li><a name="toc-Sample-fonts" href="#fonts-sample">10.56 Sample ‘<samp>fonts</samp>’</a></li>
- <li><a name="toc-Sample-grad" href="#grad-sample">10.57 Sample ‘<samp>grad</samp>’</a></li>
- <li><a name="toc-Sample-hist" href="#hist-sample">10.58 Sample ‘<samp>hist</samp>’</a></li>
- <li><a name="toc-Sample-ifs2d" href="#ifs2d-sample">10.59 Sample ‘<samp>ifs2d</samp>’</a></li>
- <li><a name="toc-Sample-ifs3d" href="#ifs3d-sample">10.60 Sample ‘<samp>ifs3d</samp>’</a></li>
- <li><a name="toc-Sample-indirect" href="#indirect-sample">10.61 Sample ‘<samp>indirect</samp>’</a></li>
- <li><a name="toc-Sample-inplot" href="#inplot-sample">10.62 Sample ‘<samp>inplot</samp>’</a></li>
- <li><a name="toc-Sample-iris" href="#iris-sample">10.63 Sample ‘<samp>iris</samp>’</a></li>
- <li><a name="toc-Sample-label" href="#label-sample">10.64 Sample ‘<samp>label</samp>’</a></li>
- <li><a name="toc-Sample-lamerey" href="#lamerey-sample">10.65 Sample ‘<samp>lamerey</samp>’</a></li>
- <li><a name="toc-Sample-legend" href="#legend-sample">10.66 Sample ‘<samp>legend</samp>’</a></li>
- <li><a name="toc-Sample-light" href="#light-sample">10.67 Sample ‘<samp>light</samp>’</a></li>
- <li><a name="toc-Sample-loglog" href="#loglog-sample">10.68 Sample ‘<samp>loglog</samp>’</a></li>
- <li><a name="toc-Sample-map" href="#map-sample">10.69 Sample ‘<samp>map</samp>’</a></li>
- <li><a name="toc-Sample-mark" href="#mark-sample">10.70 Sample ‘<samp>mark</samp>’</a></li>
- <li><a name="toc-Sample-mask" href="#mask-sample">10.71 Sample ‘<samp>mask</samp>’</a></li>
- <li><a name="toc-Sample-mesh" href="#mesh-sample">10.72 Sample ‘<samp>mesh</samp>’</a></li>
- <li><a name="toc-Sample-mirror" href="#mirror-sample">10.73 Sample ‘<samp>mirror</samp>’</a></li>
- <li><a name="toc-Sample-molecule" href="#molecule-sample">10.74 Sample ‘<samp>molecule</samp>’</a></li>
- <li><a name="toc-Sample-ode" href="#ode-sample">10.75 Sample ‘<samp>ode</samp>’</a></li>
- <li><a name="toc-Sample-ohlc" href="#ohlc-sample">10.76 Sample ‘<samp>ohlc</samp>’</a></li>
- <li><a name="toc-Sample-param1" href="#param1-sample">10.77 Sample ‘<samp>param1</samp>’</a></li>
- <li><a name="toc-Sample-param2" href="#param2-sample">10.78 Sample ‘<samp>param2</samp>’</a></li>
- <li><a name="toc-Sample-param3" href="#param3-sample">10.79 Sample ‘<samp>param3</samp>’</a></li>
- <li><a name="toc-Sample-paramv" href="#paramv-sample">10.80 Sample ‘<samp>paramv</samp>’</a></li>
- <li><a name="toc-Sample-parser" href="#parser-sample">10.81 Sample ‘<samp>parser</samp>’</a></li>
- <li><a name="toc-Sample-pde" href="#pde-sample">10.82 Sample ‘<samp>pde</samp>’</a></li>
- <li><a name="toc-Sample-pendelta" href="#pendelta-sample">10.83 Sample ‘<samp>pendelta</samp>’</a></li>
- <li><a name="toc-Sample-pipe" href="#pipe-sample">10.84 Sample ‘<samp>pipe</samp>’</a></li>
- <li><a name="toc-Sample-plot" href="#plot-sample">10.85 Sample ‘<samp>plot</samp>’</a></li>
- <li><a name="toc-Sample-pmap" href="#pmap-sample">10.86 Sample ‘<samp>pmap</samp>’</a></li>
- <li><a name="toc-Sample-primitives" href="#primitives-sample">10.87 Sample ‘<samp>primitives</samp>’</a></li>
- <li><a name="toc-Sample-projection" href="#projection-sample">10.88 Sample ‘<samp>projection</samp>’</a></li>
- <li><a name="toc-Sample-projection5" href="#projection5-sample">10.89 Sample ‘<samp>projection5</samp>’</a></li>
- <li><a name="toc-Sample-pulse" href="#pulse-sample">10.90 Sample ‘<samp>pulse</samp>’</a></li>
- <li><a name="toc-Sample-qo2d" href="#qo2d-sample">10.91 Sample ‘<samp>qo2d</samp>’</a></li>
- <li><a name="toc-Sample-quality0" href="#quality0-sample">10.92 Sample ‘<samp>quality0</samp>’</a></li>
- <li><a name="toc-Sample-quality1" href="#quality1-sample">10.93 Sample ‘<samp>quality1</samp>’</a></li>
- <li><a name="toc-Sample-quality2" href="#quality2-sample">10.94 Sample ‘<samp>quality2</samp>’</a></li>
- <li><a name="toc-Sample-quality4" href="#quality4-sample">10.95 Sample ‘<samp>quality4</samp>’</a></li>
- <li><a name="toc-Sample-quality5" href="#quality5-sample">10.96 Sample ‘<samp>quality5</samp>’</a></li>
- <li><a name="toc-Sample-quality6" href="#quality6-sample">10.97 Sample ‘<samp>quality6</samp>’</a></li>
- <li><a name="toc-Sample-quality8" href="#quality8-sample">10.98 Sample ‘<samp>quality8</samp>’</a></li>
- <li><a name="toc-Sample-radar" href="#radar-sample">10.99 Sample ‘<samp>radar</samp>’</a></li>
- <li><a name="toc-Sample-refill" href="#refill-sample">10.100 Sample ‘<samp>refill</samp>’</a></li>
- <li><a name="toc-Sample-region" href="#region-sample">10.101 Sample ‘<samp>region</samp>’</a></li>
- <li><a name="toc-Sample-scanfile" href="#scanfile-sample">10.102 Sample ‘<samp>scanfile</samp>’</a></li>
- <li><a name="toc-Sample-schemes" href="#schemes-sample">10.103 Sample ‘<samp>schemes</samp>’</a></li>
- <li><a name="toc-Sample-section" href="#section-sample">10.104 Sample ‘<samp>section</samp>’</a></li>
- <li><a name="toc-Sample-several_005flight" href="#several_005flight-sample">10.105 Sample ‘<samp>several_light</samp>’</a></li>
- <li><a name="toc-Sample-solve" href="#solve-sample">10.106 Sample ‘<samp>solve</samp>’</a></li>
- <li><a name="toc-Sample-stem" href="#stem-sample">10.107 Sample ‘<samp>stem</samp>’</a></li>
- <li><a name="toc-Sample-step" href="#step-sample">10.108 Sample ‘<samp>step</samp>’</a></li>
- <li><a name="toc-Sample-stereo" href="#stereo-sample">10.109 Sample ‘<samp>stereo</samp>’</a></li>
- <li><a name="toc-Sample-stfa" href="#stfa-sample">10.110 Sample ‘<samp>stfa</samp>’</a></li>
- <li><a name="toc-Sample-style" href="#style-sample">10.111 Sample ‘<samp>style</samp>’</a></li>
- <li><a name="toc-Sample-surf" href="#surf-sample">10.112 Sample ‘<samp>surf</samp>’</a></li>
- <li><a name="toc-Sample-surf3" href="#surf3-sample">10.113 Sample ‘<samp>surf3</samp>’</a></li>
- <li><a name="toc-Sample-surf3a" href="#surf3a-sample">10.114 Sample ‘<samp>surf3a</samp>’</a></li>
- <li><a name="toc-Sample-surf3c" href="#surf3c-sample">10.115 Sample ‘<samp>surf3c</samp>’</a></li>
- <li><a name="toc-Sample-surf3ca" href="#surf3ca-sample">10.116 Sample ‘<samp>surf3ca</samp>’</a></li>
- <li><a name="toc-Sample-surfa" href="#surfa-sample">10.117 Sample ‘<samp>surfa</samp>’</a></li>
- <li><a name="toc-Sample-surfc" href="#surfc-sample">10.118 Sample ‘<samp>surfc</samp>’</a></li>
- <li><a name="toc-Sample-surfca" href="#surfca-sample">10.119 Sample ‘<samp>surfca</samp>’</a></li>
- <li><a name="toc-Sample-table" href="#table-sample">10.120 Sample ‘<samp>table</samp>’</a></li>
- <li><a name="toc-Sample-tape" href="#tape-sample">10.121 Sample ‘<samp>tape</samp>’</a></li>
- <li><a name="toc-Sample-tens" href="#tens-sample">10.122 Sample ‘<samp>tens</samp>’</a></li>
- <li><a name="toc-Sample-ternary" href="#ternary-sample">10.123 Sample ‘<samp>ternary</samp>’</a></li>
- <li><a name="toc-Sample-text" href="#text-sample">10.124 Sample ‘<samp>text</samp>’</a></li>
- <li><a name="toc-Sample-text2" href="#text2-sample">10.125 Sample ‘<samp>text2</samp>’</a></li>
- <li><a name="toc-Sample-textmark" href="#textmark-sample">10.126 Sample ‘<samp>textmark</samp>’</a></li>
- <li><a name="toc-Sample-ticks" href="#ticks-sample">10.127 Sample ‘<samp>ticks</samp>’</a></li>
- <li><a name="toc-Sample-tile" href="#tile-sample">10.128 Sample ‘<samp>tile</samp>’</a></li>
- <li><a name="toc-Sample-tiles" href="#tiles-sample">10.129 Sample ‘<samp>tiles</samp>’</a></li>
- <li><a name="toc-Sample-torus" href="#torus-sample">10.130 Sample ‘<samp>torus</samp>’</a></li>
- <li><a name="toc-Sample-traj" href="#traj-sample">10.131 Sample ‘<samp>traj</samp>’</a></li>
- <li><a name="toc-Sample-triangulation" href="#triangulation-sample">10.132 Sample ‘<samp>triangulation</samp>’</a></li>
- <li><a name="toc-Sample-triplot" href="#triplot-sample">10.133 Sample ‘<samp>triplot</samp>’</a></li>
- <li><a name="toc-Sample-tube" href="#tube-sample">10.134 Sample ‘<samp>tube</samp>’</a></li>
- <li><a name="toc-Sample-type0" href="#type0-sample">10.135 Sample ‘<samp>type0</samp>’</a></li>
- <li><a name="toc-Sample-type1" href="#type1-sample">10.136 Sample ‘<samp>type1</samp>’</a></li>
- <li><a name="toc-Sample-type2" href="#type2-sample">10.137 Sample ‘<samp>type2</samp>’</a></li>
- <li><a name="toc-Sample-vect" href="#vect-sample">10.138 Sample ‘<samp>vect</samp>’</a></li>
- <li><a name="toc-Sample-vect3" href="#vect3-sample">10.139 Sample ‘<samp>vect3</samp>’</a></li>
- <li><a name="toc-Sample-_0027venn_0027" href="#venn-sample">10.140 Sample ’venn’</a></li>
- </ul></li>
- <li><a name="toc-Symbols-and-hot_002dkeys-1" href="#Symbols-and-hot_002dkeys">Appendix A Symbols and hot-keys</a>
- <ul class="no-bullet">
- <li><a name="toc-Symbols-for-styles-1" href="#Symbols-for-styles">A.1 Symbols for styles</a></li>
- <li><a name="toc-Hot_002dkeys-for-mglview-1" href="#Hot_002dkeys-for-mglview">A.2 Hot-keys for mglview</a></li>
- <li><a name="toc-Hot_002dkeys-for-UDAV-1" href="#Hot_002dkeys-for-UDAV">A.3 Hot-keys for UDAV</a></li>
- </ul></li>
- <li><a name="toc-File-formats-1" href="#File-formats">Appendix B File formats</a>
- <ul class="no-bullet">
- <li><a name="toc-Font-files-1" href="#Font-files">B.1 Font files</a></li>
- <li><a name="toc-MGLD-format-1" href="#MGLD-format">B.2 MGLD format</a></li>
- <li><a name="toc-JSON-format-1" href="#JSON-format">B.3 JSON format</a></li>
- <li><a name="toc-IFS-format-1" href="#IFS-format">B.4 IFS format</a></li>
- </ul></li>
- <li><a name="toc-Vremya-otrisovki" href="#Plotting-time">Appendix C Время отрисовки</a></li>
- <li><a name="toc-Simvoly-TeX" href="#TeX_002dlike-symbols">Appendix D Символы TeX</a></li>
- <li><a name="toc-GNU-Free-Documentation-License" href="#Copying-This-Manual">Appendix E GNU Free Documentation License</a></li>
- <li><a name="toc-Indeks" href="#Index">Индекс</a></li>
-</ul>
-</div>
-
-
-<a name="Top"></a>
-<div class="header">
-<p>
-Next: <a href="#Overview" accesskey="n" rel="next">Overview</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="MathGL"></a>
-<h1 class="top">MathGL</h1>
-
-<p>Это документация для MathGL (версии 2.4.3) – библиотеки классов и функций для построения научной графики. Пожалуйста сообщайте о любых ошибках в этом руководстве на <a href="mailto:mathgl.abalakin@gmail.org">mathgl.abalakin@gmail.org</a>. Дополнительную информацию о MathGL можно найти на домашней странице проекта <a href="http://mathgl.sourceforge.net/">http://mathgl.sourceforge.net/</a>.
-</p>
-<p>Copyright © 2008-2012 Alexey A. Balakin.
-</p>
-<blockquote>
-<p>Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
-Texts. A copy of the license is included in the section entitled “GNU
-Free Documentation License.”
-</p></blockquote>
-
-
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Overview" accesskey="1">Overview</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Examples" accesskey="2">Examples</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#General-concepts" accesskey="3">General concepts</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#MathGL-core" accesskey="4">MathGL core</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Widget-classes" accesskey="5">Widget classes</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-processing" accesskey="6">Data processing</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#MGL-scripts" accesskey="7">MGL scripts</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#UDAV" accesskey="8">UDAV</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Other-classes" accesskey="9">Other classes</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#All-samples">All samples</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Symbols-and-hot_002dkeys">Symbols and hot-keys</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#File-formats">File formats</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#TeX_002dlike-symbols">TeX-like symbols</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Plotting-time">Plotting time</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Copying-This-Manual">Copying This Manual</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Index">Index</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-
-
-<hr>
-<a name="Overview"></a>
-<div class="header">
-<p>
-Next: <a href="#Examples" accesskey="n" rel="next">Examples</a>, Previous: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Obzor-MathGL"></a>
-<h2 class="chapter">1 Обзор MathGL</h2>
-
-
-<a name="index-Obzor-MathGL"></a>
-
-<p>MathGL это ...
-</p><ul>
-<li> библиотека для создания высококачественной научной графики под Linux и Windows;
-</li><li> библиотека для быстрого обработки и отображения больших массивов данных;
-</li><li> библиотека для работы в оконном и консольном режимах;
-</li><li> библиотека с большим набором базовых типов графиков.
-</li></ul>
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#What-is-MathGL_003f" accesskey="1">What is MathGL?</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#MathGL-features" accesskey="2">MathGL features</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Installation" accesskey="3">Installation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Quick-guide" accesskey="4">Quick guide</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Changes-from-v_002e1" accesskey="5">Changes from v.1</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Utilities" accesskey="6">Utilities</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Thanks" accesskey="7">Thanks</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="What-is-MathGL_003f"></a>
-<div class="header">
-<p>
-Next: <a href="#MathGL-features" accesskey="n" rel="next">MathGL features</a>, Up: <a href="#Overview" accesskey="u" rel="up">Overview</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Chto-takoe-MathGL_003f"></a>
-<h3 class="section">1.1 Что такое MathGL?</h3>
-
-
-<p>Код для создания качественной научной графики на различных платформах. Код для быстрой обработки и отображения больших массивов данных. Код для работы в графическом и консольном режимах и легкого интегрирования в другие программы. Код с большим обновляемым набором графиков и инструментами обработки данных. Именно такого кода мне не хватало в последние годы при работе на персональных компьютерах и на кластерах. И именно такой код я постарался создать в библиотеке MathGL.
-</p>
-<p>На данный момент (версия 2.4.3) MathGL это более 50 основных типов графиков для одно-, двух- и трехмерных массивов, возможность экспорта в растровые и векторные (EPS или SVG) файлы, интерфейс для OpenGL и возможность запуска в консольном режиме, функции для обработки данных и даже простейший командный (интерпретируемый) язык MGL для упрощения построения графиков. Кроме того, есть несколько типов прозрачности, гладкое освещение, векторные шрифты, TeX-ие команды в надписях, произвольные криволинейные системы координат и прочие полезные мелочи (см. раздел pictures на <a href="http://mathgl.sf.net/">домашней странице</a>). Ну, и, естественно, полная переносимость библиотеки и ее свободное распространение под лицензией GPL v.2.0 или более поздней.
-</p>
-
-<hr>
-<a name="MathGL-features"></a>
-<div class="header">
-<p>
-Next: <a href="#Installation" accesskey="n" rel="next">Installation</a>, Previous: <a href="#What-is-MathGL_003f" accesskey="p" rel="prev">What is MathGL?</a>, Up: <a href="#Overview" accesskey="u" rel="up">Overview</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Vozmozhnosti-MathGL"></a>
-<h3 class="section">1.2 Возможности MathGL</h3>
-
-
-<p>Библиотека MathGL позволяет строить широкий класс графиков, включая:
-</p><ul>
-<li> рисование одномерных массивов (Plot, Area, Bars, Step, Stem, Torus, Chart, Error, Tube, Mark, see <a href="#g_t1D-plotting">1D plotting</a>);
-
-</li><li> рисование двумерных массивов (Mesh, Surf, Dens, Cont, ContF, Boxs, Axial, Fall, Belt, Tile, see <a href="#g_t2D-plotting">2D plotting</a>);
-
-</li><li> рисование трехмерных массивов (Surf3, Dens3, Cont3, ContF3, Cloud-like, see <a href="#g_t3D-plotting">3D plotting</a>);
-
-</li><li> рисование нескольких связанных массивов: векторные поля Vect, линии тока Flow, точечное отображение Map, поверхности с прозрачностью или цветом, определяемым другим массивом SurfA, SurfC, Surf3A, Surf3C (see <a href="#Dual-plotting">Dual plotting</a>);
-
-</li><li> и другие (см. see <a href="#MathGL-core">MathGL core</a>).
-</li></ul>
-
-<p>Фактически, я постарался реализовать все известные мне типы научных графиков. Список графиков постоянно пополняется, и если Вам нужен какой-то новый вариант, пишите на <a href="mailto:mathgl.abalakin@gmail.com">e-mail</a>, и в новой версии библиотеки этот график появится.
-</p>
-<p>Я постарался сделать графики максимально красивыми – поверхности могут быть прозрачными и освещены произвольно расположенными источниками света (максимальное их количество 10). Большинство функций рисования имеет два варианта: простой для быстрого построения картинки и более сложный для детальной настройки отображения, включающего в том числе возможность параметрического задания всех массивов. Получившееся изображение можно сохранить в растровом формате PNG, JPEG, GIF, TGA или BMP; в векторном EPS, SVG или TeX формате, или в 3D формате OBJ, OFF, STL, или в PRC формате, который может быть конвертирован U3D.
-</p>
-<p>Все надписи выводятся векторным шрифтом, что обеспечивает их хорошую масштабируемость и переносимость. Текст может содержать команды для большинства ТеХ-их символов, изменения положения (верхний и нижний индексы) и стиля шрифта внутри строки текста (see <a href="#Font-styles">Font styles</a>). Текст меток поворачивается вместе с осями. На график можно вывести описание кривых (легенду) и поместить надпись в произвольную точку экрана или пустить ее вдоль кривой. Поддерживаются произвольные кодировки текста (с помощью стандартной функции <code>setlocale()</code>) и текст в кодировке UTF-16.
-</p>
-<p>Для представления данных используется специальный класс mglData (see <a href="#Data-processing">Data processing</a>). Помимо безопасного создания и удаления массивов, он включает функции по их обработке (дифференцированию, интегрированию, сглаживанию, интерполяции и т.д.) и чтению текстового файла с автоматическим определением размеров данных. Класс mglData позволяет работать с массивами размерности вплоть до 3 (массивы, зависящие от трех независимых индексов <em>a_{ijk}</em>). Использование массивов с большим числом размерностей нецелесообразно, поскольку я не представляю, как их можно отобразить на экране. Заполнение или изменение значений массива можно выполнить как вручную, так и по формуле, заданной текстовой строкой.
-</p>
-<p>Для <em>быстрого</em> вычисления значения выражения, заданного текстовой строкой (see <a href="#Textual-formulas">Textual formulas</a>). Он основан на компиляции строки в древоподобную структуру при создании экземпляра класса. На этапе вычисления происходит быстрый обход дерева с выдачей результата для конкретных значений переменных. Помимо изменения значений массива данных, текстовые формулы используются для рисования в <em>произвольной</em> криволинейной системе координат. Набор таких координат ограничивается только фантазией пользователя, а не фиксированным числом (типа полярной, параболической, цилиндрической и т.д.).
-</p>
-
-<hr>
-<a name="Installation"></a>
-<div class="header">
-<p>
-Next: <a href="#Quick-guide" accesskey="n" rel="next">Quick guide</a>, Previous: <a href="#MathGL-features" accesskey="p" rel="prev">MathGL features</a>, Up: <a href="#Overview" accesskey="u" rel="up">Overview</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Ustanovka-MathGL"></a>
-<h3 class="section">1.3 Установка MathGL</h3>
-
-
-<p>Установка библиотеки возможна 4-мя способами.
-</p><ol>
-<li> Скомпилировать библиотеку непосредственно из исходных файлов. С библиотекой поставляется файлы для системы сборки CMake. Для его запуска достаточно в командной строке выполнить 3 команды: сначала <code>cmake .</code> дважды, далее <code>make</code> и, наконец, с правами суперпользователя <code>make install</code>. Иногда после компиляции библиотеки может потребоваться обновление списка библиотека в системе – выполните команду <code>ldconfig</code> с правами суперпользователя.
-
-<p>Есть несколько дополнительных опций, которые по умолчанию отключены. К их числу относятся: <code>enable-fltk, enable-glut, enable-qt4, enable-qt5</code> для поддержки FLTK, GLUT и/или Qt окон; <code>enable-jpeg, enable-gif, enable-hdf5</code> для поддержки соответствующих форматов; <code>enable-all</code> для включения всех возможностей. Для использования типа <code>double</code> для внутреннего хранения данных используйте опцию <code>enable-double</code>. Для создания интерфейсов к другим языкам (кроме С/Фортран/MGL) используйте опции <code>enable-python, enable-octave</code> или <code>enable-all-swig</code> для всех поддерживаемых языков. Вы можете воспользоваться WYSIWYG утилитой (<code>cmake-gui</code>) для просмотра и изменения всех опций, или выполнить <code>cmake -D enable-all=on -D enable-all-widgets=on -D enable-all-swig=on .</code> в командной строке для включения всех опций.
-</p>
-<p>При сборке с помощью MinGW необходимо дополнительно установить опцию сборки <code>-fopenmp</code> (т.е. <code>CMAKE_EXE_LINKER_FLAGS:STRING='-fopenmp'</code> и <code>CMAKE_SHARED_LINKER_FLAGS:STRING='-fopenmp'</code>) если включена поддержка OpenMP (<code>enable-openmp=ON</code>).
-</p>
-
-</li><li> Использовать предварительно скомпилированные файлы – с библиотекой поставляются файлы для MinGW (платформа Win32). В скомпилированной версии достаточно распаковать заголовочные файлы в папку с заголовочными файлами и библиотеку libmgl.a в папку с библиотеками. По умолчанию, скомпилированная версия включают поддержку GSL (www.gsl.org), PNG, GIF и JPEG. Соответственно, при сборке программы эти библиотеки должны быть установлены (их можно найти на <a href="http://gnuwin32.sourceforge.net/packages.html">http://gnuwin32.sourceforge.net/packages.html</a>).
-</li><li> Установить из стандартных пакетов (RPM, deb, DevPak и пр.).
-</li></ol>
-
-<p>Последнюю версию (которая может быть не стабильна) можно загрузить с sourceforge.net SVN с помощью команды
-</p><pre class="verbatim">svn checkout http://svn.code.sf.net/p/mathgl/code/mathgl-2x mathgl-code
-</pre>
-<p><strong>ВАЖНО!</strong> MathGL использует набор defines, определяемых на этапе конфигурирования библиотеки. Это <code>MGL_SYS_NAN, MGL_HAVE_TYPEOF, MGL_HAVE_PTHREAD, MGL_HAVE_ATTRIBUTE, MGL_HAVE_C99_COMPLEX, MGL_HAVE_RVAL</code>. Они могут отличаться при использовании бинарников скомпилированных другим компилятором (например при использовании скомпилированных MinGW бинарников в VisualStudio). Я специально устанавливаю их в <code>0</code> для компиляторов Borland и Microsoft из соображений совместимости. Кроме того, настройки по умолчанию подходят для компиляторов GNU (gcc, mingw) и clang. Однако, для прочих компиляторов может потребоваться ручная установка defines в <code>0</code> в файле <code>include/mgl2/config.h</code> если вы используете предварительно скомпилированные файлы.
-</p>
-
-
-
-<hr>
-<a name="Quick-guide"></a>
-<div class="header">
-<p>
-Next: <a href="#Changes-from-v_002e1" accesskey="n" rel="next">Changes from v.1</a>, Previous: <a href="#Installation" accesskey="p" rel="prev">Installation</a>, Up: <a href="#Overview" accesskey="u" rel="up">Overview</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Quick-guide-1"></a>
-<h3 class="section">1.4 Quick guide</h3>
-
-
-<p>There are 3 steps to prepare the plot in MathGL: (1) prepare data to be plotted, (2) setup plot, (3) plot data. Let me show this on the example of surface plotting.
-</p>
-<p>First we need the data. MathGL use its own class <code>mglData</code> to handle data arrays (see <a href="#Data-processing">Data processing</a>). This class give ability to handle data arrays by more or less format independent way. So, create it
-</p><pre class="verbatim"> int main()
- {
- mglData dat(30,40); // data to for plotting
- for(long i=0;i<30;i++) for(long j=0;j<40;j++)
- dat.a[i+30*j] = 1/(1+(i-15)*(i-15)/225.+(j-20)*(j-20)/400.);
-</pre><p>Here I create matrix 30*40 and initialize it by formula. Note, that I use <code>long</code> type for indexes <var>i</var>, <var>j</var> because data arrays can be really large and <code>long</code> type will automatically provide proper indexing.
-</p>
-<p>Next step is setup of the plot. The only setup I need is axis rotation and lighting.
-</p><pre class="verbatim"> mglGraph gr; // class for plot drawing
- gr.Rotate(50,60); // rotate axis
- gr.Light(true); // enable lighting
-</pre>
-<p>Everything is ready. And surface can be plotted.
-</p><pre class="verbatim"> gr.Surf(dat); // plot surface
-</pre><p>Basically plot is done. But I decide to add yellow (‘<samp>y</samp>’ color, see <a href="#Color-styles">Color styles</a>) contour lines on the surface. To do it I can just add:
-</p><pre class="verbatim"> gr.Cont(dat,"y"); // plot yellow contour lines
-</pre><p>This demonstrate one of base MathGL concept (see, <a href="#General-concepts">General concepts</a>) – “new drawing never clears things drawn already”. So, you can just consequently call different plotting functions to obtain “combined” plot. For example, if one need to draw axis then he can just call one more plotting function
-</p><pre class="verbatim"> gr.Axis(); // draw axis
-</pre>
-<p>Now picture is ready and we can save it in a file.
-</p><pre class="verbatim"> gr.WriteFrame("sample.png"); // save it
- }
-</pre>
-<p>To compile your program, you need to specify the linker option <code>-lmgl</code>.
-</p>
-<p>This is enough for a compilation of console program or with external (non-MathGL) window library. If you want to use FLTK or Qt windows provided by MathGL then you need to add the option <code>-lmgl-wnd</code>.
-</p>
-<p>При использовании фортрана необходимо также включить библиотеку <code>-lstdc++</code>. Кроме того, если библиотека была собрана с опцией <code>enable-double=ON</code> (по умолчанию в версии 2.1 и более поздних), то все вещественные числа должны быть типа real*8. Это можно включить по умолчанию опцией <code>-fdefault-real-8</code>.
-</p>
-
-<hr>
-<a name="Changes-from-v_002e1"></a>
-<div class="header">
-<p>
-Next: <a href="#Utilities" accesskey="n" rel="next">Utilities</a>, Previous: <a href="#Quick-guide" accesskey="p" rel="prev">Quick guide</a>, Up: <a href="#Overview" accesskey="u" rel="up">Overview</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Changes-from-v_002e1_002e_002a"></a>
-<h3 class="section">1.5 Changes from v.1.*</h3>
-
-
-<p>There are a lot of changes for v.2. Here I denote only main of them.
-</p><ul>
-<li> mglGraph class is single plotter class instead of mglGraphZB, mglGraphPS and so on.
-</li><li> Text style and text color positions are swapped. I.e. text style ‘<samp>r:C</samp>’ give red centered text, but not roman dark cyan text as for v.1.*.
-</li><li> ColumnPlot() indexing is reverted.
-</li><li> Move most of arguments of plotting functions into the string parameter and/or options.
-</li><li> “Bright” colors (like {b8}) can be used in color schemes and line styles.
-</li><li> Intensively use pthread internally for parallelization of drawing and data processing.
-</li><li> Add tick labels rotation and skipping. Add ticks in time/date format.
-</li><li> New kinds of plots (Tape(), Label(), Cones(), ContV()). Extend existing plots. New primitives (Circle(), Ellipse(), Rhomb(), ...). New plot positioning (MultiPlot(), GridPlot())
-</li><li> Improve MGL scripts. Add ’ask’ command and allow string concatenation from different lines.
-</li><li> Export to LaTeX and to 3D formats (OBJ, OFF, STL).
-</li><li> Add pipes support in utilities (<code>mglconv, mglview</code>).
-</li></ul>
-
-
-<hr>
-<a name="Utilities"></a>
-<div class="header">
-<p>
-Next: <a href="#Thanks" accesskey="n" rel="next">Thanks</a>, Previous: <a href="#Changes-from-v_002e1" accesskey="p" rel="prev">Changes from v.1</a>, Up: <a href="#Overview" accesskey="u" rel="up">Overview</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Utilities-for-parsing-MGL"></a>
-<h3 class="section">1.6 Utilities for parsing MGL</h3>
-
-
-<p>MathGL library provides several tools for parsing MGL scripts. There is tools saving it to bitmap or vectorial images (<code>mglconv</code>). Tool <code>mglview</code> show MGL script and allow to rotate and setup the image. Another feature of <code>mglview</code> is loading *.mgld files (see <code>ExportMGLD()</code>) for quick viewing 3d pictures.
-</p>
-<p>Both tools have similar set of arguments. They can be name of script file or options. You can use ‘<samp>-</samp>’ as script name for using standard input (i.e. pipes). Options are:
-</p><ul>
-<li> <strong>-1</strong> <var>str</var>
-set <var>str</var> as argument $1 for script;
-</li><li> ...
-...
-</li><li> <strong>-9</strong> <var>str</var>
-set <var>str</var> as argument $9 for script;
-</li><li> <strong>-L</strong> <var>loc</var>
-set locale to <var>loc</var>;
-</li><li> <strong>-s</strong> <var>fname</var>
-set MGL script for setting up the plot;
-</li><li> <strong>-h</strong>
-print help message.
-</li></ul>
-<p>Additionally <code>mglconv</code> have following options:
-</p><ul>
-<li> <strong>-A</strong> <var>val</var>
-add <var>val</var> into the list of animation parameters;
-</li><li> <strong>-C</strong> <var>v1</var>:<var>v2</var>[:<var>dv</var>]
-add values from <var>v1</var> ot <var>v2</var> with step <var>dv</var> (default is 1) into the list of animation parameters;
-</li><li> <strong>-o</strong> <var>name</var>
-set output file name;
-</li><li> <strong>-n</strong>
-disable default output (script should save results by itself);
-</li><li> <strong>-S</strong> <var>val</var>
-set set scaling factor for <a href="#setsize">setsize</a>;
-</li><li> <strong>-q</strong> <var>val</var>
-set <a href="#quality">quality</a> for output (val=0...9).
-</li></ul>
-
-<p>Also you can create animated GIF file or a set of JPEG files with names ‘<samp>frameNNNN.jpg</samp>’ (here ‘<samp>NNNN</samp>’ is frame index). Values of the parameter <code>$0</code> for making animation can be specified inside the script by comment <code>##a val</code> for each value <code>val</code> (one comment for one value) or by option(s) ‘<samp>-A val</samp>’. Also you can specify a cycle for animation by comment <code>##c v1 v2 dv</code> or by option <code>-C v1:v2:dv</code>. In the case of found/specified animation parameters, tool will execute script several times – once for each value of <code>$0</code>.
-</p>
-
-<p>MathGL also provide another simple tool <code>mgl.cgi</code> which parse MGL script from CGI request and send back produced PNG file. Usually this program should be placed in <code>/usr/lib/cgi-bin/</code>. But you need to put this program by yourself due to possible security issues and difference of Apache server settings.
-</p>
-
-<hr>
-<a name="Thanks"></a>
-<div class="header">
-<p>
-Previous: <a href="#Utilities" accesskey="p" rel="prev">Utilities</a>, Up: <a href="#Overview" accesskey="u" rel="up">Overview</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Blagodarnosti"></a>
-<h3 class="section">1.7 Благодарности</h3>
-
-
-
-<ul>
-<li> Моя специальная благодарность моей жене за терпение во время написания библиотеки.
-</li><li> Я благодарен моим соавторам Д. Кулагину и М. Видассову за помощь в разработке MathGL.
-</li><li> Я благодарен Diego Sejas Viscarra за разработку mgltex, вклад в генерацию фракталов и продуктивные предложения и обсуждения.
-</li><li> Я благодарен D. Eftaxiopoulos, D. Haley, В. Липатову и С. Плису за создание бинарных пакетов для Linux.
-</li><li> Я благодарен С. Скобелеву, К. Михайленко, М. Вейсману, A. Прохорову, A. Короткевичу, В. Онучину, С. Плису, Р. Киселеву, A. Иванову, Н. Троицкому and В. Липатову за продуктивные предложения и обсуждения.
-</li><li> Я благодарен спонсорам М. Вейсману (<a href="http://www.jiht.ru/about/structure.php?set_filter_structure=Y&structure_UF_DEPARTMENT=241&filter=Y&set_filter=Y">ОИВТ РАН</a>) и A. Прохорову (<a href="www.datadvance.net">DATADVANCE</a>).
-</li></ul>
-
-<p>Javascript интерфейс был разработан при поддержке компании <a href="www.datadvance.net">DATADVANCE</a>.
-</p>
-
-
-
-<hr>
-<a name="Examples"></a>
-<div class="header">
-<p>
-Next: <a href="#General-concepts" accesskey="n" rel="next">General concepts</a>, Previous: <a href="#Overview" accesskey="p" rel="prev">Overview</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Primery-MathGL"></a>
-<h2 class="chapter">2 Примеры MathGL</h2>
-
-
-<p>В данной главе рассмотрены базовые и продвинутые возможности MathGL, даны советы по использованию и примеры для всех типов графиков. Я рекомендую прочитать вначале первые 2 раздела и посмотреть на раздел <a href="#Hints">Hints</a>. Также рекомендую прочитать <a href="#General-concepts">General concepts</a> и <a href="#FAQ">FAQ</a>.
-</p>
-<p>Отмечу, что MathGL v.2.* имеет только пользовательских 2 интерфейса: один для языков подобных C или Fortran (не поддерживающих классы), другой для языков подобных C++/Python/Octave, которые поддерживают классы. При этом все классы являются "оберткой" С-ого интерфейсы, а функции-члены классов – inline вызовами функций С. Поэтому, в большинстве примеров в этой главе я буду приводить только один вариант кода, который после минимальных изменений синтаксиса может быть применен для других языков. Например, код на языке C++
-</p><pre class="verbatim">#include <mgl2/mgl.h>
-int main()
-{
- mglGraph gr;
- gr.FPlot("sin(pi*x)");
- gr.WriteFrame("test.png");
-}
-</pre><p>на Python будет выглядеть как
-</p><pre class="verbatim">from mathgl import *
-gr = mglGraph();
-gr.FPlot("sin(pi*x)");
-gr.WriteFrame("test.png");
-</pre><p>в Octave он будет почти тем же (в новых версиях надо предварительно выполнить <code>mathgl;</code>)
-</p><pre class="verbatim">gr = mglGraph();
-gr.FPlot("sin(pi*x)");
-gr.WriteFrame("test.png");
-</pre><p>в C необходимо будет найти С-ые аналоги функций (из документации) и указать все их аргументы явно
-</p><pre class="verbatim">#include <mgl2/mgl_cf.h>
-int main()
-{
- HMGL gr = mgl_create_graph(600,400);
- mgl_fplot(gr,"sin(pi*x)","","");
- mgl_write_frame(gr,"test.png","");
- mgl_delete_graph(gr);
-}
-</pre><p>в Fortran помимо этого придется определить функции возвращающие указатели на объекты как функции возвращающие целое
-</p><pre class="verbatim">integer gr, mgl_create_graph
-gr = mgl_create_graph(600,400);
-call mgl_fplot(gr,'sin(pi*x)','','');
-call mgl_write_frame(gr,'test.png','');
-call mgl_delete_graph(gr);
-</pre><p>и т.д.
-</p>
-
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Basic-usage" accesskey="1">Basic usage</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Advanced-usage" accesskey="2">Advanced usage</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-handling" accesskey="3">Data handling</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-plotting" accesskey="4">Data plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Hints" accesskey="5">Hints</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#FAQ" accesskey="6">FAQ</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Basic-usage"></a>
-<div class="header">
-<p>
-Next: <a href="#Advanced-usage" accesskey="n" rel="next">Advanced usage</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Osnovy-ispolxzovaniya"></a>
-<h3 class="section">2.1 Основы использования</h3>
-
-
-<p>Библиотеку MathGL можно использовать несколькими способами, каждый из которых имеет свои достоинства и недостатки:
-</p><ul>
-<li> <em>Использовать возможности MathGL для создания графического окна (требуется FLTK, Qt или GLUT библиотеки).</em>
-
-<p>Положительная сторона состоит в возможности сразу увидеть график и быстро его мышкой поправить (повернуть, приблизить, выключить прозрачность или освещение и т.д.). Однако, в этом случае требуется наличие графической системы (нельзя запускать на удаленной машине), и работать можно только с одним набором данных одновременно.
-</p>
-</li><li> <em>Прямой вывод в файл в растровом или векторном формате, без создания графического окна.</em>
-
-<p>Достоинства такого подхода: пакетная обработка похожих данных (например, набора расчетных файлов при различных условиях), возможность запуска из консольной программы (включая запуск на удаленном компьютере/сервере/кластере), более быстрая и автоматизированная отрисовка, сохранение графиков для последующего анализа непосредственно во время расчета. К недостаткам подхода можно отнести: использование внешней программы просмотра для построенных графиков, необходимость заранее представить картинку (углы просмотра, освещение и пр.). Я рекомендую вначале использовать графическое окно для выбора оптимальных параметров графика, а потом использовать их для пакетной обработки.
-</p>
-</li><li> <em>Рисовать график в памяти с последующим выводом на экран другой графической программой.</em>
-
-<p>В этом случае программист имеет максимум свободы в выборе графической библиотеки (не только FLTK, Qt или GLUT), в расположении и выборе элементов управления графиком и т.д. Я рекомендую этот вариант для "самодостаточного" приложения.
-</p>
-</li><li> <em>Использовать FLTK или Qt виджеты, предоставляемые MathGL</em>
-
-<p>Вы также можете использовать ряд элементов управления (виджетов), которые позволяют отобразить график, сохранить его в файл в различных форматах или скопировать в буфер обмена, обработать движение/клики мышкой и пр.
-</p></li></ul>
-
-<p>Графики MathGL могут быть созданы не только с помощью объектно-ориентированных языков (например, C++ или Python), но и на C или Fortran подобных языках. Использование последних в основном идентичны использованию классов (за исключением различных имен функций). Различие состоит в обязательном предварительном создании (и удалении после использования) объектов типа HMGL (для графики) и/или HMDT (для данных). Пользователи Fortran могут считать эти переменные целочисленными с достаточной разрядностью для используемой операционной системы.
-</p>
-<p>Рассмотрим вышесказанное подробно.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Using-MathGL-window" accesskey="1">Using MathGL window</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Drawing-to-file" accesskey="2">Drawing to file</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Animation" accesskey="3">Animation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Drawing-in-memory" accesskey="4">Drawing in memory</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Draw-and-calculate" accesskey="5">Draw and calculate</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Using-QMathGL" accesskey="6">Using QMathGL</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#OpenGL-output" accesskey="7">OpenGL output</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#MathGL-and-PyQt" accesskey="8">MathGL and PyQt</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#MathGL-and-MPI" accesskey="9">MathGL and MPI</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-
-<hr>
-<a name="Using-MathGL-window"></a>
-<div class="header">
-<p>
-Next: <a href="#Drawing-to-file" accesskey="n" rel="next">Drawing to file</a>, Up: <a href="#Basic-usage" accesskey="u" rel="up">Basic usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Ispolxzovanie-okon-MathGL"></a>
-<h4 class="subsection">2.1.1 Использование окон MathGL</h4>
-
-<a name="index-window"></a>
-<a name="index-widgets"></a>
-
-<p>“Интерактивный” способ использования MathGL состоит в создании окна с помощью классов <code>mglQT</code>, <code>mglFLTK</code> или <code>mglGLUT</code> (см. <a href="#Widget-classes">Widget classes</a>) и последующем рисовании в этом окне. Соответствующий код выглядит так:
-</p><pre class="verbatim">#include <mgl2/qt.h>
-int sample(mglGraph *gr)
-{
- gr->Rotate(60,40);
- gr->Box();
- return 0;
-}
-//-----------------------------------------------------
-int main(int argc,char **argv)
-{
- mglQT gr(sample,"MathGL examples");
- return gr.Run();
-}
-</pre><p>Здесь используется callback функция <code>sample</code>, выполняющая собственно рисование. Функция <code>main</code> – точка входа в программу – создает окно (объект <var>gr</var> типа <code>mglQT</code>) и запускает цикл обработки сообщений (вызов <code>gr.Run()</code>). Для компиляции достаточно выполнить команду
-</p><pre class="verbatim">gcc test.cpp -lmgl-qt5 -lmgl
-</pre><p>Вы можете использовать "-lmgl-qt4" вместо "-lmgl-qt5", если установлен Qt4.
-</p>
-<p>Альтернативный способ состоит в использовании класса, производного от <code>mglDraw</code> с переопределенной функцией <code>Draw()</code>:
-</p><pre class="verbatim">#include <mgl2/qt.h>
-class Foo : public mglDraw
-{
-public:
- int Draw(mglGraph *gr);
-};
-//-----------------------------------------------------
-int Foo::Draw(mglGraph *gr)
-{
- gr->Rotate(60,40);
- gr->Box();
- return 0;
-}
-//-----------------------------------------------------
-int main(int argc,char **argv)
-{
- Foo foo;
- mglQT gr(&foo,"MathGL examples");
- return gr.Run();
-}
-</pre><p>Или в использовании функций С:
-</p><pre class="verbatim">#include <mgl2/mgl_cf.h>
-int sample(HMGL gr, void *)
-{
- mgl_rotate(gr,60,40,0);
- mgl_box(gr);
-}
-int main(int argc,char **argv)
-{
- HMGL gr;
- gr = mgl_create_graph_qt(sample,"MathGL examples",0,0);
- return mgl_qt_run();
-/* generally I should call mgl_delete_graph() here,
- * but I omit it in main() function. */
-}
-</pre>
-<p>Похожий код получается и при использовании окон <code>mglFLTK</code>, <code>mglGLUT</code> (функция <code>sample()</code> та же):
-</p><pre class="verbatim">#include <mgl2/glut.h>
-int main(int argc,char **argv)
-{
- mglGLUT gr(sample,"MathGL examples");
- return 0;
-}
-</pre>
-<p>The rotation, shift, zooming, switching on/off transparency and lighting can be done with help of tool-buttons (for <code>mglWindow</code>) or by hot-keys: ‘<samp>a</samp>’, ‘<samp>d</samp>’, ‘<samp>w</samp>’, ‘<samp>s</samp>’ for plot rotation, ‘<samp>r</samp>’ and ‘<samp>f</samp>’ switching on/off transparency and lighting. Press ‘<samp>x</samp>’ for exit (or closing the window).
-</p>
-<p>In this example function <code>sample</code> rotates axes (<code>Rotate()</code>, see <a href="#Subplots-and-rotation">Subplots and rotation</a>) and draws the bounding box (<code>Box()</code>). Drawing is placed in separate function since it will be used on demand when window canvas needs to be redrawn.
-</p>
-
-<hr>
-<a name="Drawing-to-file"></a>
-<div class="header">
-<p>
-Next: <a href="#Animation" accesskey="n" rel="next">Animation</a>, Previous: <a href="#Using-MathGL-window" accesskey="p" rel="prev">Using MathGL window</a>, Up: <a href="#Basic-usage" accesskey="u" rel="up">Basic usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Drawing-to-file-1"></a>
-<h4 class="subsection">2.1.2 Drawing to file</h4>
-
-
-<p>Another way of using MathGL library is the direct writing of the picture to the file. It is most usable for plot creation during long calculation or for using of small programs (like Matlab or Scilab scripts) for visualizing repetitive sets of data. But the speed of drawing is much higher in comparison with a script language.
-</p>
-<p>The following code produces a bitmap PNG picture:
-</p><pre class="verbatim">#include <mgl2/mgl.h>
-int main(int ,char **)
-{
- mglGraph gr;
- gr.Alpha(true); gr.Light(true);
- sample(&gr); // The same drawing function.
- gr.WritePNG("test.png"); // Don't forget to save the result!
- return 0;
-}
-</pre><p>For compilation, you need only libmgl library not the one with widgets
-</p><pre class="verbatim">gcc test.cpp -lmgl
-</pre><p>This can be important if you create a console program in computer/cluster where X-server (and widgets) is inaccessible.
-</p>
-<p>The only difference from the previous variant (using windows) is manual switching on the transparency <code>Alpha</code> and lightning <code>Light</code>, if you need it. The usage of frames (see <a href="#Animation">Animation</a>) is not advisable since the whole image is prepared each time. If function <code>sample</code> contains frames then only last one will be saved to the file. In principle, one does not need to separate drawing functions in case of direct file writing in consequence of the single calling of this function for each picture. However, one may use the same drawing procedure to create a plot with changeable parameters, to export in different file types, to emphasize the drawing code and so on. So, in future I will put the drawing in the separate function.
-</p>
-<p>The code for export into other formats (for example, into vector EPS file) looks the same:
-</p><pre class="verbatim">#include <mgl2/mgl.h>
-int main(int ,char **)
-{
- mglGraph gr;
- gr.Light(true);
- sample(&gr); // The same drawing function.
- gr.WriteEPS("test.eps"); // Don't forget to save the result!
- return 0;
-}
-</pre><p>The difference from the previous one is using other function <code>WriteEPS()</code> for EPS format instead of function <code>WritePNG()</code>. Also, there is no switching on of the plot transparency <code>Alpha</code> since EPS format does not support it.
-</p>
-
-<hr>
-<a name="Animation"></a>
-<div class="header">
-<p>
-Next: <a href="#Drawing-in-memory" accesskey="n" rel="next">Drawing in memory</a>, Previous: <a href="#Drawing-to-file" accesskey="p" rel="prev">Drawing to file</a>, Up: <a href="#Basic-usage" accesskey="u" rel="up">Basic usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Animation-1"></a>
-<h4 class="subsection">2.1.3 Animation</h4>
-
-
-<p>Widget classes (<code>mglWindow</code>, <code>mglGLUT</code>) support a delayed drawing, when all plotting functions are called once at the beginning of writing to memory lists. Further program displays the saved lists faster. Resulting redrawing will be faster but it requires sufficient memory. Several lists (frames) can be displayed one after another (by pressing ‘<samp>,</samp>’, ‘<samp>.</samp>’) or run as cinema. To switch these feature on one needs to modify function <code>sample</code>:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->NewFrame(); // the first frame
- gr->Rotate(60,40);
- gr->Box();
- gr->EndFrame(); // end of the first frame
- gr->NewFrame(); // the second frame
- gr->Box();
- gr->Axis("xy");
- gr->EndFrame(); // end of the second frame
- return gr->GetNumFrame(); // returns the frame number
-}
-</pre><p>First, the function creates a frame by calling <code>NewFrame()</code> for rotated axes and draws the bounding box. The function <code>EndFrame()</code> <strong>must be</strong> called after the frame drawing! The second frame contains the bounding box and axes <code>Axis("xy")</code> in the initial (unrotated) coordinates. Function <code>sample</code> returns the number of created frames <code>GetNumFrame()</code>.
-</p>
-<p>Note, that animation can be also done as visualization of running calculations (see <a href="#Draw-and-calculate">Draw and calculate</a>).
-</p>
-<p>Pictures with <strong>animation can be saved in file(s)</strong> as well. You can: export in animated GIF, or save each frame in separate file (usually JPEG) and convert these files into the movie (for example, by help of ImageMagic). Let me show both methods.
-</p>
-<a name="GIF"></a><p>The simplest methods is making animated GIF. There are 3 steps: (1) open GIF file by <code>StartGIF()</code> function; (2) create the frames by calling <code>NewFrame()</code> before and <code>EndFrame()</code> after plotting; (3) close GIF by <code>CloseGIF()</code> function. So the simplest code for “running” sinusoid will look like this:
-</p><pre class="verbatim">#include <mgl2/mgl.h>
-int main(int ,char **)
-{
- mglGraph gr;
- mglData dat(100);
- char str[32];
- gr.StartGIF("sample.gif");
- for(int i=0;i<40;i++)
- {
- gr.NewFrame(); // start frame
- gr.Box(); // some plotting
- for(int j=0;j<dat.nx;j++)
- dat.a[j]=sin(M_PI*j/dat.nx+M_PI*0.05*i);
- gr.Plot(dat,"b");
- gr.EndFrame(); // end frame
- }
- gr.CloseGIF();
- return 0;
-}
-</pre>
-<a name="MPEG"></a><p>The second way is saving each frame in separate file (usually JPEG) and later make the movie from them. MathGL have special function for saving frames – it is <code>WriteFrame()</code>. This function save each frame with automatic name ‘<samp>frame0001.jpg, frame0002.jpg</samp>’ and so on. Here prefix ‘<samp>frame</samp>’ is defined by <var>PlotId</var> variable of <code>mglGraph</code> class. So the similar code will look like this:
-</p><pre class="verbatim">#include <mgl2/mgl.h>
-int main(int ,char **)
-{
- mglGraph gr;
- mglData dat(100);
- char str[32];
- for(int i=0;i<40;i++)
- {
- gr.NewFrame(); // start frame
- gr.Box(); // some plotting
- for(int j=0;j<dat.nx;j++)
- dat.a[j]=sin(M_PI*j/dat.nx+M_PI*0.05*i);
- gr.Plot(dat,"b");
- gr.EndFrame(); // end frame
- gr.WriteFrame(); // save frame
- }
- return 0;
-}
-</pre>
-<p>Created files can be converted to movie by help of a lot of programs. For example, you can use ImageMagic (command ‘<samp>convert frame*.jpg movie.mpg</samp>’), MPEG library, GIMP and so on.
-</p>
-<p>Finally, you can use <code>mglconv</code> tool for doing the same with MGL scripts (see <a href="#Utilities">Utilities</a>).
-</p>
-
-<hr>
-<a name="Drawing-in-memory"></a>
-<div class="header">
-<p>
-Next: <a href="#Draw-and-calculate" accesskey="n" rel="next">Draw and calculate</a>, Previous: <a href="#Animation" accesskey="p" rel="prev">Animation</a>, Up: <a href="#Basic-usage" accesskey="u" rel="up">Basic usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Drawing-in-memory-1"></a>
-<h4 class="subsection">2.1.4 Drawing in memory</h4>
-
-
-<p>The last way of MathGL using is the drawing in memory. Class <code>mglGraph</code> allows one to create a bitmap picture in memory. Further this picture can be displayed in window by some window libraries (like wxWidgets, FLTK, Windows GDI and so on). For example, the code for drawing in wxWidget library looks like:
-</p><pre class="verbatim">void MyForm::OnPaint(wxPaintEvent& event)
-{
- int w,h,x,y;
- GetClientSize(&w,&h); // size of the picture
- mglGraph gr(w,h);
-
- gr.Alpha(true); // draws something using MathGL
- gr.Light(true);
- sample(&gr,NULL);
-
- wxImage img(w,h,gr.GetRGB(),true);
- ToolBar->GetSize(&x,&y); // gets a height of the toolbar if any
- wxPaintDC dc(this); // and draws it
- dc.DrawBitmap(wxBitmap(img),0,y);
-}
-</pre><p>The drawing in other libraries is most the same.
-</p>
-<p>For example, FLTK code will look like
-</p><pre class="verbatim">void Fl_MyWidget::draw()
-{
- mglGraph gr(w(),h());
- gr.Alpha(true); // draws something using MathGL
- gr.Light(true);
- sample(&gr,NULL);
- fl_draw_image(gr.GetRGB(), x(), y(), gr.GetWidth(), gr.GetHeight(), 3);
-}
-</pre><p>Qt code will look like
-</p><pre class="verbatim">void MyWidget::paintEvent(QPaintEvent *)
-{
- mglGraph gr(w(),h());
-
- gr.Alpha(true); // draws something using MathGL
- gr.Light(true); gr.Light(0,mglPoint(1,0,-1));
- sample(&gr,NULL);
-
- // Qt don't support RGB format as is. So, let convert it to BGRN.
- long w=gr.GetWidth(), h=gr.GetHeight();
- unsigned char *buf = new uchar[4*w*h];
- gr.GetBGRN(buf, 4*w*h)
- QPixmap pic = QPixmap::fromImage(QImage(*buf, w, h, QImage::Format_RGB32));
-
- QPainter paint;
- paint.begin(this); paint.drawPixmap(0,0,pic); paint.end();
- delete []buf;
-}
-</pre>
-
-<hr>
-<a name="Draw-and-calculate"></a>
-<div class="header">
-<p>
-Next: <a href="#Using-QMathGL" accesskey="n" rel="next">Using QMathGL</a>, Previous: <a href="#Drawing-in-memory" accesskey="p" rel="prev">Drawing in memory</a>, Up: <a href="#Basic-usage" accesskey="u" rel="up">Basic usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Draw-and-calculate-1"></a>
-<h4 class="subsection">2.1.5 Draw and calculate</h4>
-
-
-<p>MathGL can be used to draw plots in parallel with some external calculations. The simplest way for this is the usage of <a href="#mglDraw-class">mglDraw class</a>. At this you should enable pthread for widgets by setting <code>enable-pthr-widget=ON</code> at configure stage (it is set by default).
-First, you need to inherit you class from <code>mglDraw</code> class, define virtual members <code>Draw()</code> and <code>Calc()</code> which will draw the plot and proceed calculations. You may want to add the pointer <code>mglWnd *wnd;</code> to window with plot for interacting with them. Finally, you may add any other data or member functions. The sample class is shown below
-</p><pre class="verbatim">class myDraw : public mglDraw
-{
- mglPoint pnt; // some variable for changeable data
- long i; // another variable to be shown
- mglWnd *wnd; // external window for plotting
-public:
- myDraw(mglWnd *w=0) : mglDraw() { wnd=w; }
- void SetWnd(mglWnd *w) { wnd=w; }
- int Draw(mglGraph *gr)
- {
- gr->Line(mglPoint(),pnt,"Ar2");
- char str[16]; snprintf(str,15,"i=%ld",i);
- gr->Puts(mglPoint(),str);
- return 0;
- }
- void Calc()
- {
- for(i=0;;i++) // do calculation
- {
- long_calculations();// which can be very long
- Check(); // check if need pause
- pnt.Set(2*mgl_rnd()-1,2*mgl_rnd()-1);
- if(wnd) wnd->Update();
- }
- }
-} dr;
-</pre><p>There is only one issue here. Sometimes you may want to pause calculations to view result carefully, or save state, or change something. So, you need to provide a mechanism for pausing. Class <code>mglDraw</code> provide function <code>Check();</code> which check if toolbutton with pause is pressed and wait until it will be released. This function should be called in a "safety" places, where you can pause the calculation (for example, at the end of time step). Also you may add call <code>exit(0);</code> at the end of <code>Calc();</code> function for closing window and exit after finishing calculations.
-Finally, you need to create a window itself and run calculations.
-</p><pre class="verbatim">int main(int argc,char **argv)
-{
- mglFLTK gr(&dr,"Multi-threading test"); // create window
- dr.SetWnd(&gr); // pass window pointer to yours class
- dr.Run(); // run calculations
- gr.Run(); // run event loop for window
- return 0;
-}
-</pre>
-<p>Note, that you can reach the similar functionality without using <code>mglDraw</code> class (i.e. even for pure C code).
-</p><pre class="verbatim">mglFLTK *gr=NULL; // pointer to window
-void *calc(void *) // function with calculations
-{
- mglPoint pnt; // some data for plot
- for(long i=0;;i++) // do calculation
- {
- long_calculations(); // which can be very long
- pnt.Set(2*mgl_rnd()-1,2*mgl_rnd()-1);
- if(gr)
- {
- gr->Clf(); // make new drawing
- // draw something
- gr->Line(mglPoint(),pnt,"Ar2");
- char str[16]; snprintf(str,15,"i=%ld",i);
- gr->Puts(mglPoint(),str);
- // don't forgot to update window
- gr->Update();
- }
- }
-}
-int main(int argc,char **argv)
-{
- static pthread_t thr;
- pthread_create(&thr,0,calc,0); // create separate thread for calculations
- pthread_detach(thr); // and detach it
- gr = new mglFLTK; // now create window
- gr->Run(); // and run event loop
- return 0;
-}
-</pre><p>This sample is exactly the same as one with <code>mglDraw</code> class, but it don’t have functionality for pausing calculations. If you need it then you have to create global mutex (like <code>pthread_mutex_t *mutex = pthread_mutex_init(&mutex,NULL);</code>), set it to window (like <code>gr->SetMutex(mutex);</code>) and periodically check it at calculations (like <code>pthread_mutex_lock(&mutex); pthread_mutex_unlock(&mutex);</code>).
-</p>
-<p>Finally, you can put the event-handling loop in separate instead of yours code by using <code>RunThr()</code> function instead of <code>Run()</code> one. Unfortunately, such method work well only for FLTK windows and only if pthread support was enabled. Such limitation come from the Qt requirement to be run in the primary thread only. The sample code will be:
-</p><pre class="verbatim">int main(int argc,char **argv)
-{
- mglFLTK gr("test");
- gr.RunThr(); // <-- need MathGL version which use pthread for widgets
- mglPoint pnt; // some data
- for(int i=0;i<10;i++) // do calculation
- {
- long_calculations();// which can be very long
- pnt.Set(2*mgl_rnd()-1,2*mgl_rnd()-1);
- gr.Clf(); // make new drawing
- gr.Line(mglPoint(),pnt,"Ar2");
- char str[10] = "i=0"; str[3] = '0'+i;
- gr->Puts(mglPoint(),str);
- gr.Update(); // update window
- }
- return 0; // finish calculations and close the window
-}
-</pre>
-
-
-<hr>
-<a name="Using-QMathGL"></a>
-<div class="header">
-<p>
-Next: <a href="#OpenGL-output" accesskey="n" rel="next">OpenGL output</a>, Previous: <a href="#Draw-and-calculate" accesskey="p" rel="prev">Draw and calculate</a>, Up: <a href="#Basic-usage" accesskey="u" rel="up">Basic usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Using-QMathGL-1"></a>
-<h4 class="subsection">2.1.6 Using QMathGL</h4>
-
-
-<p>MathGL have several interface widgets for different widget libraries. There are QMathGL for Qt, Fl_MathGL for FLTK. These classes provide control which display MathGL graphics. Unfortunately there is no uniform interface for widget classes because all libraries have slightly different set of functions, features and so on. However the usage of MathGL widgets is rather simple. Let me show it on the example of QMathGL.
-</p>
-<p>First of all you have to define the drawing function or inherit a class from <code>mglDraw</code> class. After it just create a window and setup QMathGL instance as any other Qt widget:
-</p><pre class="verbatim">#include <QApplication>
-#include <QMainWindow>
-#include <QScrollArea>
-#include <mgl2/qmathgl.h>
-int main(int argc,char **argv)
-{
- QApplication a(argc,argv);
- QMainWindow *Wnd = new QMainWindow;
- Wnd->resize(810,610); // for fill up the QMGL, menu and toolbars
- Wnd->setWindowTitle("QMathGL sample");
- // here I allow to scroll QMathGL -- the case
- // then user want to prepare huge picture
- QScrollArea *scroll = new QScrollArea(Wnd);
-
- // Create and setup QMathGL
- QMathGL *QMGL = new QMathGL(Wnd);
-//QMGL->setPopup(popup); // if you want to setup popup menu for QMGL
- QMGL->setDraw(sample);
- // or use QMGL->setDraw(foo); for instance of class Foo:public mglDraw
- QMGL->update();
-
- // continue other setup (menu, toolbar and so on)
- scroll->setWidget(QMGL);
- Wnd->setCentralWidget(scroll);
- Wnd->show();
- return a.exec();
-}
-</pre>
-
-
-
-<hr>
-<a name="OpenGL-output"></a>
-<div class="header">
-<p>
-Next: <a href="#MathGL-and-PyQt" accesskey="n" rel="next">MathGL and PyQt</a>, Previous: <a href="#Using-QMathGL" accesskey="p" rel="prev">Using QMathGL</a>, Up: <a href="#Basic-usage" accesskey="u" rel="up">Basic usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="OpenGL-output-1"></a>
-<h4 class="subsection">2.1.7 OpenGL output</h4>
-
-
-<p>MathGL have possibility to draw resulting plot using OpenGL. This produce resulting plot a bit faster, but with some limitations (especially at use of transparency and lighting). Generally, you need to prepare OpenGL window and call MathGL functions to draw it. There is GLUT interface (see <a href="#Widget-classes">Widget classes</a>) to do it by simple way. Below I show example of OpenGL usage basing on Qt libraries (i.e. by using <code>QGLWidget</code> widget).
-</p>
-<p>First, one need to define widget class derived from <code>QGLWidget</code> and implement a few methods: <code>resizeGL()</code> called after each window resize, <code>paintGL()</code> for displaying the image on the screen, and <code>initializeGL()</code> for initializing OpenGL. The header file looks as following.
-</p><pre class="verbatim">#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-
-#include <QGLWidget>
-#include <mgl2/mgl.h>
-
-class MainWindow : public QGLWidget
-{
- Q_OBJECT
-protected:
- mglGraph *gr; // pointer to MathGL core class
- void resizeGL(int nWidth, int nHeight); // Method called after each window resize
- void paintGL(); // Method to display the image on the screen
- void initializeGL(); // Method to initialize OpenGL
-public:
- MainWindow(QWidget *parent = 0);
- ~MainWindow();
-};
-#endif // MAINWINDOW_H
-</pre>
-<p>The class implementation is rather straightforward. One need to recreate the instance of mglGraph at initializing OpenGL, and ask MathGL to use OpenGL output (set argument <code>1</code> in mglGraph constructor). Of course, the mglGraph object should be deleted at destruction. The method <code>resizeGL()</code> just pass new sizes to OpenGL and update viewport sizes. All plotting functions are located in the method <code>paintGL()</code>. At this, one need to add 2 calls: <code>gr->Clf()</code> at beginning for clearing previous OpenGL primitives; and <code>swapBuffers()</code> for showing output on the screen. The source file looks as following.
-</p><pre class="verbatim">#include "qgl_example.h"
-#include <QApplication>
-//#include <QtOpenGL>
-//-----------------------------------------------------------------------------
-MainWindow::MainWindow(QWidget *parent) : QGLWidget(parent) { gr=0; }
-//-----------------------------------------------------------------------------
-MainWindow::~MainWindow() { if(gr) delete gr; }
-//-----------------------------------------------------------------------------
-void MainWindow::initializeGL() // recreate instance of MathGL core
-{
- if(gr) delete gr;
- gr = new mglGraph(1); // use '1' for argument to force OpenGL output in MathGL
-}
-//-----------------------------------------------------------------------------
-void MainWindow::resizeGL(int w, int h) // standard resize replace
-{
- QGLWidget::resizeGL(w, h);
- glViewport (0, 0, w, h);
-}
-//-----------------------------------------------------------------------------
-void MainWindow::paintGL() // main drawing function
-{
- gr->Clf(); // clear previous OpenGL primitives
- gr->SubPlot(1,1,0);
- gr->Rotate(40,60);
- gr->Light(true);
- gr->AddLight(0,mglPoint(0,0,10),mglPoint(0,0,-1));
- gr->Axis();
- gr->Box();
- gr->FPlot("sin(pi*x)","i2");
- gr->FPlot("cos(pi*x)","|");
- gr->FSurf("cos(2*pi*(x^2+y^2))");
- gr->Finish();
- swapBuffers(); // show output on the screen
-}
-//-----------------------------------------------------------------------------
-int main(int argc, char *argv[]) // create application
-{
- mgl_textdomain(argv?argv[0]:NULL,"");
- QApplication a(argc, argv);
- MainWindow w;
- w.show();
- return a.exec();
-}
-//-----------------------------------------------------------------------------
-</pre>
-
-
-<hr>
-<a name="MathGL-and-PyQt"></a>
-<div class="header">
-<p>
-Next: <a href="#MathGL-and-MPI" accesskey="n" rel="next">MathGL and MPI</a>, Previous: <a href="#OpenGL-output" accesskey="p" rel="prev">OpenGL output</a>, Up: <a href="#Basic-usage" accesskey="u" rel="up">Basic usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="MathGL-and-PyQt-1"></a>
-<h4 class="subsection">2.1.8 MathGL and PyQt</h4>
-
-
-<p>Generally SWIG based classes (including the Python one) are the same as C++ classes. However, there are few tips for using MathGL with PyQt. Below I place a very simple python code which demonstrate how MathGL can be used with PyQt. This code is mostly written by Prof. Dr. Heino Falcke. You can just copy it to a file <code>mgl-pyqt-test.py</code> and execute it from python shell by command <code>execfile("mgl-pyqt-test.py")</code>
-</p>
-<pre class="verbatim">from PyQt4 import QtGui,QtCore
-from mathgl import *
-import sys
-app = QtGui.QApplication(sys.argv)
-qpointf=QtCore.QPointF()
-
-class hfQtPlot(QtGui.QWidget):
- def __init__(self, parent=None):
- QtGui.QWidget.__init__(self, parent)
- self.img=(QtGui.QImage())
- def setgraph(self,gr):
- self.buffer='\t'
- self.buffer=self.buffer.expandtabs(4*gr.GetWidth()*gr.GetHeight())
- gr.GetBGRN(self.buffer,len(self.buffer))
- self.img=QtGui.QImage(self.buffer, gr.GetWidth(),gr.GetHeight(),QtGui.QImage.Format_ARGB32)
- self.update()
- def paintEvent(self, event):
- paint = QtGui.QPainter()
- paint.begin(self)
- paint.drawImage(qpointf,self.img)
- paint.end()
-
-BackgroundColor=[1.0,1.0,1.0]
-size=100
-gr=mglGraph()
-y=mglData(size)
-#y.Modify("((0.7*cos(2*pi*(x+.2)*500)+0.3)*(rnd*0.5+0.5)+362.135+10000.)")
-y.Modify("(cos(2*pi*x*10)+1.1)*1000.*rnd-501")
-x=mglData(size)
-x.Modify("x^2");
-
-def plotpanel(gr,x,y,n):
- gr.SubPlot(2,2,n)
- gr.SetXRange(x)
- gr.SetYRange(y)
- gr.AdjustTicks()
- gr.Axis()
- gr.Box()
- gr.Label("x","x-Axis",1)
- gr.Label("y","y-Axis",1)
- gr.ClearLegend()
- gr.AddLegend("Legend: "+str(n),"k")
- gr.Legend()
- gr.Plot(x,y)
-
-
-gr.Clf(BackgroundColor[0],BackgroundColor[1],BackgroundColor[2])
-gr.SetPlotFactor(1.5)
-plotpanel(gr,x,y,0)
-y.Modify("(cos(2*pi*x*10)+1.1)*1000.*rnd-501")
-plotpanel(gr,x,y,1)
-y.Modify("(cos(2*pi*x*10)+1.1)*1000.*rnd-501")
-plotpanel(gr,x,y,2)
-y.Modify("(cos(2*pi*x*10)+1.1)*1000.*rnd-501")
-plotpanel(gr,x,y,3)
-
-gr.WritePNG("test.png","Test Plot")
-
-qw = hfQtPlot()
-qw.show()
-qw.setgraph(gr)
-qw.raise_()
-</pre>
-
-
-
-<hr>
-<a name="MathGL-and-MPI"></a>
-<div class="header">
-<p>
-Previous: <a href="#MathGL-and-PyQt" accesskey="p" rel="prev">MathGL and PyQt</a>, Up: <a href="#Basic-usage" accesskey="u" rel="up">Basic usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="MathGL-and-MPI-1"></a>
-<h4 class="subsection">2.1.9 MathGL and MPI</h4>
-
-
-<p>For using MathGL in MPI program you just need to: (1) plot its own part of data for each running node; (2) collect resulting graphical information in a single program (for example, at node with rank=0); (3) save it. The sample code below demonstrate this for very simple sample of surface drawing.
-</p>
-<p>First you need to initialize MPI
-</p><pre class="verbatim">#include <stdio.h>
-#include <mgl2/mpi.h>
-#include <mpi.h>
-
-int main(int argc, char *argv[])
-{
- // initialize MPI
- int rank=0, numproc=1;
- MPI_Init(&argc, &argv);
- MPI_Comm_size(MPI_COMM_WORLD,&numproc);
- MPI_Comm_rank(MPI_COMM_WORLD,&rank);
- if(rank==0) printf("Use %d processes.\n", numproc);
-</pre>
-<p>Next step is data creation. For simplicity, I create data arrays with the same sizes for all nodes. At this, you have to create <code>mglGraph</code> object too.
-</p>
-<pre class="verbatim"> // initialize data similarly for all nodes
- mglData a(128,256);
- mglGraphMPI gr;
-</pre>
-<p>Now, data should be filled by numbers. In real case, it should be some kind of calculations. But I just fill it by formula.
-</p>
-<pre class="verbatim"> // do the same plot for its own range
- char buf[64];
- sprintf(buf,"xrange %g %g",2.*rank/numproc-1,2.*(rank+1)/numproc-1);
- gr.Fill(a,"sin(2*pi*x)",buf);
-</pre>
-<p>It is time to plot the data. Don’t forget to set proper axis range(s) by using parametric form or by using options (as in the sample).
-</p>
-<pre class="verbatim"> // plot data in each node
- gr.Clf(); // clear image before making the image
- gr.Rotate(40,60);
- gr.Surf(a,"",buf);
-</pre>
-<p>Finally, let send graphical information to node with rank=0.
-</p>
-<pre class="verbatim"> // collect information
- if(rank!=0) gr.MPI_Send(0);
- else for(int i=1;i<numproc;i++) gr.MPI_Recv(i);
-</pre>
-<p>Now, node with rank=0 have whole image. It is time to save the image to a file. Also, you can add a kind of annotations here – I draw axis and bounding box in the sample.
-</p>
-<pre class="verbatim"> if(rank==0)
- {
- gr.Box(); gr.Axis(); // some post processing
- gr.WritePNG("test.png"); // save result
- }
-</pre>
-<p>In my case the program is done, and I finalize MPI. In real program, you can repeat the loop of data calculation and data plotting as many times as you need.
-</p>
-<pre class="verbatim"> MPI_Finalize();
- return 0;
-}
-</pre>
-<p>You can type ‘<samp>mpic++ test.cpp -lmgl-mpi -lmgl && mpirun -np 8 ./a.out</samp>’ for compilation and running the sample program on 8 nodes. Note, that you have to set enable-mpi=ON at MathGL configure to use this feature.
-</p>
-
-<hr>
-<a name="Advanced-usage"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-handling" accesskey="n" rel="next">Data handling</a>, Previous: <a href="#Basic-usage" accesskey="p" rel="prev">Basic usage</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Advanced-usage-1"></a>
-<h3 class="section">2.2 Advanced usage</h3>
-
-
-<p>Now I show several non-obvious features of MathGL: several subplots in a single picture, curvilinear coordinates, text printing and so on. Generally you may miss this section at first reading.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Subplots" accesskey="1">Subplots</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Axis-and-ticks" accesskey="2">Axis and ticks</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Curvilinear-coordinates" accesskey="3">Curvilinear coordinates</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Colorbars" accesskey="4">Colorbars</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Bounding-box" accesskey="5">Bounding box</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Ternary-axis" accesskey="6">Ternary axis</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Text-features" accesskey="7">Text features</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Legend-sample" accesskey="8">Legend sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Cutting-sample" accesskey="9">Cutting sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Subplots"></a>
-<div class="header">
-<p>
-Next: <a href="#Axis-and-ticks" accesskey="n" rel="next">Axis and ticks</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Subplots-1"></a>
-<h4 class="subsection">2.2.1 Subplots</h4>
-
-
-<p>Let me demonstrate possibilities of plot positioning and rotation. MathGL has a set of functions: <a href="#subplot">subplot</a>, <a href="#inplot">inplot</a>, <a href="#title">title</a>, <a href="#aspect">aspect</a> and <a href="#rotate">rotate</a> and so on (see <a href="#Subplots-and-rotation">Subplots and rotation</a>). The order of their calling is strictly determined. First, one changes the position of plot in image area (functions <a href="#subplot">subplot</a>, <a href="#inplot">inplot</a> and <a href="#multiplot">multiplot</a>). Secondly, you can add the title of plot by <a href="#title">title</a> function. After that one may rotate the plot (function <a href="#rotate">rotate</a>). Finally, one may change aspects of axes (function <a href="#aspect">aspect</a>). The following code illustrates the aforesaid it:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(2,2,0); gr->Box();
- gr->Puts(mglPoint(-1,1.1),"Just box",":L");
- gr->InPlot(0.2,0.5,0.7,1,false); gr->Box();
- gr->Puts(mglPoint(0,1.2),"InPlot example");
- gr->SubPlot(2,2,1); gr->Title("Rotate only");
- gr->Rotate(50,60); gr->Box();
- gr->SubPlot(2,2,2); gr->Title("Rotate and Aspect");
- gr->Rotate(50,60); gr->Aspect(1,1,2); gr->Box();
- gr->SubPlot(2,2,3); gr->Title("Shear");
- gr->Box("c"); gr->Shear(0.2,0.1); gr->Box();
- return 0;
-}
-</pre><p>Here I used function <code>Puts</code> for printing the text in arbitrary position of picture (see <a href="#Text-printing">Text printing</a>). Text coordinates and size are connected with axes. However, text coordinates may be everywhere, including the outside the bounding box. I’ll show its features later in <a href="#Text-features">Text features</a>.
-</p>
-<div align="center"><img src="png/aspect.png" alt="Example of several subplots on the single picture.">
-</div>
-<p>More complicated sample show how to use most of positioning functions:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(3,2,0); gr->Title("StickPlot");
- gr->StickPlot(3, 0, 20, 30); gr->Box("r"); gr->Puts(mglPoint(0),"0","r");
- gr->StickPlot(3, 1, 20, 30); gr->Box("g"); gr->Puts(mglPoint(0),"1","g");
- gr->StickPlot(3, 2, 20, 30); gr->Box("b"); gr->Puts(mglPoint(0),"2","b");
- gr->SubPlot(3,2,3,""); gr->Title("ColumnPlot");
- gr->ColumnPlot(3, 0); gr->Box("r"); gr->Puts(mglPoint(0),"0","r");
- gr->ColumnPlot(3, 1); gr->Box("g"); gr->Puts(mglPoint(0),"1","g");
- gr->ColumnPlot(3, 2); gr->Box("b"); gr->Puts(mglPoint(0),"2","b");
- gr->SubPlot(3,2,4,""); gr->Title("GridPlot");
- gr->GridPlot(2, 2, 0); gr->Box("r"); gr->Puts(mglPoint(0),"0","r");
- gr->GridPlot(2, 2, 1); gr->Box("g"); gr->Puts(mglPoint(0),"1","g");
- gr->GridPlot(2, 2, 2); gr->Box("b"); gr->Puts(mglPoint(0),"2","b");
- gr->GridPlot(2, 2, 3); gr->Box("m"); gr->Puts(mglPoint(0),"3","m");
- gr->SubPlot(3,2,5,""); gr->Title("InPlot"); gr->Box();
- gr->InPlot(0.4, 1, 0.6, 1, true); gr->Box("r");
- gr->MultiPlot(3,2,1, 2, 1,""); gr->Title("MultiPlot and ShearPlot"); gr->Box();
- gr->ShearPlot(3, 0, 0.2, 0.1); gr->Box("r"); gr->Puts(mglPoint(0),"0","r");
- gr->ShearPlot(3, 1, 0.2, 0.1); gr->Box("g"); gr->Puts(mglPoint(0),"1","g");
- gr->ShearPlot(3, 2, 0.2, 0.1); gr->Box("b"); gr->Puts(mglPoint(0),"2","b");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/inplot.png" alt="Example for most of positioning functions.">
-</div>
-
-
-<hr>
-<a name="Axis-and-ticks"></a>
-<div class="header">
-<p>
-Next: <a href="#Curvilinear-coordinates" accesskey="n" rel="next">Curvilinear coordinates</a>, Previous: <a href="#Subplots" accesskey="p" rel="prev">Subplots</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Axis-and-ticks-1"></a>
-<h4 class="subsection">2.2.2 Axis and ticks</h4>
-
-
-<p>MathGL library can draw not only the bounding box but also the axes, grids, labels and so on. The ranges of axes and their origin (the point of intersection) are determined by functions <code>SetRange()</code>, <code>SetRanges()</code>, <code>SetOrigin()</code> (see <a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a>). Ticks on axis are specified by function <code>SetTicks</code>, <code>SetTicksVal</code>, <code>SetTicksTime</code> (see <a href="#Ticks">Ticks</a>). But usually
-</p>
-<p>Function <a href="#axis">axis</a> draws axes. Its textual string shows in which directions the axis or axes will be drawn (by default <code>"xyz"</code>, function draws axes in all directions). Function <a href="#grid">grid</a> draws grid perpendicularly to specified directions. Example of axes and grid drawing is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(2,2,0); gr->Title("Axis origin, Grid"); gr->SetOrigin(0,0);
- gr->Axis(); gr->Grid(); gr->FPlot("x^3");
-
- gr->SubPlot(2,2,1); gr->Title("2 axis");
- gr->SetRanges(-1,1,-1,1); gr->SetOrigin(-1,-1,-1); // first axis
- gr->Axis(); gr->Label('y',"axis 1",0); gr->FPlot("sin(pi*x)");
- gr->SetRanges(0,1,0,1); gr->SetOrigin(1,1,1); // second axis
- gr->Axis(); gr->Label('y',"axis 2",0); gr->FPlot("cos(pi*x)");
-
- gr->SubPlot(2,2,3); gr->Title("More axis");
- gr->SetOrigin(NAN,NAN); gr->SetRange('x',-1,1);
- gr->Axis(); gr->Label('x',"x",0); gr->Label('y',"y_1",0);
- gr->FPlot("x^2","k");
- gr->SetRanges(-1,1,-1,1); gr->SetOrigin(-1.3,-1); // second axis
- gr->Axis("y","r"); gr->Label('y',"#r{y_2}",0.2);
- gr->FPlot("x^3","r");
-
- gr->SubPlot(2,2,2); gr->Title("4 segments, inverted axis");
- gr->SetOrigin(0,0);
- gr->InPlot(0.5,1,0.5,1); gr->SetRanges(0,10,0,2); gr->Axis();
- gr->FPlot("sqrt(x/2)"); gr->Label('x',"W",1); gr->Label('y',"U",1);
- gr->InPlot(0,0.5,0.5,1); gr->SetRanges(1,0,0,2); gr->Axis("x");
- gr->FPlot("sqrt(x)+x^3"); gr->Label('x',"\\tau",-1);
- gr->InPlot(0.5,1,0,0.5); gr->SetRanges(0,10,4,0); gr->Axis("y");
- gr->FPlot("x/4"); gr->Label('y',"L",-1);
- gr->InPlot(0,0.5,0,0.5); gr->SetRanges(1,0,4,0); gr->FPlot("4*x^2");
- return 0;
-}
-</pre>
-<p>Note, that MathGL can draw not only single axis (which is default). But also several axis on the plot (see right plots). The idea is that the change of settings does not influence on the already drawn graphics. So, for 2-axes I setup the first axis and draw everything concerning it. Then I setup the second axis and draw things for the second axis. Generally, the similar idea allows one to draw rather complicated plot of 4 axis with different ranges (see bottom left plot).
-</p>
-<p>At this inverted axis can be created by 2 methods. First one is used in this sample – just specify minimal axis value to be large than maximal one. This method work well for 2D axis, but can wrongly place labels in 3D case. Second method is more general and work in 3D case too – just use <a href="#aspect">aspect</a> function with negative arguments. For example, following code will produce exactly the same result for 2D case, but 2nd variant will look better in 3D.
-</p><pre class="verbatim">// variant 1
-gr->SetRanges(0,10,4,0); gr->Axis();
-
-// variant 2
-gr->SetRanges(0,10,0,4); gr->Aspect(1,-1); gr->Axis();
-</pre>
-<div align="center"><img src="png/axis.png" alt="Example of axis.">
-</div>
-<p>Another MathGL feature is fine ticks tunning. By default (if it is not changed by <code>SetTicks</code> function), MathGL try to adjust ticks positioning, so that they looks most human readable. At this, MathGL try to extract common factor for too large or too small axis ranges, as well as for too narrow ranges. Last one is non-common notation and can be disabled by <code>SetTuneTicks</code> function.
-</p>
-<p>Also, one can specify its own ticks with arbitrary labels by help of <code>SetTicksVal</code> function. Or one can set ticks in time format. In last case MathGL will try to select optimal format for labels with automatic switching between years, months/days, hours/minutes/seconds or microseconds. However, you can specify its own time representation using formats described in <a href="http://www.manpagez.com/man/3/strftime/">http://www.manpagez.com/man/3/strftime/</a>. Most common variants are ‘<samp>%X</samp>’ for national representation of time, ‘<samp>%x</samp>’ for national representation of date, ‘<samp>%Y</samp>’ for year with century.
-</p>
-<p>The sample code, demonstrated ticks feature is
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(3,2,0); gr->Title("Usual axis"); gr->Axis();
- gr->SubPlot(3,2,1); gr->Title("Too big/small range");
- gr->SetRanges(-1000,1000,0,0.001); gr->Axis();
- gr->SubPlot(3,2,3); gr->Title("Too narrow range");
- gr->SetRanges(100,100.1,10,10.01); gr->Axis();
- gr->SubPlot(3,2,4); gr->Title("Disable ticks tuning");
- gr->SetTuneTicks(0); gr->Axis();
-
- gr->SubPlot(3,2,2); gr->Title("Manual ticks"); gr->SetRanges(-M_PI,M_PI, 0, 2);
- mreal val[]={-M_PI, -M_PI/2, 0, 0.886, M_PI/2, M_PI};
- gr->SetTicksVal('x', mglData(6,val), "-\\pi\n-\\pi/2\n0\nx^*\n\\pi/2\n\\pi");
- gr->Axis(); gr->Grid(); gr->FPlot("2*cos(x^2)^2", "r2");
-
- gr->SubPlot(3,2,5); gr->Title("Time ticks"); gr->SetRange('x',0,3e5);
- gr->SetTicksTime('x',0); gr->Axis();
- return 0;
-}
-</pre>
-<div align="center"><img src="png/ticks.png" alt="Features of axis ticks.">
-</div>
-<p>The last sample I want to show in this subsection is Log-axis. From MathGL’s point of view, the log-axis is particular case of general curvilinear coordinates. So, we need first define new coordinates (see also <a href="#Curvilinear-coordinates">Curvilinear coordinates</a>) by help of <code>SetFunc</code> or <code>SetCoor</code> functions. At this one should wary about proper axis range. So the code looks as following:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(2,2,0,"<_"); gr->Title("Semi-log axis");
- gr->SetRanges(0.01,100,-1,1); gr->SetFunc("lg(x)","");
- gr->Axis(); gr->Grid("xy","g"); gr->FPlot("sin(1/x)");
- gr->Label('x',"x",0); gr->Label('y', "y = sin 1/x",0);
-
- gr->SubPlot(2,2,1,"<_"); gr->Title("Log-log axis");
- gr->SetRanges(0.01,100,0.1,100); gr->SetFunc("lg(x)","lg(y)");
- gr->Axis(); gr->Grid("!","h="); gr->Grid();
- gr->FPlot("sqrt(1+x^2)"); gr->Label('x',"x",0);
- gr->Label('y', "y = \\sqrt{1+x^2}",0);
-
- gr->SubPlot(2,2,2,"<_"); gr->Title("Minus-log axis");
- gr->SetRanges(-100,-0.01,-100,-0.1); gr->SetFunc("-lg(-x)","-lg(-y)");
- gr->Axis(); gr->FPlot("-sqrt(1+x^2)");
- gr->Label('x',"x",0); gr->Label('y', "y = -\\sqrt{1+x^2}",0);
-
- gr->SubPlot(2,2,3,"<_"); gr->Title("Log-ticks");
- gr->SetRanges(0.1,100,0,100); gr->SetFunc("sqrt(x)","");
- gr->Axis(); gr->FPlot("x");
- gr->Label('x',"x",1); gr->Label('y', "y = x",0);
- return 0;
-}
-</pre>
-<div align="center"><img src="png/loglog.png" alt="Features of axis ticks.">
-</div>
-<p>You can see that MathGL automatically switch to log-ticks as we define log-axis formula (in difference from v.1.*). Moreover, it switch to log-ticks for any formula if axis range will be large enough (see right bottom plot). Another interesting feature is that you not necessary define usual log-axis (i.e. when coordinates are positive), but you can define “minus-log” axis when coordinate is negative (see left bottom plot).
-</p>
-
-<hr>
-<a name="Curvilinear-coordinates"></a>
-<div class="header">
-<p>
-Next: <a href="#Colorbars" accesskey="n" rel="next">Colorbars</a>, Previous: <a href="#Axis-and-ticks" accesskey="p" rel="prev">Axis and ticks</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Curvilinear-coordinates-1"></a>
-<h4 class="subsection">2.2.3 Curvilinear coordinates</h4>
-
-
-<p>As I noted in previous subsection, MathGL support curvilinear coordinates. In difference from other plotting programs and libraries, MathGL uses textual formulas for connection of the old (data) and new (output) coordinates. This allows one to plot in arbitrary coordinates. The following code plots the line <var>y</var>=0, <var>z</var>=0 in Cartesian, polar, parabolic and spiral coordinates:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SetOrigin(-1,1,-1);
-
- gr->SubPlot(2,2,0); gr->Title("Cartesian"); gr->Rotate(50,60);
- gr->FPlot("2*t-1","0.5","0","r2");
- gr->Axis(); gr->Grid();
-
- gr->SetFunc("y*sin(pi*x)","y*cos(pi*x)",0);
- gr->SubPlot(2,2,1); gr->Title("Cylindrical"); gr->Rotate(50,60);
- gr->FPlot("2*t-1","0.5","0","r2");
- gr->Axis(); gr->Grid();
-
- gr->SetFunc("2*y*x","y*y - x*x",0);
- gr->SubPlot(2,2,2); gr->Title("Parabolic"); gr->Rotate(50,60);
- gr->FPlot("2*t-1","0.5","0","r2");
- gr->Axis(); gr->Grid();
-
- gr->SetFunc("y*sin(pi*x)","y*cos(pi*x)","x+z");
- gr->SubPlot(2,2,3); gr->Title("Spiral"); gr->Rotate(50,60);
- gr->FPlot("2*t-1","0.5","0","r2");
- gr->Axis(); gr->Grid();
- gr->SetFunc(0,0,0); // set to default Cartesian
- return 0;
-}
-</pre>
-<div align="center"><img src="png/curvcoor.png" alt="Example of curvilinear coordinates">
-</div>
-
-
-<hr>
-<a name="Colorbars"></a>
-<div class="header">
-<p>
-Next: <a href="#Bounding-box" accesskey="n" rel="next">Bounding box</a>, Previous: <a href="#Curvilinear-coordinates" accesskey="p" rel="prev">Curvilinear coordinates</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Colorbars-1"></a>
-<h4 class="subsection">2.2.4 Colorbars</h4>
-
-
-<p>MathGL handle <a href="#colorbar">colorbar</a> as special kind of axis. So, most of functions for axis and ticks setup will work for colorbar too. Colorbars can be in log-scale, and generally as arbitrary function scale; common factor of colorbar labels can be separated; and so on.
-</p>
-<p>But of course, there are differences – colorbars usually located out of bounding box. At this, colorbars can be at subplot boundaries (by default), or at bounding box (if symbol ‘<samp>I</samp>’ is specified). Colorbars can handle sharp colors. And they can be located at arbitrary position too. The sample code, which demonstrate colorbar features is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(2,2,0); gr->Title("Colorbar out of box"); gr->Box();
- gr->Colorbar("<"); gr->Colorbar(">");
- gr->Colorbar("_"); gr->Colorbar("^");
-
- gr->SubPlot(2,2,1); gr->Title("Colorbar near box"); gr->Box();
- gr->Colorbar("<I"); gr->Colorbar(">I");
- gr->Colorbar("_I"); gr->Colorbar("^I");
-
- gr->SubPlot(2,2,2); gr->Title("manual colors");
- mglData a,v; mgls_prepare2d(&a,0,&v);
- gr->Box(); gr->ContD(v,a);
- gr->Colorbar(v,"<"); gr->Colorbar(v,">");
- gr->Colorbar(v,"_"); gr->Colorbar(v,"^");
-
- gr->SubPlot(2,2,3); gr->Title(" ");
- gr->Puts(mglPoint(-0.5,1.55),"Color positions",":C",-2);
- gr->Colorbar("bwr>",0.25,0); gr->Puts(mglPoint(-0.9,1.2),"Default");
- gr->Colorbar("b{w,0.3}r>",0.5,0); gr->Puts(mglPoint(-0.1,1.2),"Manual");
-
- gr->Puts(mglPoint(1,1.55),"log-scale",":C",-2);
- gr->SetRange('c',0.01,1e3);
- gr->Colorbar(">",0.75,0); gr->Puts(mglPoint(0.65,1.2),"Normal scale");
- gr->SetFunc("","","","lg(c)");
- gr->Colorbar(">"); gr->Puts(mglPoint(1.35,1.2),"Log scale");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/colorbar.png" alt="Example of colorbars">
-</div>
-
-
-<hr>
-<a name="Bounding-box"></a>
-<div class="header">
-<p>
-Next: <a href="#Ternary-axis" accesskey="n" rel="next">Ternary axis</a>, Previous: <a href="#Colorbars" accesskey="p" rel="prev">Colorbars</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Bounding-box-1"></a>
-<h4 class="subsection">2.2.5 Bounding box</h4>
-
-
-<p>Box around the plot is rather useful thing because it allows one to: see the plot boundaries, and better estimate points position since box contain another set of ticks. MathGL provide special function for drawing such box – <a href="#box">box</a> function. By default, it draw black or white box with ticks (color depend on transparency type, see <a href="#Types-of-transparency">Types of transparency</a>). However, you can change the color of box, or add drawing of rectangles at rear faces of box. Also you can disable ticks drawing, but I don’t know why anybody will want it. The sample code, which demonstrate <a href="#box">box</a> features is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(2,2,0); gr->Title("Box (default)"); gr->Rotate(50,60);
- gr->Box();
- gr->SubPlot(2,2,1); gr->Title("colored"); gr->Rotate(50,60);
- gr->Box("r");
- gr->SubPlot(2,2,2); gr->Title("with faces"); gr->Rotate(50,60);
- gr->Box("@");
- gr->SubPlot(2,2,3); gr->Title("both"); gr->Rotate(50,60);
- gr->Box("@cm");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/box.png" alt="Example of Box()">
-</div>
-
-
-<hr>
-<a name="Ternary-axis"></a>
-<div class="header">
-<p>
-Next: <a href="#Text-features" accesskey="n" rel="next">Text features</a>, Previous: <a href="#Bounding-box" accesskey="p" rel="prev">Bounding box</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Ternary-axis-1"></a>
-<h4 class="subsection">2.2.6 Ternary axis</h4>
-
-
-<p>There are another unusual axis types which are supported by MathGL. These are ternary and quaternary axis. Ternary axis is special axis of 3 coordinates <var>a</var>, <var>b</var>, <var>c</var> which satisfy relation <var>a</var>+<var>b</var>+<var>c</var>=1. Correspondingly, quaternary axis is special axis of 4 coordinates <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> which satisfy relation <var>a</var>+<var>b</var>+<var>c</var>+<var>d</var>=1.
-</p>
-<p>Generally speaking, only 2 of coordinates (3 for quaternary) are independent. So, MathGL just introduce some special transformation formulas which treat <var>a</var> as ‘<samp>x</samp>’, <var>b</var> as ‘<samp>y</samp>’ (and <var>c</var> as ‘<samp>z</samp>’ for quaternary). As result, all plotting functions (curves, surfaces, contours and so on) work as usual, but in new axis. You should use <a href="#ternary">ternary</a> function for switching to ternary/quaternary coordinates. The sample code is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SetRanges(0,1,0,1,0,1);
- mglData x(50),y(50),z(50),rx(10),ry(10), a(20,30);
- a.Modify("30*x*y*(1-x-y)^2*(x+y<1)");
- x.Modify("0.25*(1+cos(2*pi*x))");
- y.Modify("0.25*(1+sin(2*pi*x))");
- rx.Modify("rnd"); ry.Modify("(1-v)*rnd",rx);
- z.Modify("x");
-
- gr->SubPlot(2,2,0); gr->Title("Ordinary axis 3D");
- gr->Rotate(50,60); gr->Light(true);
- gr->Plot(x,y,z,"r2"); gr->Surf(a,"BbcyrR#");
- gr->Axis(); gr->Grid(); gr->Box();
- gr->Label('x',"B",1); gr->Label('y',"C",1); gr->Label('z',"Z",1);
-
- gr->SubPlot(2,2,1); gr->Title("Ternary axis (x+y+t=1)");
- gr->Ternary(1);
- gr->Plot(x,y,"r2"); gr->Plot(rx,ry,"q^ "); gr->Cont(a,"BbcyrR");
- gr->Line(mglPoint(0.5,0), mglPoint(0,0.75), "g2");
- gr->Axis(); gr->Grid("xyz","B;");
- gr->Label('x',"B"); gr->Label('y',"C"); gr->Label('t',"A");
-
- gr->SubPlot(2,2,2); gr->Title("Quaternary axis 3D");
- gr->Rotate(50,60); gr->Light(true);
- gr->Ternary(2);
- gr->Plot(x,y,z,"r2"); gr->Surf(a,"BbcyrR#");
- gr->Axis(); gr->Grid(); gr->Box();
- gr->Label('t',"A",1); gr->Label('x',"B",1);
- gr->Label('y',"C",1); gr->Label('z',"D",1);
-
- gr->SubPlot(2,2,3); gr->Title("Ternary axis 3D");
- gr->Rotate(50,60); gr->Light(true);
- gr->Ternary(1);
- gr->Plot(x,y,z,"r2"); gr->Surf(a,"BbcyrR#");
- gr->Axis(); gr->Grid(); gr->Box();
- gr->Label('t',"A",1); gr->Label('x',"B",1);
- gr->Label('y',"C",1); gr->Label('z',"Z",1);
- return 0;
-}
-</pre>
-<div align="center"><img src="png/ternary.png" alt="Example of colorbars">
-</div>
-
-<hr>
-<a name="Text-features"></a>
-<div class="header">
-<p>
-Next: <a href="#Legend-sample" accesskey="n" rel="next">Legend sample</a>, Previous: <a href="#Ternary-axis" accesskey="p" rel="prev">Ternary axis</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Text-features-1"></a>
-<h4 class="subsection">2.2.7 Text features</h4>
-
-
-<p>MathGL prints text by vector font. There are functions for manual specifying of text position (like <code>Puts</code>) and for its automatic selection (like <code>Label</code>, <code>Legend</code> and so on). MathGL prints text always in specified position even if it lies outside the bounding box. The default size of font is specified by functions <var>SetFontSize*</var> (see <a href="#Font-settings">Font settings</a>). However, the actual size of output string depends on subplot size (depends on functions <code>SubPlot</code>, <code>InPlot</code>). The switching of the font style (italic, bold, wire and so on) can be done for the whole string (by function parameter) or inside the string. By default MathGL parses TeX-like commands for symbols and indexes (see <a href="#Font-styles">Font styles</a>).
-</p>
-<p>Text can be printed as usual one (from left to right), along some direction (rotated text), or along a curve. Text can be printed on several lines, divided by new line symbol ‘<samp>\n</samp>’.
-</p>
-<p>Example of MathGL font drawing is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(2,2,0,"");
- gr->Putsw(mglPoint(0,1),L"Text can be in ASCII and in Unicode");
- gr->Puts(mglPoint(0,0.6),"It can be \\wire{wire}, \\big{big} or #r{colored}");
- gr->Puts(mglPoint(0,0.2),"One can change style in string: "
- "\\b{bold}, \\i{italic, \\b{both}}");
- gr->Puts(mglPoint(0,-0.2),"Easy to \\a{overline} or "
- "\\u{underline}");
- gr->Puts(mglPoint(0,-0.6),"Easy to change indexes ^{up} _{down} @{center}");
- gr->Puts(mglPoint(0,-1),"It parse TeX: \\int \\alpha \\cdot "
- "\\sqrt3{sin(\\pi x)^2 + \\gamma_{i_k}} dx");
-
- gr->SubPlot(2,2,1,"");
- gr->Puts(mglPoint(0,0.5), "\\sqrt{\\frac{\\alpha^{\\gamma^2}+\\overset 1{\\big\\infty}}{\\sqrt3{2+b}}}", "@", -4);
- gr->Puts(mglPoint(0,-0.5),"Text can be printed\non several lines");
-
- gr->SubPlot(2,2,2,"");
- mglData y; mgls_prepare1d(&y);
- gr->Box(); gr->Plot(y.SubData(-1,0));
- gr->Text(y,"This is very very long string drawn along a curve",":k");
- gr->Text(y,"Another string drawn under a curve","T:r");
-
- gr->SubPlot(2,2,3,"");
- gr->Line(mglPoint(-1,-1),mglPoint(1,-1),"rA");
- gr->Puts(mglPoint(0,-1),mglPoint(1,-1),"Horizontal");
- gr->Line(mglPoint(-1,-1),mglPoint(1,1),"rA");
- gr->Puts(mglPoint(0,0),mglPoint(1,1),"At angle","@");
- gr->Line(mglPoint(-1,-1),mglPoint(-1,1),"rA");
- gr->Puts(mglPoint(-1,0),mglPoint(-1,1),"Vertical");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/text.png" alt="Example of text printing">
-</div>
-<p>You can change font faces by loading font files by function <a href="#loadfont">loadfont</a>. Note, that this is long-run procedure. Font faces can be downloaded from <a href="http://mathgl.sourceforge.net/download.html">MathGL website</a> or from <a href="http://sourceforge.net/project/showfiles.php?group_id=152187&package_id=267177">here</a>. The sample code is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- double h=1.1, d=0.25;
- gr->LoadFont("STIX"); gr->Puts(mglPoint(0,h), "default font (STIX)");
- gr->LoadFont("adventor"); gr->Puts(mglPoint(0,h-d), "adventor font");
- gr->LoadFont("bonum"); gr->Puts(mglPoint(0,h-2*d), "bonum font");
- gr->LoadFont("chorus"); gr->Puts(mglPoint(0,h-3*d), "chorus font");
- gr->LoadFont("cursor"); gr->Puts(mglPoint(0,h-4*d), "cursor font");
- gr->LoadFont("heros"); gr->Puts(mglPoint(0,h-5*d), "heros font");
- gr->LoadFont("heroscn"); gr->Puts(mglPoint(0,h-6*d), "heroscn font");
- gr->LoadFont("pagella"); gr->Puts(mglPoint(0,h-7*d), "pagella font");
- gr->LoadFont("schola"); gr->Puts(mglPoint(0,h-8*d), "schola font");
- gr->LoadFont("termes"); gr->Puts(mglPoint(0,h-9*d), "termes font");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/fonts.png" alt="Example of font faces">
-</div>
-
-<hr>
-<a name="Legend-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#Cutting-sample" accesskey="n" rel="next">Cutting sample</a>, Previous: <a href="#Text-features" accesskey="p" rel="prev">Text features</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Legend-sample-1"></a>
-<h4 class="subsection">2.2.8 Legend sample</h4>
-
-
-<p>Legend is one of standard ways to show plot annotations. Basically you need to connect the plot style (line style, marker and color) with some text. In MathGL, you can do it by 2 methods: manually using <a href="#addlegend">addlegend</a> function; or use ‘<samp>legend</samp>’ option (see <a href="#Command-options">Command options</a>), which will use last plot style. In both cases, legend entries will be added into internal accumulator, which later used for legend drawing itself. <a href="#clearlegend">clearlegend</a> function allow you to remove all saved legend entries.
-</p>
-<p>There are 2 features. If plot style is empty then text will be printed without indent. If you want to plot the text with indent but without plot sample then you need to use space ‘<samp> </samp>’ as plot style. Such style ‘<samp> </samp>’ will draw a plot sample (line with marker(s)) which is invisible line (i.e. nothing) and print the text with indent as usual one.
-</p>
-<p>Function <a href="#legend">legend</a> draw legend on the plot. The position of the legend can be selected automatic or manually. You can change the size and style of text labels, as well as setup the plot sample. The sample code demonstrating legend features is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->AddLegend("sin(\\pi {x^2})","b");
- gr->AddLegend("sin(\\pi x)","g*");
- gr->AddLegend("sin(\\pi \\sqrt{x})","rd");
- gr->AddLegend("just text"," ");
- gr->AddLegend("no indent for this","");
-
- gr->SubPlot(2,2,0,""); gr->Title("Legend (default)");
- gr->Box(); gr->Legend();
-
- gr->Legend(3,"A#");
- gr->Puts(mglPoint(0.75,0.65),"Absolute position","A");
-
- gr->SubPlot(2,2,2,""); gr->Title("coloring"); gr->Box();
- gr->Legend(0,"r#"); gr->Legend(1,"Wb#"); gr->Legend(2,"ygr#");
-
- gr->SubPlot(2,2,3,""); gr->Title("manual position"); gr->Box();
- gr->Legend(0.5,1); gr->Puts(mglPoint(0.5,0.55),"at x=0.5, y=1","a");
- gr->Legend(1,"#-"); gr->Puts(mglPoint(0.75,0.25),"Horizontal legend","a");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/legend.png" alt="Example of legend">
-</div>
-
-<hr>
-<a name="Cutting-sample"></a>
-<div class="header">
-<p>
-Previous: <a href="#Legend-sample" accesskey="p" rel="prev">Legend sample</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Cutting-sample-1"></a>
-<h4 class="subsection">2.2.9 Cutting sample</h4>
-
-
-<p>The last common thing which I want to show in this section is how one can cut off points from plot. There are 4 mechanism for that.
-</p><ul>
-<li> You can set one of coordinate to NAN value. All points with NAN values will be omitted.
-
-</li><li> You can enable cutting at edges by <code>SetCut</code> function. As result all points out of bounding box will be omitted.
-
-</li><li> You can set cutting box by <code>SetCutBox</code> function. All points inside this box will be omitted.
-
-</li><li> You can define cutting formula by <code>SetCutOff</code> function. All points for which the value of formula is nonzero will be omitted. Note, that this is the slowest variant.
-</li></ul>
-
-<p>Below I place the code which demonstrate last 3 possibilities:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData a,c,v(1); mgls_prepare2d(&a); mgls_prepare3d(&c); v.a[0]=0.5;
- gr->SubPlot(2,2,0); gr->Title("Cut on (default)");
- gr->Rotate(50,60); gr->Light(true);
- gr->Box(); gr->Surf(a,"","zrange -1 0.5");
-
- gr->SubPlot(2,2,1); gr->Title("Cut off"); gr->Rotate(50,60);
- gr->Box(); gr->Surf(a,"","zrange -1 0.5; cut off");
-
- gr->SubPlot(2,2,2); gr->Title("Cut in box"); gr->Rotate(50,60);
- gr->SetCutBox(mglPoint(0,-1,-1), mglPoint(1,0,1.1));
- gr->Alpha(true); gr->Box(); gr->Surf3(c);
- gr->SetCutBox(mglPoint(0), mglPoint(0)); // switch it off
-
- gr->SubPlot(2,2,3); gr->Title("Cut by formula"); gr->Rotate(50,60);
- gr->CutOff("(z>(x+0.5*y-1)^2-1) & (z>(x-0.5*y-1)^2-1)");
- gr->Box(); gr->Surf3(c); gr->CutOff(""); // switch it off
- return 0;
-}
-</pre>
-<div align="center"><img src="png/cut.png" alt="Example of point cutting">
-</div>
-
-
-
-<hr>
-<a name="Data-handling"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-plotting" accesskey="n" rel="next">Data plotting</a>, Previous: <a href="#Advanced-usage" accesskey="p" rel="prev">Advanced usage</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-handling-1"></a>
-<h3 class="section">2.3 Data handling</h3>
-
-
-<p>Class <code>mglData</code> contains all functions for the data handling in MathGL (see <a href="#Data-processing">Data processing</a>). There are several matters why I use class <code>mglData</code> but not a single array: it does not depend on type of data (mreal or double), sizes of data arrays are kept with data, memory working is simpler and safer.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Array-creation" accesskey="1">Array creation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Linking-array" accesskey="2">Linking array</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Change-data" accesskey="3">Change data</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Array-creation"></a>
-<div class="header">
-<p>
-Next: <a href="#Linking-array" accesskey="n" rel="next">Linking array</a>, Up: <a href="#Data-handling" accesskey="u" rel="up">Data handling</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Array-creation-1"></a>
-<h4 class="subsection">2.3.1 Array creation</h4>
-
-
-<p>There are many ways in MathGL how data arrays can be created and filled.
-</p>
-<p>One can put the data in <code>mglData</code> instance by several ways. Let us do it for sinus function:
-</p><ul>
-<li> one can create external array, fill it and put to <code>mglData</code> variable
-<pre class="verbatim"> double *a = new double[50];
- for(int i=0;i<50;i++) a[i] = sin(M_PI*i/49.);
-
- mglData y;
- y.Set(a,50);
-</pre>
-</li><li> another way is to create <code>mglData</code> instance of the desired size and then to work directly with data in this variable
-<pre class="verbatim"> mglData y(50);
- for(int i=0;i<50;i++) y.a[i] = sin(M_PI*i/49.);
-</pre>
-</li><li> next way is to fill the data in <code>mglData</code> instance by textual formula with the help of <code>Modify()</code> function
-<pre class="verbatim"> mglData y(50);
- y.Modify("sin(pi*x)");
-</pre>
-</li><li> or one may fill the array in some interval and modify it later
-<pre class="verbatim"> mglData y(50);
- y.Fill(0,M_PI);
- y.Modify("sin(u)");
-</pre>
-</li><li> finally it can be loaded from file
-<pre class="verbatim"> FILE *fp=fopen("sin.dat","wt"); // create file first
- for(int i=0;i<50;i++) fprintf(fp,"%g\n",sin(M_PI*i/49.));
- fclose(fp);
-
- mglData y("sin.dat"); // load it
-</pre><p>At this you can use textual or HDF files, as well as import values from bitmap image (PNG is supported right now).
-</p>
-</li><li> at this one can read only part of data
-<pre class="verbatim"> FILE *fp-fopen("sin.dat","wt"); // create large file first
- for(int i=0;i<70;i++) fprintf(fp,"%g\n",sin(M_PI*i/49.));
- fclose(fp);
-
- mglData y;
- y.Read("sin.dat",50); // load it
-</pre></li></ul>
-
-<p>Creation of 2d- and 3d-arrays is mostly the same. But one should keep in mind that class <code>mglData</code> uses flat data representation. For example, matrix 30*40 is presented as flat (1d-) array with length 30*40=1200 (nx=30, ny=40). The element with indexes {i,j} is a[i+nx*j]. So for 2d array we have:
-</p><pre class="verbatim"> mglData z(30,40);
- for(int i=0;i<30;i++) for(int j=0;j<40;j++)
- z.a[i+30*j] = sin(M_PI*i/29.)*sin(M_PI*j/39.);
-</pre><p>or by using <code>Modify()</code> function
-</p><pre class="verbatim"> mglData z(30,40);
- z.Modify("sin(pi*x)*cos(pi*y)");
-</pre>
-<p>The only non-obvious thing here is using multidimensional arrays in C/C++, i.e. arrays defined like <code>mreal dat[40][30];</code>. Since, formally these elements <code>dat[i]</code> can address the memory in arbitrary place you should use the proper function to convert such arrays to <code>mglData</code> object. For C++ this is functions like <code>mglData::Set(mreal **dat, int N1, int N2);</code>. For C this is functions like <code>mgl_data_set_mreal2(HMDT d, const mreal **dat, int N1, int N2);</code>. At this, you should keep in mind that <code>nx=N2</code> and <code>ny=N1</code> after conversion.
-</p>
-
-<hr>
-<a name="Linking-array"></a>
-<div class="header">
-<p>
-Next: <a href="#Change-data" accesskey="n" rel="next">Change data</a>, Previous: <a href="#Array-creation" accesskey="p" rel="prev">Array creation</a>, Up: <a href="#Data-handling" accesskey="u" rel="up">Data handling</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Linking-array-1"></a>
-<h4 class="subsection">2.3.2 Linking array</h4>
-
-
-<p>Sometimes the data arrays are so large, that one couldn’t’ copy its values to another array (i.e. into mglData). In this case, he can define its own class derived from <code>mglDataA</code> (see <a href="#mglDataA-class">mglDataA class</a>) or can use <code>Link</code> function.
-</p>
-<p>In last case, MathGL just save the link to an external data array, but not copy it. You should provide the existence of this data array for whole time during which MathGL can use it. Another point is that MathGL will automatically create new array if you’ll try to modify data values by any of <code>mglData</code> functions. So, you should use only function with <code>const</code> modifier if you want still using link to the original data array.
-</p>
-<p>Creating the link is rather simple – just the same as using <code>Set</code> function
-</p><pre class="verbatim"> double *a = new double[50];
- for(int i=0;i<50;i++) a[i] = sin(M_PI*i/49.);
-
- mglData y;
- y.Link(a,50);
-</pre>
-
-<hr>
-<a name="Change-data"></a>
-<div class="header">
-<p>
-Previous: <a href="#Linking-array" accesskey="p" rel="prev">Linking array</a>, Up: <a href="#Data-handling" accesskey="u" rel="up">Data handling</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Change-data-1"></a>
-<h4 class="subsection">2.3.3 Change data</h4>
-
-
-<p>MathGL has functions for data processing: differentiating, integrating, smoothing and so on (for more detail, see <a href="#Data-processing">Data processing</a>). Let us consider some examples. The simplest ones are integration and differentiation. The direction in which operation will be performed is specified by textual string, which may contain symbols ‘<samp>x</samp>’, ‘<samp>y</samp>’ or ‘<samp>z</samp>’. For example, the call of <code>Diff("x")</code> will differentiate data along ‘<samp>x</samp>’ direction; the call of <code>Integral("xy")</code> perform the double integration of data along ‘<samp>x</samp>’ and ‘<samp>y</samp>’ directions; the call of <code>Diff2("xyz")</code> will apply 3d Laplace operator to data and so on. Example of this operations on 2d array a=x*y is presented in code:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SetRanges(0,1,0,1,0,1);
- mglData a(30,40); a.Modify("x*y");
- gr->SubPlot(2,2,0); gr->Rotate(60,40);
- gr->Surf(a); gr->Box();
- gr->Puts(mglPoint(0.7,1,1.2),"a(x,y)");
- gr->SubPlot(2,2,1); gr->Rotate(60,40);
- a.Diff("x"); gr->Surf(a); gr->Box();
- gr->Puts(mglPoint(0.7,1,1.2),"da/dx");
- gr->SubPlot(2,2,2); gr->Rotate(60,40);
- a.Integral("xy"); gr->Surf(a); gr->Box();
- gr->Puts(mglPoint(0.7,1,1.2),"\\int da/dx dxdy");
- gr->SubPlot(2,2,3); gr->Rotate(60,40);
- a.Diff2("y"); gr->Surf(a); gr->Box();
- gr->Puts(mglPoint(0.7,1,1.2),"\\int {d^2}a/dxdy dx");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/dat_diff.png" alt="Example of data differentiation and integration">
-</div>
-<p>Data smoothing (function <a href="#smooth">smooth</a>) is more interesting and important. This function has single argument which define type of smoothing and its direction. Now 3 methods are supported: ‘<samp>3</samp>’ – linear averaging by 3 points, ‘<samp>5</samp>’ – linear averaging by 5 points, and default one – quadratic averaging by 5 points.
-</p>
-<p>MathGL also have some amazing functions which is not so important for data processing as useful for data plotting. There are functions for finding envelope (useful for plotting rapidly oscillating data), for data sewing (useful to removing jumps on the phase), for data resizing (interpolation). Let me demonstrate it:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(2,2,0,""); gr->Title("Envelop sample");
- mglData d1(1000); gr->Fill(d1,"exp(-8*x^2)*sin(10*pi*x)");
- gr->Axis(); gr->Plot(d1, "b");
- d1.Envelop('x'); gr->Plot(d1, "r");
-
- gr->SubPlot(2,2,1,""); gr->Title("Smooth sample");
- mglData y0(30),y1,y2,y3;
- gr->SetRanges(0,1,0,1);
- gr->Fill(y0, "0.4*sin(pi*x) + 0.3*cos(1.5*pi*x) - 0.4*sin(2*pi*x)+0.5*rnd");
-
- y1=y0; y1.Smooth("x3");
- y2=y0; y2.Smooth("x5");
- y3=y0; y3.Smooth("x");
-
- gr->Plot(y0,"{m7}:s", "legend 'none'"); //gr->AddLegend("none","k");
- gr->Plot(y1,"r", "legend ''3' style'");
- gr->Plot(y2,"g", "legend ''5' style'");
- gr->Plot(y3,"b", "legend 'default'");
- gr->Legend(); gr->Box();
-
- gr->SubPlot(2,2,2); gr->Title("Sew sample");
- mglData d2(100, 100); gr->Fill(d2, "mod((y^2-(1-x)^2)/2,0.1)");
- gr->Rotate(50, 60); gr->Light(true); gr->Alpha(true);
- gr->Box(); gr->Surf(d2, "b");
- d2.Sew("xy", 0.1); gr->Surf(d2, "r");
-
- gr->SubPlot(2,2,3); gr->Title("Resize sample (interpolation)");
- mglData x0(10), v0(10), x1, v1;
- gr->Fill(x0,"rnd"); gr->Fill(v0,"rnd");
- x1 = x0.Resize(100); v1 = v0.Resize(100);
- gr->Plot(x0,v0,"b+ "); gr->Plot(x1,v1,"r-");
- gr->Label(x0,v0,"%n");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/dat_extra.png" alt="Example of data smoothing">
-</div>
-<p>Also one can create new data arrays on base of the existing one: extract slice, row or column of data (<a href="#subdata">subdata</a>), summarize along a direction(s) (<a href="#sum">sum</a>), find distribution of data elements (<a href="#hist">hist</a>) and so on.
-</p>
-<a name="Solve-sample"></a><p>Another interesting feature of MathGL is interpolation and root-finding. There are several functions for linear and cubic spline interpolation (see <a href="#Interpolation">Interpolation</a>). Also there is a function <a href="#evaluate">evaluate</a> which do interpolation of data array for values of each data element of index data. It look as indirect access to the data elements.
-</p>
-<p>This function have inverse function <a href="#solve">solve</a> which find array of indexes at which data array is equal to given value (i.e. work as root finding). But <a href="#solve">solve</a> function have the issue – usually multidimensional data (2d and 3d ones) have an infinite number of indexes which give some value. This is contour lines for 2d data, or isosurface(s) for 3d data. So, <a href="#solve">solve</a> function will return index only in given direction, assuming that other index(es) are the same as equidistant index(es) of original data. If data have multiple roots then second (and later) branches can be found by consecutive call(s) of <a href="#solve">solve</a> function. Let me demonstrate this on the following sample.
-</p>
-<pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SetRange('z',0,1);
- mglData x(20,30), y(20,30), z(20,30), xx,yy,zz;
- gr->Fill(x,"(x+2)/3*cos(pi*y)");
- gr->Fill(y,"(x+2)/3*sin(pi*y)");
- gr->Fill(z,"exp(-6*x^2-2*sin(pi*y)^2)");
-
- gr->SubPlot(2,1,0); gr->Title("Cartesian space"); gr->Rotate(30,-40);
- gr->Axis("xyzU"); gr->Box(); gr->Label('x',"x"); gr->Label('y',"y");
- gr->SetOrigin(1,1); gr->Grid("xy");
- gr->Mesh(x,y,z);
-
- // section along 'x' direction
- mglData u = x.Solve(0.5,'x');
- mglData v(u.nx); v.Fill(0,1);
- xx = x.Evaluate(u,v); yy = y.Evaluate(u,v); zz = z.Evaluate(u,v);
- gr->Plot(xx,yy,zz,"k2o");
-
- // 1st section along 'y' direction
- mglData u1 = x.Solve(-0.5,'y');
- mglData v1(u1.nx); v1.Fill(0,1);
- xx = x.Evaluate(v1,u1); yy = y.Evaluate(v1,u1); zz = z.Evaluate(v1,u1);
- gr->Plot(xx,yy,zz,"b2^");
-
- // 2nd section along 'y' direction
- mglData u2 = x.Solve(-0.5,'y',u1);
- xx = x.Evaluate(v1,u2); yy = y.Evaluate(v1,u2); zz = z.Evaluate(v1,u2);
- gr->Plot(xx,yy,zz,"r2v");
-
- gr->SubPlot(2,1,1); gr->Title("Accompanied space");
- gr->SetRanges(0,1,0,1); gr->SetOrigin(0,0);
- gr->Axis(); gr->Box(); gr->Label('x',"i"); gr->Label('y',"j");
- gr->Grid(z,"h");
-
- gr->Plot(u,v,"k2o"); gr->Line(mglPoint(0.4,0.5),mglPoint(0.8,0.5),"kA");
- gr->Plot(v1,u1,"b2^"); gr->Line(mglPoint(0.5,0.15),mglPoint(0.5,0.3),"bA");
- gr->Plot(v1,u2,"r2v"); gr->Line(mglPoint(0.5,0.7),mglPoint(0.5,0.85),"rA");
-}
-</pre>
-<div align="center"><img src="png/solve.png" alt="Example of data interpolation and root finding">
-</div>
-
-<hr>
-<a name="Data-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#Hints" accesskey="n" rel="next">Hints</a>, Previous: <a href="#Data-handling" accesskey="p" rel="prev">Data handling</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-plotting-1"></a>
-<h3 class="section">2.4 Data plotting</h3>
-
-
-<p>Let me now show how to plot the data. Next section will give much more examples for all plotting functions. Here I just show some basics. MathGL generally has 2 types of plotting functions. Simple variant requires a single data array for plotting, other data (coordinates) are considered uniformly distributed in axis range. Second variant requires data arrays for all coordinates. It allows one to plot rather complex multivalent curves and surfaces (in case of parametric dependencies). Usually each function have one textual argument for plot style and another textual argument for options (see <a href="#Command-options">Command options</a>).
-</p>
-<p>Note, that the call of drawing function adds something to picture but does not clear the previous plots (as it does in Matlab). Another difference from Matlab is that all setup (like transparency, lightning, axis borders and so on) must be specified <strong>before</strong> plotting functions.
-</p>
-<p>Let start for plots for 1D data. Term “1D data” means that data depend on single index (parameter) like curve in parametric form {x(i),y(i),z(i)}, i=1...n. The textual argument allow you specify styles of line and marks (see <a href="#Line-styles">Line styles</a>). If this parameter is <code>NULL</code> or empty then solid line with color from palette is used (see <a href="#Palette-and-colors">Palette and colors</a>).
-</p>
-<p>Below I shall show the features of 1D plotting on base of <a href="#plot">plot</a> function. Let us start from sinus plot:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData y0(50); y0.Modify("sin(pi*(2*x-1))");
- gr->SubPlot(2,2,0);
- gr->Plot(y0); gr->Box();
-</pre><p>Style of line is not specified in <a href="#plot">plot</a> function. So MathGL uses the solid line with first color of palette (this is blue). Next subplot shows array <var>y1</var> with 2 rows:
-</p><pre class="verbatim"> gr->SubPlot(2,2,1);
- mglData y1(50,2);
- y1.Modify("sin(pi*2*x-pi)");
- y1.Modify("cos(pi*2*x-pi)/2",1);
- gr->Plot(y1); gr->Box();
-</pre><p>As previously I did not specify the style of lines. As a result, MathGL again uses solid line with next colors in palette (there are green and red). Now let us plot a circle on the same subplot. The circle is parametric curve <em>x=cos(\pi t), y=sin(\pi t)</em>. I will set the color of the circle (dark yellow, ‘<samp>Y</samp>’) and put marks ‘<samp>+</samp>’ at point position:
-</p><pre class="verbatim"> mglData x(50); x.Modify("cos(pi*2*x-pi)");
- gr->Plot(x,y0,"Y+");
-</pre><p>Note that solid line is used because I did not specify the type of line. The same picture can be achieved by <a href="#plot">plot</a> and <a href="#subdata">subdata</a> functions. Let us draw ellipse by orange dash line:
-</p><pre class="verbatim"> gr->Plot(y1.SubData(-1,0),y1.SubData(-1,1),"q|");
-</pre>
-<p>Drawing in 3D space is mostly the same. Let us draw spiral with default line style. Now its color is 4-th color from palette (this is cyan):
-</p><pre class="verbatim"> gr->SubPlot(2,2,2); gr->Rotate(60,40);
- mglData z(50); z.Modify("2*x-1");
- gr->Plot(x,y0,z); gr->Box();
-</pre><p>Functions <a href="#plot">plot</a> and <a href="#subdata">subdata</a> make 3D curve plot but for single array. Use it to put circle marks on the previous plot:
-</p><pre class="verbatim"> mglData y2(10,3); y2.Modify("cos(pi*(2*x-1+y))");
- y2.Modify("2*x-1",2);
- gr->Plot(y2.SubData(-1,0),y2.SubData(-1,1),y2.SubData(-1,2),"bo ");
-</pre><p>Note that line style is empty ‘<samp> </samp>’ here. Usage of other 1D plotting functions looks similar:
-</p><pre class="verbatim"> gr->SubPlot(2,2,3); gr->Rotate(60,40);
- gr->Bars(x,y0,z,"r"); gr->Box();
- return 0;
-}
-</pre>
-<p>Surfaces <a href="#surf">surf</a> and other 2D plots (see <a href="#g_t2D-plotting">2D plotting</a>) are drown the same simpler as 1D one. The difference is that the string parameter specifies not the line style but the color scheme of the plot (see <a href="#Color-scheme">Color scheme</a>). Here I draw attention on 4 most interesting color schemes. There is gray scheme where color is changed from black to white (string ‘<samp>kw</samp>’) or from white to black (string ‘<samp>wk</samp>’). Another scheme is useful for accentuation of negative (by blue color) and positive (by red color) regions on plot (string ‘<samp>"BbwrR"</samp>’). Last one is the popular “jet” scheme (string ‘<samp>"BbcyrR"</samp>’).
-</p>
-<p>Now I shall show the example of a surface drawing. At first let us switch lightning on
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->Light(true); gr->Light(0,mglPoint(0,0,1));
-</pre><p>and draw the surface, considering coordinates x,y to be uniformly distributed in axis range
-</p><pre class="verbatim"> mglData a0(50,40);
- a0.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))");
- gr->SubPlot(2,2,0); gr->Rotate(60,40);
- gr->Surf(a0); gr->Box();
-</pre><p>Color scheme was not specified. So previous color scheme is used. In this case it is default color scheme (“jet”) for the first plot. Next example is a sphere. The sphere is parametrically specified surface:
-</p><pre class="verbatim"> mglData x(50,40),y(50,40),z(50,40);
- x.Modify("0.8*sin(2*pi*x)*sin(pi*y)");
- y.Modify("0.8*cos(2*pi*x)*sin(pi*y)");
- z.Modify("0.8*cos(pi*y)");
- gr->SubPlot(2,2,1); gr->Rotate(60,40);
- gr->Surf(x,y,z,"BbwrR");gr->Box();
-</pre><p>I set color scheme to <code>"BbwrR"</code> that corresponds to red top and blue bottom of the sphere.
-</p>
-<p>Surfaces will be plotted for each of slice of the data if <var>nz</var>>1. Next example draws surfaces for data arrays with <var>nz</var>=3:
-</p><pre class="verbatim"> mglData a1(50,40,3);
- a1.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))");
- a1.Modify("0.6*cos(2*pi*x)*cos(3*pi*y)+0.4*sin(3*pi*(x*y))",1);
- a1.Modify("0.6*cos(2*pi*x)*cos(3*pi*y)+0.4*cos(3*pi*(x*y))",2);
- gr->SubPlot(2,2,2); gr->Rotate(60,40);
- gr->Alpha(true);
- gr->Surf(a1); gr->Box();
-</pre><p>Note, that it may entail a confusion. However, if one will use density plot then the picture will look better:
-</p><pre class="verbatim"> gr->SubPlot(2,2,3); gr->Rotate(60,40);
- gr->Dens(a1); gr->Box();
- return 0;
-}
-</pre>
-<p>Drawing of other 2D plots is analogous. The only peculiarity is the usage of flag ‘<samp>#</samp>’. By default this flag switches on the drawing of a grid on plot (<a href="#grid">grid</a> or <a href="#mesh">mesh</a> for plots in plain or in volume). However, for isosurfaces (including surfaces of rotation <a href="#axial">axial</a>) this flag switches the face drawing off. Figure becomes wired. The following code gives example of flag ‘<samp>#</samp>’ using (compare with normal function drawing as in its description):
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->Alpha(true); gr->Light(true); gr->Light(0,mglPoint(0,0,1));
- mglData a(30,20);
- a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))");
-
- gr->SubPlot(2,2,0); gr->Rotate(40,60);
- gr->Surf(a,"BbcyrR#"); gr->Box();
- gr->SubPlot(2,2,1); gr->Rotate(40,60);
- gr->Dens(a,"BbcyrR#"); gr->Box();
- gr->SubPlot(2,2,2); gr->Rotate(40,60);
- gr->Cont(a,"BbcyrR#"); gr->Box();
- gr->SubPlot(2,2,3); gr->Rotate(40,60);
- gr->Axial(a,"BbcyrR#"); gr->Box();
- return 0;
-}
-</pre>
-
-<hr>
-<a name="Hints"></a>
-<div class="header">
-<p>
-Next: <a href="#FAQ" accesskey="n" rel="next">FAQ</a>, Previous: <a href="#Data-plotting" accesskey="p" rel="prev">Data plotting</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Hints-1"></a>
-<h3 class="section">2.5 Hints</h3>
-
-
-<p>In this section I’ve included some small hints and advices for the improving of the quality of plots and for the demonstration of some non-trivial features of MathGL library. In contrast to previous examples I showed mostly the idea but not the whole drawing function.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#g_t_0060_0060Compound_0027_0027-graphics" accesskey="1">``Compound'' graphics</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Transparency-and-lighting" accesskey="2">Transparency and lighting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Types-of-transparency" accesskey="3">Types of transparency</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Axis-projection" accesskey="4">Axis projection</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Adding-fog" accesskey="5">Adding fog</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Lighting-sample" accesskey="6">Lighting sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Using-primitives" accesskey="7">Using primitives</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#STFA-sample" accesskey="8">STFA sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Mapping-visualization" accesskey="9">Mapping visualization</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-interpolation">Data interpolation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Making-regular-data">Making regular data</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Making-histogram">Making histogram</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Nonlinear-fitting-hints">Nonlinear fitting hints</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#PDE-solving-hints">PDE solving hints</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Drawing-phase-plain">Drawing phase plain</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Using-MGL-parser">Using MGL parser</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Pulse-properties">Pulse properties</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Using-options">Using options</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#g_t_0060_0060Templates_0027_0027">``Templates''</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Stereo-image">Stereo image</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Reduce-memory-usage">Reduce memory usage</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Saving-and-scanning-file">Saving and scanning file</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Mixing-bitmap-and-vector-output">Mixing bitmap and vector output</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="g_t_0060_0060Compound_0027_0027-graphics"></a>
-<div class="header">
-<p>
-Next: <a href="#Transparency-and-lighting" accesskey="n" rel="next">Transparency and lighting</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="g_t_0060_0060Compound_0027_0027-graphics-1"></a>
-<h4 class="subsection">2.5.1 “Compound” graphics</h4>
-
-
-<p>As I noted above, MathGL functions (except the special one, like Clf()) do not erase the previous plotting but just add the new one. It allows one to draw “compound” plots easily. For example, popular Matlab command <code>surfc</code> can be emulated in MathGL by 2 calls:
-</p><pre class="verbatim"> Surf(a);
- Cont(a, "_"); // draw contours at bottom
-</pre><p>Here <var>a</var> is 2-dimensional data for the plotting, <code>-1</code> is the value of z-coordinate at which the contour should be plotted (at the bottom in this example). Analogously, one can draw density plot instead of contour lines and so on.
-</p>
-<p>Another nice plot is contour lines plotted directly on the surface:
-</p><pre class="verbatim"> Light(true); // switch on light for the surface
- Surf(a, "BbcyrR"); // select 'jet' colormap for the surface
- Cont(a, "y"); // and yellow color for contours
-</pre><p>The possible difficulties arise in black&white case, when the color of the surface can be close to the color of a contour line. In that case I may suggest the following code:
-</p><pre class="verbatim"> Light(true); // switch on light for the surface
- Surf(a, "kw"); // select 'gray' colormap for the surface
- CAxis(-1,0); // first draw for darker surface colors
- Cont(a, "w"); // white contours
- CAxis(0,1); // now draw for brighter surface colors
- Cont(a, "k"); // black contours
- CAxis(-1,1); // return color range to original state
-</pre><p>The idea is to divide the color range on 2 parts (dark and bright) and to select the contrasting color for contour lines for each of part.
-</p>
-<p>Similarly, one can plot flow thread over density plot of vector field amplitude (this is another amusing plot from Matlab) and so on. The list of compound graphics can be prolonged but I hope that the general idea is clear.
-</p>
-<p>Just for illustration I put here following sample code:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData a,b,d; mgls_prepare2v(&a,&b); d = a;
- for(int i=0;i<a.nx*a.ny;i++) d.a[i] = hypot(a.a[i],b.a[i]);
- mglData c; mgls_prepare3d(&c);
- mglData v(10); v.Fill(-0.5,1);
-
- gr->SubPlot(2,2,1,""); gr->Title("Flow + Dens");
- gr->Flow(a,b,"br"); gr->Dens(d,"BbcyrR"); gr->Box();
-
- gr->SubPlot(2,2,0); gr->Title("Surf + Cont"); gr->Rotate(50,60);
- gr->Light(true); gr->Surf(a); gr->Cont(a,"y"); gr->Box();
-
- gr->SubPlot(2,2,2); gr->Title("Mesh + Cont"); gr->Rotate(50,60);
- gr->Box(); gr->Mesh(a); gr->Cont(a,"_");
-
- gr->SubPlot(2,2,3); gr->Title("Surf3 + ContF3");gr->Rotate(50,60);
- gr->Box(); gr->ContF3(v,c,"z",0); gr->ContF3(v,c,"x"); gr->ContF3(v,c);
- gr->SetCutBox(mglPoint(0,-1,-1), mglPoint(1,0,1.1));
- gr->ContF3(v,c,"z",c.nz-1); gr->Surf3(-0.5,c);
- return 0;
-}
-</pre>
-<div align="center"><img src="png/combined.png" alt="Example of “combined” plots">
-</div>
-
-<hr>
-<a name="Transparency-and-lighting"></a>
-<div class="header">
-<p>
-Next: <a href="#Types-of-transparency" accesskey="n" rel="next">Types of transparency</a>, Previous: <a href="#g_t_0060_0060Compound_0027_0027-graphics" accesskey="p" rel="prev">``Compound'' graphics</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Transparency-and-lighting-1"></a>
-<h4 class="subsection">2.5.2 Transparency and lighting</h4>
-
-
-<p>Here I want to show how transparency and lighting both and separately change the look of a surface. So, there is code and picture for that:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- gr->SubPlot(2,2,0); gr->Title("default"); gr->Rotate(50,60);
- gr->Box(); gr->Surf(a);
-
- gr->SubPlot(2,2,1); gr->Title("light on"); gr->Rotate(50,60);
- gr->Box(); gr->Light(true); gr->Surf(a);
-
- gr->SubPlot(2,2,3); gr->Title("alpha on; light on"); gr->Rotate(50,60);
- gr->Box(); gr->Alpha(true); gr->Surf(a);
-
- gr->SubPlot(2,2,2); gr->Title("alpha on"); gr->Rotate(50,60);
- gr->Box(); gr->Light(false); gr->Surf(a);
- return 0;
-}
-</pre>
-<div align="center"><img src="png/alpha.png" alt="Example of transparency and lightings">
-</div>
-
-<hr>
-<a name="Types-of-transparency"></a>
-<div class="header">
-<p>
-Next: <a href="#Axis-projection" accesskey="n" rel="next">Axis projection</a>, Previous: <a href="#Transparency-and-lighting" accesskey="p" rel="prev">Transparency and lighting</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Types-of-transparency-1"></a>
-<h4 class="subsection">2.5.3 Types of transparency</h4>
-
-
-<p>MathGL library has advanced features for setting and handling the surface transparency. The simplest way to add transparency is the using of function <a href="#alpha">alpha</a>. As a result, all further surfaces (and isosurfaces, density plots and so on) become transparent. However, their look can be additionally improved.
-</p>
-<p>The value of transparency can be different from surface to surface. To do it just use <code>SetAlphaDef</code> before the drawing of the surface, or use option <code>alpha</code> (see <a href="#Command-options">Command options</a>). If its value is close to 0 then the surface becomes more and more transparent. Contrary, if its value is close to 1 then the surface becomes practically non-transparent.
-</p>
-<p>Also you can change the way how the light goes through overlapped surfaces. The function <code>SetTranspType</code> defines it. By default the usual transparency is used (‘<samp>0</samp>’) – surfaces below is less visible than the upper ones. A “glass-like” transparency (‘<samp>1</samp>’) has a different look – each surface just decreases the background light (the surfaces are commutable in this case).
-</p>
-<p>A “neon-like” transparency (‘<samp>2</samp>’) has more interesting look. In this case a surface is the light source (like a lamp on the dark background) and just adds some intensity to the color. At this, the library sets automatically the black color for the background and changes the default line color to white.
-</p>
-<p>As example I shall show several plots for different types of transparency. The code is the same except the values of <code>SetTranspType</code> function:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->Alpha(true); gr->Light(true);
- mglData a; mgls_prepare2d(&a);
- gr->SetTranspType(0); gr->Clf();
- gr->SubPlot(2,2,0); gr->Rotate(50,60); gr->Surf(a); gr->Box();
- gr->SubPlot(2,2,1); gr->Rotate(50,60); gr->Dens(a); gr->Box();
- gr->SubPlot(2,2,2); gr->Rotate(50,60); gr->Cont(a); gr->Box();
- gr->SubPlot(2,2,3); gr->Rotate(50,60); gr->Axial(a); gr->Box();
- return 0;
-}
-</pre>
-<div align="center"><img src="png/type0.png" alt="Example of SetTranspType(0).">
-</div><div align="center"><img src="png/type1.png" alt="Example of SetTranspType(1).">
-</div><div align="center"><img src="png/type2.png" alt="Example of SetTranspType(2).">
-</div>
-
-
-<hr>
-<a name="Axis-projection"></a>
-<div class="header">
-<p>
-Next: <a href="#Adding-fog" accesskey="n" rel="next">Adding fog</a>, Previous: <a href="#Types-of-transparency" accesskey="p" rel="prev">Types of transparency</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Axis-projection-1"></a>
-<h4 class="subsection">2.5.4 Axis projection</h4>
-
-
-<p>You can easily make 3D plot and draw its x-,y-,z-projections (like in CAD) by using <a href="#ternary">ternary</a> function with arguments: 4 for Cartesian, 5 for Ternary and 6 for Quaternary coordinates. The sample code is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SetRanges(0,1,0,1,0,1);
- mglData x(50),y(50),z(50),rx(10),ry(10), a(20,30);
- a.Modify("30*x*y*(1-x-y)^2*(x+y<1)");
- x.Modify("0.25*(1+cos(2*pi*x))");
- y.Modify("0.25*(1+sin(2*pi*x))");
- rx.Modify("rnd"); ry.Modify("(1-v)*rnd",rx);
- z.Modify("x");
-
- gr->Title("Projection sample");
- gr->Ternary(4);
- gr->Rotate(50,60); gr->Light(true);
- gr->Plot(x,y,z,"r2"); gr->Surf(a,"#");
- gr->Axis(); gr->Grid(); gr->Box();
- gr->Label('x',"X",1); gr->Label('y',"Y",1); gr->Label('z',"Z",1);
-}
-</pre>
-<div align="center"><img src="png/projection.png" alt="Example of axis projections">
-</div><div align="center"><img src="png/projection5.png" alt="Example of ternary axis projections">
-</div>
-
-<hr>
-<a name="Adding-fog"></a>
-<div class="header">
-<p>
-Next: <a href="#Lighting-sample" accesskey="n" rel="next">Lighting sample</a>, Previous: <a href="#Axis-projection" accesskey="p" rel="prev">Axis projection</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Adding-fog-1"></a>
-<h4 class="subsection">2.5.5 Adding fog</h4>
-
-
-<p>MathGL can add a fog to the image. Its switching on is rather simple – just use <a href="#fog">fog</a> function. There is the only feature – fog is applied for whole image. Not to particular subplot. The sample code is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- gr->Title("Fog sample");
- gr->Light(true); gr->Rotate(50,60); gr->Fog(1); gr->Box();
- gr->Surf(a); gr->Cont(a,"y");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/fog.png" alt="Example of Fog().">
-</div>
-
-<hr>
-<a name="Lighting-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#Using-primitives" accesskey="n" rel="next">Using primitives</a>, Previous: <a href="#Adding-fog" accesskey="p" rel="prev">Adding fog</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Lighting-sample-1"></a>
-<h4 class="subsection">2.5.6 Lighting sample</h4>
-
-
-<p>In contrast to the most of other programs, MathGL supports several (up to 10) light sources. Moreover, the color each of them can be different: white (this is usual), yellow, red, cyan, green and so on. The use of several light sources may be interesting for the highlighting of some peculiarities of the plot or just to make an amusing picture. Note, each light source can be switched on/off individually. The sample code is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- gr->Title("Several light sources");
- gr->Rotate(50,60); gr->Light(true);
- gr->AddLight(1,mglPoint(0,1,0),'c');
- gr->AddLight(2,mglPoint(1,0,0),'y');
- gr->AddLight(3,mglPoint(0,-1,0),'m');
- gr->Box(); gr->Surf(a,"h");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/several_light.png" alt="Example of several light sources.">
-</div>
-<p>Additionally, you can use local light sources and set to use <a href="#diffuse">diffuse</a> reflection instead of specular one (by default) or both kinds. Note, I use <a href="#attachlight">attachlight</a> command to keep light settings relative to subplot.
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->Light(true); gr->AttachLight(true);
- gr->SubPlot(2,2,0); gr->Title("Default"); gr->Rotate(50,60);
- gr->Line(mglPoint(-1,-0.7,1.7),mglPoint(-1,-0.7,0.7),"BA"); gr->Box(); gr->Surf(a);
-
- gr->SubPlot(2,2,1); gr->Title("Local"); gr->Rotate(50,60);
- gr->AddLight(0,mglPoint(1,0,1),mglPoint(-2,-1,-1));
- gr->Line(mglPoint(1,0,1),mglPoint(-1,-1,0),"BAO"); gr->Box(); gr->Surf(a);
-
- gr->SubPlot(2,2,2); gr->Title("no diffuse"); gr->Rotate(50,60);
- gr->SetDiffuse(0);
- gr->Line(mglPoint(1,0,1),mglPoint(-1,-1,0),"BAO"); gr->Box(); gr->Surf(a);
-
- gr->SubPlot(2,2,3); gr->Title("diffusive only"); gr->Rotate(50,60);
- gr->SetDiffuse(0.5);
- gr->AddLight(0,mglPoint(1,0,1),mglPoint(-2,-1,-1),'w',0);
- gr->Line(mglPoint(1,0,1),mglPoint(-1,-1,0),"BAO"); gr->Box(); gr->Surf(a);
-}
-</pre>
-<div align="center"><img src="png/light.png" alt="Example of different types of lighting.">
-</div>
-
-<hr>
-<a name="Using-primitives"></a>
-<div class="header">
-<p>
-Next: <a href="#STFA-sample" accesskey="n" rel="next">STFA sample</a>, Previous: <a href="#Lighting-sample" accesskey="p" rel="prev">Lighting sample</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Using-primitives-1"></a>
-<h4 class="subsection">2.5.7 Using primitives</h4>
-
-
-<p>MathGL provide a set of functions for drawing primitives (see <a href="#Primitives">Primitives</a>). Primitives are low level object, which used by most of plotting functions. Picture below demonstrate some of commonly used primitives.
-</p>
-<div align="center"><img src="png/primitives.png" alt="Primitives in MathGL.">
-</div>
-<p>Generally, you can create arbitrary new kind of plot using primitives. For example, MathGL don’t provide any special functions for drawing molecules. However, you can do it using only one type of primitives <a href="#drop">drop</a>. The sample code is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->Alpha(true); gr->Light(true);
-
- gr->SubPlot(2,2,0,""); gr->Title("Methane, CH_4");
- gr->StartGroup("Methane");
- gr->Rotate(60,120);
- gr->Sphere(mglPoint(0,0,0),0.25,"k");
- gr->Drop(mglPoint(0,0,0),mglPoint(0,0,1),0.35,"h",1,2);
- gr->Sphere(mglPoint(0,0,0.7),0.25,"g");
- gr->Drop(mglPoint(0,0,0),mglPoint(-0.94,0,-0.33),0.35,"h",1,2);
- gr->Sphere(mglPoint(-0.66,0,-0.23),0.25,"g");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.47,0.82,-0.33),0.35,"h",1,2);
- gr->Sphere(mglPoint(0.33,0.57,-0.23),0.25,"g");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.47,-0.82,-0.33),0.35,"h",1,2);
- gr->Sphere(mglPoint(0.33,-0.57,-0.23),0.25,"g");
- gr->EndGroup();
-
- gr->SubPlot(2,2,1,""); gr->Title("Water, H_{2}O");
- gr->StartGroup("Water");
- gr->Rotate(60,100);
- gr->StartGroup("Water_O");
- gr->Sphere(mglPoint(0,0,0),0.25,"r");
- gr->EndGroup();
- gr->StartGroup("Water_Bond_1");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.3,0.5,0),0.3,"m",1,2);
- gr->EndGroup();
- gr->StartGroup("Water_H_1");
- gr->Sphere(mglPoint(0.3,0.5,0),0.25,"g");
- gr->EndGroup();
- gr->StartGroup("Water_Bond_2");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.3,-0.5,0),0.3,"m",1,2);
- gr->EndGroup();
- gr->StartGroup("Water_H_2");
- gr->Sphere(mglPoint(0.3,-0.5,0),0.25,"g");
- gr->EndGroup();
- gr->EndGroup();
-
- gr->SubPlot(2,2,2,""); gr->Title("Oxygen, O_2");
- gr->StartGroup("Oxygen");
- gr->Rotate(60,120);
- gr->Drop(mglPoint(0,0.5,0),mglPoint(0,-0.3,0),0.3,"m",1,2);
- gr->Sphere(mglPoint(0,0.5,0),0.25,"r");
- gr->Drop(mglPoint(0,-0.5,0),mglPoint(0,0.3,0),0.3,"m",1,2);
- gr->Sphere(mglPoint(0,-0.5,0),0.25,"r");
- gr->EndGroup();
-
- gr->SubPlot(2,2,3,""); gr->Title("Ammonia, NH_3");
- gr->StartGroup("Ammonia");
- gr->Rotate(60,120);
- gr->Sphere(mglPoint(0,0,0),0.25,"b");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.33,0.57,0),0.32,"n",1,2);
- gr->Sphere(mglPoint(0.33,0.57,0),0.25,"g");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.33,-0.57,0),0.32,"n",1,2);
- gr->Sphere(mglPoint(0.33,-0.57,0),0.25,"g");
- gr->Drop(mglPoint(0,0,0),mglPoint(-0.65,0,0),0.32,"n",1,2);
- gr->Sphere(mglPoint(-0.65,0,0),0.25,"g");
- gr->EndGroup();
- return 0;
-}
-</pre>
-<div align="center"><img src="png/molecule.png" alt="Example of molecules drawing.">
-</div>
-<p>Moreover, some of special plots can be more easily produced by primitives rather than by specialized function. For example, Venn diagram can be produced by <code>Error</code> plot:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- double xx[3]={-0.3,0,0.3}, yy[3]={0.3,-0.3,0.3}, ee[3]={0.7,0.7,0.7};
- mglData x(3,xx), y(3,yy), e(3,ee);
- gr->Title("Venn-like diagram"); gr->Alpha(true);
- gr->Error(x,y,e,e,"!rgb@#o");
- return 0;
-}
-</pre><p>You see that you have to specify and fill 3 data arrays. The same picture can be produced by just 3 calls of <a href="#circle">circle</a> function:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->Title("Venn-like diagram"); gr->Alpha(true);
- gr->Circle(mglPoint(-0.3,0.3),0.7,"rr@");
- gr->Circle(mglPoint(0,-0.3),0.7,"gg@");
- gr->Circle(mglPoint( 0.3,0.3),0.7,"bb@");
- return 0;
-}
-</pre><p>Of course, the first variant is more suitable if you need to plot a lot of circles. But for few ones the usage of primitives looks easy.
-</p>
-<div align="center"><img src="png/venn.png" alt="Example of Venn diagram.">
-</div>
-
-<hr>
-<a name="STFA-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#Mapping-visualization" accesskey="n" rel="next">Mapping visualization</a>, Previous: <a href="#Using-primitives" accesskey="p" rel="prev">Using primitives</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="STFA-sample-1"></a>
-<h4 class="subsection">2.5.8 STFA sample</h4>
-
-
-<p>Short-time Fourier Analysis (<a href="#stfa">stfa</a>) is one of informative method for analyzing long rapidly oscillating 1D data arrays. It is used to determine the sinusoidal frequency and phase content of local sections of a signal as it changes over time.
-</p>
-<p>MathGL can find and draw STFA result. Just to show this feature I give following sample. Initial data arrays is 1D arrays with step-like frequency. Exactly this you can see at bottom on the STFA plot. The sample code is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData a(2000), b(2000);
- gr->Fill(a,"cos(50*pi*x)*(x<-.5)+cos(100*pi*x)*(x<0)*(x>-.5)+\
- cos(200*pi*x)*(x<.5)*(x>0)+cos(400*pi*x)*(x>.5)");
- gr->SubPlot(1, 2, 0,"<_"); gr->Title("Initial signal");
- gr->Plot(a);
- gr->Axis();
- gr->Label('x', "\\i t");
-
- gr->SubPlot(1, 2, 1,"<_"); gr->Title("STFA plot");
- gr->STFA(a, b, 64);
- gr->Axis();
- gr->Label('x', "\\i t");
- gr->Label('y', "\\omega", 0);
- return 0;
-}
-</pre>
-<div align="center"><img src="png/stfa.png" alt="Example of STFA().">
-</div>
-
-<hr>
-<a name="Mapping-visualization"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-interpolation" accesskey="n" rel="next">Data interpolation</a>, Previous: <a href="#STFA-sample" accesskey="p" rel="prev">STFA sample</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Mapping-visualization-1"></a>
-<h4 class="subsection">2.5.9 Mapping visualization</h4>
-
-
-<p>Sometime ago I worked with mapping and have a question about its visualization. Let me remember you that mapping is some transformation rule for one set of number to another one. The 1d mapping is just an ordinary function – it takes a number and transforms it to another one. The 2d mapping (which I used) is a pair of functions which take 2 numbers and transform them to another 2 ones. Except general plots (like <a href="#surfc">surfc</a>, <a href="#surfa">surfa</a>) there is a special plot – Arnold diagram. It shows the area which is the result of mapping of some initial area (usually square).
-</p>
-<p>I tried to make such plot in <a href="#map">map</a>. It shows the set of points or set of faces, which final position is the result of mapping. At this, the color gives information about their initial position and the height describes Jacobian value of the transformation. Unfortunately, it looks good only for the simplest mapping but for the real multivalent quasi-chaotic mapping it produces a confusion. So, use it if you like :).
-</p>
-<p>The sample code for mapping visualization is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData a(50, 40), b(50, 40);
- gr->Puts(mglPoint(0, 0), "\\to", ":C", -1.4);
- gr->SetRanges(-1,1,-1,1,-2,2);
-
- gr->SubPlot(2, 1, 0);
- gr->Fill(a,"x"); gr->Fill(b,"y");
- gr->Puts(mglPoint(0, 1.1), "\\{x, y\\}", ":C", -2); gr->Box();
- gr->Map(a, b, "brgk");
-
- gr->SubPlot(2, 1, 1);
- gr->Fill(a,"(x^3+y^3)/2"); gr->Fill(b,"(x-y)/2");
- gr->Puts(mglPoint(0, 1.1), "\\{\\frac{x^3+y^3}{2}, \\frac{x-y}{2}\\}", ":C", -2);
- gr->Box();
- gr->Map(a, b, "brgk");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/map.png" alt="Example of Map().">
-</div>
-
-<hr>
-<a name="Data-interpolation"></a>
-<div class="header">
-<p>
-Next: <a href="#Making-regular-data" accesskey="n" rel="next">Making regular data</a>, Previous: <a href="#Mapping-visualization" accesskey="p" rel="prev">Mapping visualization</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-interpolation-1"></a>
-<h4 class="subsection">2.5.10 Data interpolation</h4>
-
-
-<p>There are many functions to get interpolated values of a data array. Basically all of them can be divided by 3 categories:
-</p><ol>
-<li> functions which return single value at given point (see <a href="#Interpolation">Interpolation</a> and <code>mglGSpline()</code> in <a href="#Global-functions">Global functions</a>);
-</li><li> functions <a href="#subdata">subdata</a> and <a href="#evaluate">evaluate</a> for indirect access to data elements;
-</li><li> functions <a href="#refill">refill</a>, <a href="#gspline">gspline</a> and <a href="#datagrid">datagrid</a> which fill regular (rectangular) data array by interpolated values.
-</li></ol>
-
-<p>The usage of first category is rather straightforward and don’t need any special comments.
-</p>
-<p>There is difference in indirect access functions. Function <a href="#subdata">subdata</a> use use step-like interpolation to handle correctly single <code>nan</code> values in the data array. Contrary, function <a href="#evaluate">evaluate</a> use local spline interpolation, which give smoother output but spread <code>nan</code> values. So, <a href="#subdata">subdata</a> should be used for specific data elements (for example, for given column), and <a href="#evaluate">evaluate</a> should be used for distributed elements (i.e. consider data array as some field). Following sample illustrates this difference:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(1,1,0,""); gr->Title("SubData vs Evaluate");
- mglData in(9), arg(99), e, s;
- gr->Fill(in,"x^3/1.1"); gr->Fill(arg,"4*x+4");
- gr->Plot(in,"ko "); gr->Box();
- e = in.Evaluate(arg,false); gr->Plot(e,"b.","legend 'Evaluate'");
- s = in.SubData(arg); gr->Plot(s,"r.","legend 'SubData'");
- gr->Legend(2);
-}
-</pre>
-<div align="center"><img src="png/indirect.png" alt="Example of indirect data access.">
-</div>
-<p>Example of <a href="#datagrid">datagrid</a> usage is done in <a href="#Making-regular-data">Making regular data</a>. Here I want to show the peculiarities of <a href="#refill">refill</a> and <a href="#gspline">gspline</a> functions. Both functions require argument(s) which provide coordinates of the data values, and return rectangular data array which equidistantly distributed in axis range. So, in opposite to <a href="#evaluate">evaluate</a> function, <a href="#refill">refill</a> and <a href="#gspline">gspline</a> can interpolate non-equidistantly distributed data. At this both functions <a href="#refill">refill</a> and <a href="#gspline">gspline</a> provide continuity of 2nd derivatives along coordinate(s). However, <a href="#refill">refill</a> is slower but give better (from human point of view) result than global spline <a href="#gspline">gspline</a> due to more advanced algorithm. Following sample illustrates this difference:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData x(10), y(10), r(100);
- x.Modify("0.5+rnd"); x.CumSum("x"); x.Norm(-1,1);
- y.Modify("sin(pi*v)/1.5",x);
- gr->SubPlot(2,2,0,"<_"); gr->Title("Refill sample");
- gr->Axis(); gr->Box(); gr->Plot(x,y,"o ");
- gr->Refill(r,x,y); // or you can use r.Refill(x,y,-1,1);
- gr->Plot(r,"r"); gr->FPlot("sin(pi*x)/1.5","B:");
- gr->SubPlot(2,2,1,"<_");gr->Title("Global spline");
- gr->Axis(); gr->Box(); gr->Plot(x,y,"o ");
- r.RefillGS(x,y,-1,1); gr->Plot(r,"r");
- gr->FPlot("sin(pi*x)/1.5","B:");
-
- gr->Alpha(true); gr->Light(true);
- mglData z(10,10), xx(10,10), yy(10,10), rr(100,100);
- y.Modify("0.5+rnd"); y.CumSum("x"); y.Norm(-1,1);
- for(int i=0;i<10;i++) for(int j=0;j<10;j++)
- z.a[i+10*j] = sin(M_PI*x.a[i]*y.a[j])/1.5;
- gr->SubPlot(2,2,2); gr->Title("2d regular"); gr->Rotate(40,60);
- gr->Axis(); gr->Box(); gr->Mesh(x,y,z,"k");
- gr->Refill(rr,x,y,z); gr->Surf(rr);
-
- gr->Fill(xx,"(x+1)/2*cos(y*pi/2-1)");
- gr->Fill(yy,"(x+1)/2*sin(y*pi/2-1)");
- for(int i=0;i<10*10;i++)
- z.a[i] = sin(M_PI*xx.a[i]*yy.a[i])/1.5;
- gr->SubPlot(2,2,3); gr->Title("2d non-regular"); gr->Rotate(40,60);
- gr->Axis(); gr->Box(); gr->Plot(xx,yy,z,"ko ");
- gr->Refill(rr,xx,yy,z); gr->Surf(rr);
-}
-</pre>
-<div align="center"><img src="png/refill.png" alt="Example of non-equidistant data interpolation.">
-</div>
-
-
-<hr>
-<a name="Making-regular-data"></a>
-<div class="header">
-<p>
-Next: <a href="#Making-histogram" accesskey="n" rel="next">Making histogram</a>, Previous: <a href="#Data-interpolation" accesskey="p" rel="prev">Data interpolation</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Making-regular-data-1"></a>
-<h4 class="subsection">2.5.11 Making regular data</h4>
-
-
-<p>Sometimes, one have only unregular data, like as data on triangular grids, or experimental results and so on. Such kind of data cannot be used as simple as regular data (like matrices). Only few functions, like <a href="#dots">dots</a>, can handle unregular data as is.
-</p>
-<p>However, one can use built in triangulation functions for interpolating unregular data points to a regular data grids. There are 2 ways. First way, one can use <a href="#triangulation">triangulation</a> function to obtain list of vertexes for triangles. Later this list can be used in functions like <a href="#triplot">triplot</a> or <a href="#tricont">tricont</a>. Second way consist in usage of <a href="#datagrid">datagrid</a> function, which fill regular data grid by interpolated values, assuming that coordinates of the data grid is equidistantly distributed in axis range. Note, you can use options (see <a href="#Command-options">Command options</a>) to change default axis range as well as in other plotting functions.
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData x(100), y(100), z(100);
- gr->Fill(x,"2*rnd-1"); gr->Fill(y,"2*rnd-1"); gr->Fill(z,"v^2-w^2",x,y);
- // first way - plot triangular surface for points
- mglData d = mglTriangulation(x,y);
- gr->Title("Triangulation");
- gr->Rotate(40,60); gr->Box(); gr->Light(true);
- gr->TriPlot(d,x,y,z); gr->TriPlot(d,x,y,z,"#k");
- // second way - make regular data and plot it
- mglData g(30,30);
- gr->DataGrid(g,x,y,z); gr->Mesh(g,"m");
-}
-</pre>
-<div align="center"><img src="png/triangulation.png" alt="Example of triangulation.">
-</div>
-
-<hr>
-<a name="Making-histogram"></a>
-<div class="header">
-<p>
-Next: <a href="#Nonlinear-fitting-hints" accesskey="n" rel="next">Nonlinear fitting hints</a>, Previous: <a href="#Making-regular-data" accesskey="p" rel="prev">Making regular data</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Making-histogram-1"></a>
-<h4 class="subsection">2.5.12 Making histogram</h4>
-
-
-<p>Using the <a href="#hist">hist</a> function(s) for making regular distributions is one of useful fast methods to process and plot irregular data. <code>Hist</code> can be used to find some momentum of set of points by specifying weight function. It is possible to create not only 1D distributions but also 2D and 3D ones. Below I place the simplest sample code which demonstrate <a href="#hist">hist</a> usage:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData x(10000), y(10000), z(10000); gr->Fill(x,"2*rnd-1");
- gr->Fill(y,"2*rnd-1"); gr->Fill(z,"exp(-6*(v^2+w^2))",x,y);
- mglData xx=gr->Hist(x,z), yy=gr->Hist(y,z); xx.Norm(0,1);
- yy.Norm(0,1);
- gr->MultiPlot(3,3,3,2,2,""); gr->SetRanges(-1,1,-1,1,0,1);
- gr->Box(); gr->Dots(x,y,z,"wyrRk");
- gr->MultiPlot(3,3,0,2,1,""); gr->SetRanges(-1,1,0,1);
- gr->Box(); gr->Bars(xx);
- gr->MultiPlot(3,3,5,1,2,""); gr->SetRanges(0,1,-1,1);
- gr->Box(); gr->Barh(yy);
- gr->SubPlot(3,3,2);
- gr->Puts(mglPoint(0.5,0.5),"Hist and\nMultiPlot\nsample","a",-6);
- return 0;
-}
-</pre>
-<div align="center"><img src="png/hist.png" alt="Example of Hist().">
-</div>
-
-
-<hr>
-<a name="Nonlinear-fitting-hints"></a>
-<div class="header">
-<p>
-Next: <a href="#PDE-solving-hints" accesskey="n" rel="next">PDE solving hints</a>, Previous: <a href="#Making-histogram" accesskey="p" rel="prev">Making histogram</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Nonlinear-fitting-hints-1"></a>
-<h4 class="subsection">2.5.13 Nonlinear fitting hints</h4>
-
-
-<p>Nonlinear fitting is rather simple. All that you need is the data to fit, the approximation formula and the list of coefficients to fit (better with its initial guess values). Let me demonstrate it on the following simple example. First, let us use sin function with some random noise:
-</p><pre class="verbatim"> mglData dat(100), in(100); //data to be fitted and ideal data
- gr->Fill(dat,"0.4*rnd+0.1+sin(2*pi*x)");
- gr->Fill(in,"0.3+sin(2*pi*x)");
-</pre><p>and plot it to see that data we will fit
-</p><pre class="verbatim"> gr->Title("Fitting sample");
- gr->SetRange('y',-2,2); gr->Box(); gr->Plot(dat, "k. ");
- gr->Axis(); gr->Plot(in, "b");
- gr->Puts(mglPoint(0, 2.2), "initial: y = 0.3+sin(2\\pi x)", "b");
-</pre>
-<p>The next step is the fitting itself. For that let me specify an initial values <var>ini</var> for coefficients ‘<samp>abc</samp>’ and do the fitting for approximation formula ‘<samp>a+b*sin(c*x)</samp>’
-</p><pre class="verbatim"> mreal ini[3] = {1,1,3};
- mglData Ini(3,ini);
- mglData res = gr->Fit(dat, "a+b*sin(c*x)", "abc", Ini);
-</pre><p>Now display it
-</p><pre class="verbatim"> gr->Plot(res, "r");
- gr->Puts(mglPoint(-0.9, -1.3), "fitted:", "r:L");
- gr->PutsFit(mglPoint(0, -1.8), "y = ", "r");
-</pre>
-<p>NOTE! the fitting results may have strong dependence on initial values for coefficients due to algorithm features. The problem is that in general case there are several local "optimums" for coefficients and the program returns only first found one! There are no guaranties that it will be the best. Try for example to set <code>ini[3] = {0, 0, 0}</code> in the code above.
-</p>
-<p>The full sample code for nonlinear fitting is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData dat(100), in(100);
- gr->Fill(dat,"0.4*rnd+0.1+sin(2*pi*x)");
- gr->Fill(in,"0.3+sin(2*pi*x)");
- mreal ini[3] = {1,1,3};
- mglData Ini(3,ini);
-
- mglData res = gr->Fit(dat, "a+b*sin(c*x)", "abc", Ini);
-
- gr->Title("Fitting sample");
- gr->SetRange('y',-2,2); gr->Box(); gr->Plot(dat, "k. ");
- gr->Axis(); gr->Plot(res, "r"); gr->Plot(in, "b");
- gr->Puts(mglPoint(-0.9, -1.3), "fitted:", "r:L");
- gr->PutsFit(mglPoint(0, -1.8), "y = ", "r");
- gr->Puts(mglPoint(0, 2.2), "initial: y = 0.3+sin(2\\pi x)", "b");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/fit.png" alt="Example of nonlinear fitting.">
-</div>
-
-<hr>
-<a name="PDE-solving-hints"></a>
-<div class="header">
-<p>
-Next: <a href="#Drawing-phase-plain" accesskey="n" rel="next">Drawing phase plain</a>, Previous: <a href="#Nonlinear-fitting-hints" accesskey="p" rel="prev">Nonlinear fitting hints</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="PDE-solving-hints-1"></a>
-<h4 class="subsection">2.5.14 PDE solving hints</h4>
-
-
-<p>Solving of Partial Differential Equations (PDE, including beam tracing) and ray tracing (or finding particle trajectory) are more or less common task. So, MathGL have several functions for that. There are <a href="#ray">ray</a> for ray tracing, <a href="#pde">pde</a> for PDE solving, <a href="#qo2d">qo2d</a> for beam tracing in 2D case (see <a href="#Global-functions">Global functions</a>). Note, that these functions take “Hamiltonian” or equations as string values. And I don’t plan now to allow one to use user-defined functions. There are 2 reasons: the complexity of corresponding interface; and the basic nature of used methods which are good for samples but may not good for serious scientific calculations.
-</p>
-<p>The ray tracing can be done by <a href="#ray">ray</a> function. Really ray tracing equation is Hamiltonian equation for 3D space. So, the function can be also used for finding a particle trajectory (i.e. solve Hamiltonian ODE) for 1D, 2D or 3D cases. The function have a set of arguments. First of all, it is Hamiltonian which defined the media (or the equation) you are planning to use. The Hamiltonian is defined by string which may depend on coordinates ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’, time ‘<samp>t</samp>’ (for particle dynamics) and momentums ‘<samp>p</samp>’=<em>p_x</em>, ‘<samp>q</samp>’=<em>p_y</em>, ‘<samp>v</samp>’=<em>p_z</em>. Next, you have to define the initial conditions for coordinates and momentums at ‘<samp>t</samp>’=0 and set the integrations step (default is 0.1) and its duration (default is 10). The Runge-Kutta method of 4-th order is used for integration.
-</p><pre class="verbatim"> const char *ham = "p^2+q^2-x-1+i*0.5*(y+x)*(y>-x)";
- mglData r = mglRay(ham, mglPoint(-0.7, -1), mglPoint(0, 0.5), 0.02, 2);
-</pre><p>This example calculate the reflection from linear layer (media with Hamiltonian ‘<samp>p^2+q^2-x-1</samp>’=<em>p_x^2+p_y^2-x-1</em>). This is parabolic curve. The resulting array have 7 columns which contain data for {x,y,z,p,q,v,t}.
-</p>
-<p>The solution of PDE is a bit more complicated. As previous you have to specify the equation as pseudo-differential operator <em>\hat H(x, \nabla)</em> which is called sometime as “Hamiltonian” (for example, in beam tracing). As previously, it is defined by string which may depend on coordinates ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’ (but not time!), momentums ‘<samp>p</samp>’=<em>(d/dx)/i k_0</em>, ‘<samp>q</samp>’=<em>(d/dy)/i k_0</em> and field amplitude ‘<samp>u</samp>’=<em>|u|</em>. The evolutionary coordinate is ‘<samp>z</samp>’ in all cases. So that, the equation look like <em>du/dz = ik_0 H(x,y,\hat p, \hat q, |u|)[u]</em>. Dependence on field amplitude ‘<samp>u</samp>’=<em>|u|</em> allows one to solve nonlinear problems too. For example, for nonlinear Shrodinger equation you may set <code>ham="p^2 + q^2 - u^2"</code>. Also you may specify imaginary part for wave absorption, like <code>ham = "p^2 + i*x*(x>0)"</code> or <code>ham = "p^2 + i1*x*(x>0)"</code>.
-</p>
-<p>Next step is specifying the initial conditions at ‘<samp>z</samp>’ equal to minimal z-axis value. The function need 2 arrays for real and for imaginary part. Note, that coordinates x,y,z are supposed to be in specified axis range. So, the data arrays should have corresponding scales. Finally, you may set the integration step and parameter k0=<em>k_0</em>. Also keep in mind, that internally the 2 times large box is used (for suppressing numerical reflection from boundaries) and the equation should well defined even in this extended range.
-</p>
-<p>Final comment is concerning the possible form of pseudo-differential operator <em>H</em>. At this moment, simplified form of operator <em>H</em> is supported – all “mixed” terms (like ‘<samp>x*p</samp>’->x*d/dx) are excluded. For example, in 2D case this operator is effectively <em>H = f(p,z) + g(x,z,u)</em>. However commutable combinations (like ‘<samp>x*q</samp>’->x*d/dy) are allowed for 3D case.
-</p>
-<p>So, for example let solve the equation for beam deflected from linear layer and absorbed later. The operator will have the form ‘<samp>"p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)"</samp>’ that correspond to equation <em>1/ik_0 * du/dz + d^2 u/dx^2 + d^2 u/dy^2 + x * u + i (x+z)/2 * u = 0</em>. This is typical equation for Electron Cyclotron (EC) absorption in magnetized plasmas. For initial conditions let me select the beam with plane phase front <em>exp(-48*(x+0.7)^2)</em>. The corresponding code looks like this:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData a,re(128),im(128);
- gr->Fill(re,"exp(-48*(x+0.7)^2)");
- a = gr->PDE("p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)", re, im, 0.01, 30);
- a.Transpose("yxz");
- gr->SubPlot(1,1,0,"<_"); gr->Title("PDE solver");
- gr->SetRange('c',0,1); gr->Dens(a,"wyrRk");
- gr->Axis(); gr->Label('x', "\\i x"); gr->Label('y', "\\i z");
- gr->FPlot("-x", "k|");
- gr->Puts(mglPoint(0, 0.85), "absorption: (x+z)/2 for x+z>0");
- gr->Puts(mglPoint(0,1.1),"Equation: ik_0\\partial_zu + \\Delta u + x\\cdot u + i \\frac{x+z}{2}\\cdot u = 0");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/pde.png" alt="Example of PDE solving.">
-</div>
-<p>The next example is example of beam tracing. Beam tracing equation is special kind of PDE equation written in coordinates accompanied to a ray. Generally this is the same parameters and limitation as for PDE solving but the coordinates are defined by the ray and by parameter of grid width <var>w</var> in direction transverse the ray. So, you don’t need to specify the range of coordinates. <strong>BUT</strong> there is limitation. The accompanied coordinates are well defined only for smooth enough rays, i.e. then the ray curvature <em>K</em> (which is defined as <em>1/K^2 = (|r''|^2 |r'|^2 - (r'', r'')^2)/|r'|^6</em>) is much large then the grid width: <em>K>>w</em>. So, you may receive incorrect results if this condition will be broken.
-</p>
-<p>You may use following code for obtaining the same solution as in previous example:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData r, xx, yy, a, im(128), re(128);
- const char *ham = "p^2+q^2-x-1+i*0.5*(y+x)*(y>-x)";
- r = mglRay(ham, mglPoint(-0.7, -1), mglPoint(0, 0.5), 0.02, 2);
- gr->SubPlot(1,1,0,"<_"); gr->Title("Beam and ray tracing");
- gr->Plot(r.SubData(0), r.SubData(1), "k");
- gr->Axis(); gr->Label('x', "\\i x"); gr->Label('y', "\\i z");
-
- // now start beam tracing
- gr->Fill(re,"exp(-48*x^2)");
- a = mglQO2d(ham, re, im, r, xx, yy, 1, 30);
- gr->SetRange('c',0, 1);
- gr->Dens(xx, yy, a, "wyrRk");
- gr->FPlot("-x", "k|");
- gr->Puts(mglPoint(0, 0.85), "absorption: (x+y)/2 for x+y>0");
- gr->Puts(mglPoint(0.7, -0.05), "central ray");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/qo2d.png" alt="Example of beam tracing.">
-</div>
-<p>Note, the <a href="#pde">pde</a> is fast enough and suitable for many cases routine. However, there is situations then media have both together: strong spatial dispersion and spatial inhomogeneity. In this, case the <a href="#pde">pde</a> will produce incorrect result and you need to use advanced PDE solver <a href="#apde">apde</a>. For example, a wave beam, propagated in plasma, described by Hamiltonian <em>exp(-x^2-p^2)</em>, will have different solution for using of simplification and advanced PDE solver:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SetRanges(-1,1,0,2,0,2);
- mglData ar(256), ai(256); gr->Fill(ar,"exp(-2*x^2)");
-
- mglData res1(gr->APDE("exp(-x^2-p^2)",ar,ai,0.01)); res1.Transpose();
- gr->SubPlot(1,2,0,"_"); gr->Title("Advanced PDE solver");
- gr->SetRanges(0,2,-1,1); gr->SetRange('c',res1);
- gr->Dens(res1); gr->Axis(); gr->Box();
- gr->Label('x',"\\i z"); gr->Label('y',"\\i x");
- gr->Puts(mglPoint(-0.5,0.2),"i\\partial_z\\i u = exp(-\\i x^2+\\partial_x^2)[\\i u]","y");
-
- mglData res2(gr->PDE("exp(-x^2-p^2)",ar,ai,0.01));
- gr->SubPlot(1,2,1,"_"); gr->Title("Simplified PDE solver");
- gr->Dens(res2); gr->Axis(); gr->Box();
- gr->Label('x',"\\i z"); gr->Label('y',"\\i x");
- gr->Puts(mglPoint(-0.5,0.2),"i\\partial_z\\i u \\approx\\ exp(-\\i x^2)\\i u+exp(\\partial_x^2)[\\i u]","y");
- return 0;
-}
-</pre>
-<div align="center"><img src="png/apde.png" alt="Comparison of simplified and advanced PDE solvers.">
-</div>
-
-
-<hr>
-<a name="Drawing-phase-plain"></a>
-<div class="header">
-<p>
-Next: <a href="#Pulse-properties" accesskey="n" rel="next">Pulse properties</a>, Previous: <a href="#PDE-solving-hints" accesskey="p" rel="prev">PDE solving hints</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Drawing-phase-plain-1"></a>
-<h4 class="subsection">2.5.15 Drawing phase plain</h4>
-
-
-<p>Here I want say a few words of plotting phase plains. Phase plain is name for system of coordinates <em>x</em>, <em>x'</em>, i.e. a variable and its time derivative. Plot in phase plain is very useful for qualitative analysis of an ODE, because such plot is rude (it topologically the same for a range of ODE parameters). Most often the phase plain {<em>x</em>, <em>x'</em>} is used (due to its simplicity), that allows to analyze up to the 2nd order ODE (i.e. <em>x''+f(x,x')=0</em>).
-</p>
-<p>The simplest way to draw phase plain in MathGL is using <a href="#flow">flow</a> function(s), which automatically select several points and draw flow threads. If the ODE have an integral of motion (like Hamiltonian <em>H(x,x')=const</em> for dissipation-free case) then you can use <a href="#cont">cont</a> function for plotting isolines (contours). In fact. isolines are the same as flow threads, but without arrows on it. Finally, you can directly solve ODE using <a href="#ode">ode</a> function and plot its numerical solution.
-</p>
-<p>Let demonstrate this for ODE equation <em>x''-x+3*x^2=0</em>. This is nonlinear oscillator with square nonlinearity. It has integral <em>H=y^2+2*x^3-x^2=Const</em>. Also it have 2 typical stationary points: saddle at {x=0, y=0} and center at {x=1/3, y=0}. Motion at vicinity of center is just simple oscillations, and is stable to small variation of parameters. In opposite, motion around saddle point is non-stable to small variation of parameters, and is very slow. So, calculation around saddle points are more difficult, but more important. Saddle points are responsible for solitons, stochasticity and so on.
-</p>
-<p>So, let draw this phase plain by 3 different methods. First, draw isolines for <em>H=y^2+2*x^3-x^2=Const</em> – this is simplest for ODE without dissipation. Next, draw flow threads – this is straightforward way, but the automatic choice of starting points is not always optimal. Finally, use <a href="#ode">ode</a> to check the above plots. At this we need to run <a href="#ode">ode</a> in both direction of time (in future and in the past) to draw whole plain. Alternatively, one can put starting points far from (or at the bounding box as done in <a href="#flow">flow</a>) the plot, but this is a more complicated. The sample code is:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SubPlot(2,2,0,"<_"); gr->Title("Cont"); gr->Box();
- gr->Axis(); gr->Label('x',"x"); gr->Label('y',"\\dot{x}");
- mglData f(100,100); gr->Fill(f,"y^2+2*x^3-x^2-0.5");
- gr->Cont(f);
- gr->SubPlot(2,2,1,"<_"); gr->Title("Flow"); gr->Box();
- gr->Axis(); gr->Label('x',"x"); gr->Label('y',"\\dot{x}");
- mglData fx(100,100), fy(100,100);
- gr->Fill(fx,"x-3*x^2"); gr->Fill(fy,"y");
- gr->Flow(fy,fx,"v","value 7");
- gr->SubPlot(2,2,2,"<_"); gr->Title("ODE"); gr->Box();
- gr->Axis(); gr->Label('x',"x"); gr->Label('y',"\\dot{x}");
- for(double x=-1;x<1;x+=0.1)
- {
- mglData in(2), r; in.a[0]=x;
- r = mglODE("y;x-3*x^2","xy",in);
- gr->Plot(r.SubData(0), r.SubData(1));
- r = mglODE("-y;-x+3*x^2","xy",in);
- gr->Plot(r.SubData(0), r.SubData(1));
- }
-}
-</pre>
-<div align="center"><img src="png/ode.png" alt="Example of ODE solving and phase plain drawing.">
-</div>
-
-
-<hr>
-<a name="Pulse-properties"></a>
-<div class="header">
-<p>
-Next: <a href="#Using-MGL-parser" accesskey="n" rel="next">Using MGL parser</a>, Previous: <a href="#Drawing-phase-plain" accesskey="p" rel="prev">Drawing phase plain</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Pulse-properties-1"></a>
-<h4 class="subsection">2.5.16 Pulse properties</h4>
-
-
-<p>There is common task in optics to determine properties of wave pulses or wave beams. MathGL provide special function <a href="#pulse">pulse</a> which return the pulse properties (maximal value, center of mass, width and so on). Its usage is rather simple. Here I just illustrate it on the example of Gaussian pulse, where all parameters are obvious.
-</p><pre class="verbatim">void sample(mglGraph *gr)
-{
- gr->SubPlot(1,1,0,"<_"); gr->Title("Pulse sample");
- // first prepare pulse itself
- mglData a(100); gr->Fill(a,"exp(-6*x^2)");
- // get pulse parameters
- mglData b(a.Pulse('x'));
- // positions and widths are normalized on the number of points. So, set proper axis scale.
- gr->SetRanges(0, a.nx-1, 0, 1);
- gr->Axis(); gr->Plot(a); // draw pulse and axis
- // now visualize found pulse properties
- double m = b[0]; // maximal amplitude
- // approximate position of maximum
- gr->Line(mglPoint(b[1],0), mglPoint(b[1],m),"r=");
- // width at half-maximum (so called FWHM)
- gr->Line(mglPoint(b[1]-b[3]/2,0), mglPoint(b[1]-b[3]/2,m),"m|");
- gr->Line(mglPoint(b[1]+b[3]/2,0), mglPoint(b[1]+b[3]/2,m),"m|");
- gr->Line(mglPoint(0,m/2), mglPoint(a.nx-1,m/2),"h");
- // parabolic approximation near maximum
- char func[128]; sprintf(func,"%g*(1-((x-%g)/%g)^2)",b[0],b[1],b[2]);
- gr->FPlot(func,"g");
-}
-</pre>
-<div align="center"><img src="png/pulse.png" alt="Example of determining of pulse properties.">
-</div>
-
-<hr>
-<a name="Using-MGL-parser"></a>
-<div class="header">
-<p>
-Next: <a href="#Using-options" accesskey="n" rel="next">Using options</a>, Previous: <a href="#Pulse-properties" accesskey="p" rel="prev">Pulse properties</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Using-MGL-parser-1"></a>
-<h4 class="subsection">2.5.17 Using MGL parser</h4>
-
-
-<p>Sometimes you may prefer to use MGL scripts in yours code. It is simpler (especially in comparison with C/Fortran interfaces) and provide faster way to plot the data with annotations, labels and so on. Class <code>mglParse</code> (see <a href="#mglParse-class">mglParse class</a> parse MGL scripts in C++. It have also the corresponding interface for C/Fortran.
-</p>
-<p>The key function here is <code>mglParse::Parse()</code> (or <code>mgl_parse()</code> for C/Fortran) which execute one command per string. At this the detailed information about the possible errors or warnings is passed as function value. Or you may execute the whole script as long string with lines separated by ‘<samp>\n</samp>’. Functions <code>mglParse::Execute()</code> and <code>mgl_parse_text()</code> perform it. Also you may set the values of parameters ‘<samp>$0</samp>’...‘<samp>$9</samp>’ for the script by functions <code>mglParse::AddParam()</code> or <code>mgl_add_param()</code>, allow/disable picture resizing, check “once” status and so on. The usage is rather straight-forward.
-</p>
-<p>The only non-obvious thing is data transition between script and yours program. There are 2 stages: add or find variable; and set data to variable. In C++ you may use functions <code>mglParse::AddVar()</code> and <code>mglParse::FindVar()</code> which return pointer to <code>mglData</code>. In C/Fortran the corresponding functions are <code>mgl_add_var()</code>, <code>mgl_find_var()</code>. This data pointer is valid until next <code>Parse()</code> or <code>Execute()</code> call. Note, you <strong>must not delete or free</strong> the data obtained from these functions!
-</p>
-<p>So, some simple example at the end. Here I define a data array, create variable, put data into it and plot it. The C++ code looks like this:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->Title("MGL parser sample");
- mreal a[100]; // let a_i = sin(4*pi*x), x=0...1
- for(int i=0;i<100;i++)a[i]=sin(4*M_PI*i/99);
- mglParse *parser = new mglParse;
- mglData *d = parser->AddVar("dat");
- d->Set(a,100); // set data to variable
- parser->Execute(gr, "plot dat; xrange 0 1\nbox\naxis");
- // you may break script at any line do something
- // and continue after that
- parser->Execute(gr, "xlabel 'x'\nylabel 'y'\nbox");
- // also you may use cycles or conditions in script
- parser->Execute(gr, "for $0 -1 1 0.1\nline 0 0 -1 $0 'r'\nnext");
- delete parser;
- return 0;
-}
-</pre><p>The code in C/Fortran looks practically the same:
-</p><pre class="verbatim">int sample(HMGL gr)
-{
- mgl_title(gr, "MGL parser sample", "", -2);
- double a[100]; // let a_i = sin(4*pi*x), x=0...1
- int i;
- for(i=0;i<100;i++) a[i]=sin(4*M_PI*i/99);
- HMPR parser = mgl_create_parser();
- HMDT d = mgl_parser_add_var(parser, "dat");
- mgl_data_set_double(d,a,100,1,1); // set data to variable
- mgl_parse_text(gr, parser, "plot dat; xrange 0 1\nbox\naxis");
- // you may break script at any line do something
- // and continue after that
- mgl_parse_text(gr, parser, "xlabel 'x'\nylabel 'y'");
- // also you may use cycles or conditions in script
- mgl_parse_text(gr, parser, "for $0 -1 1 0.1\nif $0<0\n"
- "line 0 0 -1 $0 'r':else:line 0 0 -1 $0 'g'\n"
- "endif\nnext");
- mgl_write_png(gr, "test.png", ""); // don't forgot to save picture
- return 0;
-}
-</pre>
-<div align="center"><img src="png/parser.png" alt="Example of MGL script parsing.">
-</div>
-
-<hr>
-<a name="Using-options"></a>
-<div class="header">
-<p>
-Next: <a href="#g_t_0060_0060Templates_0027_0027" accesskey="n" rel="next">``Templates''</a>, Previous: <a href="#Using-MGL-parser" accesskey="p" rel="prev">Using MGL parser</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Using-options-1"></a>
-<h4 class="subsection">2.5.18 Using options</h4>
-
-
-<p><a href="#Command-options">Command options</a> allow the easy setup of the selected plot by changing global settings only for this plot. Often, options are used for specifying the range of automatic variables (coordinates). However, options allows easily change plot transparency, numbers of line or faces to be drawn, or add legend entries. The sample function for options usage is:
-</p><pre class="verbatim">void template(mglGraph *gr)
-{
- mglData a(31,41);
- gr->Fill(a,"-pi*x*exp(-(y+1)^2-4*x^2)");
-
- gr->SubPlot(2,2,0); gr->Title("Options for coordinates");
- gr->Alpha(true); gr->Light(true);
- gr->Rotate(40,60); gr->Box();
- gr->Surf(a,"r","yrange 0 1"); gr->Surf(a,"b","yrange 0 -1");
- if(mini) return;
- gr->SubPlot(2,2,1); gr->Title("Option 'meshnum'");
- gr->Rotate(40,60); gr->Box();
- gr->Mesh(a,"r","yrange 0 1"); gr->Mesh(a,"b","yrange 0 -1; meshnum 5");
- gr->SubPlot(2,2,2); gr->Title("Option 'alpha'");
- gr->Rotate(40,60); gr->Box();
- gr->Surf(a,"r","yrange 0 1; alpha 0.7");
- gr->Surf(a,"b","yrange 0 -1; alpha 0.3");
- gr->SubPlot(2,2,3,"<_"); gr->Title("Option 'legend'");
- gr->FPlot("x^3","r","legend 'y = x^3'");
- gr->FPlot("cos(pi*x)","b","legend 'y = cos \\pi x'");
- gr->Box(); gr->Axis(); gr->Legend(2,"");
-}
-</pre>
-<div align="center"><img src="png/mirror.png" alt="Example of options usage.">
-</div>
-
-<hr>
-<a name="g_t_0060_0060Templates_0027_0027"></a>
-<div class="header">
-<p>
-Next: <a href="#Stereo-image" accesskey="n" rel="next">Stereo image</a>, Previous: <a href="#Using-options" accesskey="p" rel="prev">Using options</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="g_t_0060_0060Templates_0027_0027-1"></a>
-<h4 class="subsection">2.5.19 “Templates”</h4>
-
-
-<p>As I have noted before, the change of settings will influence only for the further plotting commands. This allows one to create “template” function which will contain settings and primitive drawing for often used plots. Correspondingly one may call this template-function for drawing simplification.
-</p>
-<p>For example, let one has a set of points (experimental or numerical) and wants to compare it with theoretical law (for example, with exponent law <em>\exp(-x/2), x \in [0, 20]</em>). The template-function for this task is:
-</p><pre class="verbatim">void template(mglGraph *gr)
-{
- mglData law(100); // create the law
- law.Modify("exp(-10*x)");
- gr->SetRanges(0,20, 0.0001,1);
- gr->SetFunc(0,"lg(y)",0);
- gr->Plot(law,"r2");
- gr->Puts(mglPoint(10,0.2),"Theoretical law: e^x","r:L");
- gr->Label('x',"x val."); gr->Label('y',"y val.");
- gr->Axis(); gr->Grid("xy","g;"); gr->Box();
-}
-</pre><p>At this, one will only write a few lines for data drawing:
-</p><pre class="verbatim"> template(gr); // apply settings and default drawing from template
- mglData dat("fname.dat"); // load the data
- // and draw it (suppose that data file have 2 columns)
- gr->Plot(dat.SubData(0),dat.SubData(1),"bx ");
-</pre><p>A template-function can also contain settings for font, transparency, lightning, color scheme and so on.
-</p>
-<p>I understand that this is obvious thing for any professional programmer, but I several times receive suggestion about “templates” ... So, I decide to point out it here.
-</p>
-
-<hr>
-<a name="Stereo-image"></a>
-<div class="header">
-<p>
-Next: <a href="#Reduce-memory-usage" accesskey="n" rel="next">Reduce memory usage</a>, Previous: <a href="#g_t_0060_0060Templates_0027_0027" accesskey="p" rel="prev">``Templates''</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Stereo-image-1"></a>
-<h4 class="subsection">2.5.20 Stereo image</h4>
-
-
-<p>One can easily create stereo image in MathGL. Stereo image can be produced by making two subplots with slightly different rotation angles. The corresponding code looks like this:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- gr->Light(true);
-
- gr->SubPlot(2,1,0); gr->Rotate(50,60+1);
- gr->Box(); gr->Surf(a);
-
- gr->SubPlot(2,1,1); gr->Rotate(50,60-1);
- gr->Box(); gr->Surf(a);
- return 0;
-}
-</pre>
-<div align="center"><img src="png/stereo.png" alt="Example of stereo image.">
-</div>
-
-<hr>
-<a name="Reduce-memory-usage"></a>
-<div class="header">
-<p>
-Next: <a href="#Saving-and-scanning-file" accesskey="n" rel="next">Saving and scanning file</a>, Previous: <a href="#Stereo-image" accesskey="p" rel="prev">Stereo image</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Reduce-memory-usage-1"></a>
-<h4 class="subsection">2.5.21 Reduce memory usage</h4>
-
-
-<p>By default MathGL save all primitives in memory, rearrange it and only later draw them on bitmaps. Usually, this speed up drawing, but may require a lot of memory for plots which contain a lot of faces (like <a href="#cloud">cloud</a>, <a href="#dew">dew</a>). You can use <a href="#quality">quality</a> function for setting to use direct drawing on bitmap and bypassing keeping any primitives in memory. This function also allow you to decrease the quality of the resulting image but increase the speed of the drawing.
-</p>
-<p>The code for lowest memory usage looks like this:
-</p><pre class="verbatim">int sample(mglGraph *gr)
-{
- gr->SetQuality(6); // firstly, set to draw directly on bitmap
- for(i=0;i<1000;i++)
- gr->Sphere(mglPoint(mgl_rnd()*2-1,mgl_rnd()*2-1),0.05);
- return 0;
-}
-</pre>
-
-<hr>
-<a name="Saving-and-scanning-file"></a>
-<div class="header">
-<p>
-Next: <a href="#Mixing-bitmap-and-vector-output" accesskey="n" rel="next">Mixing bitmap and vector output</a>, Previous: <a href="#Reduce-memory-usage" accesskey="p" rel="prev">Reduce memory usage</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Scanning-file"></a>
-<h4 class="subsection">2.5.22 Scanning file</h4>
-
-
-<p>MathGL have possibilities to write textual information into file with variable values. In MGL script you can use <a href="#save">save</a> command for that. However, the usual <code>printf();</code> is simple in C/C++ code. For example, lets create some textual file
-</p><pre class="verbatim">FILE *fp=fopen("test.txt","w");
-fprintf(fp,"This is test: 0 -> 1 q\n");
-fprintf(fp,"This is test: 1 -> -1 q\n");
-fprintf(fp,"This is test: 2 -> 0 q\n");
-fclose(fp);
-</pre><p>It contents look like
-</p><pre class="verbatim">This is test: 0 -> 1 q
-This is test: 1 -> -1 q
-This is test: 2 -> 0 q
-</pre>
-<p>Let assume now that you want to read this values (i.e. [[0,1],[1,-1],[2,0]]) from the file. You can use <a href="#scanfile">scanfile</a> for that. The desired values was written using template "This is test: %g -> %g q\n". So, just use
-</p><pre class="verbatim">mglData a;
-a.ScanFile("test.txt","This is test: %g -> %g");
-</pre><p>and plot it to for assurance
-</p><pre class="verbatim">gr->SetRanges(a.SubData(0), a.SubData(1));
-gr->Axis(); gr->Plot(a.SubData(0),a.SubData(1),"o");
-</pre>
-<p>Note, I keep only the leading part of template (i.e. "This is test: %g -> %g" instead of "This is test: %g -> %g q\n"), because there is no important for us information after the second number in the line.
-</p>
-
-
-<hr>
-<a name="Mixing-bitmap-and-vector-output"></a>
-<div class="header">
-<p>
-Previous: <a href="#Saving-and-scanning-file" accesskey="p" rel="prev">Saving and scanning file</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Mixing-bitmap-and-vector-output-1"></a>
-<h4 class="subsection">2.5.23 Mixing bitmap and vector output</h4>
-
-
-<p>Sometimes output plots contain surfaces with a lot of points, and some vector primitives (like axis, text, curves, etc.). Using vector output formats (like EPS or SVG) will produce huge files with possible loss of smoothed lighting. Contrary, the bitmap output may cause the roughness of text and curves. Hopefully, MathGL have a possibility to combine bitmap output for surfaces and vector one for other primitives in the same EPS file, by using <a href="#rasterize">rasterize</a> command.
-</p>
-<p>The idea is to prepare part of picture with surfaces or other "heavy" plots and produce the background image from them by help of <a href="#rasterize">rasterize</a> command. Next, we draw everything to be saved in vector form (text, curves, axis and etc.). Note, that you need to clear primitives (use <a href="#clf">clf</a> command) after <a href="#rasterize">rasterize</a> if you want to disable duplication of surfaces in output files (like EPS). Note, that some of output formats (like 3D ones, and TeX) don’t support the background bitmap, and use <a href="#clf">clf</a> for them will cause the loss of part of picture.
-</p>
-<p>The sample code is:
-</p><pre class="verbatim">// first draw everything to be in bitmap output
-gr->FSurf("x^2+y^2", "#", "value 10");
-
-gr->Rasterize(); // set above plots as bitmap background
-gr->Clf(); // clear primitives, to exclude them from file
-
-// now draw everything to be in vector output
-gr->Axis(); gr->Box();
-
-// and save file
-gr->WriteFrame("fname.eps");
-</pre>
-
-<hr>
-<a name="FAQ"></a>
-<div class="header">
-<p>
-Previous: <a href="#Hints" accesskey="p" rel="prev">Hints</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="FAQ-1"></a>
-<h3 class="section">2.6 FAQ</h3>
-
-
-<dl compact="compact">
-<dt><strong>График не рисуется?!</strong></dt>
-<dd><p>Проверьте, что точки графика находятся внутри ограничивающего параллелепипеда, при необходимости увеличьте его с помощью функции <code>Axis()</code>. Проверьте, что размерность массива правильная для выбранного типа графика. Убедитесь, что функция <code>Finish()</code> была вызвана после построения графика (или график был сохранен в файл). Иногда отражение света от плоских поверхностей (типа, <code>Dens()</code>) может выглядеть как отсутствие графика.
-</p>
-</dd>
-<dt><strong>Не нашел нужного графика?!</strong></dt>
-<dd><p>Многие “новые” графики можно строить, используя уже существующие функции. Например, поверхность вращения кривой относительно оси можно построить, используя специальную функцию <code>Torus()</code>, а можно построить как параметрически заданную поверхность <code>Surf()</code>. См. также <a href="#Hints">Hints</a> и <a href="#Examples">Examples</a> MathGL. Если же нужного типа графика все равно нет, то пишите мне <a href="mailto:mathgl.abalakin@gmail.com">e-mail</a> и в следующей версии этот график появится.
-</p>
-</dd>
-<dt><strong>Требуется ли знание сторонних библиотек (например, OpenGL) для использования библиотеки MathGL?</strong></dt>
-<dd><p>Нет. Библиотека MathGL самодостаточна и не требует знания сторонних библиотек.
-</p>
-</dd>
-<dt><strong>На каком языке написана библиотека? Для каких языков у нее есть интерфейсы?</strong></dt>
-<dd><p>Ядро библиотеки написано на С++. Кроме него, есть интерфейсы для чистого С, фортрана, паскаля, форта и собственный командный язык MGL. Также есть поддержка большого числа интерпретируемых языков (Python, Java, ALLEGROCL, CHICKEN, Lisp, CFFI, C#, Guile, Lua, Modula 3, Mzscheme, Ocaml, Octave, Perl, PHP, Pike, R, Ruby, Tcl). Эти интерфейсы написаны с помощью SWIG (и функции чистого С и классы). Однако на данный момент только интерфейсы для Python и Octave включены в скрипты сборки. Причина в том, что я не знаю других языков, чтобы проверить качество интерфейса :(. Замечу, что большинство прочих языков могут использовать С функции напрямую.
-</p>
-</dd>
-<dt><strong>Как мне использовать MathGL с Фортраном?</strong></dt>
-<dd><p>Библиотеку MathGL можно использовать как есть с компилятором <code>gfortran</code> поскольку он использует по умолчанию AT&T нотацию для внешних функций. Для других компиляторов (например, Visual Fortran) необходимо включить использование AT&T нотации вручную. AT&T нотация требует, чтобы имя функции завершалось символом ‘<samp>_</samp>’, аргументы функции передавались по указателю и длины строк передавались в конце списка аргументов. Например:
-</p>
-<p><em>C функция</em> – <code>void mgl_fplot(HMGL graph, const char *fy, const char *stl, int n);</code>
-</p>
-<p><em>AT&T функция</em> – <code>void mgl_fplot_(uintptr_t *graph, const char *fy, const char *stl, int *n, int ly, int ls);</code>
-</p>
-<p>При использовании фортрана необходимо также включить библиотеку <code>-lstdc++</code>. Кроме того, если библиотека была собрана с опцией <code>enable-double=ON</code> (по умолчанию в версии 2.1 и более поздних), то все вещественные числа должны быть типа <code>real*8</code>. Это можно включить по умолчанию опцией <code>-fdefault-real-8</code>.
-</p>
-</dd>
-<dt><strong>У меня есть класс Foo и в нем метод рисования Foo::draw(mglGraph *gr). Как мне нарисовать что-то в окне FLTK, GLUT или Qt?</strong></dt>
-<dd><p>Функции-члены класса в С++ имеют “скрытый” параметр – указатель на экземпляр класса и их прямое использование невозможно. Решением будет определение интерфейсной функции:
-</p><div class="example">
-<pre class="example">int foo_draw(mglGraph *gr, void *par)
-{ ((Foo *)foo)->draw(gr); }
-</pre></div>
-<p>и подстановка именно ее в вызов функции <code>Window()</code>:
-</p><div class="example">
-<pre class="example">gr->Window(argc,argv,foo_draw,"Title",this);
-</pre></div>
-
-<p>Можно также наследовать Ваш класс от класса <code>mglDraw</code> и использовать функцию типа <code>gr->Window(argc, argv, foo, "Title");</code>.
-</p>
-</dd>
-<dt><strong>Как мне вывести текст на русском/испанском/арабском/японском и т.д.?</strong></dt>
-<dd><p>Стандартный путь состоит в использовании кодировки UTF-8 для вывода текста. Кроме того, все функции вывода текста имеют интерфейс для 8-битных (char *) строк. Однако в последнем случае Вам может потребоваться установить используемую в исходном тексте локаль. Например, для русского языка в кодировке CP1251 можно использовать <code>setlocale(LC_CTYPE, "ru_RU.cp1251");</code> (под MS Windows имена локали другие – <code>setlocale(LC_CTYPE, "russian_russia.1251")</code>). Настоятельно не рекомендую использовать константу <code>LC_ALL</code>, поскольку при этом меняется и формат чисел (в частности, десятичная точка), что может, например, вызвать сложности (неудобство) при написании формул и чтении текстовых файлов. Например, программа ожидает ‘<samp>,</samp>’ в качестве разделителя целой и дробной части, а пользователь вводит ‘<samp>.</samp>’.
-</p>
-</dd>
-<dt><strong>Как мне вырезать (исключить из рисования) точку или область на графике?</strong></dt>
-<dd><p>Есть три основных способа. Во-первых, можно вырезать точку, задав одну из ее координат равной <code>NAN</code>. Во-вторых, можно воспользоваться функцией <code>SetCutBox()</code> или <code>CutOff()</code> для удаления точек из некоторой области (see <a href="#Cutting">Cutting</a>). Наконец, можно сделать эти точки прозрачными (невидимыми) с помощью функций <code>SurfA()</code>, <code>Surf3A()</code> (see <a href="#Dual-plotting">Dual plotting</a>). В последнем случае обеспечивается еще и плавность включения прозрачности.
-</p>
-</dd>
-<dt><strong>Я использую VisualStudio, CBuilder или другой компилятор (не MinGW/gcc). Как мне подключить библиотеку MathGL?</strong></dt>
-<dd><p>Начиная с версии 2.0, рекомендуемый к использованию класс mglGraph (заголовочный файл <code>#include <mgl2/mgl.h></code>) содержbn только с <code>inline</code> функции и может использоваться с любым компилятором без перекомпиляции бинарной версии библиотеки. Однако, если Вы планируете использовать низкоуровневые возможности (т.е. классы mglBase, mglCanvas и т.д.), то Вам следует перекомпилировать библиотеку MathGL с использованием Вашего компилятора.
-</p>
-<p>Отмечу, что использование предоставляемых динамических библиотек *.dll требует создания библиотек импорта (import library *.lib). Эта процедура зависит от используемого компилятора – обратитесь к документации по Вашему компилятору. Например для VisualStudio это можно сделать командой <code>lib.exe /DEF:libmgl.def /OUT:libmgl.lib</code>.
-</p>
-</dd>
-<dt><strong>Как мне собрать MathGL под Windows?</strong></dt>
-<dd><p>Простейший путь – использование комбинации CMake и MinGW. Также Вам может потребоваться дополнительные библиотеки, такие как GSL, PNG, JPEG и пр. Все они могут быть найдены на <a href="http://gnuwin32.sourceforge.net/packages.html">http://gnuwin32.sourceforge.net/packages.html</a>. После установки всех компонент, просто запустите конфигуратор CMake и соберите MathGL командой make.
-</p>
-</dd>
-<dt><strong>Как создать окно FLTK/GLUT/Qt с текущими результатами параллельно с выполнением основных вычислений?</strong></dt>
-<dd><p>Следует создать отдельный поток для обработки сообщений в окно. Обновление данных в окне можно выполнить вызовом функции <code>Update()</code>. Подробнее см. <a href="#Animation">Animation</a>.
-</p>
-</dd>
-<dt><strong>Сколько человек участвовало в создании библиотеки?</strong></dt>
-<dd><p>Большую часть библиотеки написал один человек. Это результат примерно года работы на написание ядра библиотеки и базовых функций (в основном вечерами и по выходным). Процесс усовершенствования продолжается и теперь :). Скрипты сборки в основном написаны Д.Кулагиным, а экспорт в PRC/PDF написан М.Видассовым.
-</p>
-</dd>
-<dt><strong>Как мне показать растровую картинку на рисунке?</strong></dt>
-<dd><p>Можно импортировать ее в экземпляр <code>mglData</code> и построить с помощью функции <code>Dens()</code>. Например, для черно-белого рисунка можно использовать код: <code>mglData bmp; bmp.Import("fname.png","wk"); gr->Dens(bmp,"wk");</code>.
-</p>
-</dd>
-<dt><strong>Как использовать MathGL в Qt, FLTK, wxWidgets ...?</strong></dt>
-<dd><p>Есть специальные классы (виджеты) для этих библиотек: QMathGL для Qt, Fl_MathGL для FLTK и т.д. Если Вы не нашли подходящий класс, то можете создать свой собственный виджет, рисующий растровое изображение из mglCanvas::GetBits().
-</p>
-</dd>
-<dt><strong>Как мне создать 3D в PDF?</strong></dt>
-<dd><p>Используйте функцию <code>WritePRC</code>(), которая создаст PDF файл если MathGL был собран с enable-pdf=ON.
-</p>
-</dd>
-<dt><strong>Как мне создать TeX рисунок?</strong></dt>
-<dd><p>Используйте функцию <code>WriteTEX</code>(), которая создаст LaTeX файлы с собственно рисунком ‘<samp><var>fname</var>.tex</samp>’, с цветами MathGL ‘<samp>mglcolors.tex</samp>’ и основной файл ‘<samp>mglmain.tex</samp>’, который может использоваться для просмотра изображения и/или генерации PDF с помощью команды типа <code>pdflatex mglmain.tex</code>.
-</p>
-</dd>
-<dt><strong>Можно ли использовать MathGL в JavaScript?</strong></dt>
-<dd><p>Да, пример JavaScript файла находится в папке texinfo/ исходных текстов. Для его работы необходимо предоставить JSON данные с 3d изображением (можно создать с помощью <code>WriteJSON</code>() функции). Скрипт позволяет выполнять базовые операции: приближение/удаление, вращение и сдвиг. Примеры использования JavaScript можно найти в <a href="http://mathgl.sf.net/json.html">http://mathgl.sf.net/json.html</a>.
-</p>
-
-
-</dd>
-<dt><strong>Как сменить шрифт (семейство шрифтов)?</strong></dt>
-<dd><p>Во-первых, надо загрузить файлы <a href="http://mathgl.sourceforge.net/download.html">отсюда</a> или <a href="http://sourceforge.net/project/showfiles.php?group_id=152187&package_id=267177">отсюда</a>. Далее, в экземпляре mglGraph загружаем шрифты: <code>gr->LoadFont(fontname,path);</code>. Здесь <var>fontname</var> – базовое имя шрифта, например ‘<samp>STIX</samp>’, и <var>path</var> – путь к папке с файлами шрифтов. Вызовите <code>gr->RestoreFont();</code> для использования шрифта по умолчанию.
-</p>
-</dd>
-<dt><strong>Как нарисовать метки оси снаружи от графика?</strong></dt>
-<dd><p>Просто используйте отрицательные значения длины меток, например <code>gr->SetTickLen(-0.1);</code>.
-</p>
-</dd>
-<dt><strong>Как нарисовать одинаковые оси координат для прямоугольного (не квадратного) рисунка?</strong></dt>
-<dd><p>Просто используйте <code>Aspect(NAN,NAN)</code> для каждого подграфика, или в начале рисования.
-</p>
-</dd>
-<dt><strong>Как задать полупрозрачный фон?</strong></dt>
-<dd><p>Просто используйте код типа <code>Clf("r{A5}");</code> или подготовьте PNG файл и задайте его в качестве фона рисунка <code>LoadBackground("fname.png");</code>.
-</p>
-</dd>
-<dt><strong>Как уменьшить поля вокруг графика?</strong></dt>
-<dd><p>Простейший путь состоит в использовании стилей <a href="#subplot">subplot</a>. Однако, вы должны быть осторожны в изменении стиля <a href="#subplot">subplot</a> если вы планируете добавлять <a href="#colorbar">colorbar</a> или вращать график – часть графика может стать невидимой.
-</p>
-</dd>
-<dt><strong>Can I combine bitmap and vector output in EPS?</strong></dt>
-<dd><p>Yes. Sometimes you may have huge surface and a small set of curves and/or text on the plot. You can use function <a href="#rasterize">rasterize</a> just after making surface plot. This will put all plot to bitmap background. At this later plotting will be in vector format. For example, you can do something like following:
-</p><pre class="verbatim">gr->Surf(x, y, z);
-gr->Rasterize(); // make surface as bitmap
-gr->Axis();
-gr->WriteFrame("fname.eps");
-</pre>
-</dd>
-<dt><strong>Почему у меня не получается использовать имя ‘<samp>I</samp>’ для переменной?</strong></dt>
-<dd><p>MathGL поддерживает стандарт C99, в котором имя ‘<samp>I</samp>’ зарезервированно для мнимой единицы. Если Вам все таки нужно это имя для переменной, то поместите
-</p><pre class="verbatim">#undef I
-</pre><p>сразу после включения заголовочных файлов MathGL.
-</p>
-</dd>
-<dt><strong>Как мне создать MPEG видео по графикам?</strong></dt>
-<dd><p>Вам следует сохранить каждый кадр в файл JPEG с именем типа ‘<samp>frame0001.jpg</samp>’, ‘<samp>frame0002.jpg</samp>’, ... Далее используйте ImageMagic для конвертации этих файлов в видео формата MPEG с помощью команды <code>convert frame*.jpg movie.mpg</code>. См. также <a href="#MPEG">MPEG</a>.
-</p>
-</dd>
-</dl>
-
-
-
-<hr>
-<a name="General-concepts"></a>
-<div class="header">
-<p>
-Next: <a href="#MathGL-core" accesskey="n" rel="next">MathGL core</a>, Previous: <a href="#Examples" accesskey="p" rel="prev">Examples</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Osnovnye-principy"></a>
-<h2 class="chapter">3 Основные принципы</h2>
-
-
-<p>Возможности библиотеки MathGL довольно богаты – число только основных типов графиков превышает 50 видов. Кроме того, есть функции для обработки данных, настройки вида графика и пр. и пр. Тем не менее, я старался придерживаться единого стиля в порядке аргументов функций и способе их “настройки”. В основном все ниже сказанное относится к функциям рисования различных графиков.
-</p>
-<p>Всего основных концепций (базисных идей) шесть:
-</p><ol>
-<li> <strong>Все рисунки создаются в памяти.</strong> Это могут быть как растровые картинки (для <code>SetQuality(MGL_DRAW_LMEM)</code> или <code><a href="#quality">quality</a> 6</code>), так и векторные списки примитивов (по умолчанию). Дальнейшая судьба рисунков определяется пользователем: можно сохранить в файл, вывести на экран, создать анимацию/кино, дополнительно отредактировать и т.д. Такой подход обеспечивает высокую переносимость библиотеки – один и тот же программный код создаст в точности одинаковый рисунок на <em>любой</em> операционной системе. Кроме того, при таком подходе рисунки можно создавать непосредственно в консольной программе – графическое окно не нужно!
-</li><li> <strong>Все настройки графиков (стиль линий, цветовые схемы поверхностей, стиль и цвет текста) задаются строками.</strong> Это обеспечивает: удобство для пользователя – короткую строку легче читать и здесь тяжелее ошибиться, чем в большом списке параметров; переносимость – строки выглядят одинаково на всех платформах и не надо заботиться о типе и числе аргументов.
-</li><li> <strong>Все функции имеют “упрощенный” и “продвинутый” варианты.</strong> Сделано опять из-за удобства. В “упрощенном” варианте для построения графика нужны только один-два массив(а) данных, которые автоматически равнораспределяются в заданном диапазоне осей координат. В “продвинутой” версии можно не только указать явно диапазон построения графика, но и задать его параметрически. Последнее позволяет легко строить довольно сложные кривые и поверхности. В обоих вариантах функций порядок аргументов стандартен: сначала идут массивы данных, потом необязательный строковый параметр стиля графика, а далее строка опций для более точной настройки графика.
-</li><li> <strong>Все данные передаются через экземпляры класса mglData(A).</strong> Такой подход позволяет избежать ошибок при работе с памятью и единообразно передавать данные разных типов (float, double, данные из файла, заполненных пользователем и пр.) в функции рисования.
-</li><li> <strong>Все элементы рисунков векторные.</strong> Изначально библиотека MathGL была ориентированна на работу с научными данными, которые по своей природе векторные (линии, грани, матрицы и т.д.). Поэтому векторность используется во всех рисунках! Причем иногда даже в ущерб производительности (например, при выводе шрифтов). Помимо всего прочего, векторность позволяет легко масштабировать рисунок – измените размер картинки в 2 раза, и рисунок пропорционально растянется.
-</li><li> <strong>Новые графики не удаляют уже нарисованное.</strong> Этот, в чем-то неожиданный, подход позволяет создавать огромное количество “комбинированных” графиков. Например, поверхность с наложенными линиями уровня строится двумя последовательными вызовами функций рисования поверхности и линий уровня (в любом порядке). И совершенно не надо писать специальную функцию (как в Matlab и некоторых других программах) для рисования этого графика.
-</li></ol>
-
-<p>Кроме основных концепций я хотел бы остановиться на нескольких, как оказалось, нетривиальных моментах – способе указания положения графика, осей координат и строковых параметров линий, поверхностей, текста.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Coordinate-axes" accesskey="1">Coordinate axes</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Color-styles" accesskey="2">Color styles</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Line-styles" accesskey="3">Line styles</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Color-scheme" accesskey="4">Color scheme</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Font-styles" accesskey="5">Font styles</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Textual-formulas" accesskey="6">Textual formulas</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Command-options" accesskey="7">Command options</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Interfaces" accesskey="8">Interfaces</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Coordinate-axes"></a>
-<div class="header">
-<p>
-Next: <a href="#Color-styles" accesskey="n" rel="next">Color styles</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Osi-koordinat"></a>
-<h3 class="section">3.1 Оси координат</h3>
-
-
-<p>Представление системы координат в MathGL состоит из двух частей. Вначале координаты нормируются в диапазон изменения осей координат (see <a href="#Axis-settings">Axis settings</a>). Если флаг <code>SetCut()</code> установлен, то точки вне интервала отбрасываются, в противном случае, они проецируются на ограничивающий параллелепипед (см. <a href="#Cutting">Cutting</a>). Кроме того, отбрасываются точки внутри границ, определенных переменными <var>CutMin</var>x<var>CutMax</var> и точки, для которых значение функции <code>CutOff</code>() не равно нулю. После этого формулы перехода в криволинейную систему координат <code>SetFunc()</code>применяются к каждой точке. Наконец, точка данных отображается с помощью одной из графических функций.
-</p>
-<p>Диапазон изменения <em>x, y, z</em>-координат задается функциями <code>SetRange()</code> или <a href="#ranges">ranges</a>. Точка пересечения осей координат задается функцией <code>SetOrigin()</code>. При этом можно использовать NAN значения для автоматического выбора положения оси.
-</p>
-<p>Кроме привычных осей <em>x, y, z</em> есть еще одна ось – цветовая шкала – ось <em>c</em>. Она используется при окрашивании поверхностей и задает границы изменения функции при окрашивании. Ее границы автоматически устанавливаются равными диапазону z-оси при вызове <a href="#ranges">ranges</a>. Возможно и ручное изменение границ цветового интервала посредством вызова <code>SetRange('c', ...)</code>. Используйте <a href="#colorbar">colorbar</a> для отображения цветовой шкалы.
-</p>
-<p>Вид меток по осям определяется функцией <code>SetTicks()</code> (see <a href="#Ticks">Ticks</a>). Функция <var>SetTuneTicks</var> включает/выключает выделение общего множителя (большого или малого факторов в диапазоне) для меток осей координат. Наконец, если стандартный вид меток не устраивает пользователя, то их шаблон можно задать явно (можно использовать и ТеХ символы), воспользовавшись функцией <code>SetTickTempl()</code>. Кроме того, в качестве меток можно вывести произвольный текст использовав функцию <code>SetTicksVal()</code>.
-</p>
-
-<hr>
-<a name="Color-styles"></a>
-<div class="header">
-<p>
-Next: <a href="#Line-styles" accesskey="n" rel="next">Line styles</a>, Previous: <a href="#Coordinate-axes" accesskey="p" rel="prev">Coordinate axes</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Cveta"></a>
-<h3 class="section">3.2 Цвета</h3>
-
-
-<p>Base colors are defined by one of symbol ‘<samp>wkrgbcymhRGBCYMHWlenupqLENUPQ</samp>’.
-<p>Символы цвета: ‘<samp>k</samp>’ – черный, ‘<samp>r</samp>’ – <span style="color: rgb(255, 0, 0);">красный</span>, ‘<samp>R</samp>’ – <span style="color: rgb(127, 0, 0);">темно красный</span>, ‘<samp>g</samp>’ – <span style="color: rgb(0, 255, 0);">зеленый</span>, ‘<samp>G</samp>’ – <span style="color: rgb(0, 127, 0);">темно зеленый</span>, ‘<samp>b</samp>’ – <span style="color: rgb(0, 0, 255);">синий</span>, ‘<samp>B</samp>’ – <span style="color: rgb(0, 0, 127);">темно синий</span>, ‘<samp>c</samp>’ – <span style="color: rgb(0, 255, 255);">голубой</span>, ‘<samp>C</samp>’ – <span style="color: rgb(0, 127, 127);">темно голубой</span>, ‘<samp>m</samp>’ – <span style="color: rgb(255, 0, 255);">пурпурный</span>, ‘<samp>M</samp>’ – <span style="color: rgb(127, 0, 127);">темно пурпурный</span>, ‘<samp>y</samp>’ – <span style="color: rgb(255, 255, 0);">желтый</span>, ‘<samp>Y</samp>’ – <span style="color: rgb(127, 127, 0);">темно желтый (золотой)</span>, ‘<samp>h</samp>’ – <span style="color: rgb(127, 127, 127);">серый</span>, ‘<samp>H</samp>’ – <span style="color: rgb(76, 76, 76);">темно серый</span>, ‘<samp>w</samp>’ – белый, ‘<samp>W</samp>’ – <span style="color: rgb(178, 178, 178);">светло серый</span>, ‘<samp>l</samp>’ – <span style="color: rgb(0, 255, 127);">сине-зеленый</span>, ‘<samp>L</samp>’ – <span style="color: rgb(0, 127, 63);">темно сине-зеленый</span>, ‘<samp>e</samp>’ – <span style="color: rgb(127, 255, 0);">желто-зеленый</span>, ‘<samp>E</samp>’ – <span style="color: rgb(63, 127, 0);">темно желто-зеленый</span>, ‘<samp>n</samp>’ – <span style="color: rgb(0, 127, 255);">небесно-синий</span>, ‘<samp>N</samp>’ – <span style="color: rgb(0, 63, 127);">темно небесно-синий</span>, ‘<samp>u</samp>’ – <span style="color: rgb(127, 0, 255);">сине-фиолетовый</span>, ‘<samp>U</samp>’ – <span style="color: rgb(63, 0, 127);">темно сине-фиолетовый</span>, ‘<samp>p</samp>’ – <span style="color: rgb(255, 0, 127);">фиолетовый</span>, ‘<samp>P</samp>’ – <span style="color: rgb(127, 0, 63);">темно фиолетовый</span>, ‘<samp>q</samp>’ – <span style="color: rgb(255, 127, 0);">оранжевый</span>, ‘<samp>Q</samp>’ – <span style="color: rgb(127, 63, 0);">темно оранжевый (коричневый)</span>.</p>
-</p>
-<p>В цветовой схеме можно использовать тональные (“подсвеченные”) цвета. Тональный цвет задается двумя символами в фигурных скобках ‘<samp>{cN}</samp>’: первый – обычный цвет, второй – его яркость цифрой. Цифра может быть в диапазоне ‘<samp>1</samp>’...‘<samp>9</samp>’. При этом ‘<samp>5</samp>’ соответствует нормальному цвету, ‘<samp>1</samp>’ – очень темная версия цвета (почти черный), ‘<samp>9</samp>’ – очень светлая версия цвета (почти белый). Например, цвета могут быть ‘<samp>{b2}</samp>’ ‘<samp>{b7}</samp>’ ‘<samp>{r7}</samp>’ и т.д.
-</p>
-<p>Наконец, можно указать явно RGB или RGBA значения цвета, используя формат ‘<samp>{xRRGGBB}</samp>’ или ‘<samp>{xRRGGBBAA}</samp>’ соответственно. Например, ‘<samp>{xFF9966}</samp>’ даст цвет
-<span style="color: rgb(255, 153, 102);">дыни</span>.
-</p>
-
-<hr>
-<a name="Line-styles"></a>
-<div class="header">
-<p>
-Next: <a href="#Color-scheme" accesskey="n" rel="next">Color scheme</a>, Previous: <a href="#Color-styles" accesskey="p" rel="prev">Color styles</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Stilx-linii"></a>
-<h3 class="section">3.3 Стиль линий</h3>
-
-
-<a name="index-Stilx-linii"></a>
-<a name="index-Stilx-markerov"></a>
-<a name="index-Stilx-strelok"></a>
-
-<p>Стиль линии задается строкой, которая может содержать символ цвета (‘<samp>wkrgbcymhRGBCYMHWlenupqLENUPQ</samp>’), тип пунктира (‘<samp>-|;:ji</samp>’ или пробел), ширину линии (‘<samp>0123456789</samp>’) и тип маркера (‘<samp>o+xsd.^v</samp>’ и модификатор ‘<samp>#</samp>’). Если пропущен цвет или тип пунктира, то используется значение по умолчанию с последним указанным цветом или значение из палитры (для see <a href="#g_t1D-plotting">1D plotting</a>).
-По умолчанию палитры содержит следующие цвета: <span style="color: rgb(76, 76, 76);">темно серый</span> ‘<samp>H</samp>’, <span style="color: rgb(0, 0, 255);">синий</span> ‘<samp>b</samp>’, <span style="color: rgb(0, 255, 0);">зеленый</span> ‘<samp>g</samp>’, <span style="color: rgb(255, 0, 0);">красный</span> ‘<samp>r</samp>’, <span style="color: rgb(0, 255, 255);">голубой</span> ‘<samp>c</samp>’, <span style="color: rgb(255, 0, 255);">пурпурный</span> ‘<samp>m</samp>’, <span style="color: rgb(255, 255, 0);">yellow</span> ‘<samp>y</samp>’, <span style="color: rgb(127, 127, 127);">серый</span> ‘<samp>h</samp>’, <span style="color: rgb(0, 255, 127);">сине-зеленый</span> ‘<samp>l</samp>’, <span style="color: rgb(0, 127, 255);">небесно-синий</span> ‘<samp>n</samp>’, <span style="color: rgb(255, 127, 0);">оранжевый</span> ‘<samp>q</samp>’, <span style="color: rgb(127, 255, 0);">желто-зеленый</span> ‘<samp>e</samp>’, <span style="color: rgb(127, 0, 255);">сине-фиолетовый</span> ‘<samp>u</samp>’, <span style="color: rgb(255, 0, 127);">фиолетовый</span> ‘<samp>p</samp>’.
-
-<p>Тип пунктира: пробел – нет линии (для рисования только маркеров), ‘<samp>-</samp>’ – сплошная линия (■■■■■■■■■■■■■■■■), ‘<samp>|</samp>’ – длинный пунктир (■■■■■■■■□□□□□□□□), ‘<samp>;</samp>’ – пунктир (■■■■□□□□■■■■□□□□), ‘<samp>=</samp>’ – короткий пунктир (■■□□■■□□■■□□■■□□), ‘<samp>:</samp>’ – точки (■□□□■□□□■□□□■□□□), ‘<samp>j</samp>’ – пунктир с точками (■■■■■■■□□□□■□□□□), ‘<samp>i</samp>’ – мелкий пунктир с точками (■■■□□■□□■■■□□■□□), ‘<samp>{dNNNN}</samp>’ – заданнÑ\8bй вÑ\80Ñ\83Ñ\87нÑ\83Ñ\8e Ñ\81Ñ\82илÑ\8c (длÑ\8f v.2.3 и поздниÑ\85, напÑ\80имеÑ\80 ‘<samp>{df090}</samp>’ длÑ\8f (■■■■□□□□■□□■□□□□)).</p>
-</p>
-<p>Типы маркеров: ‘<samp>o</samp>’ – окружность, ‘<samp>+</samp>’ – крест, ‘<samp>x</samp>’ – косой крест, ‘<samp>s</samp>’ – квадрат, ‘<samp>d</samp>’ - ромб, ‘<samp>.</samp>’ – точка, ‘<samp>^</samp>’ – треугольник вверх, ‘<samp>v</samp>’ – треугольник вниз, ‘<samp><</samp>’ – треугольник влево, ‘<samp>></samp>’ – треугольник вправо, ‘<samp>#*</samp>’ – знак Y, ‘<samp>#+</samp>’ – крест в квадрате, ‘<samp>#x</samp>’ – косой крест в квадрате, ‘<samp>#.</samp>’ – точка в окружности. Если в строке присутствует символ ‘<samp>#</samp>’, то используются символы с заполнением.
-</p>
-<p>Вы можете определить собственные символы (см. <a href="#addsymbol">addsymbol</a>) для рисования маркеров при использовании стиля ‘<samp>&</samp>’. В частности, ‘<samp>&*</samp>’, ‘<samp>&o</samp>’, ‘<samp>&+</samp>’, ‘<samp>&x</samp>’, ‘<samp>&s</samp>’, ‘<samp>&d</samp>’, ‘<samp>&.</samp>’, ‘<samp>&^</samp>’, ‘<samp>&v</samp>’, ‘<samp>&<</samp>’, ‘<samp>&></samp>’ нарисует определенный пользователем символ с именем ‘<samp>*o+xsd.^v<></samp>’ соответственно; и
-‘<samp>&#o</samp>’, ‘<samp>&#+</samp>’, ‘<samp>&#x</samp>’, ‘<samp>&#s</samp>’, ‘<samp>&#d</samp>’, ‘<samp>&#.</samp>’, ‘<samp>&#^</samp>’, ‘<samp>&#v</samp>’, ‘<samp>&#<</samp>’, ‘<samp>&#></samp>’ нарисует определенный пользователем символ с именем ‘<samp>YOPXSDCTVLR</samp>’ соответственно. Замечу, что будет нарисован только контур определенного пользователем символа если задан отрицательный размер маркера (см. <a href="#marksize">marksize</a> или опцию <code>size</code> в <a href="#Command-options">Command options</a>).
-</p>
-<p>На конце и в начале линии можно выводить специальный символ (стрелку), если в строке указать один из символов: ‘<samp>A</samp>’ – стрелка наружу, ‘<samp>V</samp>’ – стрелка внутрь, ‘<samp>I</samp>’ – поперечная черта, ‘<samp>K</samp>’ – стрелка с чертой, ‘<samp>T</samp>’ – треугольник, ‘<samp>S</samp>’ – квадрат, ‘<samp>D</samp>’ – ромб, ‘<samp>O</samp>’ – круг, ‘<samp>X</samp>’ – косой крест, ‘<samp>_</samp>’ – нет стрелки (по умолчанию). При этом действует следующее правило: первый символ определяет стрелку на конце линии, второй символ – стрелку в начале линии. Например, ‘<samp>r-A</samp>’ – красная сплошная линия со стрелкой на конце, ‘<samp>b|AI</samp>’ – синий пунктир со стрелкой на конце и чертой вначале, ‘<samp>_O</samp>’ – линия с текущим стилем и кружком вначале. Эти стили действуют и при построении графиков (например, <a href="#g_t1D-plotting">1D plotting</a>).
-</p>
-<div align="center"><img src="png/style.png" alt="Color and line styles.">
-</div>
-
-<hr>
-<a name="Color-scheme"></a>
-<div class="header">
-<p>
-Next: <a href="#Font-styles" accesskey="n" rel="next">Font styles</a>, Previous: <a href="#Line-styles" accesskey="p" rel="prev">Line styles</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Cvetovaya-skhema"></a>
-<h3 class="section">3.4 Цветовая схема</h3>
-
-
-<a name="index-Cvetovaya-skhema"></a>
-
-<p>Цветовая схема используется для определения цвета поверхностей, линий уровня и пр. Цветовая схема задается строкой <em>s</em>, которая содержит символы цвета (see <a href="#Line-styles">Line styles</a>) или символы ‘<samp>#:|</samp>’. Символ ‘<samp>#</samp>’ переключает рисование поверхности на сетчатое (для трехмерных поверхностей) или включает рисование сетки на поверхности. Символ ‘<samp>|</samp>’ отключает интерполяцию цвета в цветовой схеме. Это может быть полезно для “резких” цветов, например, при рисовании матриц. Если в строке встречается символ ‘<samp>:</samp>’, то он принудительно заканчивает разбор строки для стиля поверхности. После этого символа могут идти описание стиля текста или оси вращения кривой/линий уровня. Цветовая схема может содержать до 32 значений цвета.
-</p>
-<p>При определении цвета по <em>амплитуде</em> (наиболее часто используется) окончательный цвет определяется путем линейной интерполяции массива цветов. Массив цветов формируется из цветов, указанных в строке спецификации. Аргумент – амплитуда, нормированная на диапазон изменения цвета (см. <a href="#Axis-settings">Axis settings</a>). Например, строка из 4 символов ‘<samp>bcyr</samp>’ соответствует изменению цвета от синего (минимальное значение) через голубой и желтый (промежуточные значения) к красному (максимальное значение). Строка ‘<samp>kw</samp>’ соответствует изменению цвета от черного (минимальное значение) к белому (максимальное значение). Строка из одного символа (например, ‘<samp>g</samp>’) соответствует однотонному цвету (в данному случае зеленому).
-</p>
-<p>Специальная двуосная цветовая схема (как в графике <a href="#map">map</a>) задается символом ‘<samp>%</samp>’. В ней второе направление (прозрачность) используется как вторая координата для цвета. При этом можно указать до 4 цветов для углов: {c1,a1}, {c2,a1}, {c1,a2}, {c2,a2}. Здесь диапазоны цвета и прозрачности равны {c1,c2} и {a1,a2}. Если указано меньше 4 цветов, то черный используется для угла {c1,a1}. Если задано только 2 цвета, то их сумма используется для угла {c2,a2}.
-</p>
-<p>Есть несколько полезных цветовых схем. Строка ‘<samp>kw</samp>’ дает обычную серую (черно-белую) схему, когда большие значения светлее. Строка ‘<samp>wk</samp>’ представляет обратную серую схему, когда большие значения темнее. Строки ‘<samp>kRryw</samp>’, ‘<samp>kGgw</samp>’, ‘<samp>kBbcw</samp>’ представляют собой хорошо известные схемы <em>hot</em>, <em>summer</em> и <em>winter</em>. Строки ‘<samp>BbwrR</samp>’ и ‘<samp>bBkRr</samp>’ позволяют рисовать двухцветные фигуры на белом или черном фоне, когда отрицательные значения показаны синим цветом, а положительные – красным. Строка ‘<samp>BbcyrR</samp>’ дает цветовую схему, близкую к хорошо известной схеме <em>jet</em>.
-</p>
-<p>Для более точно раскрашивания поверхностей можно изменить равномерное (по умолчанию) положение цветов в цветовой схеме. Формат следующий: ‘<samp>{CN,pos}</samp>’, ‘<samp>{CN,pos}</samp>’ или ‘<samp>{xRRGGBB,pos}</samp>’. Здесь значение <var>pos</var> положения цвета должно быть в диапазоне [0, 1]. Отмечу, что альтернативным механизмом тонкой настройки цветовой схемы может служить использование формул для цветовой координаты (см. <a href="#Curved-coordinates">Curved coordinates</a>).
-</p>
-<div align="center"><img src="png/schemes.png" alt="Most popular color schemes.">
-</div>
-<p>При определении цвета по <em>положению точки в пространстве</em> (используется в <a href="#map">map</a>) окончательный цвет определяется по формуле c=x*c[1] + y*c[2]. Здесь c[1], c[2] – первые три цвета в цветовом массиве; x, y – координаты точки, нормированные в диапазон изменения осей координат.
-</p>
-
-<p>Дополнительно, MathGL может наложить маску при закраске граней для создания растрового изображения. Тип маски задается одним из символов ‘<samp>-+=;oOsS~<>jdD*^</samp>’ в цветовой схеме. Маску можно повернуть на произвольный угол командой <a href="#mask">mask</a> или на один из улов +45, -45 или 90 градусов, используя символы ‘<samp>\/I</samp>’ соответственно. Примеры масок по умолчанию показаны на рисунке ниже.
-</p>
-<div align="center"><img src="png/mask.png" alt="Example of masks for face coloring.">
-</div>
-<p>Однако, вы можете задать собственную маску (как матрицу 8*8) для любого из этих символов, используя второй аргумент команды <a href="#mask">mask</a>. Например, маска на правом нижнем подрисунке получается кодом<br>
-<code>gr->SetMask('+', "ff00182424f80000"); gr->Dens(a,"3+");</code><br>
-или использовать явное задание маски (для v.2.3 и более поздних)<br>
-<code>gr->Dens(a,"3{s00ff00182424f800}");</code>
-</p>
-
-<hr>
-<a name="Font-styles"></a>
-<div class="header">
-<p>
-Next: <a href="#Textual-formulas" accesskey="n" rel="next">Textual formulas</a>, Previous: <a href="#Color-scheme" accesskey="p" rel="prev">Color scheme</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Stilx-teksta"></a>
-<h3 class="section">3.5 Стиль текста</h3>
-
-
-<a name="index-Stilx-teksta"></a>
-
-<p>Стиль текста задается строкой, которая может содержать цвет текста ‘<samp>wkrgbcymhRGBCYMHW</samp>’ (см. <a href="#Color-styles">Color styles</a>), а также тип шрифта (‘<samp>ribwou</samp>’) и/или выравнивания (‘<samp>LRC</samp>’) после символа ‘<samp>:</samp>’. Например, ‘<samp>r:iCb</samp>’ соответствует жирному (‘<samp>b</samp>’) курсиву (‘<samp>i</samp>’) с выравниванием по центру (‘<samp>C</samp>’ красного цвета (‘<samp>r</samp>’). Начиная с MathGL версии 2.3, вы можете использовать не только один цвет для всего текста, но и задать цветовой градиент для выводимой строки (см. <a href="#Color-scheme">Color scheme</a>).
-</p>
-<p>Начертания шрифта: ‘<samp>r</samp>’ – прямой шрифт, ‘<samp>i</samp>’ – курсив, ‘<samp>b</samp>’ – жирный. По умолчанию используется прямой шрифт. Типы выравнивания текста: ‘<samp>L</samp>’ – по левому краю (по умолчанию), ‘<samp>C</samp>’ – по центру, ‘<samp>R</samp>’ – по правому краю, ‘<samp>T</samp>’ – под текстом, ‘<samp>V</samp>’ – по центру вертикально. Дополнительные эффекты шрифта: ‘<samp>w</samp>’ – контурный, ‘<samp>o</samp>’ – надчеркнутый, ‘<samp>u</samp>’ – подчеркнутый.
-</p>
-<p>Синтаксический разбор LaTeX-их команд по умолчанию включен. Это команды смены стиля текста (например, \b для жирного текста): \a или \overline – надчеркивание, \b или \textbf – жирный, \i или \textit – курсив, \r или \textrm – прямой (отменяет стили жирного и курсива), \u или \underline – подчеркнутый, \w или \wire – контурный, \big – большего размера, @ – меньшего размера. Нижний и верхний индексы задаются символами ‘<samp>_</samp>’ и ‘<samp>^</samp>’. При этом изменение стиля применяется только к следующему символу или к символам в фигурных скобках {}, которые понимаются как единый блок. Например, сравните строки ‘<samp>sin (x^{2^3})</samp>’ и ‘<samp>sin (x^2^3)</samp>’. Можно также менять цвет текста внутри строки с помощью команд #? или \color?, где ‘<samp>?</samp>’ – символ цвета (see <a href="#Line-styles">Line styles</a>). Например, слова ‘<samp>Blue</samp>’ и ‘<samp>red</samp>’ будут окрашены в соответствующий цвет в строке ‘<samp>#b{Blue} and \colorr{red} text</samp>’. Большинство функций понимает символ новой строки ‘<samp>\n</samp>’ и позволяет выводить много строчный текст. Наконец, можно использовать символы с произвольным UTF кодом с помощью команды <code>\utf0x????</code>. Например, <code>\utf0x3b1</code> даст символ
-α.
-</p>
-<p>Распознаются также большинство символов TeX и AMSTeX, команды смены стиля текста (\textrm, \textbf, \textit, \textsc, \overline, \underline), акценты (\hat, \tilde, \dot, \ddot, \acute, \check, \grave, \bar, \breve) и корни (\sqrt, \sqrt3, \sqrt4). Полный список содержит около 2000 символов. Отмечу, что первый пробел (пробел, табуляция и пр.) после команды игнорируется, а все остальные пробелы печатаются обычным образом. Например, следующие строки дают одинаковый результат <em>\tilde a</em>: ‘<samp>\tilde{a}</samp>’; ‘<samp>\tilde a</samp>’; ‘<samp>\tilde{}a</samp>’.
-</p>
-В частности, распознаются греческие буквы: α – \alpha, β – \beta, γ – \gamma, δ – \delta, ε – \epsilon, η – \eta, ι – \iota, χ – \chi, κ – \kappa, λ – \lambda, μ – \mu, ν – \nu, o – \o, ω – \omega, ϕ – \phi, π – \pi, ψ – \psi, ρ – \rho, σ – \sigma, θ – \theta, τ – \tau, υ – \upsilon, ξ – \xi, ζ – \zeta, ς – \varsigma, ɛ – \varepsilon, ϑ – \vartheta, φ – \varphi, ϰ – \varkappa; A – \Alpha, B – \Beta, Γ – \Gamma, Δ – \Delta, E – \Epsilon, H – \Eta, I – \Iota, C – \Chi, K – \Kappa, Λ – \Lambda, M – \Mu, N – \Nu, O – \O, Ω – \Omega, Φ – \Phi, Π – \Pi, Ψ – \Psi, R – \Rho, Σ – \Sigma, Θ – \Theta, T – \Tau, Υ – \Upsilon, Ξ – \Xi, Z – \Zeta.
-
-<p>Еще примеры наиболее общеупотребительных TeX-их символов: ∠ – \angle, ⋅ – \cdot, ♣ – \clubsuit, ✓ – \checkmark, ∪ – \cup, ∩ – \cap, ♢ – \diamondsuit, ◇ – \diamond, ÷
- – \div,
-↓ – \downarrow, † – \dag, ‡ – \ddag, ≡ – \equiv, ∃ – \exists, ⌢ – \frown, ♭ – \flat, ≥ – \ge, ≥ – \geq, ≧ – \geqq, ← – \gets, ♡ – \heartsuit, ∞ – \infty, ∫ – \int, \Int, ℑ – \Im, ♢ – \lozenge, ⟨ – \langle, ≤ – \le, ≤ – \leq, ≦ – \leqq, ← – \leftarrow, ∓ – \mp, ∇ – \nabla, ≠ – \ne, ≠ – \neq, ♮ – \natural, ∮ – \oint, ⊙ – \odot, ⊕ – \oplus, ∂ – \partial, ∥ – \parallel, ⊥ –\perp, ± – \pm, ∝ – \propto, ∏ – \prod, ℜ – \Re, → – \rightarrow, ⟩ – \rangle, ♠ – \spadesuit, ~ – \sim, ⌣ – \smile, ⊂ – \subset, ⊃ – \supset, √ – \sqrt or \surd, § – \S, ♯ – \sharp, ∑ – \sum, × – \times, → – \to, ∴ – \therefore, ↑ – \uparrow, ℘ – \wp. </p>
-
-<p>Размер текста может быть задан явно (если <var>size</var>>0) или относительно базового размера шрифта для рисунка |<var>size</var>|*<var>FontSize</var> при <var>size</var><0. Значение <var>size</var>=0 указывает, что соответствующая строка выводиться не будет. Базовый размер шрифта измеряется во внутренних единицах. Специальные функции <code>SetFontSizePT(), SetFontSizeCM(), SetFontSizeIN()</code> позволяют задавать его в более “привычных” единицах.
-</p>
-
-<hr>
-<a name="Textual-formulas"></a>
-<div class="header">
-<p>
-Next: <a href="#Command-options" accesskey="n" rel="next">Command options</a>, Previous: <a href="#Font-styles" accesskey="p" rel="prev">Font styles</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Tekstovye-formuly"></a>
-<h3 class="section">3.6 Текстовые формулы</h3>
-
-<a name="index-Tekstovye-formuly"></a>
-
-<p>MathGL имеет быстрый парсер текстовых формул
-(see <a href="#Evaluate-expression">Evaluate expression</a>)
-, понимающий большое число функций и операций. Базовые операции: ‘<samp>+</samp>’ – сложение, ‘<samp>-</samp>’ – вычитание, ‘<samp>*</samp>’ – умножение, ‘<samp>/</samp>’ – деление, ‘<samp>%</samp>’ – остаток от деления, ‘<samp>^</samp>’ – возведение в целосичленную степень. Также есть логические операции: ‘<samp><</samp>’ – истина если if x<y, ‘<samp>></samp>’ – истина если x>y, ‘<samp>=</samp>’ – истина если x=y, ‘<samp>&</samp>’ – истина если x и y оба не равны нулю, ‘<samp>|</samp>’ – истина если x или y не нуль. Логические операции имеют наинизший приоритет и возвращают 1 если истина или 0 если ложно.
-</p>
-<p>Базовые функции: ‘<samp>sqrt(x)</samp>’ – квадратный корень из <var>x</var>, ‘<samp>pow(x,y)</samp>’ – <var>x</var> в степени <var>y</var>, ‘<samp>ln(x)</samp>’ – натуральный логарифм <var>x</var>, ‘<samp>lg(x)</samp>’ – десятичный логарифм <var>x</var>, ‘<samp>log(a,x)</samp>’ – логарифм по основанию <var>a</var> от <var>x</var>, ‘<samp>abs(x)</samp>’ – модуль <var>x</var>, ‘<samp>sign(x)</samp>’ – знак <var>x</var>, ‘<samp>mod(x,y)</samp>’ – остаток от деления <var>x</var> на <var>y</var>, ‘<samp>step(x)</samp>’ – ступенчатая функция, ‘<samp>int(x)</samp>’ – целая часть <var>x</var>, ‘<samp>rnd</samp>’ – случайное число, ‘<samp>random(x)</samp>’ – матрица случайный чисел размером как <var>x</var>, ‘<samp>hypot(x,y)</samp>’=sqrt(x^2+y^2) – гипотенуза, ‘<samp>cmplx(x,y)</samp>’=x+i*y – комплексное число, ‘<samp>pi</samp>’ – число
-π = 3.1415926…, inf=∞
-</p>
-<p>Функции для работы с комплексными числами ‘<samp>real(x)</samp>’, ‘<samp>imag(x)</samp>’, ‘<samp>abs(x)</samp>’, ‘<samp>arg(x)</samp>’, ‘<samp>conj(x)</samp>’.
-</p>
-<p>Тригонометрические функции: ‘<samp>sin(x)</samp>’, ‘<samp>cos(x)</samp>’, ‘<samp>tan(x)</samp>’ (или ‘<samp>tg(x)</samp>’). Обратные тригонометрические функции: ‘<samp>asin(x)</samp>’, ‘<samp>acos(x)</samp>’, ‘<samp>atan(x)</samp>’. Гиперболические функции: ‘<samp>sinh(x)</samp>’ (или ‘<samp>sh(x)</samp>’), ‘<samp>cosh(x)</samp>’ (или ‘<samp>ch(x)</samp>’), ‘<samp>tanh(x)</samp>’ (или ‘<samp>th(x)</samp>’). Обратные гиперболические функции: ‘<samp>asinh(x)</samp>’, ‘<samp>acosh(x)</samp>’, ‘<samp>atanh(x)</samp>’.
-</p>
-<p>Специальные функции: ‘<samp>gamma(x)</samp>’ – гамма функция Γ(x) = ∫<sub>0</sub><sup>∞</sup> t<sup>x-1</sup> exp(-t) dt, ‘<samp>gamma_inc(x,y)</samp>’ – неполная гамма функция Γ(x,y) = ∫<sub>y</sub><sup>∞</sup> t<sup>x-1</sup> exp(-t) dt, ‘<samp>psi(x)</samp>’ – дигамма функция ψ(x) = Γ′(x)/Γ(x) для x≠0, ‘<samp>ai(x)</samp>’ – Эйри функция Ai(x), ‘<samp>bi(x)</samp>’ – Эйри функция Bi(x), ‘<samp>cl(x)</samp>’ – функция Клаузена, ‘<samp>li2(x)</samp>’ (или ‘<samp>dilog(x)</samp>’) – дилогарифм Li<sub>2</sub>(x) = -ℜ∫<sub>0</sub><sup>x</sup>ds log(1-s)/s, ‘<samp>sinc(x)</samp>’ – функция sinc(x) = sin(πx)/(πx) для любых x, ‘<samp>zeta(x)</samp>’ – зета функция Римана ζ(s) = ∑<sub>k=1</sub><sup>∞</sup>k<sup>-s</sup> для s≠1, ‘<samp>eta(x)</samp>’ – эта функция η(s) = (1 - 2<sup>1-s</sup>)ζ(s) для произвольного s, ‘<samp>lp(l,x)</samp>’ – полином Лежандра P<sub>l</sub>(x), (|x|≤1, l≥0), ‘<samp>w0(x)</samp>’, ‘<samp>w1(x)</samp>’ – функции Ламберта W. Функции W(x) определены как решение уравнения: W exp(W) = x. </p>
-
-<p>Экспоненциальные интегралы: ‘<samp>ci(x)</samp>’ – cos-интеграл Ci(x) = ∫<sub>0</sub><sup>x</sup>dt cos(t)/t, ‘<samp>si(x)</samp>’ – sin-интеграл Si(x) = ∫<sub>0</sub><sup>x</sup>dt sin(t)/t, ‘<samp>erf(x)</samp>’ – функция ошибки erf(x) = (2/√π) ∫<sub>0</sub><sup>x</sup>dt exp(-t<sup>2</sup>) , ‘<samp>ei(x)</samp>’ – интеграл Ei(x) = -PV(∫<sub>-x</sub><sup>∞</sup>dt exp(-t)/t) (где PV обозначает главное значение), ‘<samp>e1(x)</samp>’ – интеграл E<sub>1</sub>(x) = ℜ∫<sub>1</sub><sup>∞</sup>dt exp(-xt)/t, ‘<samp>e2(x)</samp>’ – интеграл E<sub>2</sub>(x) = ℜ∫<sub>1</sub>∞</sup>dt exp(-xt)/t<sup>2</sup>, ‘<samp>ei3(x)</samp>’ – интеграл Ei<sub>3</sub>(x) = ∫<sub>0</sub><sup>x</sup>dt exp(-t<sup>3</sup>) для x≥0. </p>
-
-<p>Функции Бесселя: ‘<samp>j(nu,x)</samp>’ – функция Бесселя первого рода, ‘<samp>y(nu,x)</samp>’ – функция Бесселя второго рода, ‘<samp>i(nu,x)</samp>’ – модифицированная функция Бесселя первого рода, ‘<samp>k(nu,x)</samp>’ – модифицированная функция Бесселя второго рода. </p>
-
-<p>Эллиптические интегралы: ‘<samp>ee(k)</samp>’ – полный эллиптический интеграл E(k) = E(π/2,k), ‘<samp>ek(k)</samp>’ – полный эллиптический интеграл K(k) = F(π/2,k), ‘<samp>e(phi,k)</samp>’ – эллиптический интеграл E(φ,k) = ∫<sub>0</sub><sup>φ</sup>dt √(1 - k<sup>2</sup>sin<sup>2</sup>(t)), ‘<samp>f(phi,k)</samp>’ – эллиптический интеграл F(φ,k) = ∫<sub>0</sub><sup>φ</sup>dt 1/√(1 - k<sup>2</sup>sin<sup>2</sup>(t))</p>
-
-<p>Функции Якоби: ‘<samp>sn(u,m)</samp>’, ‘<samp>cn(u,m)</samp>’, ‘<samp>dn(u,m)</samp>’, ‘<samp>sc(u,m)</samp>’, ‘<samp>sd(u,m)</samp>’, ‘<samp>ns(u,m)</samp>’, ‘<samp>cs(u,m)</samp>’, ‘<samp>cd(u,m)</samp>’, ‘<samp>nc(u,m)</samp>’, ‘<samp>ds(u,m)</samp>’, ‘<samp>dc(u,m)</samp>’, ‘<samp>nd(u,m)</samp>’.
-</p>
-<p>Некоторые из функций могут быть недоступны если не была включена поддержка GSL при компиляции библиотеки MathGL.
-</p>
-<p>При разборе формул нет различия между верхним и нижним регистром. Если аргумент лежит вне области определения функции, то возвращается NaN.
-</p>
-
-<hr>
-<a name="Command-options"></a>
-<div class="header">
-<p>
-Next: <a href="#Interfaces" accesskey="n" rel="next">Interfaces</a>, Previous: <a href="#Textual-formulas" accesskey="p" rel="prev">Textual formulas</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Opcii-komand"></a>
-<h3 class="section">3.7 Опции команд</h3>
-
-
-<p>Опции команд позволяют легко настроить вид отдельного графика не меняя глобальных настроек для все рисунка. Каждая опция отделяется от предыдущей символом ‘<samp>;</samp>’. Опции работают так, что запоминают текущие настройки рисунка, применяют собственные настройки, выполняют команду и возвращают глобальные настройки обратно. Поэтому использование опций для команд обработки данных или настройки графика бесполезно.
-</p>
-<p>Наиболее часто используемые опции – <code>xrange, yrange, zrange</code>, устанавливают границы изменения осей координат (и тем самым автоматических массивов). Например, команда <code>Plot(y,"","xrange 0.1 0.9");</code> или <code>plot y; xrange 0.1 0.9</code> построит кривую с x-координатой равно распределенной в интервале 0.1 ... 0.9, а не вдоль текущей оси x. См. раздел <a href="#Using-options">Using options</a>, для примеров кода и графика.
-</p>
-<p>Полный список опций:
-<a name="index-alpha"></a>
-<a name="index-alphadef"></a>
-</p><dl>
-<dt><a name="index-alpha-1"></a>Опция MGL: <strong>alpha</strong> <em><code>val</code></em></dt>
-<dd><p>Задает величину прозрачности поверхности. Значение должно быть в диапазоне [0, 1]. См. также <a href="#alphadef">alphadef</a>
-</p></dd></dl>
-
-<a name="index-xrange"></a>
-<dl>
-<dt><a name="index-xrange-1"></a>Опция MGL: <strong>xrange</strong> <em><code>val1 val2</code></em></dt>
-<dd><p>Задает границы изменения координаты x. См. также <a href="#xrange">xrange</a>
-</p></dd></dl>
-<a name="index-yrange"></a>
-<dl>
-<dt><a name="index-yrange-1"></a>Опция MGL: <strong>yrange</strong> <em><code>val1 val2</code></em></dt>
-<dd><p>Задает границы изменения координаты y. См. также <a href="#yrange">yrange</a>
-</p></dd></dl>
-<a name="index-zrange"></a>
-<dl>
-<dt><a name="index-zrange-1"></a>Опция MGL: <strong>zrange</strong> <em><code>val1 val2</code></em></dt>
-<dd><p>Задает границы изменения координаты z. См. также <a href="#zrange">zrange</a>
-</p></dd></dl>
-
-<a name="index-cut"></a>
-<dl>
-<dt><a name="index-cut-1"></a>Опция MGL: <strong>cut</strong> <em><code>val</code></em></dt>
-<dd><p>Задает обрезание точек за пределами осей координат. См. также <a href="#cut">cut</a>.
-</p></dd></dl>
-<a name="index-fontsize"></a>
-<dl>
-<dt><a name="index-size"></a>Опция MGL: <strong>size</strong> <em><code>val</code></em></dt>
-<dd><p>Задает размер текста, маркеров и стрелок. См. также <a href="#font">font</a>, <a href="#marksize">marksize</a>, <a href="#arrowsize">arrowsize</a>.
-</p></dd></dl>
-<a name="index-meshnum"></a>
-<dl>
-<dt><a name="index-meshnum-1"></a>Опция MGL: <strong>meshnum</strong> <em><code>val</code></em></dt>
-<dd><p>Задает ориентировочное число линий, стрелок, ячеек и пр. См. также <a href="#meshnum">meshnum</a>
-</p></dd></dl>
-
-<a name="index-legend"></a>
-<dl>
-<dt><a name="index-legend-1"></a>Опция MGL: <strong>legend</strong> <em>'txt'</em></dt>
-<dd><p>Добавляет строку ’txt’ во внутренний массив записей легенды. Стиль линии и маркера аргумента последней вызванной команды построения <a href="#g_t1D-plotting">1D plotting</a>. См. также <a href="#legend">legend</a>
-</p></dd></dl>
-<a name="index-value"></a>
-<dl>
-<dt><a name="index-value-1"></a>MGL option: <strong>value</strong> <em><code>val</code></em></dt>
-<dd><p>Задает значение, которое будет использовано как дополнительный числовой параметр при построении графика.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Interfaces"></a>
-<div class="header">
-<p>
-Previous: <a href="#Command-options" accesskey="p" rel="prev">Command options</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Interfeisy"></a>
-<h3 class="section">3.8 Интерфейсы</h3>
-
-
-
-
-<p>Библиотека MathGL имеет интерфейсы к ряду языков программирования. Большинство из них основано на С интерфейсе с использованием SWIG. Это Python, Java, Octave, Lisp, C#, Guile, Lua, Modula 3, Ocaml, Perl, PHP, Pike, R, Ruby, и Tcl интерфейсы. Также есть Fortran интерфейс, который имеет схожий набор функций, но слегка различающиеся типы аргументов (целые вместо указателей). Эти функции отмечены как [C function].
-</p>
-<p>Некоторые языки поддерживают классы (подобно C++ или Python). Имена функций для них такие же как в С++ (см. <a href="#MathGL-core">MathGL core</a> и <a href="#Data-processing">Data processing</a>) и отмечены, например, так [Method on mglGraph].
-</p>
-<p>Наконец, специальный командный язык MGL (см. <a href="#MGL-scripts">MGL scripts</a>) был создан для быстрого доступа к функциям рисования. Соответствующие скрипты могут быть выполнены самостоятельно (с помощью UDAV, mglconv, mglview и т.д.) или из программы на языке C/C++/Python/... (см. <a href="#mglParse-class">mglParse class</a>).
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#C-interface" accesskey="1">C interface</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#C_002b_002b-interface" accesskey="2">C++ interface</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="C-interface"></a>
-<div class="header">
-<p>
-Next: <a href="#C_002b_002b-interface" accesskey="n" rel="next">C++ interface</a>, Up: <a href="#Interfaces" accesskey="u" rel="up">Interfaces</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="C_002fFortran-interfeis"></a>
-<h4 class="subsection">3.8.1 C/Fortran интерфейс</h4>
-
-
-<p>C интерфейс – основа для многих других интерфейсов. Он содержит функции С для всех методов MathGL. В отличие от C++ классов, C функции содержат обязательный(ые) аргумент(ы) типа HMGL (для графики) и/или HCDT/HMDT/HADT (для массивов данных), который указывают на объект для рисования или изменения. Поэтому перед использованием их необходимо создать с помощью функции <code>mgl_create_*()</code>, и удалить после использования (или в конце программы) с помощью функции <code>mgl_delete_*()</code>.
-</p>
-<p>Все C функции описаны в заголовочном файле <code>#include <mgl2/mgl_cf.h></code> и используют переменные следующих типов:
-</p><ul>
-<li> <code>HMGL</code> — Указатель на класс <code>mglGraph</code> (см. <a href="#MathGL-core">MathGL core</a>).
-</li><li> <code>HCDT</code> — Указатель на класс <code>const mglDataA</code> (см. <a href="#Data-processing">Data processing</a>) — неизменяемые массивы данных.
-</li><li> <code>HMDT</code> — Указатель на класс <code>mglData</code> (см. <a href="#Data-processing">Data processing</a>) — массивы данных с действительными числами.
-</li><li> <code>HADT</code> — Указатель на класс <code>mglDataC</code> (см. <a href="#Data-processing">Data processing</a>) — массивы данных с комплексными числами.
-</li><li> <code>HMPR</code> — Указатель на класс <code>mglParse</code> (см. <a href="#mglParse-class">mglParse class</a>) — выполнение MGL скриптов.
-</li><li> <code>HMEX</code> — Указатель на класс <code>mglExpr</code> (см. <a href="#Evaluate-expression">Evaluate expression</a>) — текстовые формулы для действительных чисел.
-</li><li> <code>HMAX</code> — Указатель на класс <code>mglExprC</code> (см. <a href="#Evaluate-expression">Evaluate expression</a>) — текстовые формулы для комплексных чисел.
-</li></ul>
-
-<p>Фортрановские функции и подпрограммы имеют такие же имена как функции С. Однако есть отличие. Переменные типов <code>HMGL, HCDT, HMDT, ...</code> должны быть целыми с достаточной разрядностью (<code>integer*4</code> для 32-битной операционной системы или <code>integer*8</code> для 64-битной). Все C функции типа <code>void</code> — подпрограммы на Фортране и должны вызываться оператором <code>call</code>. Прочие функции, возвращающие тип <code>HMGL</code> или <code>HMDT</code> и т.п. должны быть объявлены в Фортране как возвращающие целое нужной разрядности. Также необходимо иметь в виду, что строки в Фортране отделяются символом <code>'</code>, а не <code>"</code>.
-</p>
-
-<hr>
-<a name="C_002b_002b-interface"></a>
-<div class="header">
-<p>
-Previous: <a href="#C-interface" accesskey="p" rel="prev">C interface</a>, Up: <a href="#Interfaces" accesskey="u" rel="up">Interfaces</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="C_002b_002b_002fPython-interfeis"></a>
-<h4 class="subsection">3.8.2 C++/Python интерфейс</h4>
-
-
-<p>MathGL имеет интерфейс на основе классов (объектов с членами-функциями) с использованием библиотеки SWIG. Типичный пример – Python, имя которого использовано в заголовке раздела. В точности те же классы используются и в C++ API. Отмечу, что С++ классы содержат только inline члены-функции, что делает С++ API независимым от компилятора даже для бинарной версии.
-</p>
-<p>Есть 3 основных класса:
-</p><ul>
-<li> <code>mglGraph</code>
-– обеспечивает вывод графики (см. <a href="#MathGL-core">MathGL core</a>).
-</li><li> <code>mglData</code>
-– обеспечивает обработку данных (см. <a href="#Data-processing">Data processing</a>). Класс имеет возможность прямого доступа к данным с помощью конструкции вида: <code>dat[i]=sth;</code> или <code>sth=dat[i]</code>, где используется "плоское" представление данных (т.е., <var>i</var> может быть в диапазоне 0...nx*nx*nz-1). Также можно импортировать массивы NumPy в Python: <code>mgl_dat = mglData(numpy_dat);</code>.
-</li><li> <code>mglParse</code>
-– обеспечивает выполнение скриптов MGL (см. <a href="#MGL-scripts">MGL scripts</a>).
-</li></ul>
-
-
-<p>Для использования в Python достаточно выполнить ‘<samp>import mathgl</samp>’. Простейший пример имеет вид:
-</p><pre class="verbatim">import mathgl
-a=mathgl.mglGraph()
-a.Box()
-a.WritePNG("test.png")
-</pre><p>Также можно импортировать все классы из модуля <code>mathgl</code> и обеспечить более легкий доступ к MathGL:
-</p><pre class="verbatim">from mathgl import *
-a=mglGraph()
-a.Box()
-a.WritePNG("test.png")
-</pre><p>Это становится более полезным если, например, вы создаете много объектов данных <code>mglData</code>.
-</p>
-
-
-
-<hr>
-<a name="MathGL-core"></a>
-<div class="header">
-<p>
-Next: <a href="#Widget-classes" accesskey="n" rel="next">Widget classes</a>, Previous: <a href="#General-concepts" accesskey="p" rel="prev">General concepts</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="YAdro-MathGL"></a>
-<h2 class="chapter">4 Ядро MathGL</h2>
-
-<a name="index-mglGraph"></a>
-
-
-<p>Основным классом MathGL является класс <strong>mglGraph</strong>, определённый в <code>#include <mgl2/mgl.h></code>. Он включает в себя множество функций для построения графиков от 1D, 2D и 3D массивов. Он также содержит функции вывода текста и построения осей координат. Есть возможность построения в произвольной системе координат, которая задается строковыми формулами. Все графические функции используют класс mglData (см. <a href="#Data-processing">Data processing</a>) для хранения массивов данных. Это позволяет легко контролировать размеры, работу с памятью и производить обработку данных. Дополнительная информация о цветах, шрифтах, вычисления формул может быть найдена в <a href="#General-concepts">General concepts</a> и <a href="#Other-classes">Other classes</a>.
-</p>
-<p>Некоторые возможности MathGL доступны только в новых версиях библиотеки. Для проверки текущей версии MathGL можно использовать следующую функцию.
-<a name="version"></a></p><dl>
-<dt><a name="index-version"></a>Команда MGL: <em></em> <strong>version</strong> <em>'ver'</em></dt>
-<dt><a name="index-CheckVersion"></a>Метод класса <code>mglGraph</code>: <em><code>bool</code></em> <strong>CheckVersion</strong> <em>(<code>const char *</code>ver) static</em></dt>
-<dt><a name="index-mgl_005fcheck_005fversion"></a>Функция С: <em><code>int</code></em> <strong>mgl_check_version</strong> <em>(<code>const char *</code>ver)</em></dt>
-<dd><p>Возвращает нулевое значение если версия MathGL подходит для требуемой в <var>ver</var>, т.е. если номер основной версии совпадает и "подверсия" больше или равна указанной в <var>ver</var>.
-</p></dd></dl>
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Constructor" accesskey="1">Constructor</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Graphics-setup" accesskey="2">Graphics setup</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Axis-settings" accesskey="3">Axis settings</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Subplots-and-rotation" accesskey="4">Subplots and rotation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Export-picture" accesskey="5">Export picture</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Background" accesskey="6">Background</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Primitives" accesskey="7">Primitives</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Text-printing" accesskey="8">Text printing</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Axis-and-Colorbar" accesskey="9">Axis and Colorbar</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Legend">Legend</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#g_t1D-plotting">1D plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#g_t2D-plotting">2D plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#g_t3D-plotting">3D plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Dual-plotting">Dual plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Vector-fields">Vector fields</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Other-plotting">Other plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Nonlinear-fitting">Nonlinear fitting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-manipulation">Data manipulation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Constructor"></a>
-<div class="header">
-<p>
-Next: <a href="#Graphics-setup" accesskey="n" rel="next">Graphics setup</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sozdanie-i-udalenie-graficheskogo-obwekta"></a>
-<h3 class="section">4.1 Создание и удаление графического объекта</h3>
-
-
-<dl>
-<dt><a name="index-mglGraph-1"></a>Конструктор класса <code>mglGraph</code>: <em></em> <strong>mglGraph</strong> <em>(<code>int</code> kind=<code>0</code>, <code>int</code> width=<code>600</code>, <code>int</code> height=<code>400</code>)</em></dt>
-<dt><a name="index-mglGraph-2"></a>Конструктор класса <code>mglGraph</code>: <em></em> <strong>mglGraph</strong> <em>(<code>const mglGraph &</code>gr)</em></dt>
-<dt><a name="index-mglGraph-3"></a>Конструктор класса <code>mglGraph</code>: <em></em> <strong>mglGraph</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fgraph"></a>Функция С: <em><code>HMGL</code></em> <strong>mgl_create_graph</strong> <em>(<code>int</code> width, <code>int</code> height)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fgraph_005fgl"></a>Функция С: <em><code>HMGL</code></em> <strong>mgl_create_graph_gl</strong> <em>()</em></dt>
-<dd><p>Создает (или использует созданный) экземпляр класса, производного от <code>mglGraph</code> (тип <code>HMGL</code>) с указанными размерами <var>width</var> и <var>height</var>. Параметр <var>kind</var> может иметь следующие значения: ‘<samp>0</samp>’ – использовать рисование по умолчанию, ‘<samp>1</samp>’ – использовать рисование в OpenGL.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-_007emglGraph"></a>Destructor on <code>mglGraph</code>: <em></em> <strong>~mglGraph</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fdelete_005fgraph"></a>Функция С: <em><code>HMGL</code></em> <strong>mgl_delete_graph</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Удаляет экземпляр класса mglGraph.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Self"></a>Метод класса <code>mglGraph</code>: <em><code>HMGL</code></em> <strong>Self</strong> <em>()</em></dt>
-<dd><p>Возвращает указатель на используемый объект типа <code>HMGL</code>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Graphics-setup"></a>
-<div class="header">
-<p>
-Next: <a href="#Axis-settings" accesskey="n" rel="next">Axis settings</a>, Previous: <a href="#Constructor" accesskey="p" rel="prev">Constructor</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Nastroika-grafika"></a>
-<h3 class="section">4.2 Настройка графика</h3>
-
-<a name="index-Nastroika-MathGL"></a>
-
-<p>Функции и переменные в этой группе влияют на вид всего рисунка. Соответственно они должны располагаться <em>перед</em> вызовом функций непосредственно рисующих графики.
-</p>
-<a name="reset"></a><dl>
-<dt><a name="index-reset"></a>Команда MGL: <em></em> <strong>reset</strong></dt>
-<dt><a name="index-DefaultPlotParam"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>DefaultPlotParam</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fset_005fdef_005fparam"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_def_param</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Устанавливает все настройки по умолчанию и очищает рисунок.
-</p></dd></dl>
-
-<a name="setup"></a><dl>
-<dt><a name="index-setup"></a>Команда MGL: <em></em> <strong>setup</strong> <em><code>val flag</code></em></dt>
-<dt><a name="index-SetFlagAdv"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetFlagAdv</strong> <em>(<code>int</code> val, <code>uint32_t</code> flag)</em></dt>
-<dt><a name="index-mgl_005fset_005fflag"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_flag</strong> <em>(<code>HMGL</code> gr, <code>int</code> val, <code>uint32_t</code> flag)</em></dt>
-<dd><p>Устанавливает значение бинарного флага <var>flag</var> в <var>val</var>. Список флагов можно найти в <a href="https://sourceforge.net/p/mathgl/code/HEAD/tree/mathgl-2x/include/mgl2/define.h#l267">define.h</a>. Текущий список флагов:
-</p><pre class="verbatim">#define MGL_ENABLE_CUT 0x00000004 ///< Определяет способ рисования точек вне диапазона осей координат
-#define MGL_ENABLE_RTEXT 0x00000008 ///< Использовать вращение текста
-#define MGL_AUTO_FACTOR 0x00000010 ///< Разрешить автоматическое масштабирование графика
-#define MGL_ENABLE_ALPHA 0x00000020 ///< Использовать прозрачность
-#define MGL_ENABLE_LIGHT 0x00000040 ///< Использовать освещение
-#define MGL_TICKS_ROTATE 0x00000080 ///< Разрешить вращение меток осей
-#define MGL_TICKS_SKIP 0x00000100 ///< Разрешить пропуск меток осей
-#define MGL_DISABLE_SCALE 0x00000200 ///< Временный флаг, запрещающий изменение размеров
-#define MGL_FINISHED 0x00000400 ///< Флаг готовности окончательной картинки (т.е. mglCanvas::G)
-#define MGL_USE_GMTIME 0x00000800 ///< Использовать gmtime вместо localtime
-#define MGL_SHOW_POS 0x00001000 ///< Включить показ координат щелчка мыши
-#define MGL_CLF_ON_UPD 0x00002000 ///< Очищать график перед Update()
-#define MGL_NOSUBTICKS 0x00004000 ///< Запретить рисование subticks для bounding box
-#define MGL_LOCAL_LIGHT 0x00008000 ///< Сохранять источники освещения в каждом inplot
-#define MGL_VECT_FRAME 0x00010000 ///< Использовать DrwDat для сохранения всех данных в кадрах
-#define MGL_REDUCEACC 0x00020000 ///< Сокращать точность вывода точек (для уменьшения размера выходных файлов)
-#define MGL_PREFERVC 0x00040000 ///< Предпочитать цвета вершин вместо текстур если выходной формат поддерживает
-#define MGL_ONESIDED 0x00080000 ///< Выводить только переднюю сторону поверхностей если выходной формат поддерживает
-#define MGL_NO_ORIGIN 0x00100000 ///< Не рисовать метки в точке пересечения осей
-#define MGL_GRAY_MODE 0x00200000 ///< Преобразовать все цвета в оттенки серого
-#define MGL_FULL_CURV 0x00400000 ///< Запретить пропуск точек на прямолинейных участках
-#define MGL_NO_SCALE_REL 0x00800000 ///< Запретить изменение размера текста в относительных inplots
-</pre></dd></dl>
-
-<dl>
-<dt><a name="index-mgl_005fbsize"></a>Функция С: <em><code>void</code></em> <strong>mgl_bsize</strong> <em>(<code>unsigned</code> bsize)</em></dt>
-<dd><p>Задает размер буфера под примитивы как (1<<bsize)^2. Т.е. как 10^12 для bsize=20 или 4*10^9 для bsize=16 (по умолчанию). ВАЖНО: можно устанавливать только один раз вначале, до построения графиков. Возвращает текущее значение.
-</p></dd></dl>
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Transparency" accesskey="1">Transparency</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Lighting" accesskey="2">Lighting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Fog" accesskey="3">Fog</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Default-sizes" accesskey="4">Default sizes</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Cutting" accesskey="5">Cutting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Font-settings" accesskey="6">Font settings</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Palette-and-colors" accesskey="7">Palette and colors</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Masks" accesskey="8">Masks</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Error-handling" accesskey="9">Error handling</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Stop-drawing">Stop drawing</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Transparency"></a>
-<div class="header">
-<p>
-Next: <a href="#Lighting" accesskey="n" rel="next">Lighting</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Prozrachnostx"></a>
-<h4 class="subsection">4.2.1 Прозрачность</h4>
-
-<a name="index-Alpha"></a>
-<a name="index-SetAlphaDef"></a>
-<a name="index-SetTranspType"></a>
-<a name="index-AlphaDef"></a>
-<a name="index-TranspType"></a>
-
-<p>Эти функции и переменные настраивают тип и степень прозрачности поверхностей. Главной является функция <a href="#alpha">alpha</a>, которая включает/выключает прозрачность для всего графика. Функция <a href="#alphadef">alphadef</a> устанавливает величину alpha-канала по умолчанию. Наконец, функция <a href="#transptype">transptype</a> задает тип прозрачности. См. раздел <a href="#Transparency-and-lighting">Transparency and lighting</a>, для примеров кода и графика.
-</p>
-<a name="alpha"></a><dl>
-<dt><a name="index-alpha-2"></a>Команда MGL: <em></em> <strong>alpha</strong> <em><code>[val=on]</code></em></dt>
-<dt><a name="index-Alpha-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Alpha</strong> <em>(<code>bool</code> enable)</em></dt>
-<dt><a name="index-mgl_005fset_005falpha"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_alpha</strong> <em>(<code>HMGL</code> gr, <code>int</code> enable)</em></dt>
-<dd><p>Включает/выключает прозрачность и возвращает свое предыдущее состояние. По умолчанию прозрачность выключена. Функция включает прозрачность для <em>всего</em> рисунка.
-</p></dd></dl>
-
-<a name="alphadef"></a><dl>
-<dt><a name="index-alphadef-1"></a>Команда MGL: <em></em> <strong>alphadef</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetAlphaDef-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetAlphaDef</strong> <em>(<code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005falpha_005fdefault"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_alpha_default</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> alpha)</em></dt>
-<dd><p>Задает значение прозрачности по умолчанию для всех графиков. Значение по умолчанию 0.5.
-</p></dd></dl>
-
-<a name="transptype"></a><dl>
-<dt><a name="index-transptype"></a>Команда MGL: <em></em> <strong>transptype</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetTranspType-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTranspType</strong> <em>(<code>int</code> type)</em></dt>
-<dt><a name="index-mgl_005fset_005ftransp_005ftype"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_transp_type</strong> <em>(<code>HMGL</code> gr, <code>int</code> type)</em></dt>
-<dd><p>Задает тип прозрачности. Допустимые значения:
-</p><ul>
-<li> Обычная прозрачность (‘<samp>0</samp>’) – "закрытые" объекты видны меньше чем закрывающие. Этот режим некорректно отображается в OpenGL (mglGraphGL) для нескольких перекрывающихся поверхностей.
-</li><li> "Стеклянная" прозрачность (‘<samp>1</samp>’) – закрытые и закрывающие объекты единообразно ослабляют интенсивность света (по RGB каналам).
-</li><li> "Ламповая" прозрачность (‘<samp>2</samp>’) – закрытые и закрывающие объекты являются источниками дополнительного освещения (рекомендую установить <code>SetAlphaDef(0.3)</code> или меньше в этом случае).
-</li></ul>
-<p>См. раздел <a href="#Types-of-transparency">Types of transparency</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-<hr>
-<a name="Lighting"></a>
-<div class="header">
-<p>
-Next: <a href="#Fog" accesskey="n" rel="next">Fog</a>, Previous: <a href="#Transparency" accesskey="p" rel="prev">Transparency</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Osveshchenie"></a>
-<h4 class="subsection">4.2.2 Освещение</h4>
-
-<a name="index-SetAmbient"></a>
-<a name="index-AddLight"></a>
-<a name="index-Light"></a>
-<a name="index-Ambient"></a>
-
-<p>Эти функции настраивают освещение графика. Главная функция <a href="#light">light</a> включает/выключает освещение графиков построенных после ее вызова (в OpenGL работает сразу для всего рисунка). MathGL поддерживает до 10 независимых источников света. Но в режиме OpenGL можно использовать только первые 8 из них. Положение, цвет, яркость каждого источника света можно задавать по отдельности. По умолчанию включен только первый (с порядковым номером <code>0</code>) источник света белого цвета, расположенный сверху. См. раздел <a href="#Lighting-sample">Lighting sample</a>, для примеров кода и графика.
-</p>
-<a name="light"></a><dl>
-<dt><a name="index-light"></a>Команда MGL: <em></em> <strong>light</strong> <em><code>[val=on]</code></em></dt>
-<dt><a name="index-Light-1"></a>Метод класса <code>mglGraph</code>: <em><code>bool</code></em> <strong>Light</strong> <em>(<code>bool</code> enable)</em></dt>
-<dt><a name="index-mgl_005fset_005flight"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_light</strong> <em>(<code>HMGL</code> gr, <code>int</code> enable)</em></dt>
-<dd><p>Включает/выключает освещение графика и возвращает предыдущее состояние. По умолчанию освещение выключено.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-light-1"></a>Команда MGL: <em></em> <strong>light</strong> <em><code>num</code> <code>val</code></em></dt>
-<dt><a name="index-Light-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Light</strong> <em>(<code>int</code> n, <code>bool</code> enable)</em></dt>
-<dt><a name="index-mgl_005fset_005flight_005fn"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_light_n</strong> <em>(<code>HMGL</code> gr, <code>int</code> n, <code>int</code> enable)</em></dt>
-<dd><p>Включает/выключает <var>n</var>-ый источник света.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-light-2"></a>Команда MGL: <em></em> <strong>light</strong> <em><code>num xdir ydir zdir</code> ['col'='w' <code>br=0.5 ap=0</code>]</em></dt>
-<dt><a name="index-light-3"></a>Команда MGL: <em></em> <strong>light</strong> <em><code>num xdir ydir zdir xpos ypos zpos</code> ['col'='w' <code>br=0.5</code>]</em></dt>
-<dt><a name="index-AddLight-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>AddLight</strong> <em>(<code>int</code> n, <code>mglPoint</code> d, <code>char</code> c=<code>'w'</code>, <code>mreal</code> bright=<code>0.5</code>, <code>mreal</code> ap=<code>0</code>)</em></dt>
-<dt><a name="index-AddLight-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>AddLight</strong> <em>(<code>int</code> n, <code>mglPoint</code> r, <code>mglPoint</code> d, <code>char</code> c=<code>'w'</code>, <code>mreal</code> bright=<code>0.5</code>, <code>mreal</code> ap=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fadd_005flight"></a>Функция С: <em><code>void</code></em> <strong>mgl_add_light</strong> <em>(<code>HMGL</code> gr, <code>int</code> n, <code>mreal</code> dx, <code>mreal</code> dy, <code>mreal</code> dz)</em></dt>
-<dt><a name="index-mgl_005fadd_005flight_005fext"></a>Функция С: <em><code>void</code></em> <strong>mgl_add_light_ext</strong> <em>(<code>HMGL</code> gr, <code>int</code> n, <code>mreal</code> dx, <code>mreal</code> dy, <code>mreal</code> dz, <code>char</code> c, <code>mreal</code> bright, <code>mreal</code> ap)</em></dt>
-<dt><a name="index-mgl_005fadd_005flight_005floc"></a>Функция С: <em><code>void</code></em> <strong>mgl_add_light_loc</strong> <em>(<code>HMGL</code> gr, <code>int</code> n, <code>mreal</code> rx, <code>mreal</code> ry, <code>mreal</code> rz, <code>mreal</code> dx, <code>mreal</code> dy, <code>mreal</code> dz, <code>char</code> c, <code>mreal</code> bright, <code>mreal</code> ap)</em></dt>
-<dd><p>Добавляет источник света с номером <var>n</var> в положение <var>p</var> с цветом <var>c</var> и яркостью <var>bright</var>, которая должна быть в диапазоне [0,1]. Если указано положение источника <var>r</var> и оно не NAN, то источник считается локальным, иначе источник полагается бесконечно удалённым (для более быстрого рисования).
-</p></dd></dl>
-
-<a name="diffuse"></a><dl>
-<dt><a name="index-diffuse"></a>Команда MGL: <em></em> <strong>diffuse</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetDifLight"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetDifLight</strong> <em>(<code>mreal</code> bright)</em></dt>
-<dt><a name="index-mgl_005fset_005fdifbr"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_difbr</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> bright)</em></dt>
-<dd><p>Задает яркость диффузного освещения (только для локальных источников света).
-</p></dd></dl>
-
-<a name="ambient"></a><dl>
-<dt><a name="index-ambient"></a>Команда MGL: <em></em> <strong>ambient</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetAmbient-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetAmbient</strong> <em>(<code>mreal</code> bright=<code>0.5</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005fambbr"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_ambbr</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> bright)</em></dt>
-<dd><p>Задает яркость рассеянного освещения. Значение должно быть в диапазоне [0,1].
-</p></dd></dl>
-
-<a name="attachlight"></a><dl>
-<dt><a name="index-attachlight"></a>Команда MGL: <em></em> <strong>attachlight</strong> <em><code>val</code></em></dt>
-<dt><a name="index-AttachLight"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>AttachLight</strong> <em>(<code>bool</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005fattach_005flight"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_attach_light</strong> <em>(<code>HMGL</code> gr, <code>int</code> val)</em></dt>
-<dd><p>Задает привязку настроек освещения к <a href="#inplot">inplot</a>/<a href="#subplot">subplot</a>. Отмечу, что OpenGL и некоторые выходные форматы не поддерживают эту возможность.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Fog"></a>
-<div class="header">
-<p>
-Next: <a href="#Default-sizes" accesskey="n" rel="next">Default sizes</a>, Previous: <a href="#Lighting" accesskey="p" rel="prev">Lighting</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Tuman"></a>
-<h4 class="subsection">4.2.3 Туман</h4>
-
-<a name="index-Fog"></a>
-
-<a name="fog"></a><dl>
-<dt><a name="index-fog"></a>Команда MGL: <em></em> <strong>fog</strong> <em><code>val [dz=0.25]</code></em></dt>
-<dt><a name="index-Fog-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Fog</strong> <em>(<code>mreal</code> d, <code>mreal</code> dz=<code>0.25</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005ffog"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_fog</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> d, <code>mreal</code> dz)</em></dt>
-<dd><p>Имитирует туман на графике. Туман начинается на относительном расстоянии <var>dz</var> от точки обзора и его плотность растет экспоненциально вглубь по закону ~ 1-exp(-<em>d*z</em>). Здесь <em>z</em> – нормализованная на 1 глубина графика. Если <var>d</var>=<code>0</code> то туман отсутствует. См. раздел <a href="#Adding-fog">Adding fog</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-<hr>
-<a name="Default-sizes"></a>
-<div class="header">
-<p>
-Next: <a href="#Cutting" accesskey="n" rel="next">Cutting</a>, Previous: <a href="#Fog" accesskey="p" rel="prev">Fog</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Bazovye-razmery"></a>
-<h4 class="subsection">4.2.4 Базовые размеры</h4>
-
-<a name="index-SetBarWidth"></a>
-<a name="index-SetMarkSize"></a>
-<a name="index-SetArrowSize"></a>
-<a name="index-SetMeshNum"></a>
-<a name="index-SetPlotId"></a>
-<a name="index-BarWidth"></a>
-<a name="index-MarkSize"></a>
-<a name="index-ArrowSize"></a>
-<a name="index-MeshNum"></a>
-
-<p>Эти функции задают величины большинства параметров графика, включая размеры маркеров, стрелок, толщину линий и т.д. Как и любые другие настройки, они подействуют только на графики созданные после изменения настроек.
-</p>
-<a name="barwidth"></a><dl>
-<dt><a name="index-barwidth"></a>Команда MGL: <em></em> <strong>barwidth</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetBarWidth-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetBarWidth</strong> <em>( <code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005fbar_005fwidth"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_bar_width</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val)</em></dt>
-<dd><p>Задает относительный размер прямоугольников в <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#boxplot">boxplot</a>, <a href="#candle">candle</a>. Значение по умолчанию <code>0.7</code>.
-</p></dd></dl>
-
-<a name="marksize"></a><dl>
-<dt><a name="index-marksize"></a>Команда MGL: <em></em> <strong>marksize</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetMarkSize-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetMarkSize</strong> <em>(<code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005fmark_005fsize"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_mark_size</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val)</em></dt>
-<dd><p>Задает размер маркеров для <a href="#g_t1D-plotting">1D plotting</a>. Значение по умолчанию <code>1</code>.
-</p></dd></dl>
-
-<a name="arrowsize"></a><dl>
-<dt><a name="index-arrowsize"></a>Команда MGL: <em></em> <strong>arrowsize</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetArrowSize-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetArrowSize</strong> <em>(<code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005farrow_005fsize"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_arrow_size</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val)</em></dt>
-<dd><p>Задает размер стрелок для <a href="#g_t1D-plotting">1D plotting</a>, линий и кривых (см. <a href="#Primitives">Primitives</a>). Значение по умолчанию <code>1</code>.
-</p></dd></dl>
-
-<a name="meshnum"></a><a name="MeshNum"></a><dl>
-<dt><a name="index-meshnum-2"></a>Команда MGL: <em></em> <strong>meshnum</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetMeshNum-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetMeshNum</strong> <em>(<code>int</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005fmeshnum"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_meshnum</strong> <em>(<code>HMGL</code> gr, <code>int</code> num)</em></dt>
-<dd><p>Задает ориентировочное число линий в <a href="#mesh">mesh</a>, <a href="#fall">fall</a>, и число стрелок (штрихов) в <a href="#vect">vect</a>, <a href="#dew">dew</a>, и число ячеек в <a href="#cloud">cloud</a>, и число маркеров в <a href="#plot">plot</a>, <a href="#tens">tens</a>, <a href="#step">step</a>, <a href="#mark">mark</a>, <a href="#textmark">textmark</a>. По умолчанию (=0) рисуются все линии, стрелки, ячейки и т.д.
-</p></dd></dl>
-
-<a name="facenum"></a><dl>
-<dt><a name="index-facenum"></a>Команда MGL: <em></em> <strong>facenum</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetFaceNum"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetFaceNum</strong> <em>(<code>int</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005ffacenum"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_facenum</strong> <em>(<code>HMGL</code> gr, <code>int</code> num)</em></dt>
-<dd><p>Задает ориентировочное число видимых граней. Может быть использована для ускорения рисования за счет более грубого рисунка. По умолчанию (=0) рисуются все грани.
-</p></dd></dl>
-
-<a name="plotid"></a><dl>
-<dt><a name="index-plotid"></a>Команда MGL: <em></em> <strong>plotid</strong> <em>'id'</em></dt>
-<dt><a name="index-SetPlotId-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetPlotId</strong> <em>(<code>const char *</code>id)</em></dt>
-<dt><a name="index-mgl_005fset_005fplotid"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_plotid</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>id)</em></dt>
-<dd><p>Задает имя графика для сохранения в файл (например, в окне FLTK).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetPlotId"></a>Метод класса <code>mglGraph</code>: <em><code>const char *</code></em> <strong>GetPlotId</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fget_005fplotid"></a>Функция С: <em><code>const char *</code></em> <strong>mgl_get_plotid</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dt><a name="index-mgl_005fget_005fplotid-1"></a>Fortran процедура: <em><code></code></em> <strong>mgl_get_plotid</strong> <em>(<code>long</code> gr, <code>char *</code>out, <code>int</code> len)</em></dt>
-<dd><p>Возвращает имя графика для сохранения в файл (например, в окне FLTK).
-</p></dd></dl>
-
-<a name="pendelta"></a><dl>
-<dt><a name="index-pendelta"></a>Команда MGL: <em></em> <strong>pendelta</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetPenDelta"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetPenDelta</strong> <em>(<code>double</code> val)</em></dt>
-<dt><a name="index-mgl_005fpen_005fdelta"></a>Функция С: <em><code>void</code></em> <strong>mgl_pen_delta</strong> <em>(<code>HMGL</code> gr, <code>double</code> val)</em></dt>
-<dd><p>Изменяет размытие около линий и текста (по умолчанию 1). Для <var>val</var>>1 текст и линии более резкие. Для <var>val</var><1 текст и линии более размытые.
-</p></dd></dl>
-
-
-<hr>
-<a name="Cutting"></a>
-<div class="header">
-<p>
-Next: <a href="#Font-settings" accesskey="n" rel="next">Font settings</a>, Previous: <a href="#Default-sizes" accesskey="p" rel="prev">Default sizes</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Obrezanie"></a>
-<h4 class="subsection">4.2.5 Обрезание</h4>
-
-<a name="index-SetCut"></a>
-<a name="index-SetCutBox"></a>
-<a name="index-CutOff"></a>
-<a name="index-Cut"></a>
-
-<p>Эти функции задают условия когда точка будет исключена (вырезана) из рисования. Замечу, что все точки со значением(-ями) NAN по одной из координат или амплитуде автоматически исключаются из рисования. См. раздел <a href="#Cutting-sample">Cutting sample</a>, для примеров кода и графика.
-</p>
-<a name="cut"></a><dl>
-<dt><a name="index-cut-2"></a>Команда MGL: <em></em> <strong>cut</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetCut-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetCut</strong> <em>(<code>bool</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005fcut"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_cut</strong> <em>(<code>HMGL</code> gr, <code>int</code> val)</em></dt>
-<dd><p>Задает обрезание точек за пределами осей координат. Если <code>true</code> то такие точки исключаются из рисования (это по умолчанию) иначе они проецируются на ограничивающий прямоугольник.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-cut-3"></a>Команда MGL: <em></em> <strong>cut</strong> <em><code>x1 y1 z1 x2 y2 z2</code></em></dt>
-<dt><a name="index-SetCutBox-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetCutBox</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> p1)</em></dt>
-<dt><a name="index-mgl_005fset_005fcut_005fbox"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_cut_box</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> z1, <code>mreal</code> x2, <code>mreal</code> y2, <code>mreal</code> z2)</em></dt>
-<dd><p>Задает границы параллелепипеда внутри которого точки не рисуются. Если границы одинаковы (переменные равны), то параллелепипеда считается пустым.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-cut-4"></a>Команда MGL: <em></em> <strong>cut</strong> <em>'cond'</em></dt>
-<dt><a name="index-CutOff-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>CutOff</strong> <em>(<code>const char *</code>cond)</em></dt>
-<dt><a name="index-mgl_005fset_005fcutoff"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_cutoff</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>cond)</em></dt>
-<dd><p>Задает условие обрезания по формуле <var>cond</var>. Это условие исключает точки из рисования если результат вычисления формулы не равен нулю. Установите аргумент <code>""</code> для выключения условия обрезания.
-</p></dd></dl>
-
-
-<hr>
-<a name="Font-settings"></a>
-<div class="header">
-<p>
-Next: <a href="#Palette-and-colors" accesskey="n" rel="next">Palette and colors</a>, Previous: <a href="#Cutting" accesskey="p" rel="prev">Cutting</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Shrifty"></a>
-<h4 class="subsection">4.2.6 Шрифты</h4>
-
-<a name="index-SetFontSize"></a>
-<a name="index-SetFontDef"></a>
-<a name="index-SetRotatedText"></a>
-<a name="index-SetFontSizePT"></a>
-<a name="index-SetFontSizeCM"></a>
-<a name="index-SetFontSizeIN"></a>
-<a name="index-LoadFont"></a>
-<a name="index-CopyFont"></a>
-<a name="index-RestoreFont"></a>
-<a name="index-Font"></a>
-<a name="index-RotateText"></a>
-
-<a name="font"></a><dl>
-<dt><a name="index-font"></a>Команда MGL: <em></em> <strong>font</strong> <em>'fnt' [<code>val=6</code>]</em></dt>
-<dd><p>Задает стиль и размер шрифта. Вначале используется ‘<samp>:rC</samp>’ – прямой шрифт с выравниванием по центру. По умолчанию размер подписей оси координат в 1.4 раза больше. См. также см. <a href="#Font-styles">Font styles</a>.
-</p></dd></dl>
-
-<a name="rotatetext"></a><dl>
-<dt><a name="index-rotatetext"></a>Команда MGL: <em></em> <strong>rotatetext</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetRotatedText-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetRotatedText</strong> <em>(<code>bool</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005frotated_005ftext"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_rotated_text</strong> <em>(<code>HMGL</code> gr, <code>int</code> val)</em></dt>
-<dd><p>Включает/выключает вращение меток и подписей осей координат вдоль оси.
-</p></dd></dl>
-
-<a name="scaletext"></a><dl>
-<dt><a name="index-scaletext"></a>Команда MGL: <em></em> <strong>scaletext</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetScaleText"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetScaleText</strong> <em>(<code>bool</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005fscale_005ftext"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_scale_text</strong> <em>(<code>HMGL</code> gr, <code>int</code> val)</em></dt>
-<dd><p>Включает/выключает масштабирование текста в относительных <a href="#inplot">inplot</a>-ах (в том числе <a href="#columnplot">columnplot</a>, <a href="#gridplot">gridplot</a>, <a href="#stickplot">stickplot</a>, <a href="#shearplot">shearplot</a>).
-</p></dd></dl>
-
-<a name="loadfont"></a><dl>
-<dt><a name="index-loadfont"></a>Команда MGL: <em></em> <strong>loadfont</strong> <em>['name'='']</em></dt>
-<dt><a name="index-LoadFont-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>LoadFont</strong> <em>(<code>const char *</code>name, <code>const char *</code>path=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fload_005ffont"></a>Функция С: <em><code>void</code></em> <strong>mgl_load_font</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>name, <code>const char *</code>path)</em></dt>
-<dd><p>Загружает начертание шрифта из файла <var>path</var>/<var>name</var>. Пустая строка загрузит шрифт по умолчанию.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetFontDef-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetFontDef</strong> <em>(<code>const char *</code>fnt)</em></dt>
-<dt><a name="index-mgl_005fset_005ffont_005fdef"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_font_def</strong> <em>(<code>HMGL</code> gr, <code>const char *</code> val)</em></dt>
-<dd><p>Задает стиль шрифта (см. <a href="#Text-printing">Text printing</a>). По умолчанию используется ‘<samp>rC</samp>’ – прямой шрифт с выравниванием по центру.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetFontSize-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetFontSize</strong> <em>(<code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005ffont_005fsize"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_font_size</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val)</em></dt>
-<dd><p>Задает базовый размер шрифта. По умолчанию размер подписей оси координат в 1.4 раза больше.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetFontSizePT-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetFontSizePT</strong> <em>(<code>mreal</code> cm, <code>int</code> dpi=<code>72</code>)</em></dt>
-<dd><p>Задает размер шрифта в пунктах для заданного DPI (по умолчанию 16 pt для dpi=72).
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetFontSizeCM-1"></a>Метод класса <code>mglGraph</code>: <em><code>inline void</code></em> <strong>SetFontSizeCM</strong> <em>(<code>mreal</code> cm, <code>int</code> dpi=<code>72</code>)</em></dt>
-<dd><p>Задает размер шрифта в сантиметрах для заданного DPI (по умолчанию 0.56 см = 16 pt).
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetFontSizeIN-1"></a>Метод класса <code>mglGraph</code>: <em><code>inline void</code></em> <strong>SetFontSizeIN</strong> <em>(<code>mreal</code> cm, <code>int</code> dpi=<code>72</code>)</em></dt>
-<dd><p>Задает размер шрифта в дюймах для заданного DPI (по умолчанию 0.22 in = 16 pt).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-CopyFont-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>CopyFont</strong> <em>(<code>mglGraph *</code> from)</em></dt>
-<dt><a name="index-mgl_005fcopy_005ffont"></a>Функция С: <em><code>void</code></em> <strong>mgl_copy_font</strong> <em>(<code>HMGL</code> gr, <code>HMGL</code> gr_from)</em></dt>
-<dd><p>Копирует начертание шрифта из другого объекта <code>mglGraph</code>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-RestoreFont-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>RestoreFont</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005frestore_005ffont"></a>Функция С: <em><code>void</code></em> <strong>mgl_restore_font</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Восстанавливает начертание шрифта по умолчанию.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetDefFont"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetDefFont</strong> <em>(<code>const char *</code>name, <code>const char *</code>path=<code>""</code>) static</em></dt>
-<dt><a name="index-mgl_005fdef_005ffont"></a>Функция С: <em><code>void</code></em> <strong>mgl_def_font</strong> <em>(<code>const char *</code>name, <code>const char *</code>path)</em></dt>
-<dd><p>Загружает начертание шрифта по умолчанию (для всех вновь создаваемых HMGL/mglGraph объектов) из файла <var>path</var>/<var>name</var>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Palette-and-colors"></a>
-<div class="header">
-<p>
-Next: <a href="#Masks" accesskey="n" rel="next">Masks</a>, Previous: <a href="#Font-settings" accesskey="p" rel="prev">Font settings</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Palitra-i-cveta"></a>
-<h4 class="subsection">4.2.7 Палитра и цвета</h4>
-
-<a name="index-SetPalette"></a>
-<a name="index-Palette"></a>
-
-<a name="palette"></a><dl>
-<dt><a name="index-palette"></a>Команда MGL: <em></em> <strong>palette</strong> <em>'colors'</em></dt>
-<dt><a name="index-SetPalette-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetPalette</strong> <em>(<code>const char *</code>colors)</em></dt>
-<dt><a name="index-mgl_005fset_005fpalette"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_palette</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>colors)</em></dt>
-<dd><p>Задает палитру как последовательность цветов. Значение по умолчанию <code>"Hbgrcmyhlnqeup"</code>, что соответствует цветам: темно серый ‘<samp>H</samp>’, синий ‘<samp>b</samp>’, зелёный ‘<samp>g</samp>’, красный ‘<samp>r</samp>’, голубой ‘<samp>c</samp>’, малиновый ‘<samp>m</samp>’, жёлтый ‘<samp>y</samp>’, серый ‘<samp>h</samp>’, сине-зелёный ‘<samp>l</samp>’, небесно-голубой ‘<samp>n</samp>’, оранжевый ‘<samp>q</samp>’, желто-зелёный ‘<samp>e</samp>’, сине-фиолетовый ‘<samp>u</samp>’, фиолетовый ‘<samp>p</samp>’. Палитра в основном используется в 1D графиках (см. <a href="#g_t1D-plotting">1D plotting</a>) для кривых с неопределённым стилем линии. Внутренний счетчик цвета будет сброшен при любом изменении палитры, включая скрытые (например, функциями <a href="#box">box</a> или <a href="#axis">axis</a>).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetDefScheme"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetDefScheme</strong> <em>(<code>const char *</code>sch)</em></dt>
-<dt><a name="index-mgl_005fset_005fdef_005fsch"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_def_sch</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>sch)</em></dt>
-<dd><p>Устанавливает <var>sch</var> в качестве цветовой схемы по умолчанию. Начальное значение <code>"BbcyrR"</code>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetColor"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetColor</strong> <em>(<code>char</code> id, <code>mreal</code> r, <code>mreal</code> g, <code>mreal</code> b) static</em></dt>
-<dt><a name="index-mgl_005fset_005fcolor"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_color</strong> <em>(<code>char</code> id, <code>mreal</code> r, <code>mreal</code> g, <code>mreal</code> b)</em></dt>
-<dd><p>Задает RGB значения для цвета с заданным <var>id</var>. Изменения действуют глобально для всех последующих использований данного <var>id</var>.
-</p></dd></dl>
-
-<a name="gray"></a><dl>
-<dt><a name="index-gray"></a>Команда MGL: <em></em> <strong>gray</strong> <em>[<code>val=on</code>]</em></dt>
-<dt><a name="index-Gray"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Gray</strong> <em>(<code>bool</code> enable)</em></dt>
-<dt><a name="index-mgl_005fset_005fgray"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_gray</strong> <em>(<code>HMGL</code> gr, <code>int</code> enable)</em></dt>
-<dd><p>Включает/выключает вывод графика в оттенках серого.
-</p></dd></dl>
-
-
-<hr>
-<a name="Masks"></a>
-<div class="header">
-<p>
-Next: <a href="#Error-handling" accesskey="n" rel="next">Error handling</a>, Previous: <a href="#Palette-and-colors" accesskey="p" rel="prev">Palette and colors</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Maski"></a>
-<h4 class="subsection">4.2.8 Маски</h4>
-
-<a name="index-SetMask"></a>
-<a name="index-SetMaskAngle"></a>
-
-<a name="mask"></a><dl>
-<dt><a name="index-mask"></a>Команда MGL: <em></em> <strong>mask</strong> <em>'id' 'hex' [angle]</em></dt>
-<dt><a name="index-mask-1"></a>Команда MGL: <em></em> <strong>mask</strong> <em>'id' hex [angle]</em></dt>
-<dt><a name="index-SetMask-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetMask</strong> <em>(<code>char</code> id, <code>const char *</code>hex)</em></dt>
-<dt><a name="index-SetMask-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetMask</strong> <em>(<code>char</code> id, <code>uint64_t</code> hex)</em></dt>
-<dt><a name="index-mgl_005fset_005fmask"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_mask</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>hex)</em></dt>
-<dt><a name="index-mgl_005fset_005fmask_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_mask_val</strong> <em>(<code>HMGL</code> gr, <code>uint64_t</code> hex)</em></dt>
-<dd><p>Задает новую матрицу <var>hex</var> размером 8*8 для маски с заданным <var>id</var>. Изменения действуют глобально для всех последующих использований данного <var>id</var>. Значения по умолчанию (см. <a href="#Color-scheme">Color scheme</a>): ‘<samp>-</samp>’ – 000000FF00000000, ‘<samp>+</samp>’ – 080808FF08080808, ‘<samp>=</samp>’ – 0000FF00FF000000, ‘<samp>;</samp>’ – 0000007700000000, ‘<samp>o</samp>’ – 0000182424180000, ‘<samp>O</samp>’ – 0000183C3C180000, ‘<samp>s</samp>’ – 00003C24243C0000, ‘<samp>S</samp>’ – 00003C3C3C3C0000, ‘<samp>~</samp>’ – 0000060990600000, ‘<samp><</samp>’ – 0060584658600000, ‘<samp>></samp>’ – 00061A621A060000, ‘<samp>j</samp>’ – 0000005F00000000, ‘<samp>d</samp>’ – 0008142214080000, ‘<samp>D</samp>’ – 00081C3E1C080000, ‘<samp>*</samp>’ – 8142241818244281, ‘<samp>^</samp>’ – 0000001824420000. Параметр <var>angle</var> позволяет сразу задать и угол поворота маски. ВАЖНО: при экспорте в EPS угол поворота будет приведен к ближайшему кратному 45 градусам.
-</p>
-<p>Задает новую матрицу <var>hex</var> размером 8*8 для маски с заданным <var>id</var>. Изменения действуют глобально для всех последующих использований данного <var>id</var>. Значения по умолчанию (см. <a href="#Color-scheme">Color scheme</a>): ‘<samp>-</samp>’ – линии (<code>0x000000FF00000000</code>), ‘<samp>+</samp>’ – клетки (<code>080808FF08080808</code>), ‘<samp>=</samp>’ – двойные линии (<code>0000FF00FF000000</code>), ‘<samp>;</samp>’ – пунктир (<code>0x0000000F00000000</code>), ‘<samp>o</samp>’ – окружкости (<code>0000182424180000</code>), ‘<samp>O</samp>’ – круги (<code>0000183C3C180000</code>), ‘<samp>s</samp>’ – квадраты (<code>00003C24243C0000</code>), ‘<samp>S</samp>’ – закрашенные квадраты (<code>00003C3C3C3C0000</code>), ‘<samp>~</samp>’ – волны (<code>0000060990600000</code>), ‘<samp><</samp>’ – треугольники влево (<code>0060584658600000</code>), ‘<samp>></samp>’ – треугольники вправо (<code>00061A621A060000</code>), ‘<samp>j</samp>’ пунктир с точками (<code>0000002700000000</code>), ‘<samp>d</samp>’ плюсы (<code>0x0008083E08080000</code>), ‘<samp>D</samp>’ – стежки (<code>0x0139010010931000</code>), ‘<samp>*</samp>’ – точки (<code>0x0000001818000000</code>), ‘<samp>^</samp>’ – кирпичи (<code>0x101010FF010101FF</code>). Параметр <var>angle</var> позволяет сразу задать и угол поворота маски. ВАЖНО: при экспорте в EPS угол поворота будет приведен к ближайшему кратному 45 градусам.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mask-2"></a>Команда MGL: <em></em> <strong>mask</strong> <em>angle</em></dt>
-<dt><a name="index-SetMaskAngle-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetMaskAngle</strong> <em>(<code>int</code> angle)</em></dt>
-<dt><a name="index-mgl_005fset_005fmask_005fangle"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_mask_angle</strong> <em>(<code>HMGL</code> gr, <code>int</code> angle)</em></dt>
-<dd><p>Задает угол поворота маски в градусах. Отмечу, что символы ‘<samp>\</samp>’, ‘<samp>/</samp>’, ‘<samp>I</samp>’ в цветовой схеме задают угол поворота в 45, -45 и 90 градусов соответственно. ВАЖНО: при экспорте в EPS угол поворота будет приведен к ближайшему кратному 45 градусам.
-</p></dd></dl>
-
-
-<hr>
-<a name="Error-handling"></a>
-<div class="header">
-<p>
-Next: <a href="#Stop-drawing" accesskey="n" rel="next">Stop drawing</a>, Previous: <a href="#Masks" accesskey="p" rel="prev">Masks</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Obrabotka-oshibok"></a>
-<h4 class="subsection">4.2.9 Обработка ошибок</h4>
-
-<a name="index-Message"></a>
-<a name="index-SetWarn"></a>
-<a name="index-GetWarn"></a>
-
-<p>Обычно вы должны сбросить признак ошибки с помощью <code>SetWarn(0);</code> перед построением и проверить <code>GetWarnCode()</code> или <code>Message()</code> на наличие ошибок после построения. Только последнее предупреждение сохраняется. Замечу, что все предупреждения/ошибки в MathGL не являются критичными – в худшем из вариантов соответствующий график просто не будет построен. По умолчанию, все предупреждения выводятся в <code>stderr</code>. Этот вывод можно выключить вызовом <code>mgl_suppress_warn(true);</code>.
-</p>
-<dl>
-<dt><a name="index-SetWarn-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetWarn</strong> <em>(<code>int</code> code, <code>const char *</code>info=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005fwarn"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_warn</strong> <em>(<code>HMGL</code> gr, <code>int</code> code, <code>const char *</code>info)</em></dt>
-<dd><p>Задает код предупреждения. Обычно вызывается только для очистки предупреждений (<code>SetWarn(0);</code>) или внутри библиотеки. Текст <var>info</var> будет добавлен к предупреждениям как есть при <var>code</var><0.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-_0028_0029"></a>Метод класса <code>mglGraph</code>: <em><code>const char *</code>Message</em> <strong>()</strong></dt>
-<dt><a name="index-_0028HMGL"></a>Функция С: <em><code>const char *</code>mgl_get_mess</em> <strong>(<code>HMGL</code></strong> <em>gr)</em></dt>
-<dt><a name="index-mgl_005fget_005fmess"></a>Fortran процедура: <em><code></code></em> <strong>mgl_get_mess</strong> <em>(<code>long</code> gr, <code>char *</code>out, <code>int</code> len)</em></dt>
-<dd><p>Возвращает текст предупреждений о причине отсутствия графика. Если возвращаемая строка пустая, то сообщений нет.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetWarn-1"></a>Метод класса <code>mglGraph</code>: <em><code>int</code></em> <strong>GetWarn</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fget_005fwarn"></a>Функция С: <em><code>int</code></em> <strong>mgl_get_warn</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Возвращает код сообщения о причине отсутствия графика. Возможные значения:
-</p><dl compact="compact">
-<dt><code>mglWarnNone=0</code></dt>
-<dd><p>Предупреждений нет
-</p></dd>
-<dt><code>mglWarnDim</code></dt>
-<dd><p>Неправильные или несовместимые размеры данных
-</p></dd>
-<dt><code>mglWarnLow</code></dt>
-<dd><p>Размеры данных слишком малы
-</p></dd>
-<dt><code>mglWarnNeg</code></dt>
-<dd><p>Минимальное значение отрицательно
-</p></dd>
-<dt><code>mglWarnFile</code></dt>
-<dd><p>Файл не найден или указаны неправильные размерности
-</p></dd>
-<dt><code>mglWarnMem</code></dt>
-<dd><p>Не достаточно памяти
-</p></dd>
-<dt><code>mglWarnZero</code></dt>
-<dd><p>Значение данных равно нулю
-</p></dd>
-<dt><code>mglWarnLeg</code></dt>
-<dd><p>Нет записей в легенде
-</p></dd>
-<dt><code>mglWarnSlc</code></dt>
-<dd><p>Индекс среза вне данных
-</p></dd>
-<dt><code>mglWarnCnt</code></dt>
-<dd><p>Число линий уровня меньше или равно нулю
-</p></dd>
-<dt><code>mglWarnOpen</code></dt>
-<dd><p>Не могу открыть файл
-</p></dd>
-<dt><code>mglWarnLId</code></dt>
-<dd><p>Light: ID вне допустимых значений
-</p></dd>
-<dt><code>mglWarnSize</code></dt>
-<dd><p>Setsize: размер(ы) равны нулю или отрицательны
-</p></dd>
-<dt><code>mglWarnFmt</code></dt>
-<dd><p>Формат не поддерживается
-</p></dd>
-<dt><code>mglWarnTern</code></dt>
-<dd><p>Диапазоны осей несовместимые
-</p></dd>
-<dt><code>mglWarnNull</code></dt>
-<dd><p>Указатель равен NULL
-</p></dd>
-<dt><code>mglWarnSpc</code></dt>
-<dd><p>Не хватает места для графика
-</p></dd>
-<dt><code>mglScrArg</code></dt>
-<dd><p>Неправильные аргументы команды скрипта MGL
-</p></dd>
-<dt><code>mglScrCmd</code></dt>
-<dd><p>Неправильная команда в скрипте MGL
-</p></dd>
-<dt><code>mglScrLong</code></dt>
-<dd><p>Слишком длинная строка в скрипте MGL
-</p></dd>
-<dt><code>mglScrStr</code></dt>
-<dd><p>Одиночная ’ в скрипте MGL
-</p></dd>
-<dt><code>mglScrTemp</code></dt>
-<dd><p>Изменяется временная переменная в MGL скрипте
-</p></dd>
-</dl>
-</dd></dl>
-
-<dl>
-<dt><a name="index-SuppressWarn"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SuppressWarn</strong> <em>(<code>bool</code> state) static</em></dt>
-<dt><a name="index-mgl_005fsuppress_005fwarn"></a>Функция С: <em><code>void</code></em> <strong>mgl_suppress_warn</strong> <em>(<code>int</code> state)</em></dt>
-<dd><p>Выключает вывод предупреждений в <code>stderr</code> если <var>state</var> не ноль.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetGlobalWarn"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetGlobalWarn</strong> <em>(<code>const char *</code>info) static</em></dt>
-<dt><a name="index-mgl_005fset_005fglobal_005fwarn"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_global_warn</strong> <em>(<code>const char *</code>info)</em></dt>
-<dd><p>Задает предупреждение <var>info</var>, не привязанное к конкретному объекту рисования.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GlobalWarn"></a>Метод класса <code>mglGraph</code>: <em><code>const char *</code></em> <strong>GlobalWarn</strong> <em>() static</em></dt>
-<dt><a name="index-mgl_005fget_005fglobal_005fwarn"></a>Функция С: <em><code>const char *</code></em> <strong>mgl_get_global_warn</strong> <em>()</em></dt>
-<dd><p>Возвращает предупреждения, не привязанные к конкретному объекту рисования.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Stop-drawing"></a>
-<div class="header">
-<p>
-Previous: <a href="#Error-handling" accesskey="p" rel="prev">Error handling</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Ostanovka-risovaniya"></a>
-<h4 class="subsection">4.2.10 Остановка рисования</h4>
-
-<a name="index-Stop"></a>
-<a name="index-NeedStop"></a>
-<a name="index-SetEventFunc"></a>
-
-<dl>
-<dt><a name="index-Stop-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Stop</strong> <em>(<code>bool</code> stop=<code>true</code>)</em></dt>
-<dt><a name="index-mgl_005fask_005fstop"></a>Функция С only: <em><code>void</code></em> <strong>mgl_ask_stop</strong> <em>(<code>HMGL</code> gr, <code>int</code> stop)</em></dt>
-<dd><p>Просит остановить рисование если <var>stop</var> не ноль, иначе сбрасывает флаг остановки.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-NeedStop-1"></a>Метод класса <code>mglGraph</code>: <em><code>bool</code></em> <strong>NeedStop</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fneed_005fstop"></a>Функция С only: <em><code>void</code></em> <strong>mgl_need_stop</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Возвращает <code>true</code> если рисование должно быть остановлено. Также запускает обработку всех отложенных событий в GUI. Пользователь должен вызывать эту функцию время от времени внутри долгих вычислений для плавности отклика GUI.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetEventFunc-1"></a>Метод класса <code>mglGraph</code>: <em><code>bool</code></em> <strong>SetEventFunc</strong> <em>(<code>void (*</code>func<code>)(void *)</code>, <code>void *</code>par=<code>NULL</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005fevent_005ffunc"></a>Функция С only: <em><code>void</code></em> <strong>mgl_set_event_func</strong> <em>(<code>HMGL</code> gr, <code>void (*</code>func<code>)(void *)</code>, <code>void *</code>par)</em></dt>
-<dd><p>Задает функцию, которая будет вызвана для обработки событий в GUI библиотеке.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Axis-settings"></a>
-<div class="header">
-<p>
-Next: <a href="#Subplots-and-rotation" accesskey="n" rel="next">Subplots and rotation</a>, Previous: <a href="#Graphics-setup" accesskey="p" rel="prev">Graphics setup</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Nastroiki-osei-koordinat"></a>
-<h3 class="section">4.3 Настройки осей координат</h3>
-
-
-<p>Эти функции управляет видом и масштабом осей координат. Перед построением для каждой точки выполняются 3 преобразования: сначала определяется возможность рисования точки (см. <a href="#Cutting">Cutting</a>), далее применяются формулы перехода к криволинейным координатам и наконец точка отображается. Отмечу, что MathGL выдает предупреждение если масштабы осей координат лежат вне области определения формул преобразования координат.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Ranges-_0028bounding-box_0029" accesskey="1">Ranges (bounding box)</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Curved-coordinates" accesskey="2">Curved coordinates</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Ticks" accesskey="3">Ticks</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Ranges-_0028bounding-box_0029"></a>
-<div class="header">
-<p>
-Next: <a href="#Curved-coordinates" accesskey="n" rel="next">Curved coordinates</a>, Up: <a href="#Axis-settings" accesskey="u" rel="up">Axis settings</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Masshtab-osei-koordinat"></a>
-<h4 class="subsection">4.3.1 Масштаб осей координат</h4>
-
-<a name="index-CRange"></a>
-<a name="index-XRange"></a>
-<a name="index-YRange"></a>
-<a name="index-ZRange"></a>
-<a name="index-Ranges"></a>
-<a name="index-Origin"></a>
-<a name="index-SetRange"></a>
-<a name="index-SetRanges"></a>
-<a name="index-SetOrigin"></a>
-
-<a name="xrange"></a><a name="yrange"></a><a name="zrange"></a><a name="crange"></a><dl>
-<dt><a name="index-xrange-2"></a>Команда MGL: <em></em> <strong>xrange</strong> <em><code>v1 v2</code> [<code>add=off</code>]</em></dt>
-<dt><a name="index-yrange-2"></a>Команда MGL: <em></em> <strong>yrange</strong> <em><code>v1 v2</code> [<code>add=off</code>]</em></dt>
-<dt><a name="index-zrange-2"></a>Команда MGL: <em></em> <strong>zrange</strong> <em><code>v1 v2</code> [<code>add=off</code>]</em></dt>
-<dt><a name="index-crange"></a>Команда MGL: <em></em> <strong>crange</strong> <em><code>v1 v2</code> [<code>add=off</code>]</em></dt>
-<dt><a name="index-SetRange-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetRange</strong> <em>(<code>char</code> dir, <code>mreal</code> v1, <code>mreal</code> v2)</em></dt>
-<dt><a name="index-AddRange"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>AddRange</strong> <em>(<code>char</code> dir, <code>mreal</code> v1, <code>mreal</code> v2)</em></dt>
-<dt><a name="index-mgl_005fset_005frange_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_range_val</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>mreal</code> v1, <code>mreal</code> v2)</em></dt>
-<dt><a name="index-mgl_005fadd_005frange_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_add_range_val</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>mreal</code> v1, <code>mreal</code> v2)</em></dt>
-<dd><p>Задает диапазон изменения ‘<samp>x</samp>’-,‘<samp>y</samp>’-,‘<samp>z</samp>’-,‘<samp>c</samp>’-координат. Если одно из значений равно <code>NAN</code>, то оно игнорируется. Параметр <code>add=on</code> указывает добавлять новый диапазон к существующему (не заменять его). См. также <a href="#ranges">ranges</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-xrange-3"></a>Команда MGL: <em></em> <strong>xrange</strong> <em>dat [<code>add=off</code>]</em></dt>
-<dt><a name="index-yrange-3"></a>Команда MGL: <em></em> <strong>yrange</strong> <em>dat [<code>add=off</code>]</em></dt>
-<dt><a name="index-zrange-3"></a>Команда MGL: <em></em> <strong>zrange</strong> <em>dat [<code>add=off</code>]</em></dt>
-<dt><a name="index-crange-1"></a>Команда MGL: <em></em> <strong>crange</strong> <em>dat [<code>add=off</code>]</em></dt>
-<dt><a name="index-SetRange-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetRange</strong> <em>(<code>char</code> dir, <code>const mglDataA &</code>dat, <code>bool</code> add=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005frange_005fdat"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_range_dat</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>const HCDT</code> a, <code>int</code> add)</em></dt>
-<dd><p>Задает диапазон изменения ‘<samp>x</samp>’-,‘<samp>y</samp>’-,‘<samp>z</samp>’-,‘<samp>c</samp>’-координат как минимальное и максимальное значение массива <var>dat</var>. Параметр <code>add=on</code> указывает добавлять новый диапазон к существующему (не заменять его).
-</p></dd></dl>
-
-<a name="ranges"></a><dl>
-<dt><a name="index-ranges"></a>Команда MGL: <em></em> <strong>ranges</strong> <em><code>x1 x2 y1 y2 [z1=0 z2=0]</code></em></dt>
-<dt><a name="index-SetRanges-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetRanges</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> p2)</em></dt>
-<dt><a name="index-SetRanges-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetRanges</strong> <em>(<code>mreal</code> x1, <code>mreal</code> x2, <code>mreal</code> y1, <code>mreal</code> y2, <code>mreal</code> z1=<code>0</code>, <code>mreal</code> z2=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005franges"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_ranges</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> x2, <code>mreal</code> y1, <code>mreal</code> y2, <code>mreal</code> z1, <code>mreal</code> z2)</em></dt>
-<dd><p>Задает диапазон изменения координат. Если минимальное и максимальное значение координаты равны, то они игнорируются по данному направлению. Также устанавливает размер цветовой шкалы, аналогично команде <code>crange z1 z2</code>. Начальные диапазоны равны [-1, 1].
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ranges-1"></a>Команда MGL: <em></em> <strong>ranges</strong> <em><code>xx yy [zz cc=zz]</code></em></dt>
-<dt><a name="index-SetRanges-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetRanges</strong> <em>(<code>const mglDataA &</code>xx, <code>const mglDataA &</code>yy)</em></dt>
-<dt><a name="index-SetRanges-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetRanges</strong> <em>(<code>const mglDataA &</code>xx, <code>const mglDataA &</code>yy, <code>const mglDataA &</code>zz)</em></dt>
-<dt><a name="index-SetRanges-5"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetRanges</strong> <em>(<code>const mglDataA &</code>xx, <code>const mglDataA &</code>yy, <code>const mglDataA &</code>zz, <code>const mglDataA &</code>cc)</em></dt>
-<dd><p>Задает диапазон изменения ‘<samp>x</samp>’-,‘<samp>y</samp>’-,‘<samp>z</samp>’-,‘<samp>c</samp>’-координат как минимальное и максимальное значение массивов <var>xx</var>, <var>yy</var>, <var>zz</var>, <var>cc</var> соответственно.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetAutoRanges"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetAutoRanges</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> p2)</em></dt>
-<dt><a name="index-SetAutoRanges-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetAutoRanges</strong> <em>(<code>double</code> x1, <code>double</code> x2, <code>double</code> y1, <code>double</code> y2, <code>double</code> z1=<code>0</code>, <code>double</code> z2=<code>0</code>, <code>double</code> c1=<code>0</code>, <code>double</code> c2=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005fauto_005franges"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_auto_ranges</strong> <em>(<code>HMGL</code> gr, <code>double</code> x1, <code>double</code> x2, <code>double</code> y1, <code>double</code> y2, <code>double</code> z1, <code>double</code> z2, <code>double</code> z1, <code>double</code> z2)</em></dt>
-<dd><p>Задает диапазон изменения координат для автоматических переменных. Если минимальное и максимальное значение координаты равны, то они игнорируются по данному направлению.
-</p></dd></dl>
-
-<a name="origin"></a><dl>
-<dt><a name="index-origin"></a>Команда MGL: <em></em> <strong>origin</strong> <em><code>x0 y0 [z0=nan]</code></em></dt>
-<dt><a name="index-SetOrigin-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetOrigin</strong> <em>(<code>mglPoint</code> p0)</em></dt>
-<dt><a name="index-SetOrigin-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetOrigin</strong> <em>(<code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0=<code>NAN</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005forigin"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_origin</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0)</em></dt>
-<dd><p>Задает центр пересечения осей координат. Если одно из значений равно NAN, то MathGL попытается выбрать оптимальное положение осей координат по этому направлению.
-</p></dd></dl>
-
-<a name="zoomaxis"></a><dl>
-<dt><a name="index-zoomaxis"></a>Команда MGL: <em></em> <strong>zoomaxis</strong> <em><code>x1 x2</code></em></dt>
-<dt><a name="index-zoomaxis-1"></a>Команда MGL: <em></em> <strong>zoomaxis</strong> <em><code>x1 y1 x2 y2</code></em></dt>
-<dt><a name="index-zoomaxis-2"></a>Команда MGL: <em></em> <strong>zoomaxis</strong> <em><code>x1 y1 z1 x2 y2 z2</code></em></dt>
-<dt><a name="index-zoomaxis-3"></a>Команда MGL: <em></em> <strong>zoomaxis</strong> <em><code>x1 y1 z1 c1 x2 y2 z2 c2</code></em></dt>
-<dt><a name="index-ZoomAxis"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ZoomAxis</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> p2)</em></dt>
-<dt><a name="index-mgl_005fzoom_005faxis"></a>Функция С: <em><code>void</code></em> <strong>mgl_zoom_axis</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> z1, <code>mreal</code> c1, <code>mreal</code> x2, <code>mreal</code> y2, <code>mreal</code> z2, <code>mreal</code> c2)</em></dt>
-<dd><p>Дополнительно расширяет диапазон осей координат, задаваемый функциями <code>SetRange</code> или <code>SetRanges</code>, в соответствии с формулами <em>min += (max-min)*p1</em> и <em>max += (max-min)*p1</em> (или <em>min *= (max/min)^p1</em> и <em>max *= (max/min)^p1</em> для "логарифмических" диапазонов, когда <em>inf>max/min>100</em> или <em>0<max/min<0.01</em>). Начальные значения [0, 1]. Внимание! эти настройки не могут быть переписаны никакими другими функциями, включая <code>DefaultPlotParam()</code>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Curved-coordinates"></a>
-<div class="header">
-<p>
-Next: <a href="#Ticks" accesskey="n" rel="next">Ticks</a>, Previous: <a href="#Ranges-_0028bounding-box_0029" accesskey="p" rel="prev">Ranges (bounding box)</a>, Up: <a href="#Axis-settings" accesskey="u" rel="up">Axis settings</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Krivolineinye-koordinaty"></a>
-<h4 class="subsection">4.3.2 Криволинейные координаты</h4>
-
-<a name="index-Axis"></a>
-<a name="index-SetFunc"></a>
-<a name="index-SetCoor"></a>
-<a name="index-Ternary"></a>
-
-<dl>
-<dt><a name="index-axis"></a>Команда MGL: <em></em> <strong>axis</strong> <em>'fx' 'fy' 'fz' ['fa'='']</em></dt>
-<dt><a name="index-SetFunc-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetFunc</strong> <em>(<code>const char *</code>EqX, <code>const char *</code>EqY, <code>const char *</code>EqZ=<code>""</code>, <code>const char *</code>EqA=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005ffunc"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_func</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>EqX, <code>const char *</code>EqY, <code>const char *</code>EqZ, <code>const char *</code>EqA)</em></dt>
-<dd><p>Задает формулы перехода к криволинейным координатам. Каждая строка является математическим выражением, зависящим от старых координат ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’ и ‘<samp>a</samp>’ или ‘<samp>c</samp>’ для цветовой шкалы. Например, для цилиндрических координат будет <code>SetFunc("x*cos(y)", "x*sin(y)", "z");</code>. Для удаления формул соответствующий параметр должен быть пустым или <code>NULL</code>. Использование формул преобразования слегка замедляет программу. Параметр <var>EqA</var> задает аналогичную формулу для цветовой шкалы. See <a href="#Textual-formulas">Textual formulas</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-axis-1"></a>Команда MGL: <em></em> <strong>axis</strong> <em><code>how</code></em></dt>
-<dt><a name="index-SetCoor-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetCoor</strong> <em>(<code>int</code> how)</em></dt>
-<dt><a name="index-mgl_005fset_005fcoor"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_coor</strong> <em>(<code>HMGL</code> gr, <code>int</code> how)</em></dt>
-<dd><p>Устанавливает одну из предопределенных систем криволинейных координат в зависимости от параметра <var>how</var>:
-</p><dl compact="compact">
-<dt><code>mglCartesian=0</code></dt>
-<dd><p>декартова система (нет преобразования координат, {x,y,z});
-</p></dd>
-<dt><code>mglPolar=1</code></dt>
-<dd><p>полярные координаты: {x*cos(y),x*sin(y), z};
-</p></dd>
-<dt><code>mglSpherical=2</code></dt>
-<dd><p>сферические координаты: {x*sin(y)*cos(z), x*sin(y)*sin(z), x*cos(y)};
-</p></dd>
-<dt><code>mglParabolic=3</code></dt>
-<dd><p>параболические координаты: {x*y, (x*x-y*y)/2, z};
-</p></dd>
-<dt><code>mglParaboloidal=4</code></dt>
-<dd><p>Paraboloidal coordinates: {(x*x-y*y)*cos(z)/2, (x*x-y*y)*sin(z)/2, x*y};
-</p></dd>
-<dt><code>mglOblate=5</code></dt>
-<dd><p>Oblate coordinates: {cosh(x)*cos(y)*cos(z), cosh(x)*cos(y)*sin(z), sinh(x)*sin(y)};
-</p></dd>
-<dt><code>mglProlate=6</code></dt>
-<dd><p>Prolate coordinates: {sinh(x)*sin(y)*cos(z), sinh(x)*sin(y)*sin(z), cosh(x)*cos(y)};
-</p></dd>
-<dt><code>mglElliptic=7</code></dt>
-<dd><p>эллиптические координаты: {cosh(x)*cos(y), sinh(x)*sin(y), z};
-</p></dd>
-<dt><code>mglToroidal=8</code></dt>
-<dd><p>тороидальные координаты: {sinh(x)*cos(z)/(cosh(x)-cos(y)), sinh(x)*sin(z)/(cosh(x)-cos(y)), sin(y)/(cosh(x)-cos(y))};
-</p></dd>
-<dt><code>mglBispherical=9</code></dt>
-<dd><p>бисферические координаты: {sin(y)*cos(z)/(cosh(x)-cos(y)), sin(y)*sin(z)/(cosh(x)-cos(y)), sinh(x)/(cosh(x)-cos(y))};
-</p></dd>
-<dt><code>mglBipolar=10</code></dt>
-<dd><p>биполярные координаты: {sinh(x)/(cosh(x)-cos(y)), sin(y)/(cosh(x)-cos(y)), z};
-</p></dd>
-<dt><code>mglLogLog=11</code></dt>
-<dd><p>Log-log координаты: {lg(x), lg(y), lg(z)};
-</p></dd>
-<dt><code>mglLogX=12</code></dt>
-<dd><p>Log-x координаты: {lg(x), y, z};
-</p></dd>
-<dt><code>mglLogY=13</code></dt>
-<dd><p>Log-y координаты: {x, lg(y), z}.
-</p></dd>
-</dl>
-</dd></dl>
-
-<a name="ternary"></a><dl>
-<dt><a name="index-ternary"></a>Команда MGL: <em></em> <strong>ternary</strong> <em><code>val</code></em></dt>
-<dt><a name="index-Ternary-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Ternary</strong> <em>(<code>int</code> tern)</em></dt>
-<dt><a name="index-mgl_005fset_005fternary"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_ternary</strong> <em>(<code>HMGL</code> gr, <code>int</code> tern)</em></dt>
-<dd><p>Задает рисование треугольных (Ternary, <var>tern</var>=<code>1</code>), пирамидальных (Quaternary, <var>tern</var>=<code>2</code>) осей координат и проекций осей координат (<var>tern</var>=<code>4,5,6</code>).
-</p>
-<p>Ternary – специальный тип графика для 3 зависимых координат (компонент) <var>a</var>, <var>b</var>, <var>c</var> таких, что <var>a</var>+<var>b</var>+<var>c</var>=1. MathGL использует только 2 независимые координаты <var>a</var>=x и <var>b</var>=y поскольку их достаточно для построения всех графиков. При этом третья координата z является независимым параметром для построения линий уровня, поверхностей и т.д.
-</p>
-<p>Соответственно Quaternary координаты – 4 зависимые координаты <var>a</var>, <var>b</var>, <var>c</var> и <var>d</var>, такие что <var>a</var>+<var>b</var>+<var>c</var>+<var>d</var>=1. MathGL использует только 2 независимые координаты <var>a</var>=x, <var>b</var>=y и <var>d</var>=z поскольку их достаточно для построения всех графиков.
-</p>
-<p>Проекции строятся если к переменной <var>tern</var> добавить число <code>4</code>. Так что <var>tern</var>=<code>4</code> нарисует проекции в декартовых координатах, <var>tern</var>=<code>5</code> нарисует проекции в треугольных координатах, <var>tern</var>=<code>6</code> нарисует проекции в пирамидальных координатах. Если добавить <code>8</code> вместо <code>4</code>, то текст не будет выводиться на проекциях.
-</p>
-<p>Используйте <code>Ternary(0)</code> для возвращения к привычным координатам. См. раздел <a href="#Ternary-axis">Ternary axis</a>, для примеров кода и графика. См. раздел <a href="#Axis-projection">Axis projection</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-<hr>
-<a name="Ticks"></a>
-<div class="header">
-<p>
-Previous: <a href="#Curved-coordinates" accesskey="p" rel="prev">Curved coordinates</a>, Up: <a href="#Axis-settings" accesskey="u" rel="up">Axis settings</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Metki-osei"></a>
-<h4 class="subsection">4.3.3 Метки осей</h4>
-
-<a name="index-AxisStl"></a>
-<a name="index-TickLen"></a>
-<a name="index-Adjust"></a>
-<a name="index-XTick"></a>
-<a name="index-YTick"></a>
-<a name="index-ZTick"></a>
-<a name="index-CTick"></a>
-<a name="index-SetAxisStl"></a>
-<a name="index-SetTickLen"></a>
-<a name="index-SetTicks"></a>
-<a name="index-SetTicksVal"></a>
-<a name="index-SetTuneTicks"></a>
-<a name="index-SetTickTime"></a>
-<a name="index-SetTickTempl"></a>
-<a name="index-SetTickRotate"></a>
-<a name="index-SetTickSkip"></a>
-<a name="index-SetOriginTick"></a>
-<a name="index-AddTick"></a>
-
-<a name="adjust"></a><dl>
-<dt><a name="index-adjust"></a>Команда MGL: <em></em> <strong>adjust</strong> <em>['dir'='xyzc']</em></dt>
-<dt><a name="index-Adjust-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Adjust</strong> <em>(<code>const char *</code>dir=<code>"xyzc"</code>)</em></dt>
-<dt><a name="index-mgl_005fadjust_005fticks"></a>Функция С: <em><code>void</code></em> <strong>mgl_adjust_ticks</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>dir)</em></dt>
-<dd><p>Автоматически задает шаг меток осей, число подметок и начальное положение меток для осей координат <var>dir</var> в виде наиболее удобном для человека. Также задает <code>SetTuneTicks(true)</code>. Обычно не требуется вызывать эту функцию кроме случая возвращения настроек по умолчанию.
-</p></dd></dl>
-
-<a name="xtick"></a><a name="ytick"></a><a name="ztick"></a><a name="ctick"></a><dl>
-<dt><a name="index-xtick"></a>Команда MGL: <em></em> <strong>xtick</strong> <em><code>val [sub=0 org=nan 'fact'='']</code></em></dt>
-<dt><a name="index-ytick"></a>Команда MGL: <em></em> <strong>ytick</strong> <em><code>val [sub=0 org=nan 'fact'='']</code></em></dt>
-<dt><a name="index-ztick"></a>Команда MGL: <em></em> <strong>ztick</strong> <em><code>val [sub=0 org=nan 'fact'='']</code></em></dt>
-<dt><a name="index-xtick-1"></a>Команда MGL: <em></em> <strong>xtick</strong> <em><code>val sub ['fact'='']</code></em></dt>
-<dt><a name="index-ytick-1"></a>Команда MGL: <em></em> <strong>ytick</strong> <em><code>val sub ['fact'='']</code></em></dt>
-<dt><a name="index-ztick-1"></a>Команда MGL: <em></em> <strong>ztick</strong> <em><code>val sub ['fact'='']</code></em></dt>
-<dt><a name="index-ctick"></a>Команда MGL: <em></em> <strong>ctick</strong> <em><code>val ['fact'='']</code></em></dt>
-<dt><a name="index-SetTicks-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTicks</strong> <em>(<code>char</code> dir, <code>mreal</code> d=<code>0</code>, <code>int</code> ns=<code>0</code>, <code>mreal</code> org=<code>NAN</code>, <code>const char *</code>fact=<code>""</code>)</em></dt>
-<dt><a name="index-SetTicks-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTicks</strong> <em>(<code>char</code> dir, <code>mreal</code> d=<code>0</code>, <code>int</code> ns=<code>0</code>, <code>mreal</code> org=<code>NAN</code>, <code>const wchar_t *</code>fact)</em></dt>
-<dt><a name="index-mgl_005fset_005fticks"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_ticks</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>mreal</code> d, <code>int</code> ns, <code>mreal</code> org)</em></dt>
-<dt><a name="index-mgl_005fset_005fticks_005ffact"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_ticks_fact</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>mreal</code> d, <code>int</code> ns, <code>mreal</code> org, <code>const char *</code>fact)</em></dt>
-<dt><a name="index-mgl_005fset_005fticks_005ffactw"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_ticks_factw</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>mreal</code> d, <code>int</code> ns, <code>mreal</code> org, <code>const wchar_t *</code> fact)</em></dt>
-<dd><p>Задает шаг меток осей <var>d</var>, число подметок <var>ns</var> и начальное положение меток <var>org</var> для оси вдоль направления <var>dir</var> (используйте ’c’ для меток colorbar). Переменная <var>d</var> задает шаг меток (если положительна) или их число на оси (если отрицательна). Нулевое значение задает автоматическую расстановку меток. Если <var>org</var>=<code>NAN</code>, то используется значение из переменной <var>Org</var>. Параметр <var>fact</var> задает текст, которые будет напечатан после метки оси (например, "\pi" для <var>d</var>=M_PI).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-xtick-2"></a>Команда MGL: <em></em> <strong>xtick</strong> <em><code>val1</code> 'lbl1' [<code>val2</code> 'lbl2' ...]</em></dt>
-<dt><a name="index-ytick-2"></a>Команда MGL: <em></em> <strong>ytick</strong> <em><code>val1</code> 'lbl1' [<code>val2</code> 'lbl2' ...]</em></dt>
-<dt><a name="index-ztick-2"></a>Команда MGL: <em></em> <strong>ztick</strong> <em><code>val1</code> 'lbl1' [<code>val2</code> 'lbl2' ...]</em></dt>
-<dt><a name="index-ctick-1"></a>Команда MGL: <em></em> <strong>ctick</strong> <em><code>val1</code> 'lbl1' [<code>val2</code> 'lbl2' ...]</em></dt>
-<dt><a name="index-xtick-3"></a>Команда MGL: <em></em> <strong>xtick</strong> <em>vdat 'lbls' [<code>add=off</code>]</em></dt>
-<dt><a name="index-ytick-3"></a>Команда MGL: <em></em> <strong>ytick</strong> <em>vdat 'lbls' [<code>add=off</code>]</em></dt>
-<dt><a name="index-ztick-3"></a>Команда MGL: <em></em> <strong>ztick</strong> <em>vdat 'lbls' [<code>add=off</code>]</em></dt>
-<dt><a name="index-ctick-2"></a>Команда MGL: <em></em> <strong>ctick</strong> <em>vdat 'lbls' [<code>add=off</code>]</em></dt>
-<dt><a name="index-SetTicksVal-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTicksVal</strong> <em>(<code>char</code> dir, <code>const char *</code>lbl, <code>bool</code> add=<code>false</code>)</em></dt>
-<dt><a name="index-SetTicksVal-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTicksVal</strong> <em>(<code>char</code> dir, <code>const wchar_t *</code>lbl, <code>bool</code> add=<code>false</code>)</em></dt>
-<dt><a name="index-SetTicksVal-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTicksVal</strong> <em>(<code>char</code> dir, <code>const mglDataA &</code>val, <code>const char *</code>lbl, <code>bool</code> add=<code>false</code>)</em></dt>
-<dt><a name="index-SetTicksVal-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTicksVal</strong> <em>(<code>char</code> dir, <code>const mglDataA &</code>val, <code>const wchar_t *</code>lbl, <code>bool</code> add=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005fticks_005fstr"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_ticks_str</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>const char *</code>lbl, <code>bool</code> add)</em></dt>
-<dt><a name="index-mgl_005fset_005fticks_005fwcs"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_ticks_wcs</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>const wchar_t *</code>lbl, <code>bool</code> add)</em></dt>
-<dt><a name="index-mgl_005fset_005fticks_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_ticks_val</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>HCDT</code> val, <code>const char *</code>lbl, <code>bool</code> add)</em></dt>
-<dt><a name="index-mgl_005fset_005fticks_005fvalw"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_ticks_valw</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>HCDT</code> val, <code>const wchar_t *</code>lbl, <code>bool</code> add)</em></dt>
-<dd><p>Задает явное положение <var>val</var> и подписи <var>lbl</var> для меток вдоль оси <var>dir</var>. Если массив <var>val</var> не указан, то используются значения равно распределённые в диапазоне осей координат. Метки разделяются символом ‘<samp>\n</samp>’. Если в команде MGL задано только одно значение, то метка будет <em>добавлена</em> к существующим меткам. Используйте <code>SetTicks()</code> для восстановления автоматических меток.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-AddTick-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>AddTick</strong> <em>(<code>char</code> dir, <code>double</code> val, <code>const char *</code>lbl)</em></dt>
-<dt><a name="index-AddTick-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>AddTick</strong> <em>(<code>char</code> dir, <code>double</code> val, <code>const wchar_t *</code>lbl)</em></dt>
-<dt><a name="index-mgl_005fadd_005ftick"></a>Функция С: <em><code>void</code></em> <strong>mgl_add_tick</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>double</code> val, <code>const char *</code>lbl)</em></dt>
-<dt><a name="index-mgl_005fset_005ftickw"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_tickw</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>double</code> val, <code>const wchar_t *</code>lbl)</em></dt>
-<dd><p>Аналогично предыдущему, но добавляет одну метку оси к списку существующих меток.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-xtick-4"></a>Команда MGL: <em></em> <strong>xtick</strong> <em>'templ'</em></dt>
-<dt><a name="index-ytick-4"></a>Команда MGL: <em></em> <strong>ytick</strong> <em>'templ'</em></dt>
-<dt><a name="index-ztick-4"></a>Команда MGL: <em></em> <strong>ztick</strong> <em>'templ'</em></dt>
-<dt><a name="index-ctick-3"></a>Команда MGL: <em></em> <strong>ctick</strong> <em>'templ'</em></dt>
-<dt><a name="index-SetTickTempl-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTickTempl</strong> <em>(<code>char</code> dir, <code>const char *</code>templ)</em></dt>
-<dt><a name="index-SetTickTempl-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTickTempl</strong> <em>(<code>char</code> dir, <code>const wchar_t *</code>templ)</em></dt>
-<dt><a name="index-mgl_005fset_005ftick_005ftempl"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_tick_templ</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>templ)</em></dt>
-<dt><a name="index-mgl_005fset_005ftick_005ftemplw"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_tick_templw</strong> <em>(<code>HMGL</code> gr, <code>const wchar_t *</code>templ)</em></dt>
-<dd><p>Задает шаблон <var>templ</var> для меток вдоль x-,y-,z-оси или colorbar. Шаблон может содержать и символы TeX. Если <var>templ</var>=<code>""</code>, то используется шаблон по умолчанию (в простейшем случае ‘<samp>%.2g</samp>’). Если шаблон начинается с символа ‘<samp>&</samp>’, то будет использовано целое <code>long</code> вместо типа <code>double</code>. Установка шаблона выключает автоматическое улучшение вида меток.
-</p></dd></dl>
-
-<a name="ticktime"></a><dl>
-<dt><a name="index-ticktime"></a>Команда MGL: <em></em> <strong>ticktime</strong> <em>'dir' [<code>dv=0</code> 'tmpl'='']</em></dt>
-<dt><a name="index-SetTicksTime"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTicksTime</strong> <em>(<code>char</code> dir, <code>mreal</code> val, <code>const char *</code>templ)</em></dt>
-<dt><a name="index-mgl_005fset_005fticks_005ftime"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_ticks_time</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>const char *</code>templ)</em></dt>
-<dd><p>Задает метки времени с шагом <var>val</var> и шаблоном <var>templ</var> для меток вдоль x-,y-,z-оси или colorbar. Шаблон может содержать и символы TeX. Формат шаблона <var>templ</var> такой же как <a href="http://www.manpagez.com/man/3/strftime/">http://www.manpagez.com/man/3/strftime/</a>. Наиболее употребительные варианты: ‘<samp>%X</samp>’ для национального представления времени, ‘<samp>%x</samp>’ для национального представления даты, ‘<samp>%Y</samp>’ для года с цифрами столетия. Если <var>val</var>=0 и/или <var>templ</var>="", то используется автоматическая расстановка меток и/или выбор шаблона. Вы можете использовать функцию <code>mgl_get_time</code>() для получения числа секунд с 1970 года до указанной даты/времени. Отмечу, что MS Visual Studio не может обрабатывать даты до 1970.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mgl_005fget_005ftime"></a>Функция С: <em><code>double</code></em> <strong>mgl_get_time</strong> <em>(<code>const char*</code>str, <code>const char *</code>templ)</em></dt>
-<dd><p>Возвращает число секунд с 1970 года до даты/времени, указанной в строке <var>str</var>. Формат строки задается <var>templ</var>, такой же как <a href="http://www.manpagez.com/man/3/strftime/">http://www.manpagez.com/man/3/strftime/</a>. Наиболее употребительные варианты: ‘<samp>%X</samp>’ для национального представления времени, ‘<samp>%x</samp>’ для национального представления даты, ‘<samp>%Y</samp>’ для года с цифрами столетия. Отмечу, что MS Visual Studio не может обрабатывать даты до 1970.
-</p></dd></dl>
-
-<a name="tuneticks"></a><dl>
-<dt><a name="index-tuneticks"></a>Команда MGL: <em></em> <strong>tuneticks</strong> <em><code>val</code> [<code>pos=1.15</code>]</em></dt>
-<dt><a name="index-SetTuneTicks-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTuneTicks</strong> <em>(<code>int</code> tune, <code>mreal</code> pos=<code>1.15</code>)</em></dt>
-<dt><a name="index-mgl_005ftune_005fticks"></a>Функция С: <em><code>void</code></em> <strong>mgl_tune_ticks</strong> <em>(<code>HMGL</code> gr, <code>int</code> tune, <code>mreal</code> pos)</em></dt>
-<dd><p>Включает/выключает улучшение вида меток осей путем вынесения общего множителя (для маленьких, типа 0.001...0.002, или больших, типа 1000...2000, значений координат) или общей компоненты (для узкого диапазона, типа 0.999...1.000). Также задает положение <var>pos</var> общего множителя на оси: =0 около минимального значения, =1 около максимального значения.
-</p></dd></dl>
-
-<a name="tickshift"></a><dl>
-<dt><a name="index-tickshift"></a>Команда MGL: <em></em> <strong>tickshift</strong> <em><code>dx [dy=0 dz=0 dc=0]</code></em></dt>
-<dt><a name="index-SetTickShift"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTickShift</strong> <em>(<code>mglPoint</code> d)</em></dt>
-<dt><a name="index-mgl_005fset_005ftick_005fshift"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_tick_shift</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> dx, <code>mreal</code> dy, <code>mreal</code> dz, <code>mreal</code> dc)</em></dt>
-<dd><p>Задает значение дополнительного сдвига меток осей координат.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-SetTickRotate-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTickRotate</strong> <em>(<code>bool</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005ftick_005frotate"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_tick_rotate</strong> <em>(<code>HMGL</code> gr, <code>bool</code> val)</em></dt>
-<dd><p>Включает/выключает поворот меток если их число или длина меток слишком велики.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetTickSkip-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTickSkip</strong> <em>(<code>bool</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005ftick_005fskip"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_tick_skip</strong> <em>(<code>HMGL</code> gr, <code>bool</code> val)</em></dt>
-<dd><p>Включает/выключает пропуск меток если их число или длина меток слишком велики.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetTimeUTC"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTimeUTC</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Разрешает/запрещает использование UTC времени в метках осей координат. В C/Fortran следует использовать <code>mgl_set_flag(gr,val, MGL_USE_GMTIME);</code>.
-</p></dd></dl>
-
-
-<a name="origintick"></a><dl>
-<dt><a name="index-origintick"></a>Команда MGL: <em></em> <strong>origintick</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetOriginTick-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetOriginTick</strong> <em>(<code>bool</code> val=<code>true</code>)</em></dt>
-<dd><p>Разрешает/запрещает рисование меток в точке пересечения осей координат. В C/Fortran следует использовать <code>mgl_set_flag(gr,val, MGL_NO_ORIGIN);</code>.
-</p></dd></dl>
-
-<a name="ticklen"></a><dl>
-<dt><a name="index-ticklen"></a>Команда MGL: <em></em> <strong>ticklen</strong> <em><code>val</code> [<code>stt=1</code>]</em></dt>
-<dt><a name="index-SetTickLen-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetTickLen</strong> <em>(<code>mreal</code> val, <code>mreal</code> stt=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005ftick_005flen"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_tick_len</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>mreal</code> stt)</em></dt>
-<dd><p>Задает относительную длину меток осей координат. Значение по умолчанию <code>0.1</code>. Параметр <var>stt</var>>0 задает относительную длину подметок, которые в <code>sqrt(1+stt)</code> раз меньше.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-axisstl"></a>Команда MGL: <em></em> <strong>axisstl</strong> <em>'stl' ['tck'='' 'sub'='']</em></dt>
-<dt><a name="index-SetAxisStl-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetAxisStl</strong> <em>(<code>const char *</code>stl=<code>"k"</code>, <code>const char *</code>tck=<code>0</code>, <code>const char *</code>sub=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005faxis_005fstl"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_axis_stl</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>stl, <code>const char *</code>tck, <code>const char *</code>sub)</em></dt>
-<dd><p>Задает стиль осей (<var>stl</var>), меток (<var>tck</var>) и подметок (<var>sub</var>) осей координат. Если <var>stl</var> пустая или ноль, то используется стиль по умолчанию (‘<samp>k</samp>’ или ‘<samp>w</samp>’ в зависимости от типа прозрачности). Если <var>tck</var>, <var>sub</var> пустая или ноль, то используется стиль осей (т.е. <var>stl</var>).
-</p></dd></dl>
-
-
-<hr>
-<a name="Subplots-and-rotation"></a>
-<div class="header">
-<p>
-Next: <a href="#Export-picture" accesskey="n" rel="next">Export picture</a>, Previous: <a href="#Axis-settings" accesskey="p" rel="prev">Axis settings</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Matrica-preobrazovaniya"></a>
-<h3 class="section">4.4 Матрица преобразования</h3>
-
-<a name="index-Aspect"></a>
-<a name="index-Rotate"></a>
-<a name="index-RotateN"></a>
-<a name="index-SubPlot"></a>
-<a name="index-MultiPlot"></a>
-<a name="index-StickPlot"></a>
-<a name="index-ColumnPlot"></a>
-<a name="index-InPlot"></a>
-<a name="index-Title"></a>
-<a name="index-Perspective"></a>
-<a name="index-View"></a>
-<a name="index-Push"></a>
-<a name="index-Pop"></a>
-
-<p>Эти функции контролируют где и как график будет расположен. Существует определенный порядок вызова этих функций для лучшего вида графика. Вначале должны вызываться функции <a href="#subplot">subplot</a>, <a href="#multiplot">multiplot</a> или <a href="#inplot">inplot</a> для указания местоположения вывода. После них – функции вращения <a href="#rotate">rotate</a>, <a href="#shear">shear</a> и <a href="#aspect">aspect</a>. И наконец любые другие функции для рисования графика. Вместо вращения графика можно вызвать функцию <a href="#columnplot">columnplot</a>, <a href="#gridplot">gridplot</a>, <a href="#stickplot">stickplot</a>, <a href="#shearplot">shearplot</a> или относительную <a href="#inplot">inplot</a> для расположения графиков в столбец одного над другим без зазора между осями. См. раздел <a href="#Subplots">Subplots</a>, для примеров кода и графика.
-</p>
-<a name="subplot"></a><dl>
-<dt><a name="index-subplot"></a>Команда MGL: <em></em> <strong>subplot</strong> <em><code>nx ny m</code> ['stl'='<>_^' <code>dx=0 dy=0</code>]</em></dt>
-<dt><a name="index-SubPlot-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SubPlot</strong> <em>(<code>int</code> nx, <code>int</code> ny, <code>int</code> m, <code>const char *</code>stl=<code>"<>_^"</code>, <code>mreal</code> dx=<code>0</code>, <code>mreal</code> dy=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fsubplot"></a>Функция С: <em><code>void</code></em> <strong>mgl_subplot</strong> <em>(<code>HMGL</code> gr, <code>int</code> nx, <code>int</code> ny, <code>int</code> m, <code>const char *</code>stl)</em></dt>
-<dt><a name="index-mgl_005fsubplot_005fd"></a>Функция С: <em><code>void</code></em> <strong>mgl_subplot_d</strong> <em>(<code>HMGL</code> gr, <code>int</code> nx, <code>int</code> ny, <code>int</code> m, <code>const char *</code>stl, <code>mreal</code> dx, <code>mreal</code> dy)</em></dt>
-<dd><p>Помещает последующий вывод в <var>m</var>-ую ячейку сетки размером <var>nx</var>*<var>ny</var> от всего рисунка. Функция сбрасывает матрицу трансформации (повороты и сжатие графика) и должна вызываться первой для создания "подграфика". С эстетической точки зрения не рекомендуется вызывать эту функцию с различными (или не кратными) размерами сетки. Дополнительное место для осей/colorbar резервируется только если строка <var>stl</var> содержит:
-</p><ul>
-<li> ‘<samp>L</samp>’ или ‘<samp><</samp>’ – с левого края,
-</li><li> ‘<samp>R</samp>’ или ‘<samp>></samp>’ – с правого края,
-</li><li> ‘<samp>A</samp>’ или ‘<samp>^</samp>’ – с верхнего края,
-</li><li> ‘<samp>U</samp>’ или ‘<samp>_</samp>’ – с нижнего края,
-</li><li> ‘<samp>#</samp>’ – место резервироваться не будет – оси координат будут занимать все доступное пространство.
-</li></ul>
-<p>Ячейка может быть дополнительно сдвинута относительно своего обычного положения на относительный размер <var>dx</var>, <var>dy</var>. Отмечу, что colorbar может находиться за пределами рисунка если выбран пустой стиль ‘<samp></samp>’.
-</p></dd></dl>
-
-<a name="multiplot"></a><dl>
-<dt><a name="index-multiplot"></a>Команда MGL: <em></em> <strong>multiplot</strong> <em><code>nx ny m dx dy</code> ['style'='<>_^' sx sy]</em></dt>
-<dt><a name="index-MultiPlot-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>MultiPlot</strong> <em>(<code>int</code> nx, <code>int</code> ny, <code>int</code> m, <code>int</code> dx, <code>int</code> dy, <code>const char *</code>stl=<code>"<>_^"</code>)</em></dt>
-<dt><a name="index-mgl_005fmultiplot"></a>Функция С: <em><code>void</code></em> <strong>mgl_multiplot</strong> <em>(<code>HMGL</code> gr, <code>int</code> nx, <code>int</code> ny, <code>int</code> m, <code>int</code> dx, <code>int</code> dy, <code>const char *</code>stl)</em></dt>
-<dd><p>Помещает последующий вывод в прямоугольник из <var>dx</var>*<var>dy</var> ячеек, начиная с <var>m</var>-ой ячейки, сетки размером <var>nx</var>*<var>ny</var> от всего рисунка. Функция сбрасывает матрицу трансформации (повороты и сжатие графика) и должна вызываться первой для создания "подграфика". Дополнительное место для осей/colorbar резервируется если строка <var>stl</var> содержит:
-</p><ul>
-<li> ‘<samp>L</samp>’ или ‘<samp><</samp>’ – с левого края,
-</li><li> ‘<samp>R</samp>’ или ‘<samp>></samp>’ – с правого края,
-</li><li> ‘<samp>A</samp>’ или ‘<samp>^</samp>’ – с верхнего края,
-</li><li> ‘<samp>U</samp>’ или ‘<samp>_</samp>’ – с нижнего края,
-</li><li> ‘<samp>#</samp>’ – место резервироваться не будет – оси координат будут занимать все доступное пространство.
-</li></ul>
-<p>Область вывода может быть дополнительно сдвинута относительно своего обычного положения на относительный размер <var>sx</var>, <var>sy</var>.
-</p></dd></dl>
-
-<a name="inplot"></a><dl>
-<dt><a name="index-inplot"></a>Команда MGL: <em></em> <strong>inplot</strong> <em><code>x1 x2 y1 y2 [rel=on]</code></em></dt>
-<dt><a name="index-InPlot-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>InPlot</strong> <em>(<code>mreal</code> x1, <code>mreal</code> x2, <code>mreal</code> y1, <code>mreal</code> y2, <code>bool</code> rel=<code>true</code>)</em></dt>
-<dt><a name="index-mgl_005finplot"></a>Функция С: <em><code>void</code></em> <strong>mgl_inplot</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> x2, <code>mreal</code> y1, <code>mreal</code> y2)</em></dt>
-<dt><a name="index-mgl_005frelplot"></a>Функция С: <em><code>void</code></em> <strong>mgl_relplot</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> x2, <code>mreal</code> y1, <code>mreal</code> y2)</em></dt>
-<dd><p>Помещает последующий вывод в прямоугольную область [<var>x1</var>, <var>x2</var>]*[<var>y1</var>, <var>y2</var>] (исходный размер [0,1]*[0,1]). Эта функция позволяет поместить график в произвольную область рисунка. Если параметр <var>rel</var>=<code>true</code>, то используется позиция относительно текущего <a href="#subplot">subplot</a> (или <a href="#inplot">inplot</a> с <var>rel</var>=<code>false</code>). Функция сбрасывает матрицу трансформации (повороты и сжатие графика) и должна вызываться первой для создания "подграфика".
-</p></dd></dl>
-
-<a name="columnplot"></a><dl>
-<dt><a name="index-columnplot"></a>Команда MGL: <em></em> <strong>columnplot</strong> <em><code>num ind [d=0]</code></em></dt>
-<dt><a name="index-ColumnPlot-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ColumnPlot</strong> <em>(<code>int</code> num, <code>int</code> ind, <code>mreal</code> d=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fcolumnplot"></a>Функция С: <em><code>void</code></em> <strong>mgl_columnplot</strong> <em>(<code>HMGL</code> gr, <code>int</code> num, <code>int</code> ind)</em></dt>
-<dt><a name="index-mgl_005fcolumnplot_005fd"></a>Функция С: <em><code>void</code></em> <strong>mgl_columnplot_d</strong> <em>(<code>HMGL</code> gr, <code>int</code> num, <code>int</code> ind, <code>mreal</code> d)</em></dt>
-<dd><p>Помещает последующий вывод в <var>ind</var>-ую строку столбца из <var>num</var> строк. Положение столбца выбирается относительно последнего вызова <a href="#subplot">subplot</a> (или <a href="#inplot">inplot</a> с <var>rel</var>=<code>false</code>). Параметр <var>d</var> задает дополнительный зазор между строк.
-</p></dd></dl>
-
-<a name="gridplot"></a><dl>
-<dt><a name="index-gridplot"></a>Команда MGL: <em></em> <strong>gridplot</strong> <em><code>nx ny ind [d=0]</code></em></dt>
-<dt><a name="index-GridPlot"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>GridPlot</strong> <em>(<code>int</code> nx, <code>int</code> ny, <code>int</code> ind, <code>mreal</code> d=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fgridplot"></a>Функция С: <em><code>void</code></em> <strong>mgl_gridplot</strong> <em>(<code>HMGL</code> gr, <code>int</code> nx, <code>int</code> ny, <code>int</code> ind)</em></dt>
-<dt><a name="index-mgl_005fgridplot_005fd"></a>Функция С: <em><code>void</code></em> <strong>mgl_gridplot_d</strong> <em>(<code>HMGL</code> gr, <code>int</code> nx, <code>int</code> ny, <code>int</code> ind, <code>mreal</code> d)</em></dt>
-<dd><p>Помещает последующий вывод в <var>ind</var>-ую ячейку таблицы <var>nx</var>*<var>ny</var>. Положение ячейки выбирается относительно последнего вызова <a href="#subplot">subplot</a> (или <a href="#inplot">inplot</a> с <var>rel</var>=<code>false</code>). Параметр <var>d</var> задает дополнительный зазор между ячеек.
-</p></dd></dl>
-
-<a name="stickplot"></a><dl>
-<dt><a name="index-stickplot"></a>Команда MGL: <em></em> <strong>stickplot</strong> <em><code>num ind tet phi</code></em></dt>
-<dt><a name="index-StickPlot-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>StickPlot</strong> <em>(<code>int</code> num, <code>int</code> ind, <code>mreal</code> tet, <code>mreal</code> phi)</em></dt>
-<dt><a name="index-mgl_005fstickplot"></a>Функция С: <em><code>void</code></em> <strong>mgl_stickplot</strong> <em>(<code>HMGL</code> gr, <code>int</code> num, <code>int</code> ind, <code>mreal</code> tet, <code>mreal</code> phi)</em></dt>
-<dd><p>Помещает последующий вывод в <var>ind</var>-ую ячейку "бруска" из <var>num</var> ячеек. При этом сам брусок повернут на углы <var>tet</var>, <var>phi</var>. Положение выбирается относительно последнего вызова <a href="#subplot">subplot</a> (или <a href="#inplot">inplot</a> с <var>rel</var>=<code>false</code>).
-</p></dd></dl>
-
-<a name="shearplot"></a><dl>
-<dt><a name="index-shearplot"></a>Команда MGL: <em></em> <strong>shearplot</strong> <em><code>num ind sx sy [xd yd]</code></em></dt>
-<dt><a name="index-ShearPlot"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ShearPlot</strong> <em>(<code>int</code> num, <code>int</code> ind, <code>mreal</code> sx, <code>mreal</code> sy, <code>mreal</code> xd=<code>1</code>, <code>mreal</code> yd=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fshearplot"></a>Функция С: <em><code>void</code></em> <strong>mgl_shearplot</strong> <em>(<code>HMGL</code> gr, <code>int</code> num, <code>int</code> ind, <code>mreal</code> sx, <code>mreal</code> sy, <code>mreal</code> xd, <code>mreal</code> yd)</em></dt>
-<dd><p>Помещает последующий вывод в <var>ind</var>-ую ячейку "бруска" из <var>num</var> ячеек. При этом сама ячейка скошена на <var>sx</var>, <var>sy</var>. Направление бруска задается переменными <var>xd</var> и <var>yd</var>. Положение выбирается относительно последнего вызова <a href="#subplot">subplot</a> (или <a href="#inplot">inplot</a> с <var>rel</var>=<code>false</code>).
-</p></dd></dl>
-
-<a name="title"></a><dl>
-<dt><a name="index-title"></a>Команда MGL: <em></em> <strong>title</strong> <em>'title' ['stl'='' <code>size=-2</code>]</em></dt>
-<dt><a name="index-Title-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Title</strong> <em>(<code>const char *</code>txt, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> size=<code>-2</code>)</em></dt>
-<dt><a name="index-Title-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Title</strong> <em>(<code>const wchar_t *</code>txt, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> size=<code>-2</code>)</em></dt>
-<dt><a name="index-mgl_005ftitle"></a>Функция С: <em><code>void</code></em> <strong>mgl_title</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>txt, <code>const char *</code>stl, <code>mreal</code> size)</em></dt>
-<dt><a name="index-mgl_005ftitlew"></a>Функция С: <em><code>void</code></em> <strong>mgl_titlew</strong> <em>(<code>HMGL</code> gr, <code>const wchar_t *</code>txt, <code>const char *</code>stl, <code>mreal</code> size)</em></dt>
-<dd><p>Выводит заголовок <var>title</var> для текущего "подграфика" шрифтом <var>stl</var> с размером <var>size</var>. Если строка <var>stl</var> содержит ‘<samp>#</samp>’, то рисуется обрамляющий прямоугольник. Функция сбрасывает матрицу трансформации (повороты и сжатие графика) и должна вызываться сразу после создания "подграфика".
-</p></dd></dl>
-
-<a name="rotate"></a><dl>
-<dt><a name="index-rotate"></a>Команда MGL: <em></em> <strong>rotate</strong> <em><code>tetx tetz [tety=0]</code></em></dt>
-<dt><a name="index-Rotate-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Rotate</strong> <em>(<code>mreal</code> TetX, <code>mreal</code> TetZ, <code>mreal</code> TetY=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005frotate"></a>Функция С: <em><code>void</code></em> <strong>mgl_rotate</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> TetX, <code>mreal</code> TetZ, <code>mreal</code> TetY)</em></dt>
-<dd><p>Вращает систему координат относительно осей {x, z, y} последовательно на углы <var>TetX</var>, <var>TetZ</var>, <var>TetY</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-rotate-1"></a>Команда MGL: <em></em> <strong>rotate</strong> <em><code>tet x y z</code></em></dt>
-<dt><a name="index-RotateN-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>RotateN</strong> <em>(<code>mreal</code> Tet, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z)</em></dt>
-<dt><a name="index-mgl_005frotate_005fvector"></a>Функция С: <em><code>void</code></em> <strong>mgl_rotate_vector</strong> <em>(<code>HMGL</code> gr, <code>mreal Tet</code>, <code>mreal x</code>, <code>mreal y</code>, <code>mreal z</code>)</em></dt>
-<dd><p>Вращает систему координат относительно вектора {<var>x</var>, <var>y</var>, <var>z</var>} на угол <var>Tet</var>.
-</p></dd></dl>
-
-
-<a name="shear"></a><dl>
-<dt><a name="index-shear"></a>Команда MGL: <em></em> <strong>shear</strong> <em><code>sx sy</code></em></dt>
-<dt><a name="index-Shear"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Shear</strong> <em>(<code>mreal</code> sx, <code>mreal</code> sy)</em></dt>
-<dt><a name="index-mgl_005fshear"></a>Функция С: <em><code>void</code></em> <strong>mgl_shear</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> sx, <code>mreal</code> sy)</em></dt>
-<dd><p>Сдвигает (скашивает) систему координат на значения <var>sx</var>, <var>sy</var>.
-</p></dd></dl>
-
-
-<a name="aspect"></a><dl>
-<dt><a name="index-aspect"></a>Команда MGL: <em></em> <strong>aspect</strong> <em><code>ax ay [az=1]</code></em></dt>
-<dt><a name="index-Aspect-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Aspect</strong> <em>(<code>mreal</code> Ax, <code>mreal</code> Ay, <code>mreal</code> Az=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005faspect"></a>Функция С: <em><code>void</code></em> <strong>mgl_aspect</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> Ax, <code>mreal</code> Ay, <code>mreal</code> Az)</em></dt>
-<dd><p>Устанавливает соотношение размеров осей в отношении <var>Ax:Ay:Az</var>. Для лучшего вида следует вызывать после функции <a href="#rotate">rotate</a>. Если <var>Ax</var>=<code>NAN</code>, то функция выберет оптимальное соотношение размеров, чтобы шаг по осям x-y был одинаков. При этом, <var>Ay</var> задает фактор пропорциональности шага (обычно 1), или указывает на его автоматический выбор при <var>Ay</var>=<code>NAN</code>.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-Push-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Push</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fmat_005fpush"></a>Функция С: <em><code>void</code></em> <strong>mgl_mat_push</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Помещает матрицу преобразования в стек. Позднее вы можете восстановить текущее состояние с помощью функции Pop().
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Pop-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Pop</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fmat_005fpop"></a>Функция С: <em><code>void</code></em> <strong>mgl_mat_pop</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Заменяет (восстанавливает) матрицу преобразования на последнюю помещенную в стек матрицу.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetPlotFactor"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetPlotFactor</strong> <em>(<code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fset_005fplotfactor"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_plotfactor</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val)</em></dt>
-<dd><p>Задает масштаб картинки. Не рекомендуется устанавливать значения меньше 1.5. Это аналог функции Zoom(), но применяется только к конкретному подграфику. Используйте ноль для включения автоматического масштабирования.
-</p></dd></dl>
-
-
-
-<p>Также есть 3 функции, которые управляют перспективой <code>Perspective()</code>, масштабированием <code>Zoom()</code> и вращением <code>View()</code> всего рисунка. Т.е. они действуют как ещё одна матрица трансформации. Они были введены для вращения/приближения графика с помощью мыши. Не рекомендуется вызывать их при рисовании графика.
-</p>
-<a name="perspective"></a><dl>
-<dt><a name="index-perspective"></a>Команда MGL: <em></em> <strong>perspective</strong> <em><code>val</code></em></dt>
-<dt><a name="index-Perspective-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Perspective</strong> <em>(<code>mreal</code> a)</em></dt>
-<dt><a name="index-mgl_005fperspective"></a>Функция С: <em><code>void</code></em> <strong>mgl_perspective</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> a)</em></dt>
-<dd><p>Добавляет (включает) перспективу для графика. Параметр <em>a = Depth/(Depth+dz) \in [0,1)</em>. По умолчанию (<code>a=0</code>) перспектива отключена.
-</p></dd></dl>
-
-<a name="view"></a><dl>
-<dt><a name="index-view"></a>Команда MGL: <em></em> <strong>view</strong> <em><code>tetx tetz [tety=0]</code></em></dt>
-<dt><a name="index-View-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>View</strong> <em>(<code>mreal</code> TetX, <code>mreal</code> TetZ, <code>mreal</code> TetY=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fview"></a>Функция С: <em><code>void</code></em> <strong>mgl_view</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> TetX, <code>mreal</code> TetZ, <code>mreal</code> TetY)</em></dt>
-<dd><p>Вращает систему координат относительно осей {x, z, y} последовательно на углы <var>TetX</var>, <var>TetZ</var>, <var>TetY</var>. Вращение происходит независимо от <a href="#rotate">rotate</a>. Внимание! эти настройки не могут быть переписаны функцией <code>DefaultPlotParam()</code>. Используйте <code>Zoom(0,0,1,1)</code> для возвращения к виду по умолчанию.
-</p></dd></dl>
-
-<a name="zoom"></a><dl>
-<dt><a name="index-zoom"></a>Команда MGL: <em></em> <strong>zoom</strong> <em><code>x1 y1 x2 y2</code></em></dt>
-<dt><a name="index-Zoom"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Zoom</strong> <em>(<code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> x2, <code>mreal</code> y2)</em></dt>
-<dt><a name="index-mgl_005fset_005fzoom"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_zoom</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> x2, <code>mreal</code> y2)</em></dt>
-<dd><p>Масштабирует весь рисунок. После вызова функции текущий график будет очищен и в дальнейшем рисунок будет содержать только область [x1,x2]*[y1,y2] от исходного рисунка. Координаты <var>x1</var>, <var>x2</var>, <var>y1</var>, <var>y2</var> меняются в диапазоне от 0 до 1. Внимание! эти настройки не могут быть переписаны никакими другими функциями, включая <code>DefaultPlotParam()</code>. Используйте <code>Zoom(0,0,1,1)</code> для возвращения к виду по умолчанию.
-</p></dd></dl>
-
-
-<hr>
-<a name="Export-picture"></a>
-<div class="header">
-<p>
-Next: <a href="#Background" accesskey="n" rel="next">Background</a>, Previous: <a href="#Subplots-and-rotation" accesskey="p" rel="prev">Subplots and rotation</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Eksport-risunka"></a>
-<h3 class="section">4.5 Экспорт рисунка</h3>
-
-<a name="index-SetSize"></a>
-
-<p>Функции в этой группе сохраняют или дают доступ к полученному рисунку. Поэтом обычно они должны вызываться в конце рисования.
-</p>
-<a name="setsize"></a><dl>
-<dt><a name="index-setsize"></a>Команда MGL: <em></em> <strong>setsize</strong> <em><code>w h</code></em></dt>
-<dt><a name="index-SetSize-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetSize</strong> <em>(<code>int</code> width, <code>int</code> height, <code>bool</code> clear=<code>true</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005fsize"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_size</strong> <em>(<code>HMGL</code> gr, <code>int</code> width, <code>int</code> height)</em></dt>
-<dt><a name="index-mgl_005fscale_005fsize"></a>Функция С: <em><code>void</code></em> <strong>mgl_scale_size</strong> <em>(<code>HMGL</code> gr, <code>int</code> width, <code>int</code> height)</em></dt>
-<dd><p>Изменяет размер картинки в пикселях. Функция должна вызываться <strong>перед</strong> любыми функциями построения потому что полностью очищает содержимое рисунка при <var>clear</var>=<code>true</code>. Функция только очищает растровый рисунок и масштабирует примитивы при <var>clear</var>=<code>false</code>.
-</p></dd></dl>
-
-
-<a name="setsizescl"></a><dl>
-<dt><a name="index-setsizescl"></a>Команда MGL: <em></em> <strong>setsizescl</strong> <em><code>factor</code></em></dt>
-<dt><a name="index-SetSizeScl"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetSizeScl</strong> <em>(<code>double</code> factor)</em></dt>
-<dt><a name="index-mgl_005fset_005fsize_005fscl"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_size_scl</strong> <em>(<code>HMGL</code> gr, <code>double</code> factor)</em></dt>
-<dd><p>Задает множитель для высоты и ширины во всех последующих вызовах <a href="#setsize">setsize</a>.
-</p></dd></dl>
-
-
-<a name="quality"></a><dl>
-<dt><a name="index-quality"></a>Команда MGL: <em></em> <strong>quality</strong> <em>[<code>val</code>=2]</em></dt>
-<dt><a name="index-SetQuality"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetQuality</strong> <em>(<code>int</code> val=<code>MGL_DRAW_NORM</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005fquality"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_quality</strong> <em>(<code>HMGL</code> gr, <code>int</code> val)</em></dt>
-<dd><p>Задает качество графика в зависимости от значения <var>val</var>: <code>MGL_DRAW_WIRE=0</code> – нет рисования граней (наиболее быстрый), <code>MGL_DRAW_FAST=1</code> – нет интерполяции цвета (быстрый), <code>MGL_DRAW_NORM=2</code> – высокое качество (нормальный), <code>MGL_DRAW_HIGH=3</code> – высокое качество с рисованием 3d примитивов (стрелок и маркеров). Если установлен бит <code>MGL_DRAW_LMEM=0x4</code>, то происходит прямое рисование в растровое изображение (меньше затраты памяти). Если установлен бит <code>MGL_DRAW_DOTS=0x8</code>, то рисуются точки вместо примитивов (очень быстро).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetQuality"></a>Метод класса <code>mglGraph</code>: <em><code>int</code></em> <strong>GetQuality</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fget_005fquality"></a>Функция С: <em><code>void</code></em> <strong>mgl_get_quality</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Возвращает качество графика: <code>MGL_DRAW_WIRE=0</code> – нет рисования граней (наиболее быстрый), <code>MGL_DRAW_FAST=1</code> – нет интерполяции цвета (быстрый), <code>MGL_DRAW_NORM=2</code> – высокое качество (нормальный), <code>MGL_DRAW_HIGH=3</code> – высокое качество с рисованием 3d примитивов (стрелок и маркеров). Если установлен бит <code>MGL_DRAW_LMEM=0x4</code>, то происходит прямое рисование в растровое изображение (меньше затраты памяти). Если установлен бит <code>MGL_DRAW_DOTS=0x8</code>, то рисуются точки вместо примитивов (очень быстро).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-StartGroup"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>StartGroup</strong> <em>(const char *name)</em></dt>
-<dt><a name="index-mgl_005fstart_005fgroup"></a>Функция С: <em><code>void</code></em> <strong>mgl_start_group</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>name)</em></dt>
-<dd><p>Начинает определение группы. Группа может содержать объекты и другие группы. Они используются для выбора части модели при приближении, изменении прозрачности и т.д.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-EndGroup"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>EndGroup</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fend_005fgroup"></a>Функция С: <em><code>void</code></em> <strong>mgl_end_group</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Завершает определение группы.
-</p></dd></dl>
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Export-to-file" accesskey="1">Export to file</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Frames_002fAnimation" accesskey="2">Frames/Animation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Bitmap-in-memory" accesskey="3">Bitmap in memory</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Parallelization" accesskey="4">Parallelization</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Export-to-file"></a>
-<div class="header">
-<p>
-Next: <a href="#Frames_002fAnimation" accesskey="n" rel="next">Frames/Animation</a>, Up: <a href="#Export-picture" accesskey="u" rel="up">Export picture</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Eksport-v-fail"></a>
-<h4 class="subsection">4.5.1 Экспорт в файл</h4>
-
-<a name="index-Write"></a>
-<a name="index-WriteFrame"></a>
-<a name="index-WritePNG"></a>
-<a name="index-WriteGIF"></a>
-<a name="index-WriteSVG"></a>
-<a name="index-WriteBMP"></a>
-<a name="index-WriteEPS"></a>
-<a name="index-WriteBPS"></a>
-<a name="index-WriteTGA"></a>
-<a name="index-WriteTEX"></a>
-<a name="index-WritePRC"></a>
-<a name="index-WriteOBJ"></a>
-<a name="index-WriteWGL"></a>
-<a name="index-WriteJPEG"></a>
-<a name="index-ShowImage"></a>
-
-<p>Эти функции экспортируют текущую картинку (кадр) в файл. Имя файла <var>fname</var> должно иметь соответствующее расширение. Параметр <var>descr</var> дает краткое описание картинки. Пока прозрачность поддерживается только для форматов PNG, SVG, OBJ и PRC.
-</p>
-<a name="write"></a><dl>
-<dt><a name="index-write"></a>Команда MGL: <em></em> <strong>write</strong> <em>['fname'='']</em></dt>
-<dt><a name="index-WriteFrame-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteFrame</strong> <em>(<code>const char *</code>fname=<code>""</code>, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fframe"></a>Функция С: <em><code>void</code></em> <strong>mgl_write_frame</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Экспортирует текущий кадр в файл <var>fname</var> с типом, определяемым по расширению. Параметр <var>descr</var> добавляет описание (может быть пустым). Если <var>fname</var> пустой, то используется имя ‘<samp>frame####.jpg</samp>’, где ‘<samp>####</samp>’ – текущий номер кадра и имя ‘<samp>frame</samp>’ определяется переменной <a href="#plotid">plotid</a>.
-</p></dd></dl>
-
-<a name="bbox"></a><dl>
-<dt><a name="index-bbox"></a>Команда MGL: <em></em> <strong>bbox</strong> <em>x1 y1 [x2=<code>-1</code> y2=<code>-1</code>]</em></dt>
-<dt><a name="index-SetBBox"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetBBox</strong> <em>(<code>int</code> x1=<code>0</code>, <code>int</code> y1=<code>0</code>, <code>int</code> x2=<code>-1</code>, <code>int</code> y2=<code>-1</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005fbbox"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_bbox</strong> <em>(<code>HMGL</code> gr, <code>int</code> x1, <code>int</code> y1, <code>int</code> x2, <code>int</code> y2)</em></dt>
-<dd><p>Задает область изображения, которая будет сохранена в файл 2D формата. Если <var>x2</var><0 (<var>y2</var><0), то исходная ширина (высота) рисунка будет использована. Если <var>x1</var><0 или <var>y1</var><0 или <var>x1</var>>=<var>x2</var>|Width или <var>y1</var>>=<var>y2</var>|Height, то обрезания рисунка не будет.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-WritePNG-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>WritePNG</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>, <code>int</code> compr=<code>""</code>, <code>bool</code> alpha=<code>true</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fpng"></a>Функция С: <em><code>void</code></em> <strong>mgl_write_png</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fpng_005fsolid"></a>Функция С: <em><code>void</code></em> <strong>mgl_write_png_solid</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Экспортирует текущий кадр в PNG файл. Параметры функции следующие: <var>fname</var> – имя файла, <var>descr</var> – описание файла, <var>alpha</var> – прозрачность фона. Если при компиляции MathGL не был определен флаг HAVE_PNG, то экспорт в файл не производится.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteJPEG-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteJPEG</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fjpg"></a>Функция С: <em><code>void</code></em> <strong>mgl_write_jpg</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Экспортирует текущий кадр в JPEG файл. Параметры функции следующие: <var>fname</var> – имя файла, <var>descr</var> – описание файла. Если при компиляции MathGL не был определен флаг HAVE_JPEG, то экспорт в файл не производится.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteGIF-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteGIF</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fgif"></a>Функция С: <em><code>void</code></em> <strong>mgl_write_gif</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Экспортирует текущий кадр в GIF файл. Параметры функции следующие: <var>fname</var> – имя файла, <var>descr</var> – описание файла. Если при компиляции MathGL не был определен флаг HAVE_GIF, то экспорт в файл не производится.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteBMP-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteBMP</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fbmp"></a>Функция С: <em><code>void</code></em> <strong>mgl_write_bmp</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Экспортирует текущий кадр в BMP файл. Параметры функции следующие: <var>fname</var> – имя файла, <var>descr</var> – описание файла.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteTGA-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteTGA</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005ftga"></a>Функция С: <em><code>void</code></em> <strong>mgl_write_tga</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Экспортирует текущий кадр в TGA файл. Параметры функции следующие: <var>fname</var> – имя файла, <var>descr</var> – описание файла.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteEPS-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteEPS</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005feps"></a>Функция С: <em><code>void</code></em> <strong>mgl_write_eps</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Экспортирует текущий кадр в EPS файл, используя векторное представление графика. Вследствие чего не рекомендуется сохранять большие графики (поверхности, а особенно поверхности уровня) из-за большого размера файла. Хотя никаких внутренних ограничений на размер выходного файла нет. Для них лучше использовать растровый формат (например, PNG или JPEG). Параметры функции следующие: <var>fname</var> – имя файла, <var>descr</var> – описание файла. Если имя файла оканчивается на ‘<samp>z</samp>’ (например, ‘<samp>fname.eps.gz</samp>’), то файл автоматически архивируется в формате gzip. Отмечу, что формат EPS не поддерживает интерполяцию цвета, и картинка будет выглядеть как при использовании <a href="#quality">quality</a>=1.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteBPS-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteBPS</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005feps-1"></a>Функция С: <em><code>void</code></em> <strong>mgl_write_eps</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Экспортирует текущий кадр в EPS файл, используя растровое представление графика. Параметры функции следующие: <var>fname</var> – имя файла, <var>descr</var> – описание файла. Если имя файла оканчивается на ‘<samp>z</samp>’ (например, ‘<samp>fname.eps.gz</samp>’), то файл автоматически архивируется в формате gzip.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteSVG-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteSVG</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fsvg"></a>Функция С: <em><code>void</code></em> <strong>mgl_write_svg</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Экспортирует текущий кадр в SVG файл, используя векторное представление графика. Вследствие чего не рекомендуется сохранять большие графики (поверхности, а особенно поверхности уровня) из-за большого размера файла. Хотя никаких внутренних ограничений на размер выходного файла нет. Для них лучше использовать растровый формат (например, PNG или JPEG). Параметры функции следующие: <var>fname</var> – имя файла, <var>descr</var> – описание файла. Если имя файла оканчивается на ‘<samp>z</samp>’ (например, ‘<samp>fname.svgz</samp>’), то файл автоматически архивируется в формате gzip. Отмечу, что формат SVG не поддерживает интерполяцию цвета, и картинка будет выглядеть как при использовании <a href="#quality">quality</a>=1.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteTEX-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteTEX</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005ftex"></a>Функция С: <em><code>void</code></em> <strong>mgl_write_tex</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Экспортирует текущий кадр в LaTeX файл (пакет Tikz/PGF), используя векторное представление графика. Вследствие чего не рекомендуется сохранять большие графики (поверхности, а особенно поверхности уровня) из-за большого размера файла. Хотя никаких внутренних ограничений на размер выходного файла нет. Для них лучше использовать растровый формат (например, PNG или JPEG). Параметры функции следующие: <var>fname</var> – имя файла, <var>descr</var> – описание файла. Отмечу, что сейчас отсутствует изменение размера текста (например, в subplot), что может приводить к неправильному положению надписей.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-WritePRC-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>WritePRC</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>, <code>bool</code> make_pdf=<code>true</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fprc"></a>Функция С: <em><code>void</code></em> <strong>mgl_write_prc</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr, <code>int</code> make_pdf)</em></dt>
-<dd><p>Экспортирует текущий кадр в PRC файл, используя векторное представление графика (см. <a href="http://en.wikipedia.org/wiki/PRC_%28file_format%29">http://en.wikipedia.org/wiki/PRC_%28file_format%29</a>). Вследствие чего не рекомендуется сохранять большие графики (поверхности, а особенно поверхности уровня) из-за большого размера файла. Хотя никаких внутренних ограничений на размер выходного файла нет. Для них лучше использовать растровый формат (например, PNG или JPEG). Параметры функции следующие: <var>fname</var> – имя файла, <var>descr</var> – описание файла. Если параметр <var>make_pdf</var>=<code>true</code> и PDF был выбран при конфигурировании MathGL, то также создается соответствующий PDF файл с 3D изображением.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteOBJ-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteOBJ</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fobj"></a>Функция С: <em><code>void</code></em> <strong>mgl_write_obj</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Экспортирует текущий кадр в OBJ/MTL файл, используя векторное представление графика (см. <a href="http://en.wikipedia.org/wiki/Wavefront_.obj_file">OBJ формат</a>). Вследствие чего не рекомендуется сохранять большие графики (поверхности, а особенно поверхности уровня) из-за большого размера файла. Хотя никаких внутренних ограничений на размер выходного файла нет. Для них лучше использовать растровый формат (например, PNG или JPEG). Параметры функции следующие: <var>fname</var> – имя файла, <var>descr</var> – описание файла.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-WriteXYZ"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteXYZ</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_write_xyz</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Экспортирует текущий кадр в XYZ/XYZL/XYZF файлы, используя векторное представление графика (см. <a href="http://people.sc.fsu.edu/~jburkardt/data/xyz/xyz.html">XYZ формат</a>). Вследствие чего не рекомендуется сохранять большие графики (поверхности, а особенно поверхности уровня) из-за большого размера файла. Хотя никаких внутренних ограничений на размер выходного файла нет. Для них лучше использовать растровый формат (например, PNG или JPEG). Параметры функции следующие: <var>fname</var> – имя файла, <var>descr</var> – описание файла.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteSTL"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteSTL</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fstl"></a>Функция С: <em><code>void</code></em> <strong>mgl_write_stl</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Экспортирует текущий кадр в STL файл, используя векторное представление графика (см. <a href="http://en.wikipedia.org/wiki/STL_(file_format)">STL формат</a>). Вследствие чего не рекомендуется сохранять большие графики (поверхности, а особенно поверхности уровня) из-за большого размера файла. Хотя никаких внутренних ограничений на размер выходного файла нет. Для них лучше использовать растровый формат (например, PNG или JPEG). Параметры функции следующие: <var>fname</var> – имя файла, <var>descr</var> – описание файла.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-WriteOFF"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteOFF</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>, <code>bool</code> colored=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005foff"></a>Функция С: <em><code>void</code></em> <strong>mgl_write_off</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr, <code>bool</code> colored)</em></dt>
-<dd><p>Экспортирует текущий кадр в OFF файл, используя векторное представление графика (см. <a href="http://people.sc.fsu.edu/~jburkardt/data/off/off.html">OFF формат</a>). Вследствие чего не рекомендуется сохранять большие графики (поверхности, а особенно поверхности уровня) из-за большого размера файла. Хотя никаких внутренних ограничений на размер выходного файла нет. Для них лучше использовать растровый формат (например, PNG или JPEG). Параметры функции следующие: <var>fname</var> – имя файла, <var>descr</var> – описание файла.
-</p></dd></dl>
-
-
-
-
-<dl>
-<dt><a name="index-ShowImage-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ShowImage</strong> <em>(<code>const char *</code>viewer, <code>bool</code> nowait=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fshow_005fimage"></a>Функция С: <em><code>void</code></em> <strong>mgl_show_image</strong> <em>(<code>const char *</code>viewer, <code>int</code> nowait)</em></dt>
-<dd><p>Отображает текущий кадр используя внешнюю программу просмотра <var>viewer</var>. Функция сохраняет картинку во временный файл и вызывает <var>viewer</var> для его отображения. Если <var>nowait</var>=<code>true</code>, то функция возвращает управление немедленно – не ждет пока окно просмотра будет закрыто.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-WriteJSON"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>WriteJSON</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fwrite_005fjson"></a>Функция С: <em><code>void</code></em> <strong>mgl_write_json</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Экспортирует точки и примитивы в текстовый файл используя <a href="#JSON-format">JSON format</a>. В дальнейшем этот файл можно загрузить и просмотреть в JavaScript скрипте. Параметры функции следующие: <var>fname</var> – имя файла, <var>descr</var> – описание файла.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ExportMGLD"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ExportMGLD</strong> <em>(<code>const char *</code>fname, <code>const char *</code>descr=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fexport_005fmgld"></a>Функция С: <em><code>void</code></em> <strong>mgl_export_mgld</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</em></dt>
-<dd><p>Экспортирует точки и примитивы в файл <a href="#MGLD-format">MGLD format</a>. В дальнейшем этот файл можно загрузить и просмотреть с помощью <code>mglview</code>. Параметры функции следующие: <var>fname</var> – имя файла, <var>descr</var> – описание файла.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ImportMGLD"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ImportMGLD</strong> <em>(<code>const char *</code>fname, <code>bool</code> add=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fimport_005fmgld"></a>Функция С: <em><code>void</code></em> <strong>mgl_import_mgld</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>int</code> add)</em></dt>
-<dd><p>Импортирует точки и примитивы из файла в <a href="#MGLD-format">MGLD format</a>. Параметры функции следующие: <var>fname</var> – имя файла, <var>add</var> – флаг добавления или замены существующих точек и примитивов.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Frames_002fAnimation"></a>
-<div class="header">
-<p>
-Next: <a href="#Bitmap-in-memory" accesskey="n" rel="next">Bitmap in memory</a>, Previous: <a href="#Export-to-file" accesskey="p" rel="prev">Export to file</a>, Up: <a href="#Export-picture" accesskey="u" rel="up">Export picture</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Kadry_002fAnimaciya"></a>
-<h4 class="subsection">4.5.2 Кадры/Анимация</h4>
-
-
-
-<a name="index-NewFrame"></a>
-<a name="index-EndFrame"></a>
-<a name="index-GetNumFrame"></a>
-<a name="index-ResetFrames"></a>
-<a name="index-StartGIF"></a>
-<a name="index-CloseGIF"></a>
-
-<p>Эти функции позволяют создавать несколько картинок одновременно. В большинстве случаев это бесполезно, но для органов управления (см. <a href="#Widget-classes">Widget classes</a>) это позволяет показывать анимацию. Также можно записать несколько кадров в анимированный GIF файл.
-</p>
-<dl>
-<dt><a name="index-NewFrame-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>NewFrame</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fnew_005fframe"></a>Функция С: <em><code>void</code></em> <strong>mgl_new_frame</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Создает новый кадр. Функция возвращает номер текущего кадра. В режиме OpenGL функция не должны вызываться в параллельных потоках! – используйте прямое создание списка. Функция <code>EndFrame()</code> <strong>должна</strong> быть вызвана после рисования кадра для каждого вызова этой функции.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-EndFrame-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>EndFrame</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fend_005fframe"></a>Функция С: <em><code>void</code></em> <strong>mgl_end_frame</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Завершает рисование кадра.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetNumFrame-1"></a>Метод класса <code>mglGraph</code>: <em><code>int</code></em> <strong>GetNumFrame</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fget_005fnum_005fframe"></a>Функция С: <em><code>int</code></em> <strong>mgl_get_num_frame</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Возвращает число созданных кадров.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetFrame"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>GetFrame</strong> <em>(<code>int</code> i)</em></dt>
-<dt><a name="index-mgl_005fget_005fframe"></a>Функция С: <em><code>void</code></em> <strong>mgl_get_frame</strong> <em>(<code>HMGL</code> gr, <code>int</code> i)</em></dt>
-<dd><p>Завершает рисование кадра и сохраняет объекты рисования в кадр с номером <var>i</var>, который должен быть в диапазоне [0, <code>GetNumFrame()</code>-1]. Функция аналогична <code>EndFrame()</code>, но не добавляет кадр в GIF изображение.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetFrame-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>GetFrame</strong> <em>(<code>int</code> i)</em></dt>
-<dt><a name="index-mgl_005fget_005fframe-1"></a>Функция С: <em><code>void</code></em> <strong>mgl_get_frame</strong> <em>(<code>HMGL</code> gr, <code>int</code> i)</em></dt>
-<dd><p>Заменяет объекты рисования на объекты из кадра с номером <var>i</var>. Функция работает если установлен флаг <code>MGL_VECT_FRAME</code> (по умолчанию).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ShowFrame"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ShowFrame</strong> <em>(<code>int</code> i)</em></dt>
-<dt><a name="index-mgl_005fshow_005fframe"></a>Функция С: <em><code>void</code></em> <strong>mgl_show_frame</strong> <em>(<code>HMGL</code> gr, <code>int</code> i)</em></dt>
-<dd><p>Добавляет объекты рисования из кадра с номером <var>i</var> к уже существующим. Функция работает если установлен флаг <code>MGL_VECT_FRAME</code> (по умолчанию).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-DelFrame"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>DelFrame</strong> <em>(<code>int</code> i)</em></dt>
-<dt><a name="index-mgl_005fdel_005fframe"></a>Функция С: <em><code>void</code></em> <strong>mgl_del_frame</strong> <em>(<code>HMGL</code> gr, <code>int</code> i)</em></dt>
-<dd><p>Удаляет объекты рисования для кадра с номером <var>i</var> и сдвигает нумерацию всех последующих кадров. Функция работает если установлен флаг <code>MGL_VECT_FRAME</code> (по умолчанию).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ResetFrames-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ResetFrames</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005freset_005fframes"></a>Функция С: <em><code>void</code></em> <strong>mgl_reset_frames</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Сбрасывает счетчик кадров в 0.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ClearFrame"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ClearFrame</strong> <em>(<code>int</code> i)</em></dt>
-<dt><a name="index-mgl_005fclear_005fframe"></a>Функция С: <em><code>void</code></em> <strong>mgl_clear_frame</strong> <em>(<code>HMGL</code> gr, <code>int</code> i)</em></dt>
-<dd><p>Очищает текущий список объектов.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-StartGIF-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>StartGIF</strong> <em>(<code>const char *</code>fname, <code>int</code> ms=<code>100</code>)</em></dt>
-<dt><a name="index-mgl_005fstart_005fgif"></a>Функция С: <em><code>void</code></em> <strong>mgl_start_gif</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>int</code> ms)</em></dt>
-<dd><p>Начинает запись кадров в анимированный GIF файл <var>fname</var>. Параметр <var>ms</var> задает задержку между кадрами в миллисекундах. Вы <strong>не должны</strong> менять размер рисунка во время создания кино. Используйте CloseGIF() для завершения записи. Эта функция не работает в режиме OpenGL.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-CloseGIF-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>CloseGIF</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fclose_005fgif"></a>Функция С: <em><code>void</code></em> <strong>mgl_close_gif</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Завершает запись анимированного GIF файла.
-</p></dd></dl>
-
-
-<hr>
-<a name="Bitmap-in-memory"></a>
-<div class="header">
-<p>
-Next: <a href="#Parallelization" accesskey="n" rel="next">Parallelization</a>, Previous: <a href="#Frames_002fAnimation" accesskey="p" rel="prev">Frames/Animation</a>, Up: <a href="#Export-picture" accesskey="u" rel="up">Export picture</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Risovanie-v-pamyati"></a>
-<h4 class="subsection">4.5.3 Рисование в памяти</h4>
-
-
-<p>Эти функции возвращают созданный растровый рисунок, его ширину и высоту. В дальнейшем его можно использовать в любой графической библиотеке (см. также, <a href="#Widget-classes">Widget classes</a>) или сохранить в файл (см. также, <a href="#Export-to-file">Export to file</a>).
-</p>
-<dl>
-<dt><a name="index-GetRGB"></a>Метод класса <code>mglGraph</code>: <em><code>const unsigned char *</code></em> <strong>GetRGB</strong> <em>()</em></dt>
-<dt><a name="index-GetRGB-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>GetRGB</strong> <em>(<code>char *</code>buf, <code>int</code> size)</em></dt>
-<dt><a name="index-GetBGRN"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>GetBGRN</strong> <em>(<code>char *</code>buf, <code>int</code> size)</em></dt>
-<dt><a name="index-mgl_005fget_005frgb"></a>Функция С: <em><code>const unsigned char *</code></em> <strong>mgl_get_rgb</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Возвращает растровое изображение в формате RGB для текущего кадра. Формат каждого элемента (пикселя): {red, green, blue}. Число элементов Width*Height. Положение элемента {i,j} есть [3*i + 3*Width*j] (или [4*i + 4*Width*j] для <code>GetBGRN()</code>). В Python вы должны предоставить буфер <var>buf</var> достаточного размера <var>size</var>, т.е. код должен выглядеть следующим образом (для Python)
-</p><pre class="verbatim">from mathgl import *
-gr = mglGraph();
-bits='\t';
-bits=bits.expandtabs(4*gr.GetWidth()*gr.GetHeight());
-gr.GetBGRN(bits, len(bits));
-</pre></dd></dl>
-
-<dl>
-<dt><a name="index-GetRGBA"></a>Метод класса <code>mglGraph</code>: <em><code>const unsigned char *</code></em> <strong>GetRGBA</strong> <em>()</em></dt>
-<dt><a name="index-GetRGBA-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>GetRGBA</strong> <em>(<code>char *</code>buf, <code>int</code> size)</em></dt>
-<dt><a name="index-mgl_005fget_005frgba"></a>Функция С: <em><code>const unsigned char *</code></em> <strong>mgl_get_rgba</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Возвращает растровое изображение в формате RGBA для текущего кадра. Формат каждого элемента (пикселя): {red, green, blue, alpha}. Число элементов Width*Height. Положение элемента {i,j} есть [4*i + 4*Width*j].
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetWidth"></a>Метод класса <code>mglGraph</code>: <em><code>int</code></em> <strong>GetWidth</strong> <em>()</em></dt>
-<dt><a name="index-GetHeight"></a>Метод класса <code>mglGraph</code>: <em><code>int</code></em> <strong>GetHeight</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fget_005fwidth"></a>Функция С: <em><code>int</code></em> <strong>mgl_get_width</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dt><a name="index-mgl_005fget_005fheight"></a>Функция С: <em><code>int</code></em> <strong>mgl_get_height</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Возвращает ширину и высоту изображения.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-CalcXYZ"></a>Метод класса <code>mglGraph</code>: <em><code>mglPoint</code></em> <strong>CalcXYZ</strong> <em>(<code>int</code> xs, <code>int</code> ys)</em></dt>
-<dt><a name="index-mgl_005fcalc_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_calc_xyz</strong> <em>(<code>HMGL</code> gr, <code>int</code> xs, <code>int</code> ys, <code>mreal *</code>x, <code>mreal *</code>y, <code>mreal *</code>z)</em></dt>
-<dd><p>Вычисляет 3D координаты {x,y,z} для экранной точки {xs,ys}. В данный момент игнорируется перспектива графика и формулы перехода в криволинейные координаты. Вычисления производятся для последнего использованного InPlot (см. <a href="#Subplots-and-rotation">Subplots and rotation</a>).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-CalcScr"></a>Метод класса <code>mglGraph</code>: <em><code>mglPoint</code></em> <strong>CalcScr</strong> <em>(<code>mglPoint</code> p)</em></dt>
-<dt><a name="index-mgl_005fcalc_005fscr"></a>Функция С: <em><code>void</code></em> <strong>mgl_calc_scr</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>int *</code>xs, <code>int *</code>ys)</em></dt>
-<dd><p>Вычисляет экранные координаты {xs,ys} для 3D координат {x,y,z}. Вычисления производятся для последнего использованного InPlot (см. <a href="#Subplots-and-rotation">Subplots and rotation</a>).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetObjId"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetObjId</strong> <em>(<code>int</code> id)</em></dt>
-<dt><a name="index-mgl_005fset_005fobj_005fid"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_obj_id</strong> <em>(<code>HMGL</code> gr, <code>int</code> id)</em></dt>
-<dd><p>Задает числовой идентификатор для объектов или subplot/inplot.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetObjId"></a>Метод класса <code>mglGraph</code>: <em><code>int</code></em> <strong>GetObjId</strong> <em>(<code>int</code> xs, <code>int</code> ys)</em></dt>
-<dt><a name="index-mgl_005fget_005fobj_005fid"></a>Функция С: <em><code>int</code></em> <strong>mgl_get_obj_id</strong> <em>(<code>HMGL</code> gr, <code>int</code> xs, <code>int</code> ys)</em></dt>
-<dd><p>Возвращает числовой идентификатор верхнего объекта в точке {xs, ys} рисунка.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetSplId"></a>Метод класса <code>mglGraph</code>: <em><code>int</code></em> <strong>GetSplId</strong> <em>(<code>int</code> xs, <code>int</code> ys)</em></dt>
-<dt><a name="index-mgl_005fget_005fspl_005fid"></a>Функция С: <em><code>int</code></em> <strong>mgl_get_spl_id</strong> <em>(<code>HMGL</code> gr, <code>int</code> xs, <code>int</code> ys)</em></dt>
-<dd><p>Возвращает числовой идентификатор верхнего "подграфика" в точке {xs, ys} рисунка.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Highlight"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Highlight</strong> <em>(<code>int</code> id)</em></dt>
-<dt><a name="index-mgl_005fhighlight"></a>Функция С: <em><code>void</code></em> <strong>mgl_highlight</strong> <em>(<code>HMGL</code> gr, <code>int</code> id)</em></dt>
-<dd><p>Выделяет объект с заданным <var>id</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-IsActive"></a>Метод класса <code>mglGraph</code>: <em><code>long</code></em> <strong>IsActive</strong> <em>(<code>int</code> xs, <code>int</code> ys, <code>int</code> d=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fis_005factive"></a>Функция С: <em><code>long</code></em> <strong>mgl_is_active</strong> <em>(<code>HMGL</code> gr, <code>int</code> xs, <code>int</code> ys, <code>int</code> d)</em></dt>
-<dd><p>Проверяет близка ли точка {<var>xs</var>, <var>ys</var>} к активной точке (т.е. mglBase::Act) с точностью <var>d</var> и возвращает индекс активной точки или <code>-1</code> если не найдено. Активные точки – специальные точки, которые характеризуют примитивы (например, вершины). Это функция только для опытных пользователей.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetDrawReg"></a>Метод класса <code>mglGraph</code>: <em><code>long</code></em> <strong>SetDrawReg</strong> <em>(<code>int</code> nx=<code>1</code>, <code>int</code> ny=<code>1</code>, <code>int</code> m=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fset_005fdraw_005freg"></a>Функция С: <em><code>long</code></em> <strong>mgl_set_draw_reg</strong> <em>(<code>HMGL</code> gr, <code>int</code> nx, <code>int</code> ny, <code>int</code> m)</em></dt>
-<dd><p>Ограничивает рисование прямоугольной областью <var>m</var>-ой клетки матрицы размером <var>nx</var>*<var>ny</var> (аналогично <a href="#subplot">subplot</a>). Функция может бытб использована для ускорения вывода путем уменьшения выводимых примитивов. Это функция только для опытных пользователей.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Parallelization"></a>
-<div class="header">
-<p>
-Previous: <a href="#Bitmap-in-memory" accesskey="p" rel="prev">Bitmap in memory</a>, Up: <a href="#Export-picture" accesskey="u" rel="up">Export picture</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Rasparallelivanie"></a>
-<h4 class="subsection">4.5.4 Распараллеливание</h4>
-
-
-<a name="index-Combine"></a>
-<a name="index-MPI_005fSend"></a>
-<a name="index-MPI_005fRecv"></a>
-
-<p>Многие функции MathGL используют несколько потоков для ускорения работы (если MathGL была собрана с поддержкой pthread). При этом можно настраивать число используемых потоков.
-</p>
-<dl>
-<dt><a name="index-mgl_005fset_005fnum_005fthr"></a>Функция С: <em><code>int</code></em> <strong>mgl_set_num_thr</strong> <em>(<code>int</code> n)</em></dt>
-<dd><p>Задает число потоков, которое будет использовано в MathGL. При <var>n</var><1 число потоков задается как максимальное число процессоров (ядер) в системе. При <var>n</var>=1 не используется распараллеливание.
-</p></dd></dl>
-
-<p>Другая возможность – комбинирование изображений из разных объектов <code>mglGraph</code>. Эти методы наиболее подходят для компьютерных кластеров, когда данные настолько велики, что не могут поместиться в памяти отдельного компьютера.
-</p>
-<dl>
-<dt><a name="index-Combine-2"></a>Метод класса <code>mglGraph</code>: <em><code>int</code></em> <strong>Combine</strong> <em>(<code>const mglGraph *</code>g)</em></dt>
-<dt><a name="index-mgl_005fcombine_005fgr"></a>Функция С: <em><code>int</code></em> <strong>mgl_combine_gr</strong> <em>(<code>HMGL</code> gr, <code>HMGL</code> g)</em></dt>
-<dd><p>Комбинирует (добавляет) рисунок из <var>g</var> с <var>gr</var>, принимая во внимание “высоту” пикселей. Ширина и высота обоих рисунков должна быть одинаковы.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-MPI_005fSend-1"></a>Метод класса <code>mglGraph</code>: <em><code>int</code></em> <strong>MPI_Send</strong> <em>(<code>int</code> id)</em></dt>
-<dt><a name="index-mgl_005fmpi_005fsend"></a>Функция С: <em><code>int</code></em> <strong>mgl_mpi_send</strong> <em>(<code>HMGL</code> gr, <code>int</code> id)</em></dt>
-<dd><p>Посылает рисунок из компьютера (ноды) <var>id</var>, используя MPI. Ширина и высота обоих рисунков должна быть одинаковы.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-MPI_005fRecv-1"></a>Метод класса <code>mglGraph</code>: <em><code>int</code></em> <strong>MPI_Recv</strong> <em>(<code>int</code> id)</em></dt>
-<dt><a name="index-mgl_005fmpi_005fsend-1"></a>Функция С: <em><code>int</code></em> <strong>mgl_mpi_send</strong> <em>(<code>HMGL</code> gr, <code>int</code> id)</em></dt>
-<dd><p>Принимает рисунок из компьютера (ноды) <var>id</var>, используя MPI. Ширина и высота обоих рисунков должна быть одинаковы.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Background"></a>
-<div class="header">
-<p>
-Next: <a href="#Primitives" accesskey="n" rel="next">Primitives</a>, Previous: <a href="#Export-picture" accesskey="p" rel="prev">Export picture</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Fonovoe-izobrazhenie"></a>
-<h3 class="section">4.6 Фоновое изображение</h3>
-
-<a name="index-LoadBackground"></a>
-<a name="index-Clf"></a>
-<a name="index-Rasterize"></a>
-
-<p>These functions change background image.
-</p>
-<a name="clf"></a><dl>
-<dt><a name="index-clf"></a>Команда MGL: <em></em> <strong>clf</strong> <em>['col']</em></dt>
-<dt><a name="index-clf-1"></a>Команда MGL: <em></em> <strong>clf</strong> <em>r g b</em></dt>
-<dt><a name="index-Clf-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Clf</strong> <em>()</em></dt>
-<dt><a name="index-Clf-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Clf</strong> <em>(<code>const char *</code> col)</em></dt>
-<dt><a name="index-Clf-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Clf</strong> <em>(<code>char</code> col)</em></dt>
-<dt><a name="index-Clf-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Clf</strong> <em>(<code>mreal</code> r, <code>mreal</code> g, <code>mreal</code> b)</em></dt>
-<dt><a name="index-mgl_005fclf"></a>Функция С: <em><code>void</code></em> <strong>mgl_clf</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dt><a name="index-mgl_005fclf_005fstr"></a>Функция С: <em><code>void</code></em> <strong>mgl_clf_str</strong> <em>(<code>HMGL</code> gr, <code>const char *</code> col)</em></dt>
-<dt><a name="index-mgl_005fclf_005fchr"></a>Функция С: <em><code>void</code></em> <strong>mgl_clf_chr</strong> <em>(<code>HMGL</code> gr, <code>char</code> col)</em></dt>
-<dt><a name="index-mgl_005fclf_005frgb"></a>Функция С: <em><code>void</code></em> <strong>mgl_clf_rgb</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> r, <code>mreal</code> g, <code>mreal</code> b)</em></dt>
-<dd><p>Очищает рисунок и заполняет фон заданным цветом.
-</p></dd></dl>
-
-<a name="rasterize"></a><dl>
-<dt><a name="index-rasterize"></a>Команда MGL: <em></em> <strong>rasterize</strong></dt>
-<dt><a name="index-Rasterize-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Rasterize</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005frasterize"></a>Функция С: <em><code>void</code></em> <strong>mgl_rasterize</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Завершает рисование графика и помещает результат в качестве фона. После этого, очищает список примитивов (как <a href="#clf">clf</a>). Функция полезна для сохранения части графика (например, поверхностей или векторных полей) в растровом виде, а другой части (кривых, осей и пр.) в векторном.
-</p></dd></dl>
-
-<a name="background"></a><dl>
-<dt><a name="index-background"></a>Команда MGL: <em></em> <strong>background</strong> <em>'fname' [<code>alpha=1</code>]</em></dt>
-<dt><a name="index-LoadBackground-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>LoadBackground</strong> <em>(<code>const char *</code> fname, <code>double</code> alpha=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fload_005fbackground"></a>Функция С: <em><code>void</code></em> <strong>mgl_load_background</strong> <em>(<code>HMGL</code> gr, <code>const char *</code> fname, <code>double</code> alpha)</em></dt>
-<dd><p>Загружает PNG или JPEG файл <var>fname</var> в качестве фона для графика. Параметр <var>alpha</var> задает прозрачность фона вручную.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Primitives"></a>
-<div class="header">
-<p>
-Next: <a href="#Text-printing" accesskey="n" rel="next">Text printing</a>, Previous: <a href="#Export-picture" accesskey="p" rel="prev">Export picture</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Risovanie-primitivov"></a>
-<h3 class="section">4.7 Рисование примитивов</h3>
-
-<a name="index-Ball"></a>
-<a name="index-Line"></a>
-<a name="index-Curve"></a>
-<a name="index-Glyph"></a>
-<a name="index-Face"></a>
-<a name="index-FaceX"></a>
-<a name="index-FaceY"></a>
-<a name="index-FaceZ"></a>
-<a name="index-Cone"></a>
-<a name="index-Drop"></a>
-<a name="index-Sphere"></a>
-
-<a name="index-Mark"></a>
-<a name="index-Error"></a>
-
-<p>Эти функции рисуют рисуют простые объекты типа линий, точек, сфер, капель, конусов, и т.д.
-</p>
-<a name="ball"></a><dl>
-<dt><a name="index-ball"></a>Команда MGL: <em></em> <strong>ball</strong> <em><code>x y</code> ['col'='r.']</em></dt>
-<dt><a name="index-ball-1"></a>Команда MGL: <em></em> <strong>ball</strong> <em><code>x y z</code> ['col'='r.']</em></dt>
-<dt><a name="index-Ball-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Ball</strong> <em>(<code>mglPoint</code> p, <code>char</code> col=<code>'r'</code>)</em></dt>
-<dt><a name="index-Mark-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Mark</strong> <em>(<code>mglPoint</code> p, <code>const char *</code>mark)</em></dt>
-<dt><a name="index-mgl_005fmark"></a>Функция С: <em><code>void</code></em> <strong>mgl_mark</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>const char *</code>mark)</em></dt>
-<dd><p>Рисует маркер (точку по умолчанию) с координатами <var>p</var>={<var>x</var>, <var>y</var>, <var>z</var>} и цветом <var>col</var>.
-</p></dd></dl>
-
-<a name="errbox"></a><dl>
-<dt><a name="index-errbox"></a>Команда MGL: <em></em> <strong>errbox</strong> <em><code>x y ex ey</code> ['stl'='']</em></dt>
-<dt><a name="index-errbox-1"></a>Команда MGL: <em></em> <strong>errbox</strong> <em><code>x y z ex ey ez</code> ['stl'='']</em></dt>
-<dt><a name="index-Error-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Error</strong> <em>(<code>mglPoint</code> p, <code>mglPoint</code> e, <code>char</code> *stl=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ferror_005fbox"></a>Функция С: <em><code>void</code></em> <strong>mgl_error_box</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> px, <code>mreal</code> py, <code>mreal</code> pz, <code>mreal</code> ex, <code>mreal</code> ey, <code>mreal</code> ez, <code>char *</code>stl)</em></dt>
-<dd><p>Рисует 3d error box в точке <var>p</var>={<var>x</var>, <var>y</var>, <var>z</var>} размером <var>e</var>={<var>ex</var>, <var>ey</var>, <var>ez</var>} и стилем <var>stl</var>. Используйте NAN в компонентах <var>e</var> для уменьшения рисуемых элементов.
-</p></dd></dl>
-
-<a name="line"></a><dl>
-<dt><a name="index-line"></a>Команда MGL: <em></em> <strong>line</strong> <em><code>x1 y1 x2 y2</code> ['stl'='']</em></dt>
-<dt><a name="index-line-1"></a>Команда MGL: <em></em> <strong>line</strong> <em><code>x1 y1 z1 x2 y2 z2</code> ['stl'='']</em></dt>
-<dt><a name="index-Line-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Line</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> p2, <code>char *</code>stl=<code>"B"</code>, <code>int</code>num=<code>2</code>)</em></dt>
-<dt><a name="index-mgl_005fline"></a>Функция С: <em><code>void</code></em> <strong>mgl_line</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> z1, <code>mreal</code> x2, <code>mreal</code> y2, <code>mreal</code> z2, <code>char *</code>stl, <code>int</code>num)</em></dt>
-<dd><p>Рисует геодезическую линию (декартовых координатах – прямую) из точки <var>p1</var> в <var>p2</var> использую стиль линии <var>stl</var>. Параметр <var>num</var> определяет гладкость линии (число точек на линии). Если <var>num</var>=<code>2</code>, то рисуется прямая даже в криволинейных координатах (см. <a href="#Curved-coordinates">Curved coordinates</a>). Наоборот, для больших значений (например, =<code>100</code>) рисуется геодезическая линия (окружность в полярных координатах, парабола в параболических и т.д.). Линия рисуется даже если часть ее лежит вне диапазона осей координат.
-</p></dd></dl>
-
-<a name="curve"></a><dl>
-<dt><a name="index-curve"></a>Команда MGL: <em></em> <strong>curve</strong> <em><code>x1 y1 dx1 dy1 x2 y2 dx2 dy2</code> ['stl'='']</em></dt>
-<dt><a name="index-curve-1"></a>Команда MGL: <em></em> <strong>curve</strong> <em><code>x1 y1 z1 dx1 dy1 dz1 x2 y2 z2 dx2 dy2 dz2</code> ['stl'='']</em></dt>
-<dt><a name="index-Curve-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Curve</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> d1, <code>mglPoint</code> p2, <code>mglPoint</code> d2, <code>const char *</code>stl=<code>"B"</code>, <code>int</code> num=<code>100</code>)</em></dt>
-<dt><a name="index-mgl_005fcurve"></a>Функция С: <em><code>void</code></em> <strong>mgl_curve</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> z1, <code>mreal</code> dx1, <code>mreal</code> dy1, <code>mreal</code> dz1, <code>mreal</code> x2, <code>mreal</code> y2, <code>mreal</code> z2, <code>mreal</code> dx2, <code>mreal</code> dy2, <code>mreal</code> dz2, <code>const char *</code>stl, <code>int</code> num)</em></dt>
-<dd><p>Рисует кривую Безье из точки <var>p1</var> в <var>p2</var> используя стиль линии <var>stl</var>. Касательные в точках пропорциональны <var>d1</var>, <var>d2</var>. Параметр <var>num</var> определяет гладкость линии (число точек на линии). Если <var>num</var>=<code>2</code>, то рисуется прямая даже в криволинейных координатах (см. <a href="#Curved-coordinates">Curved coordinates</a>). Наоборот, для больших значений (например, =<code>100</code>) рисуется геодезическая линия (окружность в полярных координатах, парабола в параболических и т.д.). Кривая рисуется даже если часть ее лежит вне диапазона осей координат.
-</p></dd></dl>
-
-<a name="face"></a><dl>
-<dt><a name="index-face"></a>Команда MGL: <em></em> <strong>face</strong> <em><code>x1 y1 x2 y2 x3 y3 x4 y4</code> ['stl'='']</em></dt>
-<dt><a name="index-face-1"></a>Команда MGL: <em></em> <strong>face</strong> <em><code>x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4</code> ['stl'='']</em></dt>
-<dt><a name="index-Face-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Face</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> p2, <code>mglPoint</code> p3, <code>mglPoint</code> p4, <code>const char *</code>stl=<code>"w"</code>)</em></dt>
-<dt><a name="index-mgl_005fface"></a>Функция С: <em><code>void</code></em> <strong>mgl_face</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> z1, <code>mreal</code> x2, <code>mreal</code> y2, <code>mreal</code> z2, <code>mreal</code> x3, <code>mreal</code> y3, <code>mreal</code> z3, <code>mreal</code> x4, <code>mreal</code> y4, <code>mreal</code> z4, <code>const char *</code>stl)</em></dt>
-<dd><p>Рисует заполненный четырехугольник (грань) с углами в точках <var>p1</var>, <var>p2</var>, <var>p3</var>, <var>p4</var> и цветом(-ами) <var>stl</var>. При этом цвет может быть один для всей грани, или различным если указаны все 4 цвета. Грань будет нарисована даже если часть ее лежит вне диапазона осей координат.
-</p></dd></dl>
-
-<a name="rect"></a><dl>
-<dt><a name="index-rect"></a>Команда MGL: <em></em> <strong>rect</strong> <em><code>x1 y1 x2 y2</code> ['stl'='']</em></dt>
-<dt><a name="index-rect-1"></a>Команда MGL: <em></em> <strong>rect</strong> <em><code>x1 y1 z1 x2 y2 z2</code> ['stl'='']</em></dt>
-<dd><p>Рисует закрашенный прямоугольник (грань) с вершинами {<var>x1</var>, <var>y1</var>, <var>z1</var>} и {<var>x2</var>, <var>y2</var>, <var>z2</var>} цветом <var>stl</var>. При этом цвет может быть один для всей грани, или различным для разных вершин если указаны все 4 цвета. Грань будет нарисована даже если часть ее лежит вне диапазона осей координат.
-</p></dd></dl>
-
-<a name="facex"></a><a name="facey"></a><a name="facez"></a><dl>
-<dt><a name="index-facex"></a>Команда MGL: <em></em> <strong>facex</strong> <em><code>x0 y0 z0 wy wz</code> ['stl'='' <code>d1=0 d2=0</code>]</em></dt>
-<dt><a name="index-facey"></a>Команда MGL: <em></em> <strong>facey</strong> <em><code>x0 y0 z0 wx wz</code> ['stl'='' <code>d1=0 d2=0</code>]</em></dt>
-<dt><a name="index-facez"></a>Команда MGL: <em></em> <strong>facez</strong> <em><code>x0 y0 z0 wx wy</code> ['stl'='' <code>d1=0 d2=0</code>]</em></dt>
-<dt><a name="index-FaceX-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>FaceX</strong> <em>(<code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> wy, <code>mreal</code> wz, <code>const char *</code>stl=<code>"w"</code>, <code>mreal</code> d1=<code>0</code>, <code>mreal</code> d2=<code>0</code>)</em></dt>
-<dt><a name="index-FaceY-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>FaceY</strong> <em>(<code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> wx, <code>mreal</code> wz, <code>const char *</code>stl=<code>"w"</code>, <code>mreal</code> d1=<code>0</code>, <code>mreal</code> d2=<code>0</code>)</em></dt>
-<dt><a name="index-FaceZ-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>FaceZ</strong> <em>(<code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> wx, <code>mreal</code> wy, <code>const char *</code>stl=<code>"w"</code>, <code>mreal</code> d1=<code>0</code>, <code>mreal</code> d2=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005ffacex"></a>Функция С: <em><code>void</code></em> <strong>mgl_facex</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> wy, <code>mreal</code> wz, <code>const char *</code>stl, <code>mreal</code> d1, <code>mreal</code> d2)</em></dt>
-<dt><a name="index-mgl_005ffacey"></a>Функция С: <em><code>void</code></em> <strong>mgl_facey</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> wx, <code>mreal</code> wz, <code>const char *</code>stl, <code>mreal</code> d1, <code>mreal</code> d2)</em></dt>
-<dt><a name="index-mgl_005ffacez"></a>Функция С: <em><code>void</code></em> <strong>mgl_facez</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> wx, <code>mreal</code> wy, <code>const char *</code>stl, <code>mreal</code> d1, <code>mreal</code> d2)</em></dt>
-<dd><p>Рисует закрашенный прямоугольник (грань) перпендикулярно оси [x,y,z] в точке {<var>x0</var>, <var>y0</var>, <var>z0</var>} цветом <var>stl</var> и шириной <var>wx</var>, <var>wy</var>, <var>wz</var> вдоль соответствующего направления. При этом цвет может быть один для всей грани, или различным для разных вершин если указаны все 4 цвета. Параметры <var>d1</var>!=0, <var>d2</var>!=0 задают дополнительный сдвиг последней точки (т.е. рисуют четырехугольник). Грань будет нарисована даже если часть ее лежит вне диапазона осей координат.
-</p></dd></dl>
-
-<a name="sphere"></a><dl>
-<dt><a name="index-sphere"></a>Команда MGL: <em></em> <strong>sphere</strong> <em><code>x0 y0 r</code> ['col'='r']</em></dt>
-<dt><a name="index-sphere-1"></a>Команда MGL: <em></em> <strong>sphere</strong> <em><code>x0 y0 z0 r</code> ['col'='r']</em></dt>
-<dt><a name="index-Sphere-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Sphere</strong> <em>(<code>mglPoint</code> p, <code>mreal</code> r, <code>const char *</code>stl=<code>"r"</code>)</em></dt>
-<dt><a name="index-mgl_005fsphere"></a>Функция С: <em><code>void</code></em> <strong>mgl_sphere</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> r, <code>const char *</code>stl)</em></dt>
-<dd><p>Рисует сферу радиуса <var>r</var> с центром в точке <var>p</var>={<var>x0</var>, <var>y0</var>, <var>z0</var>} цветом <var>stl</var>.
-</p></dd></dl>
-
-<a name="drop"></a><dl>
-<dt><a name="index-drop"></a>Команда MGL: <em></em> <strong>drop</strong> <em><code>x0 y0 dx dy r</code> ['col'='r' <code>sh=1 asp=1</code>]</em></dt>
-<dt><a name="index-drop-1"></a>Команда MGL: <em></em> <strong>drop</strong> <em><code>x0 y0 z0 dx dy dz r</code> ['col'='r' <code>sh=1 asp=1</code>]</em></dt>
-<dt><a name="index-Drop-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Drop</strong> <em>(<code>mglPoint</code> p, <code>mglPoint</code> d, <code>mreal</code> r, <code>const char *</code>col=<code>"r"</code>, <code>mreal</code> shift=<code>1</code>, <code>mreal</code> ap=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdrop"></a>Функция С: <em><code>void</code></em> <strong>mgl_drop</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> dx, <code>mreal</code> dy, <code>mreal</code> dz, <code>mreal</code> r, <code>const char *</code>col, <code>mreal</code> shift, <code>mreal</code> ap)</em></dt>
-<dd><p>Рисует каплю радиуса <var>r</var> в точке <var>p</var> вытянутую вдоль направления <var>d</var> цветом <var>col</var>. Параметр <var>shift</var> определяет степень вытянутости: ‘<samp>0</samp>’ – сфера, ‘<samp>1</samp>’ – классическая капля. Параметр <var>ap</var> определяет относительную ширину капли (аналог "эллиптичности" для сферы).
-</p></dd></dl>
-
-<a name="cone"></a><dl>
-<dt><a name="index-cone"></a>Команда MGL: <em></em> <strong>cone</strong> <em><code>x1 y1 z1 x2 y2 z2 r1</code> [<code>r2=-1</code> 'stl'='' <code>edge=off</code>]</em></dt>
-<dt><a name="index-Cone-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Cone</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> p2, <code>mreal</code> r1, <code>mreal</code> r2=<code>-1</code>, <code>const char *</code>stl=<code>"B"</code>, <code>bool</code> edge=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fcone"></a>Функция С: <em><code>void</code></em> <strong>mgl_cone</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> z1, <code>mreal</code> x2, <code>mreal</code> y2, <code>mreal</code> z2, <code>mreal</code> r1, <code>mreal</code> r2, <code>const char *</code>stl, <code>int</code> draw_edge)</em></dt>
-<dd><p>Рисует трубу (или усеченный конус если <var>edge</var>=<code>false</code>) между точками <var>p1</var>, <var>p2</var> с радиусами на концах <var>r1</var>, <var>r2</var>. Если <var>r2</var><0, то полагается <var>r2</var>=<var>r1</var>. Цвет конуса задается строкой <var>stl</var>. Параметр <var>stl</var> может содержать:
-</p><ul>
-<li> ‘<samp>@</samp>’ для рисования торцов;
-</li><li> ‘<samp>#</samp>’ для сетчатой фигуры;
-</li><li> ‘<samp>t</samp>’ для рисования цилиндра вместо конуса/призмы;
-</li><li> ‘<samp>4</samp>’, ‘<samp>6</samp>’, ‘<samp>8</samp>’ для рисования квадратной, шестиугольной или восьмиугольной призмы вместо конуса.
-</li></ul>
-
-</dd></dl>
-
-<a name="circle"></a><dl>
-<dt><a name="index-circle"></a>Команда MGL: <em></em> <strong>circle</strong> <em><code>x0 y0 r</code> ['col'='r']</em></dt>
-<dt><a name="index-circle-1"></a>Команда MGL: <em></em> <strong>circle</strong> <em><code>x0 y0 z0 r</code> ['col'='r']</em></dt>
-<dt><a name="index-Circle"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Circle</strong> <em>(<code>mglPoint</code> p, <code>mreal</code> r, <code>const char *</code>stl=<code>"r"</code>)</em></dt>
-<dd><p>Рисует круг радиуса <var>r</var> с центром в точке <var>p</var>={<var>x0</var>, <var>y0</var>, <var>z0</var>} цветом <var>stl</var>. Если <var>col</var> содержит: ‘<samp>#</samp>’ то рисуется только граница, ‘<samp>@</samp>’ то рисуется граница (вторым цветом из <var>col</var> или черными).
-</p></dd></dl>
-
-<a name="ellipse"></a><dl>
-<dt><a name="index-ellipse"></a>Команда MGL: <em></em> <strong>ellipse</strong> <em><code>x1 y1 x2 y2 r</code> ['col'='r']</em></dt>
-<dt><a name="index-ellipse-1"></a>Команда MGL: <em></em> <strong>ellipse</strong> <em><code>x1 y1 z1 x2 y2 z2 r</code> ['col'='r']</em></dt>
-<dt><a name="index-Ellipse"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Ellipse</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> p2, <code>mreal</code> r, <code>const char *</code>col=<code>"r"</code>)</em></dt>
-<dt><a name="index-mgl_005fellipse"></a>Функция С: <em><code>void</code></em> <strong>mgl_ellipse</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> z1, <code>mreal</code> x2, <code>mreal</code> y2, <code>mreal</code> z2, <code>mreal</code> r, <code>const char *</code>col)</em></dt>
-<dd><p>Рисует эллипс радиуса <var>r</var> с фокусами в точках <var>p1</var>, <var>p2</var> цветом <var>stl</var>. Если <var>col</var> содержит: ‘<samp>#</samp>’ то рисуется только граница, ‘<samp>@</samp>’ то рисуется граница (вторым цветом из <var>col</var> или черными).
-</p></dd></dl>
-
-<a name="rhomb"></a><dl>
-<dt><a name="index-rhomb"></a>Команда MGL: <em></em> <strong>rhomb</strong> <em><code>x1 y1 x2 y2 r</code> ['col'='r']</em></dt>
-<dt><a name="index-rhomb-1"></a>Команда MGL: <em></em> <strong>rhomb</strong> <em><code>x1 y1 z1 x2 y2 z2 r</code> ['col'='r']</em></dt>
-<dt><a name="index-Rhomb"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Rhomb</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> p2, <code>mreal</code> r, <code>const char *</code>col=<code>"r"</code>)</em></dt>
-<dt><a name="index-mgl_005frhomb"></a>Функция С: <em><code>void</code></em> <strong>mgl_rhomb</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> z1, <code>mreal</code> x2, <code>mreal</code> y2, <code>mreal</code> z2, <code>mreal</code> r, <code>const char *</code>col)</em></dt>
-<dd><p>Рисует ромб ширины <var>r</var> с вершинами в точках <var>p1</var>, <var>p2</var> цветом <var>stl</var>. Если <var>col</var> содержит: ‘<samp>#</samp>’ то рисуется только граница, ‘<samp>@</samp>’ то рисуется граница (вторым цветом из <var>col</var> или черными). Если <var>col</var> содержит 3 цвета, то используется градиентная заливка.
-</p></dd></dl>
-
-<a name="arc"></a><dl>
-<dt><a name="index-arc"></a>Команда MGL: <em></em> <strong>arc</strong> <em><code>x0 y0 x1 y1 a</code> ['col'='r']</em></dt>
-<dt><a name="index-arc-1"></a>Команда MGL: <em></em> <strong>arc</strong> <em><code>x0 y0 z0 x1 y1 a</code> ['col'='r']</em></dt>
-<dt><a name="index-arc-2"></a>Команда MGL: <em></em> <strong>arc</strong> <em><code>x0 y0 z0 xa ya za x1 y1 z1 a</code> ['col'='r']</em></dt>
-<dt><a name="index-Arc"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Arc</strong> <em>(<code>mglPoint</code> p0, <code>mglPoint</code> p1, <code>mreal</code> a, <code>const char *</code>col=<code>"r"</code>)</em></dt>
-<dt><a name="index-Arc-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Arc</strong> <em>(<code>mglPoint</code> p0, <code>mglPoint</code> pa, <code>mglPoint</code> p1, <code>mreal</code> a, <code>const char *</code>col=<code>"r"</code>)</em></dt>
-<dt><a name="index-mgl_005farc"></a>Функция С: <em><code>void</code></em> <strong>mgl_arc</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> a, <code>const char *</code>col)</em></dt>
-<dt><a name="index-mgl_005farc_005fext"></a>Функция С: <em><code>void</code></em> <strong>mgl_arc_ext</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> xa, <code>mreal</code> ya, <code>mreal</code> za, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> z1, <code>mreal</code> a, <code>const char *</code>col)</em></dt>
-<dd><p>Рисует дугу вокруг оси <var>pa</var> (по умолчанию вокруг оси z <var>pa</var>={0,0,1}) с центром в <var>p0</var>, начиная с точки <var>p1</var>. Параметр <var>a</var> задает угол дуги в градусах. Строка <var>col</var> задает цвет дуги и тип стрелок на краях.
-</p></dd></dl>
-
-<a name="polygon"></a><dl>
-<dt><a name="index-polygon"></a>Команда MGL: <em></em> <strong>polygon</strong> <em><code>x0 y0 x1 y1 num</code> ['col'='r']</em></dt>
-<dt><a name="index-polygon-1"></a>Команда MGL: <em></em> <strong>polygon</strong> <em><code>x0 y0 z0 x1 y1 z1 num</code> ['col'='r']</em></dt>
-<dt><a name="index-Polygon"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Polygon</strong> <em>(<code>mglPoint</code> p0, <code>mglPoint</code> p1, <code>int</code> num, <code>const char *</code>col=<code>"r"</code>)</em></dt>
-<dt><a name="index-mgl_005fpolygon"></a>Функция С: <em><code>void</code></em> <strong>mgl_polygon</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> x1, <code>mreal</code> y1, <code>mreal</code> z1, <code>int</code> num, <code>const char *</code>col)</em></dt>
-<dd><p>Рисует правильный <var>num</var>-угольник с центром в <var>p0</var> с первой вершиной в <var>p1</var> цветом <var>col</var>. Если <var>col</var> содержит: ‘<samp>#</samp>’ то рисуется только граница, ‘<samp>@</samp>’ то рисуется граница (вторым цветом из <var>col</var> или черными).
-</p></dd></dl>
-
-<a name="logo"></a><dl>
-<dt><a name="index-logo"></a>Команда MGL: <em></em> <strong>logo</strong> <em>'fname' [smooth=off]</em></dt>
-<dt><a name="index-Logo"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Logo</strong> <em>(<code>const char *</code>fname, <code>bool</code> smooth=<code>false</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Logo-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Logo</strong> <em>(<code>long</code> w, <code>long</code> h, <code>const unsigned char *</code>rgba, <code>bool</code> smooth=<code>false</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005flogo"></a>Функция С: <em><code>void</code></em> <strong>mgl_logo</strong> <em>(<code>HMGL</code> gr, <code>long</code> w, <code>long</code> h, <code>const unsigned char *</code>rgba, <code>bool</code> smooth, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005flogo_005ffile"></a>Функция С: <em><code>void</code></em> <strong>mgl_logo_file</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>fname, <code>bool</code> smooth, <code>const char *</code>opt)</em></dt>
-<dd><p>Draw bitmap (logo) along whole axis range, which can be changed by <a href="#Command-options">Command options</a>. Bitmap can be loaded from file or specified as RGBA values for pixels. Parameter <var>smooth</var> set to draw bitmap without or with color interpolation.
-</p></dd></dl>
-
-
-
-<a name="symbol"></a><dl>
-<dt><a name="index-symbol"></a>Команда MGL: <em></em> <strong>symbol</strong> <em><code>x y</code> 'id' ['fnt'='' <code>size=-1</code>]</em></dt>
-<dt><a name="index-symbol-1"></a>Команда MGL: <em></em> <strong>symbol</strong> <em><code>x y z</code> 'id' ['fnt'='' <code>size=-1</code>]</em></dt>
-<dt><a name="index-Symbol"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Symbol</strong> <em>(<code>mglPoint</code> p, <code>char</code> id, <code>const char *</code>fnt=<code>""</code>, <code>mreal</code> size=<code>-1</code>)</em></dt>
-<dt><a name="index-mgl_005fsymbol"></a>Функция С: <em><code>void</code></em> <strong>mgl_symbol</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>char</code> id, <code>const char *</code>fnt, <code>mreal</code> size)</em></dt>
-<dd><p>Рисует определенный пользователем символ с именем <var>id</var> в точке <var>p</var> стилем <var>fnt</var>. Размер задается параметром <var>size</var> (по умолчанию <code>-1</code>). Строка <var>fnt</var> может содержать цвет (до разделителя ‘<samp>:</samp>’); стили ‘<samp>a</samp>’ или ‘<samp>A</samp>’ для вывода в абсолютной позиции ({<var>x</var>, <var>y</var>} полагаются в диапазоне [0,1]) относительно рисунка (для ‘<samp>A</samp>’) или subplot/inplot (для ‘<samp>a</samp>’); и стиль ‘<samp>w</samp>’ для рисования только контура символа.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-symbol-2"></a>Команда MGL: <em></em> <strong>symbol</strong> <em><code>x y dx dy</code> 'id' ['fnt'=':L' <code>size=-1</code>]</em></dt>
-<dt><a name="index-symbol-3"></a>Команда MGL: <em></em> <strong>symbol</strong> <em><code>x y z dx dy dz</code> 'id' ['fnt'=':L' <code>size=-1</code>]</em></dt>
-<dt><a name="index-Symbol-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Symbol</strong> <em>(<code>mglPoint</code> p, <code>mglPoint</code> d, <code>char</code> id, <code>const char *</code>fnt=<code>""</code>, <code>mreal</code> size=<code>-1</code>)</em></dt>
-<dt><a name="index-mgl_005fsymbol_005fdir"></a>Функция С: <em><code>void</code></em> <strong>mgl_symbol_dir</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>mreal</code> dx, <code>mreal</code> dy, <code>mreal</code> dz, <code>const char *</code>text, <code>const char *</code>fnt, <code>mreal</code> size)</em></dt>
-<dd><p>Аналогично предыдущему, но символ рисуется в повернутым в направлении <var>d</var>.
-</p></dd></dl>
-
-<a name="addsymbol"></a><dl>
-<dt><a name="index-addsymbol"></a>Команда MGL: <em></em> <strong>addsymbol</strong> <em>'id' xdat ydat</em></dt>
-<dt><a name="index-DefineSymbol"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>DefineSymbol</strong> <em>(<code>char</code> id, <code>const mglDataA &</code>xdat, <code>const mglDataA &</code>ydat)</em></dt>
-<dt><a name="index-mgl_005fdefine_005fsymbol"></a>Функция С: <em><code>void</code></em> <strong>mgl_define_symbol</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> xdat, <code>HCDT</code> ydat)</em></dt>
-<dd><p>Добавляет определенный пользователем символ с именем <var>id</var> и границей {<var>xdat</var>, <var>ydat</var>}. Значения <code>NAN</code> задают разрыв (скачок) граничной кривой.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Text-printing"></a>
-<div class="header">
-<p>
-Next: <a href="#Axis-and-Colorbar" accesskey="n" rel="next">Axis and Colorbar</a>, Previous: <a href="#Primitives" accesskey="p" rel="prev">Primitives</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Vyvod-teksta"></a>
-<h3 class="section">4.8 Вывод текста</h3>
-
-<a name="index-Puts"></a>
-<a name="index-Putsw"></a>
-<a name="index-Text"></a>
-<a name="index-fgets"></a>
-
-<p>Функции для вывода текста позволяют вывести строку текста в произвольном месте рисунка, в произвольном направлении и вдоль произвольной кривой. MathGL позволяет использовать произвольное начертание шрифта и многие ТеХ-ие команды (детальнее см. <a href="#Font-styles">Font styles</a>). Все функции вывода текста имеют варианты для 8-bit строк (<code>char *</code>) и для Unicode строк (<code>wchar_t *</code>). В первом случае используется конверсия из текущей локали, т.е. иногда вам требуется явно указать локаль с помощью функции <code>setlocale()</code>. Аргумент <var>size</var> определяет размер текста: размер шрифта если положителен или относительный размер (=-<var>size</var>*<code>SetFontSize()</code>) если отрицателен. Начертание шрифта (STIX, arial, courier, times и др.) можно изменить с помощью функции LoadFont(). See <a href="#Font-settings">Font settings</a>.
-</p>
-<p>Параметры шрифта задаются строкой, которая может содержать символы цвета ‘<samp>wkrgbcymhRGBCYMHW</samp>’ (см. <a href="#Color-styles">Color styles</a>). Также после символа ‘<samp>:</samp>’ можно указать символы стиля (‘<samp>rbiwou</samp>’) и/или выравнивания (‘<samp>LRCTV</samp>’). Стили шрифта: ‘<samp>r</samp>’ – прямой, ‘<samp>i</samp>’ – курсив, ‘<samp>b</samp>’ – жирный, ‘<samp>w</samp>’ – контурный, ‘<samp>o</samp>’ – надчеркнутый, ‘<samp>u</samp>’ – подчеркнутый. По умолчанию используется прямой шрифт. Типы выравнивания: ‘<samp>L</samp>’ – по левому краю (по умолчанию), ‘<samp>C</samp>’ – по центру, ‘<samp>R</samp>’ – по правому краю, ‘<samp>T</samp>’ – под текстом, ‘<samp>V</samp>’ – по центру вертикально. Например, строка ‘<samp>b:iC</samp>’ соответствует курсиву синего цвета с выравниванием по центру. Начиная с MathGL версии 2.3, вы можете задать цветовой градиент для выводимой строки (см. <a href="#Color-scheme">Color scheme</a>).
-</p>
-<p>Если строка содержит символы ‘<samp>aA</samp>’, то текст выводится в абсолютных координатах (полагаются в диапазоне [0,1]). При этом используются координаты относительно рисунка (если указано ‘<samp>A</samp>’) или относительно последнего subplot/inplot (если указано ‘<samp>a</samp>’). Если строка содержит символ ‘<samp>@</samp>’, то вокруг текста рисуется прямоугольник.
-</p>
-<p>См. раздел <a href="#Text-features">Text features</a>, для примеров кода и графика.
-</p>
-<a name="text"></a><dl>
-<dt><a name="index-text"></a>Команда MGL: <em></em> <strong>text</strong> <em><code>x y</code> 'text' ['fnt'='' <code>size=-1</code>]</em></dt>
-<dt><a name="index-text-1"></a>Команда MGL: <em></em> <strong>text</strong> <em><code>x y z</code> 'text' ['fnt'='' <code>size=-1</code>]</em></dt>
-<dt><a name="index-Puts-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Puts</strong> <em>(<code>mglPoint</code> p, <code>const char *</code>text, <code>const char *</code>fnt=<code>":C"</code>, <code>mreal</code> size=<code>-1</code>)</em></dt>
-<dt><a name="index-Putsw-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Putsw</strong> <em>(<code>mglPoint</code> p, <code>const wchar_t *</code>text, <code>const char *</code>fnt=<code>":C"</code>, <code>mreal</code> size=<code>-1</code>)</em></dt>
-<dt><a name="index-Puts-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Puts</strong> <em>(<code>mreal</code> x, <code>mreal</code> y, <code>const char *</code>text, <code>const char *</code>fnt=<code>":AC"</code>, <code>mreal</code> size=<code>-1</code>)</em></dt>
-<dt><a name="index-Putsw-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Putsw</strong> <em>(<code>mreal</code> x, <code>mreal</code> y, <code>const wchar_t *</code>text, <code>const char *</code>fnt=<code>":AC"</code>, <code>mreal</code> size=<code>-1</code>)</em></dt>
-<dt><a name="index-mgl_005fputs"></a>Функция С: <em><code>void</code></em> <strong>mgl_puts</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>const char *</code>text, <code>const char *</code>fnt, <code>mreal</code> size)</em></dt>
-<dt><a name="index-mgl_005fputsw"></a>Функция С: <em><code>void</code></em> <strong>mgl_putsw</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>const wchar_t *</code>text, <code>const char *</code>fnt, <code>mreal</code> size)</em></dt>
-<dd><p>Выводит строку <var>text</var> от точки <var>p</var> шрифтом определяемым строкой <var>fnt</var>. Размер шрифта задается параметром <var>size</var> (по умолчанию <code>-1</code>).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-text-2"></a>Команда MGL: <em></em> <strong>text</strong> <em><code>x y dx dy</code> 'text' ['fnt'=':L' <code>size=-1</code>]</em></dt>
-<dt><a name="index-text-3"></a>Команда MGL: <em></em> <strong>text</strong> <em><code>x y z dx dy dz</code> 'text' ['fnt'=':L' <code>size=-1</code>]</em></dt>
-<dt><a name="index-Puts-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Puts</strong> <em>(<code>mglPoint</code> p, <code>mglPoint</code> d, <code>const char *</code>text, <code>const char *</code>fnt=<code>':L'</code>, <code>mreal</code> size=<code>-1</code>)</em></dt>
-<dt><a name="index-Putsw-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Putsw</strong> <em>(<code>mglPoint</code> p, <code>mglPoint</code> d, <code>const wchar_t *</code>text, <code>const char *</code>fnt=<code>':L'</code>, <code>mreal</code> size=<code>-1</code>)</em></dt>
-<dt><a name="index-mgl_005fputs_005fdir"></a>Функция С: <em><code>void</code></em> <strong>mgl_puts_dir</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>mreal</code> dx, <code>mreal</code> dy, <code>mreal</code> dz, <code>const char *</code>text, <code>const char *</code>fnt, <code>mreal</code> size)</em></dt>
-<dt><a name="index-mgl_005fputsw_005fdir"></a>Функция С: <em><code>void</code></em> <strong>mgl_putsw_dir</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>mreal</code> dx, <code>mreal</code> dy, <code>mreal</code> dz, <code>const wchar_t *</code>text, <code>const char *</code>fnt, <code>mreal</code> size)</em></dt>
-<dd><p>Выводит строку <var>text</var> от точки <var>p</var> вдоль направления <var>d</var>. Параметр <var>fnt</var> задает стиль текста и указывает выводить текст под линией (‘<samp>T</samp>’) или над ней (‘<samp>t</samp>’).
-</p></dd></dl>
-
-<a name="fgets"></a><dl>
-<dt><a name="index-fgets-1"></a>Команда MGL: <em></em> <strong>fgets</strong> <em><code>x y</code> 'fname' [<code>n=0</code> 'fnt'='' <code>size=-1.4</code>]</em></dt>
-<dt><a name="index-fgets-2"></a>Команда MGL: <em></em> <strong>fgets</strong> <em><code>x y z</code> 'fname' [<code>n=0</code> 'fnt'='' <code>size=-1.4</code>]</em></dt>
-<dd><p>Выводит <var>n</var>-ую строку файла <var>fname</var> от точки {<var>x</var>,<var>y</var>,<var>z</var>} шрифтом <var>fnt</var> и размером <var>size</var>. По умолчанию используются параметры заданные командой <a href="#font">font</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-text-4"></a>Команда MGL: <em></em> <strong>text</strong> <em>ydat 'text' ['fnt'='']</em></dt>
-<dt><a name="index-text-5"></a>Команда MGL: <em></em> <strong>text</strong> <em>xdat ydat 'text' ['fnt'='' <code>size=-1 zval=nan</code>]</em></dt>
-<dt><a name="index-text-6"></a>Команда MGL: <em></em> <strong>text</strong> <em>xdat ydat zdat 'text' ['fnt'='' <code>size=-1</code>]</em></dt>
-<dt><a name="index-Text-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Text</strong> <em>(<code>const mglDataA &</code>y, <code>const char *</code>text, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Text-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Text</strong> <em>(<code>const mglDataA &</code>y, <code>const wchar_t *</code>text, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Text-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Text</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>text, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Text-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Text</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const wchar_t *</code>text, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Text-5"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Text</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>text, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Text-6"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Text</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const wchar_t *</code>text, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftext_005fy"></a>Функция С: <em><code>void</code></em> <strong>mgl_text_y</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const char *</code>text, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftextw_005fy"></a>Функция С: <em><code>void</code></em> <strong>mgl_textw_y</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const wchar_t *</code>text, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftext_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_text_xy</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>text, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftextw_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_textw_xy</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y, <code>const wchar_t *</code>text, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftext_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_text_xyz</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>text, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftextw_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_textw_xyz</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const wchar_t *</code>text, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dd><p>Выводит строку <var>text</var> вдоль кривой {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]} шрифтом <var>fnt</var>. Строка <var>fnt</var> может содержать символы: ‘<samp>t</samp>’ для вывода текста под кривой (по умолчанию), или ‘<samp>T</samp>’ для вывода текста под кривой. Размеры по 1-ой размерности должны быть одинаковы для всех массивов <code>x.nx=y.nx=z.nx</code>. Если массив <var>x</var> не указан, то используется "автоматический" массив со значениями в диапазоне осей координат (см. <a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a>). Если массив <var>z</var> не указан, то используется минимальное значение оси z. Строка <var>opt</var> содержит опции команды (см. <a href="#Command-options">Command options</a>).
-</p></dd></dl>
-
-
-<hr>
-<a name="Axis-and-Colorbar"></a>
-<div class="header">
-<p>
-Next: <a href="#Legend" accesskey="n" rel="next">Legend</a>, Previous: <a href="#Text-printing" accesskey="p" rel="prev">Text printing</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Osi-i-Colorbar"></a>
-<h3 class="section">4.9 Оси и Colorbar</h3>
-
-<a name="index-Axis-1"></a>
-<a name="index-Box"></a>
-<a name="index-Grid"></a>
-<a name="index-Colorbar"></a>
-<a name="index-Label"></a>
-
-<p>Эти функции рисуют объекты для "измерения" типа осей координат, цветовой таблицы (colorbar), сетку по осям, обрамляющий параллелепипед и подписи по осям координат. См. также см. <a href="#Axis-settings">Axis settings</a>.
-</p>
-<a name="axis"></a><dl>
-<dt><a name="index-axis-2"></a>Команда MGL: <em></em> <strong>axis</strong> <em>['dir'='xyz' 'stl'='']</em></dt>
-<dt><a name="index-Axis-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Axis</strong> <em>(<code>const char *</code>dir=<code>"xyz"</code>, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005faxis"></a>Функция С: <em><code>void</code></em> <strong>mgl_axis</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>dir, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует оси координат и метки на них (см. <a href="#Axis-settings">Axis settings</a>) в направлениях ‘<samp>xyz</samp>’, указанных строкой <var>dir</var>. Строка <var>dir</var> может содержать:
-</p><ul>
-<li> ‘<samp>xyz</samp>’ для рисования соответствующих осей;
-</li><li> ‘<samp>XYZ</samp>’ для рисования соответствующих осей с метками с другой стороны;
-</li><li> ‘<samp>~</samp>’ или ‘<samp>_</samp>’ для осей без подписей;
-</li><li> ‘<samp>U</samp>’ для невращаемых подписей;
-</li><li> ‘<samp>^</samp>’ для инвертирования положения по умолчанию;
-</li><li> ‘<samp>!</samp>’ для отключения улучшения вида меток (см. <a href="#tuneticks">tuneticks</a>);
-</li><li> ‘<samp>AKDTVISO</samp>’ для вывода стрелки на конце оси;
-</li><li> ‘<samp>a</samp>’ для принудительной автоматической расстановки меток;
-</li><li> ‘<samp>:</samp>’ для рисования линий через точку (0,0,0);
-</li><li> ‘<samp>f</samp>’ для вывода чисел в фиксированном формате;
-</li><li> ‘<samp>E</samp>’ для вывода ‘<samp>E</samp>’ вместо ‘<samp>e</samp>’;
-</li><li> ‘<samp>F</samp>’ для вывода в формате LaTeX;
-</li><li> ‘<samp>+</samp>’ для вывода ‘<samp>+</samp>’ для положительных чисел;
-</li><li> ‘<samp>-</samp>’ для вывода обычного ‘<samp>-</samp>’;
-</li><li> ‘<samp>0123456789</samp>’ для задания точности при выводе чисел.
-</li></ul>
-<p>Стиль меток и оси(ей) задается строкой <var>stl</var>. Опция <code>value</code> задает угол вращения меток оси. См. раздел <a href="#Axis-and-ticks">Axis and ticks</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="colorbar"></a><dl>
-<dt><a name="index-colorbar"></a>Команда MGL: <em></em> <strong>colorbar</strong> <em>['sch'='']</em></dt>
-<dt><a name="index-Colorbar-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Colorbar</strong> <em>(<code>const char *</code>sch=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcolorbar"></a>Функция С: <em><code>void</code></em> <strong>mgl_colorbar</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>sch)</em></dt>
-<dd><p>Рисует полосу соответствия цвета и числовых значений (colorbar) для цветовой схемы <var>sch</var> (используется текущая для <code>sch=""</code>) с краю от графика. Строка <var>sch</var> также может содержать:
-</p><ul>
-<li> ‘<samp><>^_</samp>’ для расположения слева, справа, сверху или снизу соответственно;
-</li><li> ‘<samp>I</samp>’ для расположения около осей (по умолчанию, на краях subplot);
-</li><li> ‘<samp>A</samp>’ для использования абсолютных координат (относительно рисунка);
-</li><li> ‘<samp>~</samp>’ для colorbar без подписей;
-</li><li> ‘<samp>!</samp>’ для отключения улучшения вида меток (см. <a href="#tuneticks">tuneticks</a>);
-</li><li> ‘<samp>a</samp>’ для принудительной автоматической расстановки меток;
-</li><li> ‘<samp>f</samp>’ для вывода чисел в фиксированном формате;
-</li><li> ‘<samp>E</samp>’ для вывода ‘<samp>E</samp>’ вместо ‘<samp>e</samp>’;
-</li><li> ‘<samp>F</samp>’ для вывода в формате LaTeX;
-</li><li> ‘<samp>+</samp>’ для вывода ‘<samp>+</samp>’ для положительных чисел;
-</li><li> ‘<samp>-</samp>’ для вывода обычного ‘<samp>-</samp>’;
-</li><li> ‘<samp>0123456789</samp>’ для задания точности при выводе чисел.
-</li></ul>
-<p>См. раздел <a href="#Colorbars">Colorbars</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-colorbar-1"></a>Команда MGL: <em></em> <strong>colorbar</strong> <em>vdat ['sch'='']</em></dt>
-<dt><a name="index-Colorbar-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Colorbar</strong> <em>(<code>const mglDataA &</code>v, <code>const char *</code>sch=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcolorbar_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_colorbar_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>const char *</code>sch)</em></dt>
-<dd><p>Аналогично предыдущему, но для цветовой схемы без сглаживания с заданными значениями <var>v</var>. См. раздел <a href="#contd-sample">contd sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-colorbar-2"></a>Команда MGL: <em></em> <strong>colorbar</strong> <em>'sch' <code>x y [w=1 h=1]</code></em></dt>
-<dt><a name="index-Colorbar-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Colorbar</strong> <em>(<code>const char *</code>sch, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> w=<code>1</code>, <code>mreal</code> h=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fcolorbar_005fext"></a>Функция С: <em><code>void</code></em> <strong>mgl_colorbar_ext</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>sch, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> w, <code>mreal</code> h)</em></dt>
-<dd><p>Аналогично первому, но в произвольном месте графика {<var>x</var>, <var>y</var>} (полагаются в диапазоне [0,1]). Параметры <var>w</var>, <var>h</var> задают относительную ширину и высоту colorbar.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-colorbar-3"></a>Команда MGL: <em></em> <strong>colorbar</strong> <em>vdat 'sch' <code>x y [w=1 h=1]</code></em></dt>
-<dt><a name="index-Colorbar-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Colorbar</strong> <em>(<code>const mglDataA &</code>v, <code>const char *</code>sch, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> w=<code>1</code>, <code>mreal</code> h=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fcolorbar_005fval_005fext"></a>Функция С: <em><code>void</code></em> <strong>mgl_colorbar_val_ext</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>const char *</code>sch, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> w, <code>mreal</code> h)</em></dt>
-<dd><p>Аналогично предыдущему, но для цветовой схемы <var>sch</var> без сглаживания с заданными значениями <var>v</var>. См. раздел <a href="#contd-sample">contd sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="grid"></a><dl>
-<dt><a name="index-grid"></a>Команда MGL: <em></em> <strong>grid</strong> <em>['dir'='xyz' 'pen'='B']</em></dt>
-<dt><a name="index-Grid-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Grid</strong> <em>(<code>const char *</code>dir=<code>"xyz"</code>, <code>const char *</code>pen=<code>"B"</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005faxis_005fgrid"></a>Функция С: <em><code>void</code></em> <strong>mgl_axis_grid</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>dir, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует линии сетки в направлениях перпендикулярным <var>dir</var>. Если <var>dir</var> содержит ‘<samp>!</samp>’, то линии рисуются также и для координат под-меток. Шаг сетки такой же как у меток осей координат. Стиль линий задается параметром <var>pen</var> (по умолчанию – сплошная темно синяя линия ‘<samp>B-</samp>’).
-</p></dd></dl>
-
-<a name="box"></a><dl>
-<dt><a name="index-box"></a>Команда MGL: <em></em> <strong>box</strong> <em>['stl'='k' <code>ticks=on</code>]</em></dt>
-<dt><a name="index-Box-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Box</strong> <em>(<code>const char *</code>col=<code>""</code>, <code>bool</code> ticks=<code>true</code>)</em></dt>
-<dt><a name="index-mgl_005fbox"></a>Функция С: <em><code>void</code></em> <strong>mgl_box</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dt><a name="index-mgl_005fbox_005fstr"></a>Функция С: <em><code>void</code></em> <strong>mgl_box_str</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>col, <code>int</code> ticks)</em></dt>
-<dd><p>Рисует ограничивающий параллелепипед цветом <var>col</var>. Если <var>col</var> содержит ‘<samp>@</samp>’, то рисуются закрашенные задние грани. При этом первый цвет используется для граней (по умолчанию светло жёлтый), а последний для рёбер и меток.
-</p></dd></dl>
-
-<a name="xlabel"></a><a name="ylabel"></a><a name="zlabel"></a><a name="tlabel"></a><a name="clabel"></a><dl>
-<dt><a name="index-xlabel"></a>Команда MGL: <em></em> <strong>xlabel</strong> <em>'text' [<code>pos=1</code>]</em></dt>
-<dt><a name="index-ylabel"></a>Команда MGL: <em></em> <strong>ylabel</strong> <em>'text' [<code>pos=1</code>]</em></dt>
-<dt><a name="index-zlabel"></a>Команда MGL: <em></em> <strong>zlabel</strong> <em>'text' [<code>pos=1</code>]</em></dt>
-<dt><a name="index-tlabel"></a>Команда MGL: <em></em> <strong>tlabel</strong> <em>'text' [<code>pos=1</code>]</em></dt>
-<dt><a name="index-clabel"></a>Команда MGL: <em></em> <strong>clabel</strong> <em>'text' [<code>pos=1</code>]</em></dt>
-<dt><a name="index-Label-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Label</strong> <em>(<code>char</code> dir, <code>const char *</code>text, <code>mreal</code> pos=<code>1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Label-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Label</strong> <em>(<code>char</code> dir, <code>const wchar_t *</code>text, <code>mreal</code> pos=<code>1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005flabel"></a>Функция С: <em><code>void</code></em> <strong>mgl_label</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>const char *</code>text, <code>mreal</code> pos, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005flabelw"></a>Функция С: <em><code>void</code></em> <strong>mgl_labelw</strong> <em>(<code>HMGL</code> gr, <code>char</code> dir, <code>const wchar_t *</code>text, <code>mreal</code> pos, <code>const char *</code>opt)</em></dt>
-<dd><p>Выводит подпись <var>text</var> для оси <var>dir</var>=‘<samp>x</samp>’,‘<samp>y</samp>’,‘<samp>z</samp>’,‘<samp>t</samp>’,‘<samp>c</samp>’, где ‘<samp>t</samp>’ – “тернарная” ось <em>t=1-x-y</em>; ‘<samp>c</samp>’ – для цвета (следует вызывать после <a href="#colorbar">colorbar</a>). Параметр <var>pos</var> задает положение подписи: при <var>pos</var>=0 – по центру оси, при <var>pos</var>>0 – около максимальных значений, при <var>pos</var><0 – около минимальных значений. Опция <code>value</code> задает дополнительный сдвиг текста. See <a href="#Text-printing">Text printing</a>.
-</p></dd></dl>
-
-
-<hr>
-<a name="Legend"></a>
-<div class="header">
-<p>
-Next: <a href="#g_t1D-plotting" accesskey="n" rel="next">1D plotting</a>, Previous: <a href="#Axis-and-Colorbar" accesskey="p" rel="prev">Axis and Colorbar</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Legenda"></a>
-<h3 class="section">4.10 Легенда</h3>
-
-<a name="index-Legend"></a>
-<a name="index-AddLegend"></a>
-<a name="index-ClearLegend"></a>
-<a name="index-SetLegendBox"></a>
-<a name="index-SetLegendMarks"></a>
-
-<p>Эти функции обеспечивают рисование легенды графика (полезно для <a href="#g_t1D-plotting">1D plotting</a>). Запись в легенде состоит из двух строк: одна для стиля линии и маркеров, другая с текстом описания (с включенным разбором TeX-их команд). Можно использовать непосредственно массивы строк, или накопление во внутренние массивы с помощью функции AddLegend() с последующим отображением. Положение легенды можно задать автоматически или вручную. Параметры <var>fnt</var> и <var>size</var> задают стиль и размер шрифта (см. <a href="#Font-settings">Font settings</a>). Опция <code>value</code> задает зазор между примером линии и текстом (по умолчанию 0.1). Опция <code>size</code> задает размер текста. Если стиль линии пустой, то соответствующий текст печатается без отступа. Строка <var>fnt</var> может содержать:
-</p><ul>
-<li> стиль текста для записей;
-</li><li> ‘<samp>A</samp>’ для расположения относительно всего рисунка, а не текущего subplot;
-</li><li> ‘<samp>^</samp>’ для размещения снаружи от указанных координат;
-</li><li> ‘<samp>#</samp>’ для вывода прямоугольника вокруг легенды;
-</li><li> ‘<samp>-</samp>’ для горизонтального расположения записей;
-</li><li> цвета для заливки (1-ый), для границы (2-ой) и для текста записей (3-ий). Если указано меньше трех цветов, то цвет границы черный (для 2 и менее цветов), и цвет заливки белый (для 1 и менее цвета).
-</li></ul>
-<p>См. раздел <a href="#Legend-sample">Legend sample</a>, для примеров кода и графика.
-</p>
-<a name="legend"></a><dl>
-<dt><a name="index-legend-2"></a>Команда MGL: <em></em> <strong>legend</strong> <em>[<code>pos=3</code> 'fnt'='#']</em></dt>
-<dt><a name="index-Legend-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Legend</strong> <em>(<code>int</code> pos=<code>0x3</code>, <code>const char *</code>fnt=<code>"#"</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005flegend"></a>Функция С: <em><code>void</code></em> <strong>mgl_legend</strong> <em>(<code>HMGL</code> gr, <code>int</code> pos, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует легенду из накопленных записей шрифтом <var>fnt</var>. Параметр <var>pos</var> задает положение легенды: ‘<samp>0</samp>’ – в нижнем левом углу, ‘<samp>1</samp>’ – нижнем правом углу, ‘<samp>2</samp>’ – верхнем левом углу, ‘<samp>3</samp>’ – верхнем правом углу (по умолчанию). Опция <code>value</code> задает зазор между примером линии и текстом (по умолчанию 0.1).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-legend-3"></a>Команда MGL: <em></em> <strong>legend</strong> <em><code>x y</code> ['fnt'='#']</em></dt>
-<dt><a name="index-Legend-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Legend</strong> <em>(<code>mreal</code> x, <code>mreal</code> y, <code>const char *</code>fnt=<code>"#"</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005flegend_005fpos"></a>Функция С: <em><code>void</code></em> <strong>mgl_legend_pos</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует легенду из накопленных записей шрифтом <var>fnt</var>. Положение легенды задается параметрами <var>x</var>, <var>y</var>, которые полагаются нормированными в диапазоне [0,1]. Опция <code>value</code> задает зазор между примером линии и текстом (по умолчанию 0.1).
-</p></dd></dl>
-
-<a name="addlegend"></a><dl>
-<dt><a name="index-addlegend"></a>Команда MGL: <em></em> <strong>addlegend</strong> <em>'text' 'stl'</em></dt>
-<dt><a name="index-AddLegend-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>AddLegend</strong> <em>(<code>const char *</code>text, <code>const char *</code>style)</em></dt>
-<dt><a name="index-AddLegend-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>AddLegend</strong> <em>(<code>const wchar_t *</code>text, <code>const char *</code>style)</em></dt>
-<dt><a name="index-mgl_005fadd_005flegend"></a>Функция С: <em><code>void</code></em> <strong>mgl_add_legend</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>text, <code>const char *</code>style)</em></dt>
-<dt><a name="index-mgl_005fadd_005flegendw"></a>Функция С: <em><code>void</code></em> <strong>mgl_add_legendw</strong> <em>(<code>HMGL</code> gr, <code>const wchar_t *</code>text, <code>const char *</code>style)</em></dt>
-<dd><p>Добавляет описание <var>text</var> кривой со стилем <var>style</var> (см. <a href="#Line-styles">Line styles</a>) во внутренний массив записей легенды.
-</p></dd></dl>
-
-<a name="clearlegend"></a><dl>
-<dt><a name="index-clearlegend"></a>Команда MGL: <em></em> <strong>clearlegend</strong></dt>
-<dt><a name="index-ClearLegend-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ClearLegend</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fclear_005flegend"></a>Функция С: <em><code>void</code></em> <strong>mgl_clear_legend</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Очищает внутренний массив записей легенды.
-</p></dd></dl>
-
-<a name="legendmarks"></a><dl>
-<dt><a name="index-legendmarks"></a>Команда MGL: <em></em> <strong>legendmarks</strong> <em><code>val</code></em></dt>
-<dt><a name="index-SetLegendMarks-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SetLegendMarks</strong> <em>(<code>int</code> num)</em></dt>
-<dt><a name="index-mgl_005fset_005flegend_005fmarks"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_legend_marks</strong> <em>(<code>HMGL</code> gr, <code>int</code> num)</em></dt>
-<dd><p>Задает число маркеров в легенде. По умолчанию используется 1 маркер.
-</p></dd></dl>
-
-
-<hr>
-<a name="g_t1D-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#g_t2D-plotting" accesskey="n" rel="next">2D plotting</a>, Previous: <a href="#Legend" accesskey="p" rel="prev">Legend</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="g_t1D-grafiki"></a>
-<h3 class="section">4.11 1D графики</h3>
-
-<a name="index-Plot"></a>
-<a name="index-Radar"></a>
-<a name="index-Tens"></a>
-<a name="index-Area"></a>
-<a name="index-Region"></a>
-<a name="index-Stem"></a>
-<a name="index-Bars"></a>
-<a name="index-Barh"></a>
-<a name="index-Chart"></a>
-<a name="index-Step"></a>
-<a name="index-Torus"></a>
-<a name="index-Tube"></a>
-<a name="index-Mark-1"></a>
-<a name="index-TextMark"></a>
-<a name="index-Error-1"></a>
-<a name="index-BoxPlot"></a>
-<a name="index-Candle"></a>
-<a name="index-Tape"></a>
-<a name="index-Label-1"></a>
-<a name="index-Cones"></a>
-
-<p>Эти функции строят графики для одномерных (1D) массивов. Одномерными считаются массивы, зависящие только от одного параметра (индекса) подобно кривой в параметрической форме {x(i),y(i),z(i)}, i=1...n. По умолчанию (если отсутствуют) значения <var>x</var>[i] равно распределены в диапазоне оси х, и <var>z</var>[i] равно минимальному значению оси z. Графики рисуются для каждой строки массива данных если он двумерный. Размер по 1-ой координате <strong>должен быть одинаков</strong> для всех массивов <code>x.nx=y.nx=z.nx</code>.
-</p>
-<p>Строка <var>pen</var> задает цвет и стиль линии и маркеров (см. <a href="#Line-styles">Line styles</a>). По умолчанию (<code>pen=""</code>) рисуется сплошная линия с текущим цветом из палитры (см. <a href="#Palette-and-colors">Palette and colors</a>). Символ ‘<samp>!</samp>’ в строке задает использование нового цвета из палитры для каждой точки данных (не для всей кривой, как по умолчанию). Строка <var>opt</var> задает опции графика (см. <a href="#Command-options">Command options</a>).
-</p>
-<a name="plot"></a><dl>
-<dt><a name="index-plot"></a>Команда MGL: <em></em> <strong>plot</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-plot-1"></a>Команда MGL: <em></em> <strong>plot</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-plot-2"></a>Команда MGL: <em></em> <strong>plot</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dt><a name="index-Plot-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Plot</strong> <em>(<code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Plot-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Plot</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Plot-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Plot</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fplot"></a>Функция С: <em><code>void</code></em> <strong>mgl_plot</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fplot_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_plot_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fplot_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_plot_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют ломанную линию по точкам {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Если <var>pen</var> содержит ‘<samp>a</samp>’, то рисуются и сегменты между точками вне диапазона осей координат. Если <var>pen</var> содержит ‘<samp>~</samp>’, то число сегментов уменьшается для квази-линейных участков. См. также <a href="#area">area</a>, <a href="#step">step</a>, <a href="#stem">stem</a>, <a href="#tube">tube</a>, <a href="#mark">mark</a>, <a href="#error">error</a>, <a href="#belt">belt</a>, <a href="#tens">tens</a>, <a href="#tape">tape</a>, <a href="#meshnum">meshnum</a>. См. раздел <a href="#plot-sample">plot sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="radar"></a><dl>
-<dt><a name="index-radar"></a>Команда MGL: <em></em> <strong>radar</strong> <em>adat ['stl'='']</em></dt>
-<dt><a name="index-Radar-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Radar</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fradar"></a>Функция С: <em><code>void</code></em> <strong>mgl_radar</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют radar chart, представляющий собой ломанную с вершинами на радиальных линиях (типа ломанной в полярных координатах). Параметр <code>value</code> в опциях <var>opt</var> задает дополнительный сдвиг данных (т.е. использование <var>a</var>+<code>value</code> вместо <var>a</var>). Если <var>pen</var> содержит ‘<samp>#</samp>’, то рисуется "сетка" (радиальные линии). Если <var>pen</var> содержит ‘<samp>a</samp>’, то рисуются и сегменты между точками вне диапазона осей координат. См. также <a href="#plot">plot</a>, <a href="#meshnum">meshnum</a>. См. раздел <a href="#radar-sample">radar sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="step"></a><dl>
-<dt><a name="index-step"></a>Команда MGL: <em></em> <strong>step</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-step-1"></a>Команда MGL: <em></em> <strong>step</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-step-2"></a>Команда MGL: <em></em> <strong>step</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dt><a name="index-Step-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Step</strong> <em>(<code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Step-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Step</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Step-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Step</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fstep"></a>Функция С: <em><code>void</code></em> <strong>mgl_step</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fstep_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_step_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fstep_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_step_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют ступеньки для точек массива. Если <var>x</var>.nx><var>y</var>.nx, то массив <var>x</var> задает границы ступенек, а не их конец. См. также <a href="#plot">plot</a>, <a href="#stem">stem</a>, <a href="#tile">tile</a>, <a href="#boxs">boxs</a>, <a href="#meshnum">meshnum</a>. См. раздел <a href="#step-sample">step sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="tens"></a><dl>
-<dt><a name="index-tens"></a>Команда MGL: <em></em> <strong>tens</strong> <em>ydat cdat ['stl'='']</em></dt>
-<dt><a name="index-tens-1"></a>Команда MGL: <em></em> <strong>tens</strong> <em>xdat ydat cdat ['stl'='']</em></dt>
-<dt><a name="index-tens-2"></a>Команда MGL: <em></em> <strong>tens</strong> <em>xdat ydat zdat cdat ['stl'='']</em></dt>
-<dt><a name="index-Tens-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Tens</strong> <em>(<code>const mglDataA &</code>y, <code>const mglDataA &</code>c, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tens-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Tens</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>c, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tens-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Tens</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftens"></a>Функция С: <em><code>void</code></em> <strong>mgl_tens</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>HCDT</code> c, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftens_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_tens_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> c, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftens_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_tens_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют ломанную линию по точкам с цветом, определяемым массивом <var>c</var> (типа графика натяжений). Строка <var>pen</var> задает цветовую схему (см. <a href="#Color-scheme">Color scheme</a>) и стиль линий и/или маркеров (см. <a href="#Line-styles">Line styles</a>). Если <var>pen</var> содержит ‘<samp>a</samp>’, то рисуются и сегменты между точками вне диапазона осей координат. Если <var>pen</var> содержит ‘<samp>~</samp>’, то число сегментов уменьшается для квази-линейных участков. См. также <a href="#plot">plot</a>, <a href="#mesh">mesh</a>, <a href="#fall">fall</a>, <a href="#meshnum">meshnum</a>. См. раздел <a href="#tens-sample">tens sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="tape"></a><dl>
-<dt><a name="index-tape"></a>Команда MGL: <em></em> <strong>tape</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-tape-1"></a>Команда MGL: <em></em> <strong>tape</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-tape-2"></a>Команда MGL: <em></em> <strong>tape</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dt><a name="index-Tape-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Tape</strong> <em>(<code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tape-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Tape</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tape-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Tape</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftape"></a>Функция С: <em><code>void</code></em> <strong>mgl_tape</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftape_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_tape_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftape_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_tape_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют ленты, которые вращаются вокруг кривой {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]} как её нормали. Начальная лента(ы) выбираются в плоскости x-y (для ‘<samp>x</samp>’ в <var>pen</var>) и/или y-z (для ‘<samp>x</samp>’ в <var>pen</var>). Ширина лент пропорциональна <a href="#barwidth">barwidth</a>, а также может быть изменена опцией <code>value</code>. См. также <a href="#plot">plot</a>, <a href="#flow">flow</a>, <a href="#barwidth">barwidth</a>. См. раздел <a href="#tape-sample">tape sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="area"></a><dl>
-<dt><a name="index-area"></a>Команда MGL: <em></em> <strong>area</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-area-1"></a>Команда MGL: <em></em> <strong>area</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-area-2"></a>Команда MGL: <em></em> <strong>area</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dt><a name="index-Area-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Area</strong> <em>(<code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Area-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Area</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Area-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Area</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005farea"></a>Функция С: <em><code>void</code></em> <strong>mgl_area</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005farea_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_area_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005farea_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_area_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют ломанную линию между точками и закрашивает её вниз до плоскости осей координат. Градиентная заливка используется если число цветов равно удвоенному число кривых. Если <var>pen</var> содержит ‘<samp>#</samp>’, то рисуется только каркас. Если <var>pen</var> содержит ‘<samp>a</samp>’, то рисуются и сегменты между точками вне диапазона осей координат. См. также <a href="#plot">plot</a>, <a href="#bars">bars</a>, <a href="#stem">stem</a>, <a href="#region">region</a>. См. раздел <a href="#area-sample">area sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="region"></a><dl>
-<dt><a name="index-region"></a>Команда MGL: <em></em> <strong>region</strong> <em>ydat1 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-region-1"></a>Команда MGL: <em></em> <strong>region</strong> <em>xdat ydat1 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-region-2"></a>Команда MGL: <em></em> <strong>region</strong> <em>xdat1 ydat1 xdat2 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-region-3"></a>Команда MGL: <em></em> <strong>region</strong> <em>xdat1 ydat1 zdat1 xdat2 ydat2 zdat2 ['stl'='']</em></dt>
-<dt><a name="index-Region-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Region</strong> <em>(<code>const mglDataA &</code>y1, <code>const mglDataA &</code>y2, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Region-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Region</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y1, <code>const mglDataA &</code>y2, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Region-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Region</strong> <em>(<code>const mglDataA &</code>x1, <code>const mglDataA &</code>y1, <code>const mglDataA &</code>x2, <code>const mglDataA &</code>y2, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Region-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Region</strong> <em>(<code>const mglDataA &</code>x1, <code>const mglDataA &</code>y1, <code>const mglDataA &</code>z1, <code>const mglDataA &</code>x2, <code>const mglDataA &</code>y2, <code>const mglDataA &</code>z2, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fregion"></a>Функция С: <em><code>void</code></em> <strong>mgl_region</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y1, <code>HCDT</code> y2, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fregion_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_region_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y1, <code>HCDT</code> y2, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fregion_005f3d"></a>Функция С: <em><code>void</code></em> <strong>mgl_region_3d</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x1, <code>HCDT</code> y1, <code>HCDT</code> z1, <code>HCDT</code> x2, <code>HCDT</code> y2, <code>HCDT</code> z2, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции закрашивают область между 2 кривыми. Градиентная заливка используется если число цветов равно удвоенному число кривых. Если в 2d версии <var>pen</var> содержит ‘<samp>i</samp>’, то закрашивается только область y1<y<y2, в противном случае будет закрашена и область y2<y<y1. Если <var>pen</var> содержит ‘<samp>#</samp>’, то рисуется только каркас. Если <var>pen</var> содержит ‘<samp>a</samp>’, то рисуются и сегменты между точками вне диапазона осей координат. См. также <a href="#area">area</a>, <a href="#bars">bars</a>, <a href="#stem">stem</a>. См. раздел <a href="#region-sample">region sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="stem"></a><dl>
-<dt><a name="index-stem"></a>Команда MGL: <em></em> <strong>stem</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-stem-1"></a>Команда MGL: <em></em> <strong>stem</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-stem-2"></a>Команда MGL: <em></em> <strong>stem</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dt><a name="index-Stem-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Stem</strong> <em>(<code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Stem-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Stem</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Stem-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Stem</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fstem"></a>Функция С: <em><code>void</code></em> <strong>mgl_stem</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fstem_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_stem_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fstem_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_stem_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют вертикальные линии из точек до плоскости осей координат. См. также <a href="#area">area</a>, <a href="#bars">bars</a>, <a href="#plot">plot</a>, <a href="#mark">mark</a>. См. раздел <a href="#stem-sample">stem sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="bars"></a><dl>
-<dt><a name="index-bars"></a>Команда MGL: <em></em> <strong>bars</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-bars-1"></a>Команда MGL: <em></em> <strong>bars</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-bars-2"></a>Команда MGL: <em></em> <strong>bars</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dt><a name="index-Bars-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Bars</strong> <em>(<code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Bars-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Bars</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Bars-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Bars</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fbars"></a>Функция С: <em><code>void</code></em> <strong>mgl_bars</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fbars_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_bars_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fbars_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_bars_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют вертикальные полосы (прямоугольники) из точек до плоскости осей координат. Строка <var>pen</var> может содержать:
-</p><ul>
-<li> ‘<samp>a</samp>’ для вывода линий одной поверх другой (как при суммировании);
-</li><li> ‘<samp>f</samp>’ для определения кумулятивного эффекта последовательности положительных и отрицательных значений (график типа waterfall);
-</li><li> ‘<samp>F</samp>’ для использования одинаковой (минимальной) ширины полосок;
-</li><li> ‘<samp><</samp>’, ‘<samp>^</samp>’ or ‘<samp>></samp>’ для выравнивания полосок влево, вправо или центрирования относительно их координат.
-</li></ul>
-<p>Можно использовать разные цвета для положительных и отрицательных значений если число указанных цветов равно удвоенному числу кривых для построения. Если <var>x</var>.nx><var>y</var>.nx, то массив <var>x</var> задает границы полос, а не их центр. См. также <a href="#barh">barh</a>, <a href="#cones">cones</a>, <a href="#area">area</a>, <a href="#stem">stem</a>, <a href="#chart">chart</a>, <a href="#barwidth">barwidth</a>. См. раздел <a href="#bars-sample">bars sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="barh"></a><dl>
-<dt><a name="index-barh"></a>Команда MGL: <em></em> <strong>barh</strong> <em>vdat ['stl'='']</em></dt>
-<dt><a name="index-barh-1"></a>Команда MGL: <em></em> <strong>barh</strong> <em>ydat vdat ['stl'='']</em></dt>
-<dt><a name="index-Barh-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Barh</strong> <em>(<code>const mglDataA &</code>v, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Barh-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Barh</strong> <em>(<code>const mglDataA &</code>y, <code>const mglDataA &</code>v, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fbarh"></a>Функция С: <em><code>void</code></em> <strong>mgl_barh</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fbarh_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_barh_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>HCDT</code> v, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют горизонтальные полосы (прямоугольники) из точек до плоскости осей координат. Строка <var>pen</var> может содержать:
-</p><ul>
-<li> ‘<samp>a</samp>’ для вывода линий одной поверх другой (как при суммировании);
-</li><li> ‘<samp>f</samp>’ для определения кумулятивного эффекта последовательности положительных и отрицательных значений (график типа waterfall);
-</li><li> ‘<samp>F</samp>’ для использования одинаковой (минимальной) ширины полосок;
-</li><li> ‘<samp><</samp>’, ‘<samp>^</samp>’ or ‘<samp>></samp>’ для выравнивания полосок влево, вправо или центрирования относительно их координат.
-</li></ul>
-<p>Можно использовать разные цвета для положительных и отрицательных значений если число указанных цветов равно удвоенному числу кривых для построения. Если <var>x</var>.nx><var>y</var>.nx, то массив <var>x</var> задает границы полос, а не их центр. См. также <a href="#bars">bars</a>, <a href="#barwidth">barwidth</a>. См. раздел <a href="#barh-sample">barh sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="cones"></a><dl>
-<dt><a name="index-cones"></a>Команда MGL: <em></em> <strong>cones</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-cones-1"></a>Команда MGL: <em></em> <strong>cones</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-cones-2"></a>Команда MGL: <em></em> <strong>cones</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dt><a name="index-Cones-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Cones</strong> <em>(<code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Cones-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Cones</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Cones-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Cones</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcones"></a>Функция С: <em><code>void</code></em> <strong>mgl_cones</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcones_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_cones_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcones_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_cones_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют конусы из точек до плоскости осей координат. Если строка <var>pen</var> содержит символ ‘<samp>a</samp>’, то линии рисуются одна поверх другой. Можно использовать разные цвета для положительных и отрицательных значений если число указанных цветов равно удвоенному числу кривых для построения. Параметр <var>pen</var> может содержать:
-</p><ul>
-<li> ‘<samp>@</samp>’ для рисования торцов;
-</li><li> ‘<samp>#</samp>’ для сетчатой фигуры;
-</li><li> ‘<samp>t</samp>’ для рисования цилиндра вместо конуса/призмы;
-</li><li> ‘<samp>4</samp>’, ‘<samp>6</samp>’, ‘<samp>8</samp>’ для рисования квадратной, шестиугольной или восьмиугольной призмы вместо конуса;
-</li><li> ‘<samp><</samp>’, ‘<samp>^</samp>’ или ‘<samp>></samp>’ для выравнивания конусов влево, вправо или по центру относительно их координат.
-</li></ul>
-<p>См. также <a href="#bars">bars</a>, <a href="#cone">cone</a>, <a href="#barwidth">barwidth</a>. См. раздел <a href="#cones-sample">cones sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-
-<a name="chart"></a><dl>
-<dt><a name="index-chart"></a>Команда MGL: <em></em> <strong>chart</strong> <em>adat ['col'='']</em></dt>
-<dt><a name="index-Chart-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Chart</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>col=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fchart"></a>Функция С: <em><code>void</code></em> <strong>mgl_chart</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>col, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует цветные полосы (пояса) для массива данных <var>a</var>. Число полос равно числу строк <var>a</var> (равно <var>a.ny</var>). Цвет полос поочерёдно меняется из цветов указанных в <var>col</var> или в палитре (см. <a href="#Palette-and-colors">Palette and colors</a>). Пробел в цветах соответствует прозрачному "цвету", т.е. если <var>col</var> содержит пробел(ы), то соответствующая полоса не рисуется. Ширина полосы пропорциональна значению элемента в <var>a</var>. График строится только для массивов не содержащих отрицательных значений. Если строка <var>col</var> содержит ‘<samp>#</samp>’, то рисуется также чёрная граница полос. График выглядит лучше в (после вращения системы координат) и/или в полярной системе координат (становится Pie chart). См. раздел <a href="#chart-sample">chart sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="boxplot"></a><dl>
-<dt><a name="index-boxplot"></a>Команда MGL: <em></em> <strong>boxplot</strong> <em>adat ['stl'='']</em></dt>
-<dt><a name="index-boxplot-1"></a>Команда MGL: <em></em> <strong>boxplot</strong> <em>xdat adat ['stl'='']</em></dt>
-<dt><a name="index-BoxPlot-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>BoxPlot</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-BoxPlot-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>BoxPlot</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>a, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fboxplot"></a>Функция С: <em><code>void</code></em> <strong>mgl_boxplot</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fboxplot_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_boxplot_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> a, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют boxplot (называемый также как box-and-whisker diagram или как "ящик с усами") в точках <var>x</var>[i] на плоскости <var>z</var> = <var>zVal</var> (по умолчанию <var>z</var> равно минимальному значению оси z). Это график, компактно изображающий распределение вероятностей <var>a</var>[i,j] (минимум, нижний квартиль (Q1), медиана (Q2), верхний квартиль (Q3) и максимум) вдоль второго (j-го) направления. Если <var>pen</var> содержит ‘<samp><</samp>’, ‘<samp>^</samp>’ или ‘<samp>></samp>’, то полоски будут выровнены влево, вправо или центрированы относительно их координат. См. также <a href="#plot">plot</a>, <a href="#error">error</a>, <a href="#bars">bars</a>, <a href="#barwidth">barwidth</a>. См. раздел <a href="#boxplot-sample">boxplot sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="candle"></a><dl>
-<dt><a name="index-candle"></a>Команда MGL: <em></em> <strong>candle</strong> <em>vdat1 ['stl'='']</em></dt>
-<dt><a name="index-candle-1"></a>Команда MGL: <em></em> <strong>candle</strong> <em>vdat1 vdat2 ['stl'='']</em></dt>
-<dt><a name="index-candle-2"></a>Команда MGL: <em></em> <strong>candle</strong> <em>vdat1 ydat1 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-candle-3"></a>Команда MGL: <em></em> <strong>candle</strong> <em>vdat1 vdat2 ydat1 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-candle-4"></a>Команда MGL: <em></em> <strong>candle</strong> <em>xdat vdat1 vdat2 ydat1 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-Candle-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Candle</strong> <em>(<code>const mglDataA &</code>v1, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Candle-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Candle</strong> <em>(<code>const mglDataA &</code>v1, <code>const mglDataA &</code>v2, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Candle-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Candle</strong> <em>(<code>const mglDataA &</code>v1, <code>const mglDataA &</code>y1, <code>const mglDataA &</code>y2, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Candle-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Candle</strong> <em>(<code>const mglDataA &</code>v1, <code>const mglDataA &</code>v2, <code>const mglDataA &</code>y1, <code>const mglDataA &</code>y2, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Candle-5"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Candle</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>v1, <code>const mglDataA &</code>v2, <code>const mglDataA &</code>y1, <code>const mglDataA &</code>y2, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcandle"></a>Функция С: <em><code>void</code></em> <strong>mgl_candle</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v1, <code>HCDT</code> y1, <code>HCDT</code> y2, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcandle_005fyv"></a>Функция С: <em><code>void</code></em> <strong>mgl_candle_yv</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v1, <code>HCDT</code> v2, <code>HCDT</code> y1, <code>HCDT</code> y2, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcandle_005fxyv"></a>Функция С: <em><code>void</code></em> <strong>mgl_candle_xyv</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> v1, <code>HCDT</code> v2, <code>HCDT</code> y1, <code>HCDT</code> y2, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют candlestick chart в точках <var>x</var>[i]. Этот график показывает прямоугольником ("свечой") диапазон изменения величины. Прозрачная (белая) свеча соответствует росту величины <var>v1</var>[i]<<var>v2</var>[i], чёрная – уменьшению. "Тени" показывают минимальное <var>y1</var> и максимальное <var>y2</var> значения. Если <var>v2</var> отсутствует, то он определяется как <var>v2</var>[i]=<var>v1</var>[i+1]. Можно использовать разные цвета для растущих и падающих дней если число указанных цветов равно удвоенному числу кривых для построения. Если <var>pen</var> содержит ‘<samp>#</samp>’, то прозрачная свеча будет использована и при 2-цветной схеме. См. также <a href="#plot">plot</a>, <a href="#bars">bars</a>, <a href="#ohlc">ohlc</a>, <a href="#barwidth">barwidth</a>. См. раздел <a href="#candle-sample">candle sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="ohlc"></a><dl>
-<dt><a name="index-ohlc"></a>Команда MGL: <em></em> <strong>ohlc</strong> <em>odat hdat ldat cdat ['stl'='']</em></dt>
-<dt><a name="index-ohlc-1"></a>Команда MGL: <em></em> <strong>ohlc</strong> <em>xdat odat hdat ldat cdat ['stl'='']</em></dt>
-<dt><a name="index-OHLC"></a>MМетод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>OHLC</strong> <em>(<code>const mglDataA &</code>o, <code>const mglDataA &</code>h, <code>const mglDataA &</code>l, <code>const mglDataA &</code>c, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-OHLC-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>OHLC</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>o, <code>const mglDataA &</code>h, <code>const mglDataA &</code>l, <code>const mglDataA &</code>c, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fohlc"></a>Функция С: <em><code>void</code></em> <strong>mgl_ohlc</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> o, <code>HCDT</code> h, <code>HCDT</code> l, <code>HCDT</code> c, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fohlc_005fx"></a>Функция С: <em><code>void</code></em> <strong>mgl_ohlc_x</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> o, <code>HCDT</code> h, <code>HCDT</code> l, <code>HCDT</code> c, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют Open-High-Low-Close диаграмму. Этот график содержит вертикальные линии между максимальным <var>h</var> и минимальным <var>l</var> значениями, и горизонтальные линии перед/после вертикальной линии для начального <var>o</var> и конечного <var>c</var> значений процесса (обычно цены). Можно использовать разные цвета для растущих и падающих дней если число указанных цветов равно удвоенному числу кривых для построения. См. также <a href="#candle">candle</a>, <a href="#plot">plot</a>, <a href="#barwidth">barwidth</a>. См. раздел <a href="#ohlc-sample">ohlc sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-<a name="error"></a><dl>
-<dt><a name="index-error"></a>Команда MGL: <em></em> <strong>error</strong> <em>ydat yerr ['stl'='']</em></dt>
-<dt><a name="index-error-1"></a>Команда MGL: <em></em> <strong>error</strong> <em>xdat ydat yerr ['stl'='']</em></dt>
-<dt><a name="index-error-2"></a>Команда MGL: <em></em> <strong>error</strong> <em>xdat ydat xerr yerr ['stl'='']</em></dt>
-<dt><a name="index-Error-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Error</strong> <em>(<code>const mglDataA &</code>y, <code>const mglDataA &</code>ey, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Error-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Error</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>ey, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Error-5"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Error</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>ex, <code>const mglDataA &</code>ey, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ferror"></a>Функция С: <em><code>void</code></em> <strong>mgl_error</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>HCDT</code> ey, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ferror_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_error_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> ey, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ferror_005fexy"></a>Функция С: <em><code>void</code></em> <strong>mgl_error_exy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> ex, <code>HCDT</code> ey, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют размер ошибки {<var>ex</var>[i], <var>ey</var>[i]} в точках {<var>x</var>[i], <var>y</var>[i]} на плоскости <var>z</var> = <var>zVal</var> (по умолчанию <var>z</var> равно минимальному значению оси z). Такой график полезен для отображения ошибки эксперимента, вычислений и пр. Если <var>pen</var> содержит ‘<samp>@</samp>’, то будут использованы большие полупрозрачные маркеры. См. также <a href="#plot">plot</a>, <a href="#mark">mark</a>. См. раздел <a href="#error-sample">error sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="mark"></a><dl>
-<dt><a name="index-mark"></a>Команда MGL: <em></em> <strong>mark</strong> <em>ydat rdat ['stl'='']</em></dt>
-<dt><a name="index-mark-1"></a>Команда MGL: <em></em> <strong>mark</strong> <em>xdat ydat rdat ['stl'='']</em></dt>
-<dt><a name="index-mark-2"></a>Команда MGL: <em></em> <strong>mark</strong> <em>xdat ydat zdat rdat ['stl'='']</em></dt>
-<dt><a name="index-Mark-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Mark</strong> <em>(<code>const mglDataA &</code>y, <code>const mglDataA &</code>r, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Mark-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Mark</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>r, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Mark-5"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Mark</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>r, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fmark_005fy"></a>Функция С: <em><code>void</code></em> <strong>mgl_mark_y</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>HCDT</code> r, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fmark_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_mark_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> r, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fmark_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_mark_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> r, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют маркеры размером <var>r</var>[i]*<a href="#marksize">marksize</a> (см. <a href="#Default-sizes">Default sizes</a>) в точках {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Для рисования маркеров одинакового размера можно использовать функцию <a href="#plot">plot</a> с невидимой линией (со стилем содержащим ‘<samp> </samp>’). Для маркеров с размером как у координат можно использовать <a href="#error">error</a> со стилем ‘<samp>@</samp>’. См. также <a href="#plot">plot</a>, <a href="#textmark">textmark</a>, <a href="#error">error</a>, <a href="#stem">stem</a>, <a href="#meshnum">meshnum</a>. См. раздел <a href="#mark-sample">mark sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="textmark"></a><dl>
-<dt><a name="index-textmark"></a>Команда MGL: <em></em> <strong>textmark</strong> <em>ydat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-textmark-1"></a>Команда MGL: <em></em> <strong>textmark</strong> <em>ydat rdat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-textmark-2"></a>Команда MGL: <em></em> <strong>textmark</strong> <em>xdat ydat rdat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-textmark-3"></a>Команда MGL: <em></em> <strong>textmark</strong> <em>xdat ydat zdat rdat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-TextMark-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>TextMark</strong> <em>(<code>const mglDataA &</code>y, <code>const char *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TextMark-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>TextMark</strong> <em>(<code>const mglDataA &</code>y, <code>const wchar_t *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TextMark-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>TextMark</strong> <em>(<code>const mglDataA &</code>y, <code>const mglDataA &</code>r, <code>const char *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TextMark-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>TextMark</strong> <em>(<code>const mglDataA &</code>y, <code>const mglDataA &</code>r, <code>const wchar_t *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TextMark-5"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>TextMark</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>r, <code>const char *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TextMark-6"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>TextMark</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>r, <code>const wchar_t *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TextMark-7"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>TextMark</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>r, <code>const char *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TextMark-8"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>TextMark</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>r, <code>const wchar_t *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftextmark"></a>Функция С: <em><code>void</code></em> <strong>mgl_textmark</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const char *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftextmarkw"></a>Функция С: <em><code>void</code></em> <strong>mgl_textmarkw</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const wchar_t *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftextmark_005fyr"></a>Функция С: <em><code>void</code></em> <strong>mgl_textmark_yr</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>HCDT</code> r, <code>const char *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftextmarkw_005fyr"></a>Функция С: <em><code>void</code></em> <strong>mgl_textmarkw_yr</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>HCDT</code> r, <code>const wchar_t *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftextmark_005fxyr"></a>Функция С: <em><code>void</code></em> <strong>mgl_textmark_xyr</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> r, <code>const char *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftextmarkw_005fxyr"></a>Функция С: <em><code>void</code></em> <strong>mgl_textmarkw_xyr</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> r, <code>const wchar_t *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftextmark_005fxyzr"></a>Функция С: <em><code>void</code></em> <strong>mgl_textmark_xyzr</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> r, <code>const char *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftextmarkw_005fxyzr"></a>Функция С: <em><code>void</code></em> <strong>mgl_textmarkw_xyzr</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> r, <code>const wchar_t *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют текст <var>txt</var> как маркер с размером пропорциональным <var>r</var>[i]*<var>marksize</var> в точках {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. См. также <a href="#plot">plot</a>, <a href="#mark">mark</a>, <a href="#stem">stem</a>, <a href="#meshnum">meshnum</a>. См. раздел <a href="#textmark-sample">textmark sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="label"></a><dl>
-<dt><a name="index-label"></a>Команда MGL: <em></em> <strong>label</strong> <em>ydat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-label-1"></a>Команда MGL: <em></em> <strong>label</strong> <em>xdat ydat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-label-2"></a>Команда MGL: <em></em> <strong>label</strong> <em>xdat ydat zdat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-Label-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Label</strong> <em>(<code>const mglDataA &</code>y, <code>const char *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Label-5"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Label</strong> <em>(<code>const mglDataA &</code>y, <code>const wchar_t *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Label-6"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Label</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Label-7"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Label</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const wchar_t *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Label-8"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Label</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Label-9"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Label</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const wchar_t *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005flabel-1"></a>Функция С: <em><code>void</code></em> <strong>mgl_label</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const char *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005flabelw-1"></a>Функция С: <em><code>void</code></em> <strong>mgl_labelw</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>const wchar_t *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005flabel_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_label_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005flabelw_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_labelw_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>const wchar_t *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005flabel_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_label_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005flabelw_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_labelw_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const wchar_t *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции выводят текстовую строку <var>txt</var> в точках {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Если строка <var>txt</var> содержит ‘<samp>%x</samp>’, ‘<samp>%y</samp>’, ‘<samp>%z</samp>’ или ‘<samp>%n</samp>’, то они будут заменены на значения соответствующих координат или на номер точки. Строка <var>fnt</var> может содержать:
-</p><ul>
-<li> стиль текста <a href="#Font-styles">Font styles</a>;
-</li><li> ‘<samp>f</samp>’ для вывода чисел в фиксированном формате;
-</li><li> ‘<samp>E</samp>’ для вывода ‘<samp>E</samp>’ вместо ‘<samp>e</samp>’;
-</li><li> ‘<samp>F</samp>’ для вывода в формате LaTeX;
-</li><li> ‘<samp>+</samp>’ для вывода ‘<samp>+</samp>’ для положительных чисел;
-</li><li> ‘<samp>-</samp>’ для вывода обычного ‘<samp>-</samp>’;
-</li><li> ‘<samp>0123456789</samp>’ для задания точности при выводе чисел.
-</li></ul>
-<p>См. также <a href="#plot">plot</a>, <a href="#mark">mark</a>, <a href="#textmark">textmark</a>, <a href="#table">table</a>. См. раздел <a href="#label-sample">label sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="table"></a><dl>
-<dt><a name="index-table"></a>Команда MGL: <em></em> <strong>table</strong> <em>vdat 'txt' ['stl'='#']</em></dt>
-<dt><a name="index-table-1"></a>Команда MGL: <em></em> <strong>table</strong> <em>x y vdat 'txt' ['stl'='#']</em></dt>
-<dt><a name="index-Table"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Table</strong> <em>(<code>const mglDataA &</code>val, <code>const char *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Table-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Table</strong> <em>(<code>const mglDataA &</code>val, <code>const wchar_t *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Table-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Table</strong> <em>(<code>mreal</code> x, <code>mreal</code> y, <code>const mglDataA &</code>val, <code>const char *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Table-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Table</strong> <em>(<code>mreal</code> x, <code>mreal</code> y, <code>const mglDataA &</code>val, <code>const wchar_t *</code>txt, <code>const char *</code>fnt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftable"></a>Функция С: <em><code>void</code></em> <strong>mgl_table</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>HCDT</code> val, <code>const char *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftablew"></a>Функция С: <em><code>void</code></em> <strong>mgl_tablew</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>HCDT</code> val, <code>const wchar_t *</code>txt, <code>const char *</code>fnt, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует таблицу значений массива <var>val</var> с заголовками <var>txt</var> (разделенными символом новой строки ‘<samp>\n</samp>’) в точке {<var>x</var>, <var>y</var>} (по умолчанию {0,0}) относительно текущего subplot. Строка <var>fnt</var> может содержать:
-</p><ul>
-<li> стиль текста <a href="#Font-styles">Font styles</a>;
-</li><li> ‘<samp>#</samp>’ для рисования границ ячеек;
-</li><li> ‘<samp>=</samp>’ для одинаковой ширины всех ячеек;
-</li><li> ‘<samp>|</samp>’ для ограничения ширины таблицы шириной subplot (эквивалентно опции ‘<samp>value 1</samp>’);
-</li><li> ‘<samp>f</samp>’ для вывода чисел в фиксированном формате;
-</li><li> ‘<samp>E</samp>’ для вывода ‘<samp>E</samp>’ вместо ‘<samp>e</samp>’;
-</li><li> ‘<samp>F</samp>’ для вывода в формате LaTeX;
-</li><li> ‘<samp>+</samp>’ для вывода ‘<samp>+</samp>’ для положительных чисел;
-</li><li> ‘<samp>-</samp>’ для вывода обычного ‘<samp>-</samp>’;
-</li><li> ‘<samp>0123456789</samp>’ для задания точности при выводе чисел.
-</li></ul>
-<p>Опция <code>value</code> задает ширину таблицы (по умолчанию 1). См. также <a href="#plot">plot</a>, <a href="#label">label</a>. См. раздел <a href="#table-sample">table sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="iris"></a><dl>
-<dt><a name="index-iris"></a>Команда MGL: <em></em> <strong>iris</strong> <em>dats 'ids' ['stl'='']</em></dt>
-<dt><a name="index-iris-1"></a>Команда MGL: <em></em> <strong>iris</strong> <em>dats rngs 'ids' ['stl'='']</em></dt>
-<dt><a name="index-Iris"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Iris</strong> <em>(<code>const mglDataA &</code>dats, <code>const char *</code>ids, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Iris-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Iris</strong> <em>(<code>const mglDataA &</code>dats, <code>const wchar_t *</code>ids, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Iris-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Iris</strong> <em>(<code>const mglDataA &</code>dats, <code>const mglDataA &</code>rngs, <code>const char *</code>ids, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Iris-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Iris</strong> <em>(<code>const mglDataA &</code>dats, <code>const mglDataA &</code>rngs, <code>const wchar_t *</code>ids, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005firis_005f1"></a>Функция С: <em><code>void</code></em> <strong>mgl_iris_1</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> dats, <code>const char *</code>ids, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005firisw_005f1"></a>Функция С: <em><code>void</code></em> <strong>mgl_irisw_1</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> dats, <code>const wchar_t *</code>ids, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005firis"></a>Функция С: <em><code>void</code></em> <strong>mgl_iris</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> dats, <code>HCDT</code> rngs, <code>const char *</code>ids, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005firisw"></a>Функция С: <em><code>void</code></em> <strong>mgl_irisw</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> dats, <code>HCDT</code> rngs, <code>const wchar_t *</code>ids, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует Ирисы Фишера для определения зависимостей данных <var>dats</var> друг от друга (см. <a href="http://en.wikipedia.org/wiki/Iris_flower_data_set">http://en.wikipedia.org/wiki/Iris_flower_data_set</a>). Массив <var>rngs</var> размером 2*<var>dats</var>.nx задает диапазон изменения осей для каждой из колонки. Строка <var>ids</var> содержит имена колонок данных, разделенных символом ‘<samp>;</samp>’. Опция <code>value</code> задает размер текста для имен данных. На график можно добавить новый набор данных если указать тот же размер <var>rngs</var> и использовать пустую строку имен <var>ids</var>. См. также <a href="#plot">plot</a>. См. раздел <a href="#iris-sample">iris sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="tube"></a><dl>
-<dt><a name="index-tube"></a>Команда MGL: <em></em> <strong>tube</strong> <em>ydat rdat ['stl'='']</em></dt>
-<dt><a name="index-tube-1"></a>Команда MGL: <em></em> <strong>tube</strong> <em>ydat <code>rval</code> ['stl'='']</em></dt>
-<dt><a name="index-tube-2"></a>Команда MGL: <em></em> <strong>tube</strong> <em>xdat ydat rdat ['stl'='']</em></dt>
-<dt><a name="index-tube-3"></a>Команда MGL: <em></em> <strong>tube</strong> <em>xdat ydat <code>rval</code> ['stl'='']</em></dt>
-<dt><a name="index-tube-4"></a>Команда MGL: <em></em> <strong>tube</strong> <em>xdat ydat zdat rdat ['stl'='']</em></dt>
-<dt><a name="index-tube-5"></a>Команда MGL: <em></em> <strong>tube</strong> <em>xdat ydat zdat <code>rval</code> ['stl'='']</em></dt>
-<dt><a name="index-Tube-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Tube</strong> <em>(<code>const mglDataA &</code>y, <code>const mglDataA &</code>r, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tube-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Tube</strong> <em>(<code>const mglDataA &</code>y, <code>mreal</code> r, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tube-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Tube</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>r, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tube-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Tube</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>mreal</code> r, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tube-5"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Tube</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>r, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tube-6"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Tube</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>mreal</code> r, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftube_005fr"></a>Функция С: <em><code>void</code></em> <strong>mgl_tube_r</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>HCDT</code> r, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftube"></a>Функция С: <em><code>void</code></em> <strong>mgl_tube</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> y, <code>mreal</code> r, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftube_005fxyr"></a>Функция С: <em><code>void</code></em> <strong>mgl_tube_xyr</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> r, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftube_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_tube_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>mreal</code> r, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftube_005fxyzr"></a>Функция С: <em><code>void</code></em> <strong>mgl_tube_xyzr</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> r, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftube_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_tube_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>mreal</code> r, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют трубу радиуса <var>r</var>[i] вдоль кривой между точками {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Опция <code>value</code> число сегментов в поперечном сечении (по умолчанию 25). См. также <a href="#plot">plot</a>. См. раздел <a href="#tube-sample">tube sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="torus"></a><dl>
-<dt><a name="index-torus"></a>Команда MGL: <em></em> <strong>torus</strong> <em>rdat zdat ['stl'='']</em></dt>
-<dt><a name="index-Torus-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Torus</strong> <em>(<code>const mglDataA &</code>r, <code>const mglDataA &</code>z, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftorus"></a>Функция С: <em><code>void</code></em> <strong>mgl_torus</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> r, <code>HCDT</code> z, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют поверхность вращения кривой {<var>r</var>, <var>z</var>} относительно оси. Если строка <var>pen</var> содержит ‘<samp>x</samp>’ или ‘<samp>z</samp>’, то ось вращения будет выбрана в указанном направлении (по умолчанию вдоль оси y). Если <var>sch</var> содержит ‘<samp>#</samp>’, то рисуется сетчатая поверхность. Если <var>sch</var> содержит ‘<samp>.</samp>’, то рисуется поверхность из точек. См. также <a href="#plot">plot</a>, <a href="#axial">axial</a>. См. раздел <a href="#torus-sample">torus sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-
-<a name="lamerey"></a><dl>
-<dt><a name="index-lamerey"></a>Команда MGL: <em></em> <strong>lamerey</strong> <em><code>x0</code> ydat ['stl'='']</em></dt>
-<dt><a name="index-lamerey-1"></a>Команда MGL: <em></em> <strong>lamerey</strong> <em><code>x0</code> 'y(x)' ['stl'='']</em></dt>
-<dt><a name="index-Lamerey"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Lamerey</strong> <em>(<code>double</code> x0, <code>const mglDataA &</code>y, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Lamerey-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Lamerey</strong> <em>(<code>double</code> x0, <code>const char *</code>y, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005flamerey_005fdat"></a>Функция С: <em><code>void</code></em> <strong>mgl_lamerey_dat</strong> <em>(<code>HMGL</code> gr, <code>double</code> x0, <code>HCDT</code> y, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005flamerey_005fstr"></a>Функция С: <em><code>void</code></em> <strong>mgl_lamerey_str</strong> <em>(<code>HMGL</code> gr, <code>double</code> x0, <code>const char *</code>y, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют диаграмму Ламерея для точечного отображения x_new = y(x_old) начиная с точки <var>x0</var>. Строка <var>stl</var> может содержать стиль линии, символ ‘<samp>v</samp>’ для стрелок, символ ‘<samp>~</samp>’ для исключения первого сегмента. Опция <code>value</code> задает число сегментов для рисования (по умолчанию 20). См. также <a href="#plot">plot</a>, <a href="#fplot">fplot</a>, <a href="#bifurcation">bifurcation</a>, <a href="#pmap">pmap</a>. См. раздел <a href="#lamerey-sample">lamerey sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="bifurcation"></a><dl>
-<dt><a name="index-bifurcation"></a>Команда MGL: <em></em> <strong>bifurcation</strong> <em><code>dx</code> ydat ['stl'='']</em></dt>
-<dt><a name="index-bifurcation-1"></a>Команда MGL: <em></em> <strong>bifurcation</strong> <em><code>dx</code> 'y(x)' ['stl'='']</em></dt>
-<dt><a name="index-Bifurcation"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Bifurcation</strong> <em>(<code>double</code> dx, <code>const mglDataA &</code>y, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Bifurcation-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Bifurcation</strong> <em>(<code>double</code> dx, <code>const char *</code>y, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fbifurcation_005fdat"></a>Функция С: <em><code>void</code></em> <strong>mgl_bifurcation_dat</strong> <em>(<code>HMGL</code> gr, <code>double</code> dx, <code>HCDT</code> y, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fbifurcation_005fstr"></a>Функция С: <em><code>void</code></em> <strong>mgl_bifurcation_str</strong> <em>(<code>HMGL</code> gr, <code>double</code> dx, <code>const char *</code>y, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют бифуркационную диаграмму (диаграмму удвоения периода) для точечного отображения x_new = y(x_old). Параметр <var>dx</var> задает точность по оси x. Строка <var>stl</var> задает цвет. Опция <code>value</code> задает число учитываемых стационарных точек (по умолчанию 1024). См. также <a href="#plot">plot</a>, <a href="#fplot">fplot</a>, <a href="#lamerey">lamerey</a>. См. раздел <a href="#bifurcation-sample">bifurcation sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="pmap"></a><dl>
-<dt><a name="index-pmap"></a>Команда MGL: <em></em> <strong>pmap</strong> <em>ydat sdat ['stl'='']</em></dt>
-<dt><a name="index-pmap-1"></a>Команда MGL: <em></em> <strong>pmap</strong> <em>xdat ydat sdat ['stl'='']</em></dt>
-<dt><a name="index-pmap-2"></a>Команда MGL: <em></em> <strong>pmap</strong> <em>xdat ydat zdat sdat ['stl'='']</em></dt>
-<dt><a name="index-Pmap"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Pmap</strong> <em>(<code>const mglDataA &</code>y, <code>const mglDataA &</code>s, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Pmap-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Pmap</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>s, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Pmap-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Pmap</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>s, <code>const char *</code>stl=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fpmap"></a>Функция С: <em><code>void</code></em> <strong>mgl_pmap</strong> <em>(<code>HMGL</code> gr, <code>HMDT</code> y, <code>HCDT</code> s, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fpmap_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_pmap_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HMDT</code> y, <code>HCDT</code> s, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fpmap_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_pmap_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HMDT</code> y, <code>HCDT</code> z, <code>HCDT</code> s, <code>const char *</code>stl, <code>const char *</code>opt)</em></dt>
-<dd><p>Функции рисуют отображение Пуанкаре для кривой {<var>x</var>, <var>y</var>, <var>z</var>} при условии <var>s</var>=0. Проще говоря, рисуются точки пересечения кривой и поверхности. Строка <var>stl</var> задает стиль маркеров. См. также <a href="#plot">plot</a>, <a href="#mark">mark</a>, <a href="#lamerey">lamerey</a>. См. раздел <a href="#pmap-sample">pmap sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="g_t2D-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#g_t3D-plotting" accesskey="n" rel="next">3D plotting</a>, Previous: <a href="#g_t1D-plotting" accesskey="p" rel="prev">1D plotting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="g_t2D-grafiki"></a>
-<h3 class="section">4.12 2D графики</h3>
-
-<a name="index-Mesh"></a>
-<a name="index-Fall"></a>
-<a name="index-Belt"></a>
-<a name="index-Surf"></a>
-<a name="index-Boxs"></a>
-<a name="index-Tile"></a>
-<a name="index-Dens"></a>
-<a name="index-Cont"></a>
-<a name="index-ContF"></a>
-<a name="index-ContD"></a>
-<a name="index-Axial"></a>
-<a name="index-Grad"></a>
-<a name="index-Grid-1"></a>
-
-<p>Эти функции строят графики для двумерных (2D) массивов. Двумерными считаются массивы, зависящие только от двух параметров (индексов) подобно матрице <em>f(x_i,y_j), i=1...n, j=1...m</em>. По умолчанию (если отсутствуют) значения <var>x</var>, <var>y</var> равно распределены в диапазоне осей координат. Младшие размерности массивов <var>x</var>, <var>y</var>, <var>z</var> должны быть одинаковы <code>x.nx=z.nx && y.nx=z.ny</code> или <code>x.nx=y.nx=z.nx && x.ny=y.ny=z.ny</code>. Массивы <var>x</var> и <var>y</var> могут быть векторами (не матрицами как <var>z</var>). График строится для каждого z среза данных. Строка <var>sch</var> задает цветовую схему (см. <a href="#Color-scheme">Color scheme</a>). Строка <var>opt</var> задает опции графика (см. <a href="#Command-options">Command options</a>).
-</p>
-<a name="surf"></a><dl>
-<dt><a name="index-surf"></a>Команда MGL: <em></em> <strong>surf</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-surf-1"></a>Команда MGL: <em></em> <strong>surf</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Surf-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Surf-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurf"></a>Функция С: <em><code>void</code></em> <strong>mgl_surf</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurf_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_surf_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует параметрически заданную поверхность {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. Если <var>sch</var> содержит ‘<samp>#</samp>’, то рисуется сетка на поверхности. Если <var>sch</var> содержит ‘<samp>.</samp>’, то рисуется поверхность из точек. См. также <a href="#mesh">mesh</a>, <a href="#dens">dens</a>, <a href="#belt">belt</a>, <a href="#tile">tile</a>, <a href="#boxs">boxs</a>, <a href="#surfc">surfc</a>, <a href="#surfa">surfa</a>. См. раздел <a href="#surf-sample">surf sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="mesh"></a><dl>
-<dt><a name="index-mesh"></a>Команда MGL: <em></em> <strong>mesh</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-mesh-1"></a>Команда MGL: <em></em> <strong>mesh</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Mesh-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Mesh</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Mesh-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Mesh</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fmesh"></a>Функция С: <em><code>void</code></em> <strong>mgl_mesh</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fmesh_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_mesh_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует сетчатую поверхность, заданную параметрически {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. См. также <a href="#surf">surf</a>, <a href="#fall">fall</a>, <a href="#meshnum">meshnum</a>, <a href="#cont">cont</a>, <a href="#tens">tens</a>. См. раздел <a href="#mesh-sample">mesh sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="fall"></a><dl>
-<dt><a name="index-fall"></a>Команда MGL: <em></em> <strong>fall</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-fall-1"></a>Команда MGL: <em></em> <strong>fall</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Fall-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Fall</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fall-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Fall</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ffall"></a>Функция С: <em><code>void</code></em> <strong>mgl_fall</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ffall_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_fall_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует водопад для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. График удобен для построения нескольких кривых, сдвинутых вглубь друг относительно друга. Если <var>sch</var> содержит ‘<samp>x</samp>’, то линии рисуются вдоль оси x, иначе (по умолчанию) вдоль оси y. См. также <a href="#belt">belt</a>, <a href="#mesh">mesh</a>, <a href="#tens">tens</a>, <a href="#meshnum">meshnum</a>. См. раздел <a href="#fall-sample">fall sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="belt"></a><dl>
-<dt><a name="index-belt"></a>Команда MGL: <em></em> <strong>belt</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-belt-1"></a>Команда MGL: <em></em> <strong>belt</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Belt-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Belt</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Belt-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Belt</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fbelt"></a>Функция С: <em><code>void</code></em> <strong>mgl_belt</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fbelt_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_belt_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует ленточки для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. График может использоваться как 3d обобщение графика <a href="#plot">plot</a>. Если <var>sch</var> содержит ‘<samp>x</samp>’, то ленточки рисуются вдоль оси x, иначе (по умолчанию) вдоль оси y. См. также <a href="#fall">fall</a>, <a href="#surf">surf</a>, <a href="#beltc">beltc</a>, <a href="#plot">plot</a>, <a href="#meshnum">meshnum</a>. См. раздел <a href="#belt-sample">belt sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="boxs"></a><dl>
-<dt><a name="index-boxs"></a>Команда MGL: <em></em> <strong>boxs</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-boxs-1"></a>Команда MGL: <em></em> <strong>boxs</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Boxs-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Boxs</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Boxs-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Boxs</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fboxs"></a>Функция С: <em><code>void</code></em> <strong>mgl_boxs</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fboxs_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_boxs_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует вертикальные ящики для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. См. также <a href="#surf">surf</a>, <a href="#dens">dens</a>, <a href="#tile">tile</a>, <a href="#step">step</a>. См. раздел <a href="#boxs-sample">boxs sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="tile"></a><dl>
-<dt><a name="index-tile"></a>Команда MGL: <em></em> <strong>tile</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-tile-1"></a>Команда MGL: <em></em> <strong>tile</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-tile-2"></a>Команда MGL: <em></em> <strong>tile</strong> <em>xdat ydat zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-Tile-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Tile</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tile-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Tile</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Tile-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Tile</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftile"></a>Функция С: <em><code>void</code></em> <strong>mgl_tile</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftile_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_tile_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftile_005fxyc"></a>Функция С: <em><code>void</code></em> <strong>mgl_tile_xyc</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует плитки для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} с цветом, заданным массивом <var>c</var>[i,j]. Если строка <var>sch</var> содержит стиль ‘<samp>x</samp>’ или ‘<samp>y</samp>’, то плитки будут ориентированы перпендикулярно x- или y-оси. График может использоваться как 3d обобщение <a href="#step">step</a>. См. также <a href="#surf">surf</a>, <a href="#boxs">boxs</a>, <a href="#step">step</a>, <a href="#tiles">tiles</a>. См. раздел <a href="#tile-sample">tile sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="dens"></a><dl>
-<dt><a name="index-dens"></a>Команда MGL: <em></em> <strong>dens</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-dens-1"></a>Команда MGL: <em></em> <strong>dens</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Dens-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Dens</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>, <code>mreal</code> zVal=<code>NAN</code>)</em></dt>
-<dt><a name="index-Dens-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Dens</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>, <code>mreal</code> zVal=<code>NAN</code>)</em></dt>
-<dt><a name="index-mgl_005fdens"></a>Функция С: <em><code>void</code></em> <strong>mgl_dens</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fdens_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_dens_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует график плотности для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} при <var>z</var> равном минимальному значению оси z. Если <var>sch</var> содержит ‘<samp>#</samp>’, то рисуется сетка. Если <var>sch</var> содержит ‘<samp>.</samp>’, то рисуется поверхность из точек. См. также <a href="#surf">surf</a>, <a href="#cont">cont</a>, <a href="#contf">contf</a>, <a href="#boxs">boxs</a>, <a href="#tile">tile</a>, <code>dens[xyz]</code>. См. раздел <a href="#dens-sample">dens sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="cont"></a><dl>
-<dt><a name="index-cont"></a>Команда MGL: <em></em> <strong>cont</strong> <em>vdat zdat ['sch'='']</em></dt>
-<dt><a name="index-cont-1"></a>Команда MGL: <em></em> <strong>cont</strong> <em>vdat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Cont-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Cont</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Cont-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Cont</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcont_005f_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_cont__val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcont_005fxy_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_cont_xy_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует линии уровня для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} при <var>z=v</var>[k] или при <var>z</var> равном минимальному значению оси z если <var>sch</var> содержит ‘<samp>_</samp>’. Линии уровня рисуются для <var>z</var>[i,j]=<var>v</var>[k]. Если <var>sch</var> содержит ‘<samp>t</samp>’ или ‘<samp>T</samp>’, то значения <var>v</var>[k] будут выведены вдоль контуров над (или под) кривой. См. также <a href="#dens">dens</a>, <a href="#contf">contf</a>, <a href="#contd">contd</a>, <a href="#axial">axial</a>, <code>cont[xyz]</code>. См. раздел <a href="#cont-sample">cont sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-cont-2"></a>Команда MGL: <em></em> <strong>cont</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-cont-3"></a>Команда MGL: <em></em> <strong>cont</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Cont-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Cont</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Cont-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Cont</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcont"></a>Функция С: <em><code>void</code></em> <strong>mgl_cont</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcont_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_cont_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Как предыдущий с вектором <var>v</var> из <var>num</var> элементов равно распределенных в диапазоне изменения цвета. Здесь <var>num</var> равен значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 7). Если <var>sch</var> содержит ‘<samp>.</samp>’, то будут строится только контуры по уровням седловых точек.
-</p></dd></dl>
-
-<a name="contf"></a><dl>
-<dt><a name="index-contf"></a>Команда MGL: <em></em> <strong>contf</strong> <em>vdat zdat ['sch'='']</em></dt>
-<dt><a name="index-contf-1"></a>Команда MGL: <em></em> <strong>contf</strong> <em>vdat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-ContF-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContF</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContF-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContF</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontf_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_contf_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontf_005fxy_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_contf_xy_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует закрашенные линии (контуры) уровня для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} при <var>z=v</var>[k] или при <var>z</var> равном минимальному значению оси z если <var>sch</var> содержит ‘<samp>_</samp>’. Линии уровня рисуются для <var>z</var>[i,j]=<var>v</var>[k]. См. также <a href="#dens">dens</a>, <a href="#cont">cont</a>, <a href="#contd">contd</a>, <code>contf[xyz]</code>. См. раздел <a href="#contf-sample">contf sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-contf-2"></a>Команда MGL: <em></em> <strong>contf</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-contf-3"></a>Команда MGL: <em></em> <strong>contf</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-ContF-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContF</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContF-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContF</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontf"></a>Функция С: <em><code>void</code></em> <strong>mgl_contf</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontf_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_contf_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Как предыдущий с вектором <var>v</var> из <var>num</var> элементов равно распределенных в диапазоне изменения цвета. Здесь <var>num</var> равен значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 7).
-</p></dd></dl>
-
-<a name="contd"></a><dl>
-<dt><a name="index-contd"></a>Команда MGL: <em></em> <strong>contd</strong> <em>vdat zdat ['sch'='']</em></dt>
-<dt><a name="index-contd-1"></a>Команда MGL: <em></em> <strong>contd</strong> <em>vdat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-ContD-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContD</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContD-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContD</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontd_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_contd_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontd_005fxy_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_contd_xy_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует закрашенные линии (контуры) уровня для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} при <var>z=v</var>[k] или при <var>z</var> равном минимальному значению оси z если <var>sch</var> содержит ‘<samp>_</samp>’. Линии уровня рисуются для <var>z</var>[i,j]=<var>v</var>[k]. Строка <var>sch</var> задает цвета контуров: цвет k-го контура определяется как k-ый цвет строки. См. также <a href="#dens">dens</a>, <a href="#cont">cont</a>, <a href="#contf">contf</a>. См. раздел <a href="#contd-sample">contd sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-contd-2"></a>Команда MGL: <em></em> <strong>contd</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-contd-3"></a>Команда MGL: <em></em> <strong>contd</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-ContD-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContD</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContD-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContD</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontd"></a>Функция С: <em><code>void</code></em> <strong>mgl_contd</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontd_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_contd_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Как предыдущий с вектором <var>v</var> из <var>num</var> элементов равно распределенных в диапазоне изменения цвета. Здесь <var>num</var> равен значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 7).
-</p></dd></dl>
-
-
-<a name="contp"></a><dl>
-<dt><a name="index-contp"></a>Команда MGL: <em></em> <strong>contp</strong> <em>vdat xdat ydat zdat adat ['sch'='']</em></dt>
-<dt><a name="index-ContP"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContP</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontp_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_contp_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует линии уровня для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. Линии уровня рисуются для <var>a</var>[i,j]=<var>v</var>[k]. Если <var>sch</var> содержит ‘<samp>t</samp>’ или ‘<samp>T</samp>’, то значения <var>v</var>[k] будут выведены вдоль контуров над (или под) кривой. Если <var>sch</var> содержит ‘<samp>f</samp>’, то контуры будут закрашены. См. также <a href="#cont">cont</a>, <a href="#contf">contf</a>, <a href="#surfc">surfc</a>, <code>cont[xyz]</code>. </p></dd></dl>
-
-<dl>
-<dt><a name="index-contp-1"></a>Команда MGL: <em></em> <strong>contp</strong> <em>xdat ydat zdat adat ['sch'='']</em></dt>
-<dt><a name="index-ContP-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContP</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontp"></a>Функция С: <em><code>void</code></em> <strong>mgl_contp</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Как предыдущий с вектором <var>v</var> из <var>num</var> элементов равно распределенных в диапазоне изменения цвета. Здесь <var>num</var> равен значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 7).
-</p></dd></dl>
-
-<a name="contv"></a><dl>
-<dt><a name="index-contv"></a>Команда MGL: <em></em> <strong>contv</strong> <em>vdat zdat ['sch'='']</em></dt>
-<dt><a name="index-contv-1"></a>Команда MGL: <em></em> <strong>contv</strong> <em>vdat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-ContV"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContV</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContV-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContV</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontv_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_contv_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontv_005fxy_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_contv_xy_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует вертикальные цилиндры от линий уровня для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} при <var>z</var>=<var>v</var>[k] или при <var>z</var> равном минимальному значению оси z если <var>sch</var> содержит ‘<samp>_</samp>’. Линии уровня рисуются для <var>z</var>[i,j]=<var>v</var>[k]. См. также <a href="#cont">cont</a>, <a href="#contf">contf</a>. См. раздел <a href="#contv-sample">contv sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-contv-2"></a>Команда MGL: <em></em> <strong>contv</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-contv-3"></a>Команда MGL: <em></em> <strong>contv</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-ContV-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContV</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContV-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContV</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontv"></a>Функция С: <em><code>void</code></em> <strong>mgl_contv</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontv_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_contv_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Как предыдущий с вектором <var>v</var> из <var>num</var> элементов равно распределенных в диапазоне изменения цвета. Здесь <var>num</var> равен значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 7).
-</p></dd></dl>
-
-<a name="axial"></a><dl>
-<dt><a name="index-axial"></a>Команда MGL: <em></em> <strong>axial</strong> <em>vdat zdat ['sch'='']</em></dt>
-<dt><a name="index-axial-1"></a>Команда MGL: <em></em> <strong>axial</strong> <em>vdat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Axial-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Axial</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Axial-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Axial</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005faxial_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_axial_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005faxial_005fxy_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_axial_xy_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует поверхность вращения линии уровня для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. Линии уровня рисуются для <var>z</var>[i,j]=<var>v</var>[k]. Если <var>sch</var> содержит ‘<samp>#</samp>’, то рисуется сетчатая поверхность. Если <var>sch</var> содержит ‘<samp>.</samp>’, то рисуется поверхность из точек. Если строка содержит символы ‘<samp>x</samp>’ или ‘<samp>z</samp>’, то ось вращения устанавливается в указанное направление (по умолчанию вдоль ‘<samp>y</samp>’). См. также <a href="#cont">cont</a>, <a href="#contf">contf</a>, <a href="#torus">torus</a>, <a href="#surf3">surf3</a>. См. раздел <a href="#axial-sample">axial sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-axial-2"></a>Команда MGL: <em></em> <strong>axial</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-axial-3"></a>Команда MGL: <em></em> <strong>axial</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Axial-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Axial</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>, <code>int</code> num=<code>3</code>)</em></dt>
-<dt><a name="index-Axial-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Axial</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>, <code>int</code> num=<code>3</code>)</em></dt>
-<dt><a name="index-mgl_005faxial"></a>Функция С: <em><code>void</code></em> <strong>mgl_axial</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005faxial_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_axial_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Как предыдущий с вектором <var>v</var> из <var>num</var> элементов равно распределенных в диапазоне изменения цвета. Здесь <var>num</var> равен значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 3).
-</p></dd></dl>
-
-<a name="grid2"></a><dl>
-<dt><a name="index-grid2"></a>Команда MGL: <em></em> <strong>grid2</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-grid2-1"></a>Команда MGL: <em></em> <strong>grid2</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Grid-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Grid</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Grid-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Grid</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fgrid"></a>Функция С: <em><code>void</code></em> <strong>mgl_grid</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fgrid_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_grid_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует плоскую сету для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} при <var>z</var> равном минимальному значению оси z. См. также <a href="#dens">dens</a>, <a href="#cont">cont</a>, <a href="#contf">contf</a>, <a href="#grid3">grid3</a>, <a href="#meshnum">meshnum</a>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="g_t3D-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#Dual-plotting" accesskey="n" rel="next">Dual plotting</a>, Previous: <a href="#g_t2D-plotting" accesskey="p" rel="prev">2D plotting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="g_t3D-grafiki"></a>
-<h3 class="section">4.13 3D графики</h3>
-
-<a name="index-Surf3"></a>
-<a name="index-Dens3"></a>
-<a name="index-Cont3"></a>
-<a name="index-ContF3"></a>
-<a name="index-Grid3"></a>
-<a name="index-Cloud"></a>
-<a name="index-Beam"></a>
-
-<p>Эти функции строят графики для трехмерных (3D) массивов. Трёхмерными считаются массивы, зависящие от трёх параметров (индексов) подобно матрице <em>f(x_i,y_j,z_k), i=1...n, j=1...m, k=1...l</em>. По умолчанию (если отсутствуют) значения <var>x</var>, <var>y</var>, <var>z</var> равно распределены в диапазоне осей координат. Младшие размерности массивов <var>x</var>, <var>y</var>, <var>z</var> должны быть одинаковы <code>x.nx=a.nx && y.nx=a.ny && z.nz=a.nz</code> или <code>x.nx=y.nx=z.nx=a.nx && x.ny=y.ny=z.ny=a.ny && x.nz=y.nz=z.nz=a.nz</code>. Массивы <var>x</var>, <var>y</var> и <var>z</var> могут быть векторами (не матрицами как <var>a</var>). Строка <var>sch</var> задает цветовую схему (см. <a href="#Color-scheme">Color scheme</a>). Строка <var>opt</var> задает опции графика (см. <a href="#Command-options">Command options</a>).
-</p>
-
-<a name="surf3"></a><dl>
-<dt><a name="index-surf3"></a>Команда MGL: <em></em> <strong>surf3</strong> <em>adat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-surf3-1"></a>Команда MGL: <em></em> <strong>surf3</strong> <em>xdat ydat zdat adat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-Surf3-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3</strong> <em>(<code>mreal</code> val, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Surf3-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3</strong> <em>(<code>mreal</code> val, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurf3_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_surf3_val</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurf3_005fxyz_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_surf3_xyz_val</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует поверхность уровня для 3d массива, заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) при <var>a</var>(x,y,z)=<var>val</var>. Если <var>sch</var> содержит ‘<samp>#</samp>’, то рисуется сетчатая поверхность. Если <var>sch</var> содержит ‘<samp>.</samp>’, то рисуется поверхность из точек. Замечу, что возможно некорректная отрисовка граней вследствие неопределённости построения сечения если поверхность пересекает ячейку данных 2 и более раз. См. также <a href="#cloud">cloud</a>, <a href="#dens3">dens3</a>, <a href="#surf3c">surf3c</a>, <a href="#surf3a">surf3a</a>, <a href="#axial">axial</a>. См. раздел <a href="#surf3-sample">surf3 sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-surf3-2"></a>Команда MGL: <em></em> <strong>surf3</strong> <em>adat ['sch'='']</em></dt>
-<dt><a name="index-surf3-3"></a>Команда MGL: <em></em> <strong>surf3</strong> <em>xdat ydat zdat adat ['sch'='']</em></dt>
-<dt><a name="index-Surf3-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Surf3-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurf3"></a>Функция С: <em><code>void</code></em> <strong>mgl_surf3</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurf3_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_surf3_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Аналогично предыдущему для <var>num</var> поверхностей уровня равномерно распределённых в диапазоне изменения цвета. Величина <var>num</var> равна значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 3).
-</p></dd></dl>
-
-<a name="cloud"></a><dl>
-<dt><a name="index-cloud"></a>Команда MGL: <em></em> <strong>cloud</strong> <em>adat ['sch'='']</em></dt>
-<dt><a name="index-cloud-1"></a>Команда MGL: <em></em> <strong>cloud</strong> <em>xdat ydat zdat adat ['sch'='']</em></dt>
-<dt><a name="index-Cloud-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Cloud</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Cloud-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Cloud</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcloud"></a>Функция С: <em><code>void</code></em> <strong>mgl_cloud</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcloud_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_cloud_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует облачный график для 3d массива, заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). График состоит из кубиков с цветом и прозрачностью пропорциональной значениям <var>a</var>. Результат похож на облако – малые значения прозрачны, а большие нет. Число кубиков зависит от <a href="#meshnum">meshnum</a>. Если <var>sch</var> содержит ‘<samp>.</samp>’, то будет построен график более низкого качества, но с заметно меньшим использованием памяти. Если <var>sch</var> содержит ‘<samp>i</samp>’, то прозрачность будет инвертирована, т.е. области с более высокими значениями будут более прозрачны, а с более низким – менее прозрачны. См. также <a href="#surf3">surf3</a>, <a href="#meshnum">meshnum</a>. См. раздел <a href="#cloud-sample">cloud sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="dens3"></a><dl>
-<dt><a name="index-dens3"></a>Команда MGL: <em></em> <strong>dens3</strong> <em>adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-dens3-1"></a>Команда MGL: <em></em> <strong>dens3</strong> <em>xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-Dens3-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Dens3</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Dens3-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Dens3</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fdens3"></a>Функция С: <em><code>void</code></em> <strong>mgl_dens3</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fdens3_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_dens3_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует график плотности для 3d массива, заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). График рисуется на срезе <var>sVal</var> в направлении {‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’}, указанном в строке <var>sch</var> (по умолчанию, в напралении ‘<samp>y</samp>’). Если <var>sch</var> содержит ‘<samp>#</samp>’, то на срезе рисуется сетка. См. также <a href="#cont3">cont3</a>, <a href="#contf3">contf3</a>, <a href="#dens">dens</a>, <a href="#grid3">grid3</a>. См. раздел <a href="#dens3-sample">dens3 sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="cont3"></a><dl>
-<dt><a name="index-cont3"></a>Команда MGL: <em></em> <strong>cont3</strong> <em>vdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-cont3-1"></a>Команда MGL: <em></em> <strong>cont3</strong> <em>vdat xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-Cont3-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Cont3</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Cont3-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Cont3</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcont3_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_cont3_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcont3_005fxyz_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_cont3_xyz_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует линии уровня для 3d массива, заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). Линии рисуются для значений из массива <var>v</var> на срезе <var>sVal</var> в направлении {‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’}, указанном в строке <var>sch</var> (по умолчанию, в напралении ‘<samp>y</samp>’). Если <var>sch</var> содержит ‘<samp>#</samp>’, то на срезе рисуется сетка. Если <var>sch</var> содержит ‘<samp>t</samp>’ или ‘<samp>T</samp>’, то значения <var>v</var>[k] будут выведены вдоль контуров над (или под) кривой. См. также <a href="#dens3">dens3</a>, <a href="#contf3">contf3</a>, <a href="#cont">cont</a>, <a href="#grid3">grid3</a>. См. раздел <a href="#cont3-sample">cont3 sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-cont3-2"></a>Команда MGL: <em></em> <strong>cont3</strong> <em>adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-cont3-3"></a>Команда MGL: <em></em> <strong>cont3</strong> <em>xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-Cont3-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Cont3</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Cont3-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Cont3</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcont3"></a>Функция С: <em><code>void</code></em> <strong>mgl_cont3</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcont3_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_cont3_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>Аналогично предыдущему для <var>num</var> линий уровня равномерно распределённых в диапазоне изменения цвета. Величина <var>num</var> равна значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 7).
-</p></dd></dl>
-
-<a name="contf3"></a><dl>
-<dt><a name="index-contf3"></a>Команда MGL: <em></em> <strong>contf3</strong> <em>vdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-contf3-1"></a>Команда MGL: <em></em> <strong>contf3</strong> <em>vdat xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-Contf3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Contf3</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Contf3-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Contf3</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontf3_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_contf3_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontf3_005fxyz_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_contf3_xyz_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует закрашенные линии (контуры) уровня для 3d массива, заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). Линии рисуются для значений из массива <var>v</var> на срезе <var>sVal</var> в направлении {‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’}, указанном в строке <var>sch</var> (по умолчанию, в напралении ‘<samp>y</samp>’). Если <var>sch</var> содержит ‘<samp>#</samp>’, то на срезе рисуется сетка. См. также <a href="#dens3">dens3</a>, <a href="#cont3">cont3</a>, <a href="#contf">contf</a>, <a href="#grid3">grid3</a>. См. раздел <a href="#contf3-sample">contf3 sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-contf3-2"></a>Команда MGL: <em></em> <strong>contf3</strong> <em>adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-contf3-3"></a>Команда MGL: <em></em> <strong>contf3</strong> <em>xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-Contf3-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Contf3</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Contf3-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Contf3</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontf3"></a>Функция С: <em><code>void</code></em> <strong>mgl_contf3</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontf3_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_contf3_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>Аналогично предыдущему для <var>num</var> закрашенных линий (контуров) уровня равномерно распределённых в диапазоне изменения цвета. Величина <var>num</var> равна значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 7).
-</p></dd></dl>
-
-<a name="grid3"></a><dl>
-<dt><a name="index-grid3"></a>Команда MGL: <em></em> <strong>grid3</strong> <em>adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-grid3-1"></a>Команда MGL: <em></em> <strong>grid3</strong> <em>xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-Grid3-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Grid3</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Grid3-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Grid3</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fgrid3"></a>Функция С: <em><code>void</code></em> <strong>mgl_grid3</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fgrid3_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_grid3_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует сетку для 3d массива, заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). График рисуется на срезе <var>sVal</var> в направлении {‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’}, указанном в строке <var>sch</var> (по умолчанию, в напралении ‘<samp>y</samp>’). См. также <a href="#cont3">cont3</a>, <a href="#contf3">contf3</a>, <a href="#dens3">dens3</a>, <a href="#grid2">grid2</a>, <a href="#meshnum">meshnum</a>.
-</p></dd></dl>
-
-<a name="beam"></a><dl>
-<dt><a name="index-beam"></a>Команда MGL: <em></em> <strong>beam</strong> <em>tr g1 g2 adat <code>rval</code> ['sch'='' <code>flag=0 num=3</code>]</em></dt>
-<dt><a name="index-Beam-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Beam</strong> <em>(<code>const mglDataA &</code>tr, <code>const mglDataA &</code>g1, <code>const mglDataA &</code>g2, <code>const mglDataA &</code>a, <code>mreal</code> r, <code>const char *</code>stl=<code>""</code>, <code>int</code> flag=<code>0</code>, <code>int</code> num=<code>3</code>)</em></dt>
-<dt><a name="index-Beam-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Beam</strong> <em>(<code>mreal</code> val, <code>const mglDataA &</code>tr, <code>const mglDataA &</code>g1, <code>const mglDataA &</code>g2, <code>const mglDataA &</code>a, <code>mreal</code> r, <code>const char *</code>stl=<code>""</code>, <code>int</code> flag=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fbeam"></a>Функция С: <em><code>void</code></em> <strong>mgl_beam</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> tr, <code>HCDT</code> g1, <code>HCDT</code> g2, <code>HCDT</code> a, <code>mreal</code> r, <code>const char *</code>stl, <code>int</code> flag, <code>int</code> num)</em></dt>
-<dt><a name="index-mgl_005fbeam_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_beam_val</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>HCDT</code> tr, <code>HCDT</code> g1, <code>HCDT</code> g2, <code>HCDT</code> a, <code>mreal</code> r, <code>const char *</code>stl, <code>int</code> flag)</em></dt>
-<dd><p>Рисует поверхность уровня для 3d массива <var>a</var> при постоянном значении <var>a</var>=<var>val</var>. Это специальный тип графика для <var>a</var> заданного в сопровождающей системе координат вдоль кривой <var>tr</var> с ортами <var>g1</var>, <var>g2</var> и с поперечным размером <var>r</var>. Переменная <var>flag</var> – битовый флаг: ‘<samp>0x1</samp>’ - рисовать в сопровождающих (не лабораторных) координатах; ‘<samp>0x2</samp>’ - рисовать проекцию на плоскость <em>\rho-z</em>; ‘<samp>0x4</samp>’ - рисовать нормированное в каждом сечении поле. Размеры массивов по 1-му индексу <var>tr</var>, <var>g1</var>, <var>g2</var> должны быть nx>2. Размеры массивов по 2-му индексу <var>tr</var>, <var>g1</var>, <var>g2</var> и размер по 3-му индексу массива <var>a</var> должны быть одинаковы. См. также <a href="#surf3">surf3</a>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Dual-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#Vector-fields" accesskey="n" rel="next">Vector fields</a>, Previous: <a href="#g_t3D-plotting" accesskey="p" rel="prev">3D plotting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Parnye-grafiki"></a>
-<h3 class="section">4.14 Парные графики</h3>
-
-<a name="index-SurfC"></a>
-<a name="index-SurfA"></a>
-<a name="index-Surf3C"></a>
-<a name="index-Surf3A"></a>
-<a name="index-TileS"></a>
-<a name="index-Map"></a>
-<a name="index-STFA"></a>
-
-<p>Эти функции строят графики для двух связанных массивов. Есть несколько основных типов 3D графиков: поверхность и поверхность уровня с окраской по второму массиву (SurfC, Surf3C), поверхность и поверхность уровня с прозрачностью по второму массиву (SurfA, Surf3A), плитки переменного размера (TileS), диаграмма точечного отображения (Map), STFA диаграмма (STFA). По умолчанию (если отсутствуют) значения <var>x</var>, <var>y</var> (и <var>z</var> для <code>Surf3C, Surf3A</code>) равно распределены в диапазоне осей координат. Младшие размерности массивов <var>x</var>, <var>y</var>, <var>z</var>, <var>c</var> должны быть одинаковы <code>x.nx=a.nx && y.nx=a.ny && z.nz=a.nz</code> или <code>x.nx=y.nx=z.nx=a.nx && x.ny=y.ny=z.ny=a.ny && x.nz=y.nz=z.nz=a.nz</code>. Массивы <var>x</var>, <var>y</var> (и <var>z</var> для <code>Surf3C, Surf3A</code>) могут быть векторами (не матрицами как <var>c</var>). Строка <var>sch</var> задает цветовую схему (см. <a href="#Color-scheme">Color scheme</a>). Строка <var>opt</var> задает опции графика (см. <a href="#Command-options">Command options</a>).
-</p>
-
-<a name="surfc"></a><dl>
-<dt><a name="index-surfc"></a>Команда MGL: <em></em> <strong>surfc</strong> <em>zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-surfc-1"></a>Команда MGL: <em></em> <strong>surfc</strong> <em>xdat ydat zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-SurfC-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SurfC</strong> <em>(<code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-SurfC-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SurfC</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurfc"></a>Функция С: <em><code>void</code></em> <strong>mgl_surfc</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurfc_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_surfc_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует параметрически заданную поверхность {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} с цветом, заданным массивом <var>c</var>[i,j]. Если <var>sch</var> содержит ‘<samp>#</samp>’, то на поверхности рисуется сетка. Если <var>sch</var> содержит ‘<samp>.</samp>’, то рисуется поверхность из точек. Размерность массивов <var>z</var> и <var>c</var> должна быть одинакова. График строится для каждого z среза данных. См. также <a href="#surf">surf</a>, <a href="#surfa">surfa</a>, <a href="#beltc">beltc</a>, <a href="#surf3c">surf3c</a>. См. раздел <a href="#surfc-sample">surfc sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-<a name="beltc"></a><dl>
-<dt><a name="index-beltc"></a>Команда MGL: <em></em> <strong>beltc</strong> <em>zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-beltc-1"></a>Команда MGL: <em></em> <strong>beltc</strong> <em>xdat ydat zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-BeltC"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>BeltC</strong> <em>(<code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-BeltC-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>BeltC</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fbeltc"></a>Функция С: <em><code>void</code></em> <strong>mgl_beltc</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fbeltc_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_beltc_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует ленточки для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} с цветом, заданным массивом <var>c</var>[i,j]. График может использоваться как 3d обобщение графика <a href="#plot">plot</a>. Если <var>sch</var> содержит ‘<samp>x</samp>’, то ленточки рисуются вдоль оси x, иначе (по умолчанию) вдоль оси y. См. также <a href="#belt">belt</a>, <a href="#surfc">surfc</a>, <a href="#meshnum">meshnum</a>. </p></dd></dl>
-
-
-<a name="surf3c"></a><dl>
-<dt><a name="index-surf3c"></a>Команда MGL: <em></em> <strong>surf3c</strong> <em>adat cdat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-surf3c-1"></a>Команда MGL: <em></em> <strong>surf3c</strong> <em>xdat ydat zdat adat cdat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-Surf3C-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3C</strong> <em>(<code>mreal</code> val, <code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Surf3C-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3C</strong> <em>(<code>mreal</code> val, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurf3c_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_surf3c_val</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>HCDT</code> a, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurf3c_005fxyz_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_surf3c_xyz_val</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует поверхность уровня для 3d массива, заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) при <var>a</var>(x,y,z)=<var>val</var>. Аналогично <a href="#surf3">surf3</a>, но цвет задается массивом <var>c</var>. Если <var>sch</var> содержит ‘<samp>#</samp>’, то рисуется сетчатая поверхность. Если <var>sch</var> содержит ‘<samp>.</samp>’, то рисуется поверхность из точек. См. также <a href="#surf3">surf3</a>, <a href="#surfc">surfc</a>, <a href="#surf3a">surf3a</a>. См. раздел <a href="#surf3c-sample">surf3c sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-surf3c-2"></a>Команда MGL: <em></em> <strong>surf3c</strong> <em>adat cdat ['sch'='']</em></dt>
-<dt><a name="index-surf3c-3"></a>Команда MGL: <em></em> <strong>surf3c</strong> <em>xdat ydat zdat adat cdat ['sch'='']</em></dt>
-<dt><a name="index-Surf3C-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3C</strong> <em>(<code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Surf3C-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3C</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurf3c"></a>Функция С: <em><code>void</code></em> <strong>mgl_surf3c</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurf3c_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_surf3c_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Аналогично предыдущему для <var>num</var> поверхностей уровня равномерно распределённых в диапазоне изменения цвета. Величина <var>num</var> равна значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 3).
-</p></dd></dl>
-
-
-<a name="surfa"></a><dl>
-<dt><a name="index-surfa"></a>Команда MGL: <em></em> <strong>surfa</strong> <em>zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-surfa-1"></a>Команда MGL: <em></em> <strong>surfa</strong> <em>xdat ydat zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-SurfA-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SurfA</strong> <em>(<code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-SurfA-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SurfA</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurfa"></a>Функция С: <em><code>void</code></em> <strong>mgl_surfa</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurfa_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_surfa_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует параметрически заданную поверхность {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} с прозрачностью, заданной массивом <var>c</var>[i,j]. Если <var>sch</var> содержит ‘<samp>#</samp>’, то на поверхности рисуется сетка. Если <var>sch</var> содержит ‘<samp>.</samp>’, то рисуется поверхность из точек. Размерность массивов <var>z</var> и <var>c</var> должна быть одинакова. График строится для каждого z среза данных. См. также <a href="#surf">surf</a>, <a href="#surfc">surfc</a>, <a href="#surf3a">surf3a</a>. См. раздел <a href="#surfa-sample">surfa sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="surf3a"></a><dl>
-<dt><a name="index-surf3a"></a>Команда MGL: <em></em> <strong>surf3a</strong> <em>adat cdat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-surf3a-1"></a>Команда MGL: <em></em> <strong>surf3a</strong> <em>xdat ydat zdat adat cdat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-Surf3A-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3A</strong> <em>(<code>mreal</code> val, <code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Surf3A-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3A</strong> <em>(<code>mreal</code> val, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurf3a_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_surf3a_val</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>HCDT</code> a, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurf3a_005fxyz_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_surf3a_xyz_val</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует поверхность уровня для 3d массива, заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) при <var>a</var>(x,y,z)=<var>val</var>. Аналогично <a href="#surf3">surf3</a>, но прозрачность задается массивом <var>c</var>. Если <var>sch</var> содержит ‘<samp>#</samp>’, то рисуется сетчатая поверхность. Если <var>sch</var> содержит ‘<samp>.</samp>’, то рисуется поверхность из точек. См. также <a href="#surf3">surf3</a>, <a href="#surfc">surfc</a>, <a href="#surf3a">surf3a</a>. См. раздел <a href="#surf3a-sample">surf3a sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-surf3a-2"></a>Команда MGL: <em></em> <strong>surf3a</strong> <em>adat cdat ['sch'='']</em></dt>
-<dt><a name="index-surf3a-3"></a>Команда MGL: <em></em> <strong>surf3a</strong> <em>xdat ydat zdat adat cdat ['sch'='']</em></dt>
-<dt><a name="index-Surf3A-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3A</strong> <em>(<code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Surf3A-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3A</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurf3a"></a>Функция С: <em><code>void</code></em> <strong>mgl_surf3a</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurf3a_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_surf3a_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Аналогично предыдущему для <var>num</var> поверхностей уровня равномерно распределённых в диапазоне изменения цвета. При этом массив <var>c</var> может быть вектором со значениями прозрачности и <var>num</var>=<var>c</var>.nx. В противном случае величина <var>num</var> равна значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 3).
-</p></dd></dl>
-
-
-
-<a name="surfca"></a><dl>
-<dt><a name="index-surfca"></a>Команда MGL: <em></em> <strong>surfca</strong> <em>zdat cdat adat ['sch'='']</em></dt>
-<dt><a name="index-surfca-1"></a>Команда MGL: <em></em> <strong>surfca</strong> <em>xdat ydat zdat cdat adat ['sch'='']</em></dt>
-<dt><a name="index-SurfCA"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SurfCA</strong> <em>(<code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-SurfCA-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>SurfCA</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurfca"></a>Функция С: <em><code>void</code></em> <strong>mgl_surfca</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>HCDT</code> c, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurfca_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_surfca_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> c, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует параметрически заданную поверхность {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} с цветом и прозрачностью, заданными массивами <var>c</var>[i,j] и <var>a</var>[i,j] соответственно. Если <var>sch</var> содержит ‘<samp>#</samp>’, то на поверхности рисуется сетка. Если <var>sch</var> содержит ‘<samp>.</samp>’, то рисуется поверхность из точек. Размерность массивов <var>z</var> и <var>c</var> должна быть одинакова. График строится для каждого z среза данных. См. также <a href="#surf">surf</a>, <a href="#surfc">surfc</a>, <a href="#surfa">surfa</a>, <a href="#surf3ca">surf3ca</a>. См. раздел <a href="#surfca-sample">surfca sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="surf3ca"></a><dl>
-<dt><a name="index-surf3ca"></a>Команда MGL: <em></em> <strong>surf3ca</strong> <em>adat cdat bdat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-surf3ca-1"></a>Команда MGL: <em></em> <strong>surf3ca</strong> <em>xdat ydat zdat adat cdat bdat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-Surf3CA"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3CA</strong> <em>(<code>mreal</code> val, <code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const mglDataA &</code>b, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Surf3CA-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3CA</strong> <em>(<code>mreal</code> val, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const mglDataA &</code>b, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurf3ca_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_surf3ca_val</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>HCDT</code> a, <code>HCDT</code> c, <code>HCDT</code> b, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurf3ca_005fxyz_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_surf3ca_xyz_val</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> val, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>HCDT</code> c, <code>HCDT</code> b, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует поверхность уровня для 3d массива, заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) при <var>a</var>(x,y,z)=<var>val</var>. Аналогично <a href="#surf3">surf3</a>, но цвет и прозрачность задается массивами <var>c</var> и <var>b</var> соответственно. Если <var>sch</var> содержит ‘<samp>#</samp>’, то рисуется сетчатая поверхность. Если <var>sch</var> содержит ‘<samp>.</samp>’, то рисуется поверхность из точек. См. также <a href="#surf3">surf3</a>, <a href="#surfc">surfc</a>, <a href="#surf3a">surf3a</a>. См. раздел <a href="#surf3a-sample">surf3a sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-surf3ca-2"></a>Команда MGL: <em></em> <strong>surf3ca</strong> <em>adat cdat ['sch'='']</em></dt>
-<dt><a name="index-surf3ca-3"></a>Команда MGL: <em></em> <strong>surf3ca</strong> <em>xdat ydat zdat adat cdat ['sch'='']</em></dt>
-<dt><a name="index-Surf3CA-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3CA</strong> <em>(<code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const mglDataA &</code>b, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Surf3CA-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Surf3CA</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const mglDataA &</code>c, <code>const mglDataA &</code>b, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fsurf3ca"></a>Функция С: <em><code>void</code></em> <strong>mgl_surf3ca</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>HCDT</code> c, <code>HCDT</code> b, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fsurf3ca_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_surf3ca_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>HCDT</code> c, <code>HCDT</code> b, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Аналогично предыдущему для <var>num</var> поверхностей уровня равномерно распределённых в диапазоне изменения цвета. Здесь величина <var>num</var> равна значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 3).
-</p></dd></dl>
-
-
-<a name="tiles"></a><dl>
-<dt><a name="index-tiles"></a>Команда MGL: <em></em> <strong>tiles</strong> <em>zdat rdat ['sch'='']</em></dt>
-<dt><a name="index-tiles-1"></a>Команда MGL: <em></em> <strong>tiles</strong> <em>xdat ydat zdat rdat ['sch'='']</em></dt>
-<dt><a name="index-tiles-2"></a>Команда MGL: <em></em> <strong>tiles</strong> <em>xdat ydat zdat rdat cdat ['sch'='']</em></dt>
-<dt><a name="index-TileS-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>TileS</strong> <em>(<code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TileS-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>TileS</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>r, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TileS-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>TileS</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>r, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftiles"></a>Функция С: <em><code>void</code></em> <strong>mgl_tiles</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftiles_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_tiles_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> r, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftiles_005fxyc"></a>Функция С: <em><code>void</code></em> <strong>mgl_tiles_xyc</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> r, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует плитки для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} с цветом, заданным массивом <var>c</var>[i,j]. Аналогично Tile(), но размер плиток задается массивов <var>r</var>. Если строка <var>sch</var> содержит стиль ‘<samp>x</samp>’ или ‘<samp>y</samp>’, то плитки будут ориентированы перпендикулярно x- или y-оси. Это создает эффект "прозрачности" при экспорте в файлы EPS. График строится для каждого z среза данных. См. также <a href="#surfa">surfa</a>, <a href="#tile">tile</a>. См. раздел <a href="#tiles-sample">tiles sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="map"></a><dl>
-<dt><a name="index-map"></a>Команда MGL: <em></em> <strong>map</strong> <em>udat vdat ['sch'='']</em></dt>
-<dt><a name="index-map-1"></a>Команда MGL: <em></em> <strong>map</strong> <em>xdat ydat udat vdat ['sch'='']</em></dt>
-<dt><a name="index-Map-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Map</strong> <em>(<code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Map-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Map</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fmap"></a>Функция С: <em><code>void</code></em> <strong>mgl_map</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fmap_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_map_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует точечное отображение для матриц {<var>ax</var>, <var>ay</var> } параметрически зависящих от координат <var>x</var>, <var>y</var>. Исходное положение ячейки задает ее цвет. Высота пропорциональна якобиану J(ax,ay). График является аналогом диаграммы Арнольда ??? Если <var>sch</var> содержит ‘<samp>.</samp>’, то цветные точки рисуются в узлах матриц (полезно для "запутанного" отображения), иначе рисуются грани. См. раздел <a href="#Mapping-visualization">Mapping visualization</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="stfa"></a><dl>
-<dt><a name="index-stfa"></a>Команда MGL: <em></em> <strong>stfa</strong> <em>re im <code>dn</code> ['sch'='']</em></dt>
-<dt><a name="index-stfa-1"></a>Команда MGL: <em></em> <strong>stfa</strong> <em>xdat ydat re im <code>dn</code> ['sch'='']</em></dt>
-<dt><a name="index-STFA-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>STFA</strong> <em>(<code>const mglDataA &</code>re, <code>const mglDataA &</code>im, <code>int</code> dn, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-STFA-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>STFA</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>re, <code>const mglDataA &</code>im, <code>int</code> dn, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fstfa"></a>Функция С: <em><code>void</code></em> <strong>mgl_stfa</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> re, <code>HCDT</code> im, <code>int</code> dn, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fstfa_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_stfa_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> re, <code>HCDT</code> im, <code>int</code> dn, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует спектрограмму комплексного массива <var>re</var>+i*<var>im</var> для Фурье размером <var>dn</var> точек в плоскости <var>z</var> равно минимальному значению оси z. Параметр <var>dn</var> – любое чётное число. Например в 1D случае, результатом будет график плотности от массива <em>res[i,j]=|\sum_d^dn exp(I*j*d)*(re[i*dn+d]+I*im[i*dn+d])|/dn</em> размером {int(nx/dn), dn, ny}. Массивы <var>re</var>, <var>im</var> параметрически зависят от координат <var>x</var>, <var>y</var>. Все размеры массивов <var>re</var> и <var>im</var> должны быть одинаковы. Младшие размерности массивов <var>x</var>, <var>y</var>, <var>re</var> должны быть одинаковы. Массивы <var>x</var> и <var>y</var> могут быть векторами (не матрицами как <var>re</var>). См. раздел <a href="#stfa-sample">stfa sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Vector-fields"></a>
-<div class="header">
-<p>
-Next: <a href="#Other-plotting" accesskey="n" rel="next">Other plotting</a>, Previous: <a href="#Dual-plotting" accesskey="p" rel="prev">Dual plotting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Vektornye-polya"></a>
-<h3 class="section">4.15 Векторные поля</h3>
-
-<a name="index-Traj"></a>
-<a name="index-Vect"></a>
-<a name="index-Dew"></a>
-<a name="index-Flow"></a>
-<a name="index-FlowP"></a>
-<a name="index-Pipe"></a>
-
-<p>Эти функции рисуют графики для 2D и 3D векторных полей. Есть несколько типов графиков: просто векторное поле (Vect), вектора вдоль траектории (Traj), векторное поле каплями (Dew), нити тока (Flow, FlowP), трубки тока (Pipe). По умолчанию (если отсутствуют) значения <var>x</var>, <var>y</var> и <var>z</var> равно распределены в диапазоне осей координат. Младшие размерности массивов <var>x</var>, <var>y</var>, <var>z</var> и <var>ax</var> должны быть одинаковы. Размеры массивов <var>ax</var>, <var>ay</var> и <var>az</var> должны быть одинаковы. Массивы <var>x</var>, <var>y</var> и <var>z</var> могут быть векторами (не матрицами как <var>ax</var>). Строка <var>sch</var> задает цветовую схему (см. <a href="#Color-scheme">Color scheme</a>). Строка <var>opt</var> задает опции графика (см. <a href="#Command-options">Command options</a>).
-</p>
-<a name="traj"></a><dl>
-<dt><a name="index-traj"></a>Команда MGL: <em></em> <strong>traj</strong> <em>xdat ydat udat vdat ['sch'='']</em></dt>
-<dt><a name="index-traj-1"></a>Команда MGL: <em></em> <strong>traj</strong> <em>xdat ydat zdat udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-Traj-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Traj</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Traj-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Traj</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftraj_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_traj_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code>x, <code>HCDT</code>y, <code>HCDT</code>z, <code>HCDT</code>ax, <code>HCDT</code>ay, <code>HCDT</code>az, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftraj_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_traj_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code>x, <code>HCDT</code>y, <code>HCDT</code>ax, <code>HCDT</code>ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует вектора {<var>ax</var>, <var>ay</var>, <var>az</var>} вдоль кривой {<var>x</var>, <var>y</var>, <var>z</var>}. Длина векторов пропорциональна <em>\sqrt{ax^2+ay^2+az^2}</em>. Строка <var>pen</var> задает цвет (см. <a href="#Line-styles">Line styles</a>). По умолчанию (<code>pen=""</code>) используется текущий цвет из палитры (см. <a href="#Palette-and-colors">Palette and colors</a>). Опция <code>value</code> задает фактор длины векторов (если не нуль) или выбирать длину пропорционально расстоянию между точками кривой (если <code>value=0</code>). Размер по 1-му индексу должен быть 2 или больше. График рисуется для каждой строки если один из массивов матрица. См. также <a href="#vect">vect</a>. См. раздел <a href="#traj-sample">traj sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="vect"></a><dl>
-<dt><a name="index-vect"></a>Команда MGL: <em></em> <strong>vect</strong> <em>udat vdat ['sch'='']</em></dt>
-<dt><a name="index-vect-1"></a>Команда MGL: <em></em> <strong>vect</strong> <em>xdat ydat udat vdat ['sch'='']</em></dt>
-<dt><a name="index-Vect-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Vect</strong> <em>(<code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Vect-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Vect</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fvect_005f2d"></a>Функция С: <em><code>void</code></em> <strong>mgl_vect_2d</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fvect_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_vect_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует векторное поле {<var>ax</var>, <var>ay</var>} параметрически зависящее от координат <var>x</var>, <var>y</var> на плоскости при <var>z</var> равном минимальному значению оси z. Длина и цвет векторов пропорциональна <em>\sqrt{ax^2+ay^2}</em>. Число рисуемых векторов зависит от <a href="#meshnum">meshnum</a>. Вид стрелок/штрихов может быть изменён символами:
-</p><ul>
-<li> ‘<samp>f</samp>’ для стрелок одинаковой длины,
-</li><li> ‘<samp>></samp>’, ‘<samp><</samp>’ для стрелок начинающихся или заканчивающихся в ячейке сетки (по умолчанию центрированы),
-</li><li> ‘<samp>.</samp>’ для рисования штрихов с точкой в начале вместо стрелок,
-</li><li> ‘<samp>=</samp>’ для использования градиента цвета вдоль стрелок.
-</li></ul>
-<p>См. также <a href="#flow">flow</a>, <a href="#dew">dew</a>. См. раздел <a href="#vect-sample">vect sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-vect-2"></a>Команда MGL: <em></em> <strong>vect</strong> <em>udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-vect-3"></a>Команда MGL: <em></em> <strong>vect</strong> <em>xdat ydat zdat udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-Vect-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Vect</strong> <em>(<code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Vect-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Vect</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fvect_005f3d"></a>Функция С: <em><code>void</code></em> <strong>mgl_vect_3d</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fvect_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_vect_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Это 3d версия графика. Здесь массивы <var>ax</var>, <var>ay</var>, <var>az</var> должны трёхмерными тензорами и длина вектора пропорциональна <em>\sqrt{ax^2+ay^2+az^2}</em>.
-</p></dd></dl>
-
-<a name="vect3"></a><dl>
-<dt><a name="index-vect3"></a>Команда MGL: <em></em> <strong>vect3</strong> <em>udat vdat wdat ['sch'='' sval]</em></dt>
-<dt><a name="index-vect3-1"></a>Команда MGL: <em></em> <strong>vect3</strong> <em>xdat ydat zdat udat vdat wdat ['sch'='' sval]</em></dt>
-<dt><a name="index-Vect3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Vect3</strong> <em>(<code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Vect3-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Vect3</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fvect3"></a>Функция С: <em><code>void</code></em> <strong>mgl_vect3</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fvect3_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_vect3_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует 3D векторное поле {<var>ax</var>, <var>ay</var>, <var>az</var>} параметрически зависящее от координат <var>x</var>, <var>y</var>, <var>z</var>. График рисуется на срезе <var>sVal</var> в направлении {‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’}, указанном в строке <var>sch</var> (по умолчанию, в напралении ‘<samp>y</samp>’). Длина и цвет векторов пропорциональна <em>\sqrt{ax^2+ay^2+az^2}</em>. Число рисуемых векторов зависит от <a href="#meshnum">meshnum</a>. Вид стрелок/штрихов может быть изменён символами:
-</p><ul>
-<li> ‘<samp>f</samp>’ для стрелок одинаковой длины,
-</li><li> ‘<samp>></samp>’, ‘<samp><</samp>’ для стрелок начинающихся или заканчивающихся в ячейке сетки (по умолчанию центрированы),
-</li><li> ‘<samp>.</samp>’ для рисования штрихов с точкой в начале вместо стрелок,
-</li><li> ‘<samp>=</samp>’ для использования градиента цвета вдоль стрелок.
-</li></ul>
-<p>См. также <a href="#vect">vect</a>, <a href="#flow">flow</a>, <a href="#dew">dew</a>. См. раздел <a href="#vect-sample">vect sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="dew"></a><dl>
-<dt><a name="index-dew"></a>Команда MGL: <em></em> <strong>dew</strong> <em>udat vdat ['sch'='']</em></dt>
-<dt><a name="index-dew-1"></a>Команда MGL: <em></em> <strong>dew</strong> <em>xdat ydat udat vdat ['sch'='']</em></dt>
-<dt><a name="index-Dew-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Dew</strong> <em>(<code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Dew-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Dew</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fdew"></a>Функция С: <em><code>void</code></em> <strong>mgl_dew</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fdew_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_dew_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует капли для векторного поля {<var>ax</var>, <var>ay</var>}, параметрически зависящего от координат <var>x</var>, <var>y</var> при <var>z</var> равном минимальному значению оси z. Замечу, что график требует много памяти и процессорного времени для своего создания! Цвет капель пропорционален <em>\sqrt{ax^2+ay^2}</em>. Число капель определяется <a href="#meshnum">meshnum</a>. См. также <a href="#vect">vect</a>. См. раздел <a href="#dew-sample">dew sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="flow"></a><dl>
-<dt><a name="index-flow"></a>Команда MGL: <em></em> <strong>flow</strong> <em>udat vdat ['sch'='']</em></dt>
-<dt><a name="index-flow-1"></a>Команда MGL: <em></em> <strong>flow</strong> <em>xdat ydat udat vdat ['sch'='']</em></dt>
-<dt><a name="index-Flow-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Flow</strong> <em>(<code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Flow-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Flow</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fflow_005f2d"></a>Функция С: <em><code>void</code></em> <strong>mgl_flow_2d</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fflow_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_flow_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует нити тока для векторного поля {<var>ax</var>, <var>ay</var>}, параметрически зависящего от координат <var>x</var>, <var>y</var> на плоскости при <var>z</var> равном минимальному значению оси z. Число нитей пропорционально значению опции <code>value</code> (по умолчанию 5). Цвет нитей пропорционален <em>\sqrt{ax^2+ay^2}</em>. Строка <var>sch</var> может содержать
-</p><ul>
-<li> цветовую схему – тёплые цвета соответствуют нормальному току (типа стока), холодные цвета соответствуют обратному току (типа источника);
-</li><li> ‘<samp>#</samp>’ для использования нитей, начинающихся только на границе;
-</li><li> ‘<samp>.</samp>’ для рисования сепаратрис (нитей из/в стационарных точек).
-</li><li> ‘<samp>*</samp>’ для использования нитей, начинающихся с двумерной сетки внутри данных;
-</li><li> ‘<samp>v</samp>’ для рисования стрелок на нитях;
-</li><li> ‘<samp>x</samp>’, ‘<samp>z</samp>’ для рисования лент нормалей, начинающихся в плоскостях x-y и y-z соответственно.
-</li></ul>
-<p>См. также <a href="#pipe">pipe</a>, <a href="#vect">vect</a>, <a href="#tape">tape</a>, <a href="#flow3">flow3</a>, <a href="#barwidth">barwidth</a>. См. раздел <a href="#flow-sample">flow sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-flow-2"></a>Команда MGL: <em></em> <strong>flow</strong> <em>udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-flow-3"></a>Команда MGL: <em></em> <strong>flow</strong> <em>xdat ydat zdat udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-Flow-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Flow</strong> <em>(<code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Flow-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Flow</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fflow_005f3d"></a>Функция С: <em><code>void</code></em> <strong>mgl_flow_3d</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fflow_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_flow_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Это 3d версия графика. Здесь массивы должны трёхмерными тензорами и цвет пропорционален <em>\sqrt{ax^2+ay^2+az^2}</em>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-flow-4"></a>Команда MGL: <em></em> <strong>flow</strong> <em><code>x0 y0</code> udat vdat ['sch'='']</em></dt>
-<dt><a name="index-flow-5"></a>Команда MGL: <em></em> <strong>flow</strong> <em><code>x0 y0</code> xdat ydat udat vdat ['sch'='']</em></dt>
-<dt><a name="index-FlowP-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>FlowP</strong> <em>(<code>mglPoint</code> p0, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-FlowP-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>FlowP</strong> <em>(<code>mglPoint</code> p0, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fflowp_005f2d"></a>Функция С: <em><code>void</code></em> <strong>mgl_flowp_2d</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fflowp_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_flowp_xy</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Аналогично <a href="#flow">flow</a>, но рисует одну нить из точки <var>p0</var>={<var>x0</var>,<var>y0</var>,<var>z0</var>}. Строка <var>sch</var> также может содержать: ‘<samp>></samp>’ или ‘<samp><</samp>’ для рисования линии тока только вперед или только назад от заданной точки (по умолчанию, рисует в обе стороны).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-flow-6"></a>Команда MGL: <em></em> <strong>flow</strong> <em><code>x0 y0 z0</code> udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-flow-7"></a>Команда MGL: <em></em> <strong>flow</strong> <em><code>x0 y0 z0</code> xdat ydat zdat udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-FlowP-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>FlowP</strong> <em>(<code>mglPoint</code> p0, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-FlowP-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>FlowP</strong> <em>(<code>mglPoint</code> p0, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fflowp_005f3d"></a>Функция С: <em><code>void</code></em> <strong>mgl_flowp_3d</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fflowp_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_flowp_xyz</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Это 3d версия графика.
-</p></dd></dl>
-
-<a name="flow3"></a><dl>
-<dt><a name="index-flow3"></a>MGL command: <em></em> <strong>flow3</strong> <em>udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-flow3-1"></a>MGL command: <em></em> <strong>flow3</strong> <em>xdat ydat zdat udat vdat ['sch'='']</em></dt>
-<dt><a name="index-Flow3"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Flow3</strong> <em>(<code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>double</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Flow3-1"></a>Method on <code>mglGraph</code>: <em><code>void</code></em> <strong>Flow3</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>double</code> sVal=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fflow3"></a>C function: <em><code>void</code></em> <strong>mgl_flow3</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>double</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fflow3_005fxyz"></a>C function: <em><code>void</code></em> <strong>mgl_flow3_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>double</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>The function draws flow threads for the 3D vector field {<var>ax</var>, <var>ay</var>, <var>az</var>} parametrically depending on coordinates <var>x</var>, <var>y</var>, <var>z</var>. Flow threads starts from given plane. Option <code>value</code> set the approximate number of threads (default is 5). String <var>sch</var> may contain:
-</p><ul>
-<li> color scheme – up-half (warm) corresponds to normal flow (like attractor), bottom-half (cold) corresponds to inverse flow (like source);
-</li><li> ‘<samp>x</samp>’, ‘<samp>z</samp>’ for normal of starting plane (default is y-direction);
-</li><li> ‘<samp>v</samp>’ for drawing arrows on the threads;
-</li><li> ‘<samp>t</samp>’ for drawing tapes of normals in x-y and y-z planes.
-</li></ul>
-<p>See also <a href="#flow">flow</a>, <a href="#pipe">pipe</a>, <a href="#vect">vect</a>. См. раздел <a href="#flow3-sample">flow3 sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-<a name="grad"></a><dl>
-<dt><a name="index-grad"></a>Команда MGL: <em></em> <strong>grad</strong> <em>pdat ['sch'='']</em></dt>
-<dt><a name="index-grad-1"></a>Команда MGL: <em></em> <strong>grad</strong> <em>xdat ydat pdat ['sch'='']</em></dt>
-<dt><a name="index-grad-2"></a>Команда MGL: <em></em> <strong>grad</strong> <em>xdat ydat zdat pdat ['sch'='']</em></dt>
-<dt><a name="index-Grad-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Grad</strong> <em>(<code>const mglDataA &</code>phi, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Grad-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Grad</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>phi, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Grad-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Grad</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>phi, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fgrad"></a>Функция С: <em><code>void</code></em> <strong>mgl_grad</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> phi, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fgrad_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_grad_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> phi, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fgrad_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_grad_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> phi, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует линии градиента скалярного поля <var>phi</var>[i,j] (или <var>phi</var>[i,j,k] в 3d случае) заданного параметрически {<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]}. Число линий пропорционально значению опции <code>value</code> (по умолчанию 5). См. также <a href="#dens">dens</a>, <a href="#cont">cont</a>, <a href="#flow">flow</a>.
-</p></dd></dl>
-
-<a name="pipe"></a><dl>
-<dt><a name="index-pipe"></a>Команда MGL: <em></em> <strong>pipe</strong> <em>udat vdat ['sch'='' <code>r0=0.05</code>]</em></dt>
-<dt><a name="index-pipe-1"></a>Команда MGL: <em></em> <strong>pipe</strong> <em>xdat ydat udat vdat ['sch'='' <code>r0=0.05</code>]</em></dt>
-<dt><a name="index-Pipe-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Pipe</strong> <em>(<code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> r0=<code>0.05</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Pipe-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Pipe</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> r0=<code>0.05</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fpipe_005f2d"></a>Функция С: <em><code>void</code></em> <strong>mgl_pipe_2d</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>mreal</code> r0, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fpipe_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_pipe_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>const char *</code>sch, <code>mreal</code> r0, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует трубки тока для векторного поля {<var>ax</var>, <var>ay</var>}, параметрически зависящего от координат <var>x</var>, <var>y</var> на плоскости при <var>z</var> равном минимальному значению оси z. Число трубок пропорционально значению опции <code>value</code>. Цвет и радиус трубок пропорционален <em>\sqrt{ax^2+ay^2}</em>. Тёплые цвета соответствуют нормальному току (типа стока). Холодные цвета соответствуют обратному току (типа источника). Параметр <var>r0</var> задает радиус трубок. При <var>r0</var><0 радиус трубок обратно пропорционален их амплитуде. См. также <a href="#flow">flow</a>, <a href="#vect">vect</a>. См. раздел <a href="#pipe-sample">pipe sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-pipe-2"></a>Команда MGL: <em></em> <strong>pipe</strong> <em>udat vdat wdat ['sch'='' <code>r0=0.05</code>]</em></dt>
-<dt><a name="index-pipe-3"></a>Команда MGL: <em></em> <strong>pipe</strong> <em>xdat ydat zdat udat vdat wdat ['sch'='' <code>r0=0.05</code>]</em></dt>
-<dt><a name="index-Pipe-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Pipe</strong> <em>(<code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> r0=<code>0.05</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Pipe-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Pipe</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>ax, <code>const mglDataA &</code>ay, <code>const mglDataA &</code>az, <code>const char *</code>sch=<code>""</code>, <code>mreal</code> r0=<code>0.05</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fpipe_005f3d"></a>Функция С: <em><code>void</code></em> <strong>mgl_pipe_3d</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>mreal</code> r0, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fpipe_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_pipe_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> ax, <code>HCDT</code> ay, <code>HCDT</code> az, <code>const char *</code>sch, <code>mreal</code> r0, <code>const char *</code>opt)</em></dt>
-<dd><p>Это 3d версия графика. Здесь массивы <var>ax</var>, <var>ay</var>, <var>az</var> должны трёхмерными тензорами и цвет пропорционален <em>\sqrt{ax^2+ay^2+az^2}</em>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Other-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#Nonlinear-fitting" accesskey="n" rel="next">Nonlinear fitting</a>, Previous: <a href="#Vector-fields" accesskey="p" rel="prev">Vector fields</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Prochie-grafiki"></a>
-<h3 class="section">4.16 Прочие графики</h3>
-
-<a name="index-DensXYZ"></a>
-<a name="index-ContXYZ"></a>
-<a name="index-ContFXYZ"></a>
-<a name="index-Dots"></a>
-<a name="index-Crust"></a>
-<a name="index-TriPlot"></a>
-<a name="index-TriCont"></a>
-<a name="index-QuadPlot"></a>
-<a name="index-FPlot"></a>
-<a name="index-FSurf"></a>
-
-<p>Это функции, не относящиеся к какой-то специальной категории. Сюда входят функции построения графиков по текстовым формулам (FPlot и FSurf), рисования поверхностей из треугольников и четырёхугольников (TriPlot, TriCont, QuadPlot), произвольных точек в пространстве (Dots) и реконструкции по ним поверхности (Crust), графики плотности и линии уровня на плоскостях, перпендикулярных осям x, y или z (Dens[XYZ], Cont[XYZ], ContF[XYZ]). Каждый тип графика имеет похожий интерфейс. Есть версия для рисования одного массива с автоматическими координатами и версия для параметрически заданного массива. Параметры цветовой схемы задаются строкой. See <a href="#Color-scheme">Color scheme</a>.
-</p>
-<a name="densz"></a><a name="densy"></a><a name="densx"></a><a name="DensXYZ"></a><dl>
-<dt><a name="index-densx"></a>Команда MGL: <em></em> <strong>densx</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-densy"></a>Команда MGL: <em></em> <strong>densy</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-densz"></a>Команда MGL: <em></em> <strong>densz</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-DensX"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>DensX</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-DensY"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>DensY</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-DensZ"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>DensZ</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fdens_005fx"></a>Функция С: <em><code>void</code></em> <strong>mgl_dens_x</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fdens_005fy"></a>Функция С: <em><code>void</code></em> <strong>mgl_dens_y</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fdens_005fz"></a>Функция С: <em><code>void</code></em> <strong>mgl_dens_z</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>Эти функции рисуют график плотности на x, y или z плоскостях. Если <var>a</var> – 3d массив, то выполняется интерполяция к заданному срезу <var>sVal</var>. Функции полезны для создания проекций 3D массивов на оси координат. См. также <a href="#ContXYZ">ContXYZ</a>, <a href="#ContFXYZ">ContFXYZ</a>, <a href="#dens">dens</a>, <a href="#Data-manipulation">Data manipulation</a>. См. раздел <a href="#dens_005fxyz-sample">dens_xyz sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="contz"></a><a name="conty"></a><a name="contx"></a><a name="ContXYZ"></a><dl>
-<dt><a name="index-contx"></a>Команда MGL: <em></em> <strong>contx</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-conty"></a>Команда MGL: <em></em> <strong>conty</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-contz"></a>Команда MGL: <em></em> <strong>contz</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-ContX"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContX</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContY"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContY</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContZ"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContZ</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcont_005fx"></a>Функция С: <em><code>void</code></em> <strong>mgl_cont_x</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcont_005fy"></a>Функция С: <em><code>void</code></em> <strong>mgl_cont_y</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcont_005fz"></a>Функция С: <em><code>void</code></em> <strong>mgl_cont_z</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>Эти функции рисуют линии уровня на x, y или z плоскостях. Если <var>a</var> – 3d массив, то выполняется интерполяция к заданному срезу <var>sVal</var>. Опция <code>value</code> задает число контуров. Функции полезны для создания проекций 3D массивов на оси координат. См. также <a href="#ContFXYZ">ContFXYZ</a>, <a href="#DensXYZ">DensXYZ</a>, <a href="#cont">cont</a>, <a href="#Data-manipulation">Data manipulation</a>. См. раздел <a href="#cont_005fxyz-sample">cont_xyz sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ContX-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContX</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContY-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContY</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContZ-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContZ</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcont_005fx_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_cont_x_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcont_005fy_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_cont_y_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcont_005fz_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_cont_z_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>Аналогично предыдущему с ручным заданием значений для линий уровня.
-</p></dd></dl>
-
-<a name="contfz"></a><a name="contfy"></a><a name="contfx"></a><a name="ContFXYZ"></a><dl>
-<dt><a name="index-contfx"></a>Команда MGL: <em></em> <strong>contfx</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-contfy"></a>Команда MGL: <em></em> <strong>contfy</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-contfz"></a>Команда MGL: <em></em> <strong>contfz</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-ContFX"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContFX</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContFY"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContFY</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContFZ"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContFZ</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontf_005fx"></a>Функция С: <em><code>void</code></em> <strong>mgl_contf_x</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontf_005fy"></a>Функция С: <em><code>void</code></em> <strong>mgl_contf_y</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontf_005fz"></a>Функция С: <em><code>void</code></em> <strong>mgl_contf_z</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>Эти функции рисуют закрашенные контуры уровня на x, y или z плоскостях. Если <var>a</var> – 3d массив, то выполняется интерполяция к заданному срезу <var>sVal</var>. Опция <code>value</code> задает число контуров. Функции полезны для создания проекций 3D массивов на оси координат. См. также <a href="#ContFXYZ">ContFXYZ</a>, <a href="#DensXYZ">DensXYZ</a>, <a href="#cont">cont</a>, <a href="#Data-manipulation">Data manipulation</a>. См. раздел <a href="#contf_005fxyz-sample">contf_xyz sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ContFX-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContFX</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContFY-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContFY</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-ContFZ-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>ContFZ</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>a, <code>const char *</code>stl=<code>""</code>, <code>mreal</code> sVal=<code>NAN</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcontf_005fx_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_contf_x_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontf_005fy_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_contf_y_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fcontf_005fz_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_contf_z_val</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> a, <code>const char *</code>stl, <code>mreal</code> sVal, <code>const char *</code>opt)</em></dt>
-<dd><p>Аналогично предыдущему с ручным заданием значений для линий уровня.
-</p></dd></dl>
-
-<a name="fplot"></a><dl>
-<dt><a name="index-fplot"></a>Команда MGL: <em></em> <strong>fplot</strong> <em>'y(x)' ['pen'='']</em></dt>
-<dt><a name="index-FPlot-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>FPlot</strong> <em>(<code>const char *</code>eqY, <code>const char *</code>pen=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ffplot"></a>Функция С: <em><code>void</code></em> <strong>mgl_fplot</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>eqY, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует функцию ‘<samp>eqY(x)</samp>’ в плоскости <var>z</var> равно минимальному значению оси z с координатой ‘<samp>x</samp>’ в диапазоне осей координат. Опция <code>value</code> задает начальное число точек. См. также <a href="#plot">plot</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-fplot-1"></a>Команда MGL: <em></em> <strong>fplot</strong> <em>'x(t)' 'y(t)' 'z(t)' ['pen'='']</em></dt>
-<dt><a name="index-FPlot-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>FPlot</strong> <em>(<code>const char *</code>eqX, <code>const char *</code>eqY, <code>const char *</code>eqZ, <code>const char *</code>pen, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ffplot_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_fplot_xyz</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>eqX, <code>const char *</code>eqY, <code>const char *</code>eqZ, <code>const char *</code>pen, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует параметрическую кривую {‘<samp>eqX(t)</samp>’, ‘<samp>eqY(t)</samp>’, ‘<samp>eqZ(t)</samp>’}, где координата ‘<samp>t</samp>’ меняется в диапазоне [0, 1]. Опция <code>value</code> задает начальное число точек. См. также <a href="#plot">plot</a>.
-</p></dd></dl>
-
-<a name="fsurf"></a><dl>
-<dt><a name="index-fsurf"></a>Команда MGL: <em></em> <strong>fsurf</strong> <em>'z(x,y)' ['sch'='']</em></dt>
-<dt><a name="index-FSurf-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>FSurf</strong> <em>(<code>const char *</code>eqZ, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>);</em></dt>
-<dt><a name="index-mgl_005ffsurf"></a>Функция С: <em><code>void</code></em> <strong>mgl_fsurf</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>eqZ, <code>const char *</code>sch, <code>const char *</code>opt);</em></dt>
-<dd><p>Рисует поверхность ‘<samp>eqY(x,y)</samp>’ с координатами ‘<samp>x</samp>’, ‘<samp>y</samp>’ в диапазоне <code>xrange, yrange</code>. Опция <code>value</code> задает число точек. См. также <a href="#surf">surf</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-fsurf-1"></a>Команда MGL: <em></em> <strong>fsurf</strong> <em>'x(u,v)' 'y(u,v)' 'z(u,v)' ['sch'='']</em></dt>
-<dt><a name="index-FSurf-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>FSurf</strong> <em>(<code>const char *</code>eqX, <code>const char *</code>eqY, <code>const char *</code>eqZ, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ffsurf_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_fsurf_xyz</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>eqX, <code>const char *</code>eqY, <code>const char *</code>eqZ, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует параметрическую поверхность {‘<samp>eqX(u,v)</samp>’, ‘<samp>eqY(u,v)</samp>’, ‘<samp>eqZ(u,v)</samp>’}, где координаты ‘<samp>u</samp>’, ‘<samp>v</samp>’ меняются в диапазоне [0, 1]. Опция <code>value</code> задает число точек. См. также <a href="#surf">surf</a>.
-</p></dd></dl>
-
-<a name="triplot"></a><dl>
-<dt><a name="index-triplot"></a>Команда MGL: <em></em> <strong>triplot</strong> <em>idat xdat ydat ['sch'='']</em></dt>
-<dt><a name="index-triplot-1"></a>Команда MGL: <em></em> <strong>triplot</strong> <em>idat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-triplot-2"></a>Команда MGL: <em></em> <strong>triplot</strong> <em>idat xdat ydat zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-TriPlot-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>TriPlot</strong> <em>(<code>const mglDataA &</code>id, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TriPlot-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>TriPlot</strong> <em>(<code>const mglDataA &</code>id, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TriPlot-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>TriPlot</strong> <em>(<code>const mglDataA &</code>id, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftriplot_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_triplot_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> id, <code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftriplot_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_triplot_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> id, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftriplot_005fxyzc"></a>Функция С: <em><code>void</code></em> <strong>mgl_triplot_xyzc</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> id, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует поверхность из треугольников. Вершины треугольников задаются индексами <var>id</var> в массиве точек {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Строка <var>sch</var> задает цветовую схему. Если строка содержит ‘<samp>#</samp>’, то рисуется сетчатая поверхность. Размер по 1-му индексу массива <var>id</var> должен быть 3 или больше. Массивы <var>x</var>, <var>y</var>, <var>z</var> должны иметь одинаковые размеры. Массив <var>c</var> задает цвет треугольников (если <var>id</var>.ny=<var>c</var>.nx) или цвет вершин (если <var>x</var>.nx=<var>c</var>.nx). См. также <a href="#dots">dots</a>, <a href="#crust">crust</a>, <a href="#quadplot">quadplot</a>, <a href="#triangulation">triangulation</a>. См. раздел <a href="#triplot-sample">triplot sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="tricont"></a><dl>
-<dt><a name="index-tricont"></a>Команда MGL: <em></em> <strong>tricont</strong> <em>vdat idat xdat ydat zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-tricont-1"></a>Команда MGL: <em></em> <strong>tricont</strong> <em>vdat idat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-tricont-2"></a>Команда MGL: <em></em> <strong>tricont</strong> <em>idat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-TriCont-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>TriCont</strong> <em>(<code>const mglDataA &</code>id, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TriCont-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>TriCont</strong> <em>(<code>const mglDataA &</code>id, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TriContV"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>TriContV</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>id, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-TriContV-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>TriContV</strong> <em>(<code>const mglDataA &</code>v, <code>const mglDataA &</code>id, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ftricont_005fxyzc"></a>Функция С: <em><code>void</code></em> <strong>mgl_tricont_xyzc</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> id, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftricont_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_tricont_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> id, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftricont_005fxyzcv"></a>Функция С: <em><code>void</code></em> <strong>mgl_tricont_xyzcv</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> id, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ftricont_005fxyzv"></a>Функция С: <em><code>void</code></em> <strong>mgl_tricont_xyzv</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> v, <code>HCDT</code> id, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует линии уровня поверхности из треугольников при <var>z</var>=<var>v</var>[k] (или при <var>z</var> равном минимальному значению оси z если <var>sch</var> содержит ‘<samp>_</samp>’). Вершины треугольников задаются индексами <var>id</var> в массиве точек {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Если аргуент <var>v</var> не задан, то используется массив из <var>num</var> элементов равно распределенных в диапазоне изменения цвета. Здесь <var>num</var> равен значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 7). Строка <var>sch</var> задает цветовую схему. Размер по 1-му индексу массива <var>id</var> должен быть 3 или больше. Массивы <var>x</var>, <var>y</var>, <var>z</var> должны иметь одинаковые размеры. Массив <var>c</var> задает цвет треугольников (если <var>id</var>.ny=<var>c</var>.nx) или цвет вершин (если <var>x</var>.nx=<var>c</var>.nx). См. также <a href="#triplot">triplot</a>, <a href="#cont">cont</a>, <a href="#triangulation">triangulation</a>.
-</p></dd></dl>
-
-<a name="quadplot"></a><dl>
-<dt><a name="index-quadplot"></a>Команда MGL: <em></em> <strong>quadplot</strong> <em>idat xdat ydat ['sch'='']</em></dt>
-<dt><a name="index-quadplot-1"></a>Команда MGL: <em></em> <strong>quadplot</strong> <em>idat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-quadplot-2"></a>Команда MGL: <em></em> <strong>quadplot</strong> <em>idat xdat ydat zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-QuadPlot-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>QuadPlot</strong> <em>(<code>const mglDataA &</code>id, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-QuadPlot-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>QuadPlot</strong> <em>(<code>const mglDataA &</code>id, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-QuadPlot-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>QuadPlot</strong> <em>(<code>const mglDataA &</code>id, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fquadplot_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_quadplot_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> id, <code>HCDT</code> x, <code>HCDT</code> y, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fquadplot_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_quadplot_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> id, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fquadplot_005fxyzc"></a>Функция С: <em><code>void</code></em> <strong>mgl_quadplot_xyzc</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> id, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> c, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует поверхность из четырёхугольников. Вершины четырёхугольников задаются индексами <var>id</var> в массиве точек {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Строка <var>sch</var> задает цветовую схему. Если строка содержит ‘<samp>#</samp>’, то рисуется сетчатая поверхность. Размер по 1-му индексу массива <var>id</var> должен быть 4 или больше. Массивы <var>x</var>, <var>y</var>, <var>z</var> должны иметь одинаковые размеры. Массив <var>c</var> задает цвет четырёхугольников (если <var>id</var>.ny=<var>c</var>.nx) или цвет вершин (если <var>x</var>.nx=<var>c</var>.nx). См. также <a href="#triplot">triplot</a>. См. раздел <a href="#triplot-sample">triplot sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="dots"></a><dl>
-<dt><a name="index-dots"></a>Команда MGL: <em></em> <strong>dots</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-dots-1"></a>Команда MGL: <em></em> <strong>dots</strong> <em>xdat ydat zdat adat ['sch'='']</em></dt>
-<dt><a name="index-Dots-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Dots</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Dots-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Dots</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Dots-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Dots</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>c, <code>const mglDataA &</code>a, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fdots"></a>Функция С: <em><code>void</code></em> <strong>mgl_dots</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fdots_005fa"></a>Функция С: <em><code>void</code></em> <strong>mgl_dots_a</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fdots_005fca"></a>Функция С: <em><code>void</code></em> <strong>mgl_dots_ca</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> c, <code>HCDT</code> a, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Рисует произвольно расположенные точки {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Строка <var>sch</var> задает цветовую схему и тип маркеров. Если определёны массивы <var>c</var>, <var>a</var> то они задают цвет и прозрачность точек соответственно. Непрозрачные точки с заданным цветом можно нарисовать с помощью <a href="#tens">tens</a>, используя стиль ‘<samp> .</samp>’. Массивы <var>x</var>, <var>y</var>, <var>z</var>, <var>a</var> должны иметь одинаковые размеры. См. также <a href="#crust">crust</a>, <a href="#tens">tens</a>, <a href="#mark">mark</a>, <a href="#plot">plot</a>. См. раздел <a href="#dots-sample">dots sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="crust"></a><dl>
-<dt><a name="index-crust"></a>Команда MGL: <em></em> <strong>crust</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-Crust-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Crust</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>sch=<code>""</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fcrust"></a>Функция С: <em><code>void</code></em> <strong>mgl_crust</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>sch, <code>const char *</code>opt)</em></dt>
-<dd><p>Реконструирует и рисует поверхность по произвольно расположенным точкам {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Опция <var>value</var> задает радиус ошибки (увеличите для удаления дыр). Строка <var>sch</var> задает цветовую схему. Если строка содержит ‘<samp>#</samp>’, то рисуется сетчатая поверхность. Массивы <var>x</var>, <var>y</var>, <var>z</var> должны иметь одинаковые размеры. См. также <a href="#dots">dots</a>, <a href="#triplot">triplot</a>. </p></dd></dl>
-
-
-<hr>
-<a name="Nonlinear-fitting"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-manipulation" accesskey="n" rel="next">Data manipulation</a>, Previous: <a href="#Other-plotting" accesskey="p" rel="prev">Other plotting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Nonlinear-fitting-1"></a>
-<h3 class="section">4.17 Nonlinear fitting</h3>
-
-<a name="index-Fit"></a>
-<a name="index-FitS"></a>
-<a name="index-PutsFit"></a>
-<a name="index-mglFitPnts"></a>
-<a name="index-Fit2"></a>
-<a name="index-Fit3"></a>
-
-<p>Эти функции подбирают параметры функции для наилучшей аппроксимации данных, т.е. минимизируют сумму <em>\sum_i (f(x_i, y_i, z_i) - a_i)^2/s_i^2</em>. При этом аппроксимирующая функция ‘<samp>f</samp>’ может зависеть от одного аргумента ‘<samp>x</samp>’ (1D случай), от двух аргументов ‘<samp>x,y</samp>’ (2D случай) или от трех аргументов ‘<samp>x,y,z</samp>’ (3D случай). Функция ‘<samp>f</samp>’ также может зависеть от параметров. Список параметров задается строкой <var>var</var> (например, ‘<samp>abcd</samp>’). Обычно пользователь должен предоставить начальные значения параметров в переменной <var>ini</var>. Однако, при его отсутствии используются нулевые значения. Параметр <var>print</var>=<code>true</code> включает вывод найденной формулы в <var>Message</var> (см. <a href="#Error-handling">Error handling</a>).
-</p>
-<p>Функции Fit() и FitS() не рисуют полученные массивы. Они заполняют массив <var>fit</var> по формуле ‘<samp>f</samp>’ с найденными коэффициентами и возвращают <em>\chi^2</em> ошибку аппроксимации. При этом, координаты ‘<samp>x,y,z</samp>’ равно распределены в диапазоне осей координат. Число точек в <var>fit</var> определяется опцией <code>value</code> (по умолчанию <var>mglFitPnts</var>=100). Функции используют библиотеку GSL. См. раздел <a href="#Nonlinear-fitting-hints">Nonlinear fitting hints</a>, для примеров кода и графика.
-</p>
-<a name="fits"></a><dl>
-<dt><a name="index-fits"></a>Команда MGL: <em></em> <strong>fits</strong> <em>res adat sdat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fits-1"></a>Команда MGL: <em></em> <strong>fits</strong> <em>res xdat adat sdat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fits-2"></a>Команда MGL: <em></em> <strong>fits</strong> <em>res xdat ydat adat sdat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fits-3"></a>Команда MGL: <em></em> <strong>fits</strong> <em>res xdat ydat zdat adat sdat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-FitS-1"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>FitS</strong> <em>(<code>const mglDataA &</code>a, <code>const mglDataA &</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-FitS-2"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>FitS</strong> <em>(<code>const mglDataA &</code>a, <code>const mglDataA &</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &</code>ini, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-FitS-3"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>FitS</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>a, <code>const mglDataA &</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-FitS-4"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>FitS</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>a, <code>const mglDataA &</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &</code>ini, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-FitS-5"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>FitS</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>a, <code>const mglDataA &</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-FitS-6"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>FitS</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>a, <code>const mglDataA &</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &</code>ini, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-FitS-7"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>FitS</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const mglDataA &</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-FitS-8"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>FitS</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const mglDataA &</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &</code>ini, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ffit_005fys"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_fit_ys</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>HCDT</code> s, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ffit_005fxys"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_fit_xys</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> a, <code>HCDT</code> s, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ffit_005fxyzs"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_fit_xyzs</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> a, <code>HCDT</code> s, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ffit_005fxyzas"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_fit_xyzas</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>HCDT</code> s, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini, <code>const char *</code>opt)</em></dt>
-<dd><p>"Подгоняют" формулу вдоль x-, y- и z-направлений для 3d массива заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) с весовым множителем <var>s</var>[i,j,k].
-</p></dd></dl>
-
-<a name="fit"></a><dl>
-<dt><a name="index-fit"></a>Команда MGL: <em></em> <strong>fit</strong> <em>res adat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fit-1"></a>Команда MGL: <em></em> <strong>fit</strong> <em>res xdat adat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fit-2"></a>Команда MGL: <em></em> <strong>fit</strong> <em>res xdat ydat adat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fit-3"></a>Команда MGL: <em></em> <strong>fit</strong> <em>res xdat ydat zdat adat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-Fit-1"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fit-2"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &</code>ini, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fit-3"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fit-4"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &</code>ini, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fit-5"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fit-6"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &</code>ini, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fit-7"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fit-8"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &</code>ini, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ffit_005fy"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_fit_y</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ffit_005fxy"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_fit_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ffit_005fxyz"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_fit_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ffit_005fxyza"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_fit_xyza</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini, <code>const char *</code>opt)</em></dt>
-<dd><p>"Подгоняют" формулу вдоль x-, y- и z-направлений для 3d массива заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) с весовым множителем 1.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-Fit2-1"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit2</strong> <em>(<code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fit2-2"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit2</strong> <em>(<code>mglData &</code>fit, <code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &</code>ini, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fit3-1"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit3</strong> <em>(<code>mglData &</code>fit, <code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fit3-2"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Fit3</strong> <em>(<code>mglData &</code>fit, <code>const mglDataA &</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &</code>ini, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005ffit_005f2"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_fit_2</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005ffit_005f3"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_fit_3</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini, <code>const char *</code>opt)</em></dt>
-<dd><p>"Подгоняют" формулу вдоль всех направлений для 2d или 3d массива <var>a</var> с <var>s</var>=1 и <var>x</var>, <var>y</var>, <var>z</var> равно распределёнными в диапазоне осей координат.
-</p></dd></dl>
-
-<a name="putsfit"></a><dl>
-<dt><a name="index-putsfit"></a>Команда MGL: <em></em> <strong>putsfit</strong> <em><code>x y</code> ['pre'='' 'fnt'='' <code>size=-1</code>]</em></dt>
-<dt><a name="index-PutsFit-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>PutsFit</strong> <em>(<code>mglPoint</code> p, <code>const char *</code>prefix=<code>""</code>, <code>const char *</code>font=<code>""</code>, <code>mreal</code> size=<code>-1</code>)</em></dt>
-<dt><a name="index-mgl_005fputs_005ffit"></a>Функция С: <em><code>void</code></em> <strong>mgl_puts_fit</strong> <em>(<code>HMGL</code> gr, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>const char *</code>prefix, <code>const char *</code>font, <code>mreal</code> size)</em></dt>
-<dd><p>Печатает последнюю подобранную формулу с найденными коэффициентами в точке <var>p0</var>. Строка <var>prefix</var> будет напечатана перед формулой. Все другие параметры такие же как в <a href="#Text-printing">Text printing</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-_0028_0029-1"></a>Метод класса <code>mglGraph</code>: <em><code>const char *</code>GetFit</em> <strong>()</strong></dt>
-<dt><a name="index-mgl_005fget_005ffit"></a>Функция С: <em><code>const char *</code></em> <strong>mgl_get_fit</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dt><a name="index-mgl_005fget_005ffit-1"></a>Fortran процедура: <em><code></code></em> <strong>mgl_get_fit</strong> <em>(<code>long</code> gr, <code>char *</code>out, <code>int</code> len)</em></dt>
-<dd><p>Возвращает последнюю подобранную формулу с найденными коэффициентами.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetFitChi"></a>Метод класса <code>mglGraph</code>: <em><code>mreal</code></em> <strong>GetFitChi</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fget_005ffit_005fchi"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_get_fit_chi</strong> <em>()</em></dt>
-<dd><p>Возвращает величину \chi для последней подобранной формулы.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetFitCovar"></a>Метод класса <code>mglGraph</code>: <em><code>mreal</code></em> <strong>GetFitCovar</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fget_005ffit_005fcovar"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_get_fit_covar</strong> <em>()</em></dt>
-<dd><p>Возвращает ковариационную матрицу для последней подобранной формулы.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Data-manipulation"></a>
-<div class="header">
-<p>
-Previous: <a href="#Nonlinear-fitting" accesskey="p" rel="prev">Nonlinear fitting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Raspredelenie-dannykh"></a>
-<h3 class="section">4.18 Распределение данных</h3>
-
-<a name="index-Hist"></a>
-<a name="index-Fill"></a>
-<a name="index-DataGrid"></a>
-
-<dl>
-<dt><a name="index-hist"></a>Команда MGL: <em></em> <strong>hist</strong> <em><small>RES</small> xdat adat</em></dt>
-<dt><a name="index-hist-1"></a>Команда MGL: <em></em> <strong>hist</strong> <em><small>RES</small> xdat ydat adat</em></dt>
-<dt><a name="index-hist-2"></a>Команда MGL: <em></em> <strong>hist</strong> <em><small>RES</small> xdat ydat zdat adat</em></dt>
-<dt><a name="index-Hist-2"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Hist</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>a, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Hist-3"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Hist</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>a, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Hist-4"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>Hist</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>a, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fhist_005fx"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_hist_x</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> a, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fhist_005fxy"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_hist_xy</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> a, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fhist_005fxyz"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_hist_xyz</strong> <em>(<code>HMGL</code> gr, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> a, <code>const char *</code>opt)</em></dt>
-<dd><p>Создают распределения данных. Они не рисуют данные. Функции могут быть полезны в случае когда данные пользователя определены на случайно расположенных точка (например, после PIC расчетов) и он хочет построить график, требующий регулярных данных (данных на сетках). Диапазон сеток равен диапазону осей координат. Массивы <var>x</var>, <var>y</var>, <var>z</var> определяют положение (координаты) точек. Массив <var>a</var> задает значения данных. Число точек в результате <var>res</var> определяется опцией <code>value</code> (по умолчанию <var>mglFitPnts</var>=100).
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-fill"></a>Команда MGL: <em></em> <strong>fill</strong> <em>dat 'eq'</em></dt>
-<dt><a name="index-fill-1"></a>Команда MGL: <em></em> <strong>fill</strong> <em>dat 'eq' vdat</em></dt>
-<dt><a name="index-fill-2"></a>Команда MGL: <em></em> <strong>fill</strong> <em>dat 'eq' vdat wdat</em></dt>
-<dt><a name="index-Fill-2"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>mglData &</code>u, <code>const char *</code>eq, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fill-3"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>mglData &</code>u, <code>const char *</code>eq, <code>const mglDataA &</code>v, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fill-4"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>mglData &</code>u, <code>const char *</code>eq, <code>const mglDataA &</code>v, <code>const mglDataA &</code>w, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005ffill_005feq"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_fill_eq</strong> <em>(<code>HMGL</code> gr, <code>HMDT</code> u, <code>const char *</code>eq, <code>HCDT</code>v, <code>HCDT</code>w, <code>const char *</code>opt)</em></dt>
-<dd><p>Заполняют значения массива ‘<samp>u</samp>’ в соответствии с формулой в строке <var>eq</var>. Формула – произвольное выражение, зависящее от переменных ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’, ‘<samp>u</samp>’, ‘<samp>v</samp>’, ‘<samp>w</samp>’. Координаты ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’ полагаются в диапазоне изменения осей координат. Переменная ‘<samp>u</samp>’ – значение исходного массива. Переменные ‘<samp>v</samp>’ и ‘<samp>w</samp>’ – значения массивов <var>v</var>, <var>w</var>, которые могут быть <code>NULL</code> (т.е. могут быть опущены).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-datagrid"></a>Команда MGL: <em></em> <strong>datagrid</strong> <em>dat xdat ydat zdat</em></dt>
-<dt><a name="index-DataGrid-1"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>DataGrid</strong> <em>(<code>mglData &</code>u, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fgrid"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_grid</strong> <em>(<code>HMGL</code> gr, <code>HMDT</code> u, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>opt)</em></dt>
-<dd><p>Заполняет значения массива ‘<samp>u</samp>’ результатом линейной интерполяции по триангулированной поверхности, найденной по произвольно расположенным точкам ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’. NAN значение используется для точек сетки вне триангулированной поверхности. См. раздел <a href="#Making-regular-data">Making regular data</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-refill"></a>Команда MGL: <em></em> <strong>refill</strong> <em>dat xdat vdat [sl=-1]</em></dt>
-<dt><a name="index-refill-1"></a>Команда MGL: <em></em> <strong>refill</strong> <em>dat xdat ydat vdat [sl=-1]</em></dt>
-<dt><a name="index-refill-2"></a>Команда MGL: <em></em> <strong>refill</strong> <em>dat xdat ydat zdat vdat</em></dt>
-<dt><a name="index-Refill-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Refill</strong> <em>(<code>mglDataA &</code>dat, <code>const mglDataA &</code>x, <code>const mglDataA &</code>v, <code>long</code> sl=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Refill-2"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Refill</strong> <em>(<code>mglDataA &</code>dat, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>v, <code>long</code> sl=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Refill-3"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Refill</strong> <em>(<code>mglDataA &</code>dat, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>v, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005frefill_005fgr"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_refill_gr</strong> <em>(<code>HMGL</code> gr, <code>HMDT</code> a, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> v, <code>long</code> sl, <code>const char *</code>opt)</em></dt>
-<dd><p>Заполняет значениями интерполяции массива <var>v</var> в точках {<var>x</var>, <var>y</var>, <var>z</var>}={<code>X[i], Y[j], Z[k]</code>} (или {<var>x</var>, <var>y</var>, <var>z</var>}={<code>X[i,j,k], Y[i,j,k], Z[i,j,k]</code>} если <var>x</var>, <var>y</var>, <var>z</var> не 1d массивы), где <code>X,Y,Z</code> равномерно распределены в диапазоне осей координат и имеют такой же размер как и массив <var>dat</var>. Если параметр <var>sl</var> равен 0 или положительный, то изменятся будет только <var>sl</var>-ый срез.
-</p></dd></dl>
-
-
-
-<dl>
-<dt><a name="index-pde"></a>Команда MGL: <em></em> <strong>pde</strong> <em><small>RES</small> 'ham' ini_re ini_im [<code>dz=0.1 k0=100</code>]</em></dt>
-<dt><a name="index-PDE"></a>Метод класса <code>mglGraph</code>: <em><code>mglData</code></em> <strong>PDE</strong> <em>(<code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>mreal</code> dz=<code>0.1</code>, <code>mreal</code> k0=<code>100</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fpde_005fsolve"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_pde_solve</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>ham, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>mreal</code> dz, <code>mreal</code> k0, <code>const char *</code>opt)</em></dt>
-<dd><p>Решает уравнение в частных производных du/dz = i*k0*<var>ham</var>(p,q,x,y,z,|u|)[u], где p=-i/k0*d/dx, q=-i/k0*d/dy – псевдо-дифференциальные оперторы. Параметры <var>ini_re</var>, <var>ini_im</var> задают действительную и мнимую часть начального распределения поля. Координаты ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’ полагаются в диапазоне изменения осей координат. Отмечу, ято в действительности этот диапазон увеличен на 3/2 для уменьшения отражения от границ сетки. Параметр <var>dz</var> задает шаг по эволюционной координате z. Сейчас используется упрощенный вид функции <var>ham</var> – исключены все “смешанные” члены (типа ‘<samp>x*p</samp>’->x*d/dx). Например, в 2D случае это функция вида <em>ham = f(p,z) + g(x,z,u)</em>. Однако, коммутирующие члены (типа ‘<samp>x*q</samp>’->x*d/dy) разрешены. Переменная ‘<samp>u</samp>’ используется для амплитуды поля |u|, что позволяет решать нелинейные задачи – например уравнение Шредингера <code>ham="p^2 + q^2 - u^2"</code>. Вы можете задавать мнимую часть для поглощения волн, например <code>ham = "p^2 + i*x*(x>0)"</code>, но только для линейной зависимости от переменной ‘<samp>i</samp>’ (т.е. <em>ham = hre+i*him</em>). См. раздел <a href="#PDE-solving-hints">PDE solving hints</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-
-
-
-
-
-
-
-<hr>
-<a name="Widget-classes"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-processing" accesskey="n" rel="next">Data processing</a>, Previous: <a href="#MathGL-core" accesskey="p" rel="prev">MathGL core</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-
-<a name="g_t_0060_0060Okonnye_0027_0027-klassy"></a>
-<h2 class="chapter">5 “Оконные” классы</h2>
-
-<a name="index-mglWnd"></a>
-<a name="index-mglGLUT"></a>
-<a name="index-Fl_005fMathGL"></a>
-<a name="index-QMathGL"></a>
-<a name="index-window-1"></a>
-<a name="index-widgets-1"></a>
-
-<p>Есть целый набор “оконных” классов для создания окон с графикой MathGL: <code>mglWnd</code> и <code>mglGLUT</code> для окон целиком, <code>Fl_MathGL</code> и <code>QMathGL</code> для виджетов. Все эти классы позволяют пользователю просмотривать, вращать, экспортировать рисунок. Большинство из них (кроме <code>mglGLUT</code>) имеют панель инструментов для упрощения изменения графика. Все оконные классы имеют схожий набор функций. Ниже приведен список классов с краткими комментариями.
-</p>
-<p>Для рисования можно использовать: указатель <code>NULL</code> если планируется обновлять график вручную, глобальную функцию типа <code>int draw(<code>HMGL</code> gr, <code>void *</code>p)</code> или <code>int draw(<code>mglGraph *</code>gr)</code>, или экземпляр класса, производного от <a href="#mglDraw-class">mglDraw class</a>. Этот класс определен в <code>#include <mgl2/wnd.h></code> и имеет 2 основных виртуальных метода:
-</p><pre class="verbatim">class mglDraw
-{
-public:
- virtual int Draw(mglGraph *) { return 0; };
- virtual void Reload() {};
-};
-</pre><p>Вам следует наследовать свой класс от <code>mglDraw</code> и определить один или оба метода.
-</p>
-<p>Непосредственно окна можно создать используя один из следующих классов (см. <a href="#Using-MathGL-window">Using MathGL window</a> для примеров).
-</p>
-
-<dl>
-<dt><a name="index-mglFLTK"></a>Конструктор класса <code>mglFLTK</code>: <em></em> <strong>mglFLTK</strong> <em>(<code>const char *</code>title=<code>"MathGL"</code>)</em></dt>
-<dt><a name="index-mglFLTK-1"></a>Конструктор класса <code>mglFLTK</code>: <em></em> <strong>mglFLTK</strong> <em>(<code>int</code> (*draw)(<code>HMGL</code> gr, <code>void *</code>p), <code>const char *</code>title=<code>"MathGL"</code>, <code>void *</code>par=<code>NULL</code>, <code>void</code> (*reload)(<code>HMGL</code> gr, <code>void *</code>p)=0)</em></dt>
-<dt><a name="index-mglFLTK-2"></a>Конструктор класса <code>mglFLTK</code>: <em></em> <strong>mglFLTK</strong> <em>(<code>int</code> (*draw)(<code>mglGraph *</code>gr), <code>const char *</code>title=<code>"MathGL"</code>)</em></dt>
-<dt><a name="index-mglFLTK-3"></a>Конструктор класса <code>mglFLTK</code>: <em></em> <strong>mglFLTK</strong> <em>(<code>mglDraw *</code>draw, <code>const char *</code>title=<code>"MathGL"</code>)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fgraph_005ffltk"></a>Функция С: <em><code>HMGL</code></em> <strong>mgl_create_graph_fltk</strong> <em>(<code>int</code> (*draw)(<code>HMGL</code> gr, <code>void *</code>p), <code>const char *</code>title, <code>void *</code>par, <code>void</code> (*reload)(<code>HMGL</code> gr, <code>void *</code>p))</em></dt>
-<dd>
-<p>Создает FLTK окно для вывода графика. Параметр <var>draw</var> – указатель (имя) функции рисования. Есть возможность создания нескольких кадров вначале (требует больше памяти) и их быстрая анимации в дальнейшем. В этом случае функция <var>draw</var> должна возвращать число кадров или ноль для рисования по запросу. Замечу, что <var>draw</var> может быть равна <code>NULL</code> для отображения статической (текущей) картинки. Параметр <var>title</var> задает заголовок окна. Параметр <var>par</var> содержит указатель на данные, передаваемые функции рисования <var>draw</var>. FLTK окна обеспечивают быстрое рисование и хорошо поддерживают многопоточность.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-RunThr"></a>Метод класса <code>mglWnd</code>: <em><code>int</code></em> <strong>RunThr</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005ffltk_005fthr"></a>Функция С: <em><code>int</code></em> <strong>mgl_fltk_thr</strong> <em>()</em></dt>
-<dd><p>Запускает цикл обработки сообщений в отдельном потоке. В данный момент работает только для окон FLTK.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-mglQT"></a>Конструктор класса <code>mglQT</code>: <em></em> <strong>mglQT</strong> <em>(<code>const char *</code>title=<code>"MathGL"</code>)</em></dt>
-<dt><a name="index-mglQT-1"></a>Конструктор класса <code>mglQT</code>: <em></em> <strong>mglQT</strong> <em>(<code>int</code> (*draw)(<code>HMGL</code> gr, <code>void *</code>p), <code>const char *</code>title=<code>"MathGL"</code>, <code>void *</code>par=<code>NULL</code>, <code>void</code> (*reload)(<code>HMGL</code> gr, <code>void *</code>p)=0)</em></dt>
-<dt><a name="index-mglQT-2"></a>Конструктор класса <code>mglQT</code>: <em></em> <strong>mglQT</strong> <em>(<code>int</code> (*draw)(<code>mglGraph *</code>gr), <code>const char *</code>title=<code>"MathGL"</code>)</em></dt>
-<dt><a name="index-mglQT-3"></a>Конструктор класса <code>mglQT</code>: <em></em> <strong>mglQT</strong> <em>(<code>mglDraw *</code>draw, <code>const char *</code>title=<code>"MathGL"</code>)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fgraph_005fqt"></a>Функция С: <em><code>HMGL</code></em> <strong>mgl_create_graph_qt</strong> <em>(<code>int</code> (*draw)(<code>HMGL</code> gr, <code>void *</code>p), <code>const char *</code>title, <code>void *</code>par, <code>void</code> (*reload)(<code>HMGL</code> gr, <code>void *</code>p))</em></dt>
-<dd>
-<p>Создает Qt окно для вывода графика. Параметр <var>draw</var> – указатель (имя) функции рисования. Есть возможность создания нескольких кадров вначале (требует больше памяти) и их быстрая анимации в дальнейшем. В этом случае функция <var>draw</var> должна возвращать число кадров или ноль для рисования по запросу. Замечу, что <var>draw</var> может быть равна <code>NULL</code> для отображения статической (текущей) картинки. Параметр <var>title</var> задает заголовок окна. Параметр <var>par</var> содержит указатель на данные, передаваемые функции рисования <var>draw</var>.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-mglGLUT-1"></a>Конструктор класса <code>mglGLUT</code>: <em></em> <strong>mglGLUT</strong> <em>(<code>const char *</code>title=<code>"MathGL"</code>)</em></dt>
-<dt><a name="index-mglGLUT-2"></a>Конструктор класса <code>mglGLUT</code>: <em></em> <strong>mglGLUT</strong> <em>(<code>int</code> (*draw)(<code>HMGL</code> gr, <code>void *</code>p), <code>const char *</code>title=<code>"MathGL"</code>, <code>void *</code>par=<code>NULL</code>, <code>void</code> (*reload)(<code>HMGL</code> gr, <code>void *</code>p)=0)</em></dt>
-<dt><a name="index-mglGLUT-3"></a>Конструктор класса <code>mglGLUT</code>: <em></em> <strong>mglGLUT</strong> <em>(<code>int</code> (*draw)(<code>mglGraph *</code>gr), <code>const char *</code>title=<code>"MathGL"</code>)</em></dt>
-<dt><a name="index-mglGLUT-4"></a>Конструктор класса <code>mglGLUT</code>: <em></em> <strong>mglGLUT</strong> <em>(<code>mglDraw *</code>draw, <code>const char *</code>title=<code>"MathGL"</code>)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fgraph_005fglut"></a>Функция С: <em><code>HMGL</code></em> <strong>mgl_create_graph_glut</strong> <em>(<code>int</code> (*draw)(<code>HMGL</code> gr, <code>void *</code>p), <code>const char *</code>title, <code>void *</code>par, <code>void</code> (*reload)(<code>HMGL</code> gr, <code>void *</code>p))</em></dt>
-<dd>
-<p>Создает окно для вывода графика. Параметр <var>draw</var> – указатель (имя) функции рисования. Есть возможность создания нескольких кадров вначале (требует больше памяти) и их быстрая анимации в дальнейшем. В этом случае функция <var>draw</var> должна возвращать число кадров или ноль для рисования по запросу. Замечу, что <var>draw</var> может быть равна <code>NULL</code> для отображения статической (текущей) картинки. Параметр <var>title</var> задает заголовок окна. Параметр <var>par</var> содержит указатель на данные, передаваемые функции рисования <var>draw</var>. Параметр <var>kind</var> может иметь следующие значения: ‘<samp>0</samp>’ – использовать окно FLTK, ‘<samp>1</samp>’ – использовать окно Qt.
-</p>
-<p>В окне просмотра можно использовать клавиши: ’a’, ’d’, ’w’, ’s’ для вращения; ’,’, ’.’ для просмотра предыдущего и следующего кадров; ’r’ для переключения прозрачности; ’f’ для переключения оспещенности; ’x’ для закрытия окна.
-</p></dd></dl>
-
-
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#mglWnd-class" accesskey="1">mglWnd class</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mglDraw-class" accesskey="2">mglDraw class</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Fl_005fMathGL-class" accesskey="3">Fl_MathGL class</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#QMathGL-class" accesskey="4">QMathGL class</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#wxMathGL-class" accesskey="5">wxMathGL class</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-
-<hr>
-<a name="mglWnd-class"></a>
-<div class="header">
-<p>
-Next: <a href="#Fl_005fMathGL-class" accesskey="n" rel="next">Fl_MathGL class</a>, Up: <a href="#Widget-classes" accesskey="u" rel="up">Widget classes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Klass-mglWnd"></a>
-<h3 class="section">5.1 Класс mglWnd</h3>
-
-<a name="index-mglWnd-1"></a>
-<a name="index-window-2"></a>
-
-<p>Это абстрактный класс производный от класса mglGraph (см. <a href="#MathGL-core">MathGL core</a>). Он определен в <code>#include <mgl2/wnd.h></code>. Класс содержит методы для создания и управления окном, содержащим графику MathGL. Производные от него классы существует отдельно для каждой библиотеки виджетов: <code>mglQT</code> в <code>#include <mgl2/qt.h></code>, <code>mglFLTK</code> в <code>#include <mgl2/fltk.h></code>.
-</p>
-<dl>
-<dt><a name="index-Run"></a>Метод класса <code>mglWnd</code>: <em><code>int</code></em> <strong>Run</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fqt_005frun"></a>Функция С: <em><code>int</code></em> <strong>mgl_qt_run</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005ffltk_005frun"></a>Функция С: <em><code>int</code></em> <strong>mgl_fltk_run</strong> <em>()</em></dt>
-<dd><p>Запускает цикл обработки сообщений. Обычно эта функция должна вызываться в отдельном потоке или последней функцией в <code>main()</code>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetDrawFunc"></a>Метод класса <code>mglWnd</code>: <em><code>void</code></em> <strong>SetDrawFunc</strong> <em>(<code>int</code> (*draw)(<code>HMGL</code> gr, <code>void *</code>p), <code>void *</code>par=<code>NULL</code>, <code>void</code> (*reload)(<code>void *</code>p)=<code>NULL</code>)</em></dt>
-<dt><a name="index-SetDrawFunc-1"></a>Метод класса <code>mglWnd</code>: <em><code>void</code></em> <strong>SetDrawFunc</strong> <em>(<code>int</code> (*draw)(<code>mglGraph *</code>gr))</em></dt>
-<dt><a name="index-SetDrawFunc-2"></a>Метод класса <code>mglWnd</code>: <em><code>void</code></em> <strong>SetDrawFunc</strong> <em>(<code>mglDraw *</code>obj)</em></dt>
-<dt><a name="index-mgl_005fwnd_005fset_005ffunc"></a>Функция С: <em><code>void</code></em> <strong>mgl_wnd_set_func</strong> <em>(<code>HMGL</code> gr, <code>int</code> (*draw)(<code>HMGL</code> gr, <code>void *</code>p), <code>void *</code>par, <code>void</code> (*reload)(<code>void *</code>p))</em></dt>
-<dd><p>Устанавливает функцию, которая будет вызвана при перерисовке (<var>draw</var>) и при повторной загрузке данных (<var>reload</var>), или объект <var>obj</var> класса, производного от <code>mglDraw</code>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetClickFunc"></a>Метод класса <code>mglWnd</code>: <em><code>void</code></em> <strong>SetClickFunc</strong> <em>(<code>void</code> (*func)(<code>HMGL</code> gr, <code>void *</code>p))</em></dt>
-<dt><a name="index-mgl_005fset_005fclick_005ffunc"></a>Функция С: <em><code>void</code></em> <strong>mgl_set_click_func</strong> <em>(<code>void</code> (*func)(<code>HMGL</code> gr, <code>void *</code>p))</em></dt>
-<dd><p>Устанавливает функцию, которая будет вызвана при щелчке мышью.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetMutex_0028pthread_005fmutex_005ft-_002amutex_0029"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>SetMutex(<code>pthread_mutex_t *</code>mutex)</strong></dt>
-<dt><a name="index-mgl_005fwnd_005fset_005fmutex_0028HMGL"></a>C function: <em><code>void</code></em> <strong>mgl_wnd_set_mutex(<code>HMGL</code></strong> <em>gr, <code>pthread_mutex_t *</code>mutex)</em></dt>
-<dd><p>Устанавливает внешний mutex для блокировки/разблокировки внешних вычислений с помощью меню или кнопок окна. Функция вызывается автоматически при использовании <a href="#mglDraw-class">mglDraw class</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ToggleAlpha"></a>Метод класса <code>mglWnd</code>: <em><code>void</code></em> <strong>ToggleAlpha</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005ftoggle_005falpha"></a>Функция С: <em><code>void</code></em> <strong>mgl_wnd_toggle_alpha</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Включает/выключает прозрачность, но не перекрывает ее включение в пользовательской функции рисования.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ToggleLight"></a>Метод класса <code>mglWnd</code>: <em><code>void</code></em> <strong>ToggleLight</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005ftoggle_005flight"></a>Функция С: <em><code>void</code></em> <strong>mgl_wnd_toggle_light</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Включает/выключает освещение, но не перекрывает его включение в пользовательской функции рисования.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ToggleRotate"></a>Метод класса <code>mglWnd</code>: <em><code>void</code></em> <strong>ToggleRotate</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005ftoggle_005frotate"></a>Функция С: <em><code>void</code></em> <strong>mgl_wnd_toggle_rotate</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Включает/выключает вращение мышкой. Нажатая левая кнопка используется для вращения, средняя для сдвига, правая для приближения/перспективы.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ToggleZoom"></a>Метод класса <code>mglWnd</code>: <em><code>void</code></em> <strong>ToggleZoom</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005ftoggle_005fzoom"></a>Функция С: <em><code>void</code></em> <strong>mgl_wnd_toggle_zoom</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Включает/выключает приближение мышкой. Выделите прямоугольную область и она будет приближена.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ToggleNo"></a>Метод класса <code>mglWnd</code>: <em><code>void</code></em> <strong>ToggleNo</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005ftoggle_005fno"></a>Функция С: <em><code>void</code></em> <strong>mgl_wnd_toggle_no</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Выключает вращение и приближение мышкой, а также восстанавливает исходный вид графика.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Update"></a>Метод класса <code>mglWnd</code>: <em><code>void</code></em> <strong>Update</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005fupdate"></a>Функция С: <em><code>void</code></em> <strong>mgl_wnd_update</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Обновляет содержимое окна. Функция полезна при ручном обновлении содержимого, пока долгий расчет идет в параллельном потоке.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ReLoad"></a>Метод класса <code>mglWnd</code>: <em><code>void</code></em> <strong>ReLoad</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005freload"></a>Функция С: <em><code>void</code></em> <strong>mgl_wnd_reload</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Перегружает данные и обновляет рисунок. Функция также обновляет число кадров, которое создает функция рисования.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Adjust-2"></a>Метод класса <code>mglWnd</code>: <em><code>void</code></em> <strong>Adjust</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005fadjust"></a>Функция С: <em><code>void</code></em> <strong>mgl_wnd_adjust</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Подгоняет размер рисунка под размер окна.
-</p></dd></dl>
-<dl>
-<dt><a name="index-NextFrame"></a>Метод класса <code>mglWnd</code>: <em><code>void</code></em> <strong>NextFrame</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005fnext_005fframe"></a>Функция С: <em><code>void</code></em> <strong>mgl_wnd_next_frame</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Показывает следующий кадр, если он есть.
-</p></dd></dl>
-<dl>
-<dt><a name="index-PrevFrame"></a>Метод класса <code>mglWnd</code>: <em><code>void</code></em> <strong>PrevFrame</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005fprev_005fframe"></a>Функция С: <em><code>void</code></em> <strong>mgl_wnd_prev_frame</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Показывает предыдущий кадр, если он есть.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Animation"></a>Метод класса <code>mglWnd</code>: <em><code>void</code></em> <strong>Animation</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005fanimation"></a>Функция С: <em><code>void</code></em> <strong>mgl_wnd_animation</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Запускает/останавливает анимацию кадров.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetDelay"></a>Метод класса <code>mglWnd</code>: <em><code>void</code></em> <strong>SetDelay</strong> <em>(<code>double</code> dt)</em></dt>
-<dt><a name="index-mgl_005fwnd_005fset_005fdelay"></a>Функция С: <em><code>void</code></em> <strong>mgl_wnd_set_delay</strong> <em>(<code>HMGL</code> gr, <code>double</code> dt)</em></dt>
-<dd><p>Задает задержку при анимации в секундах. По умолчанию интервал – 1 секунда.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetDelay"></a>Метод класса <code>mglWnd</code>: <em><code>double</code></em> <strong>GetDelay</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fwnd_005fget_005fdelay"></a>Функция С: <em><code>double</code></em> <strong>mgl_wnd_get_delay</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Возвращает задержку при анимации в секундах.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Setup"></a>Метод класса <code>mglWnd</code>: <em><code>void</code></em> <strong>Setup</strong> <em>(<code>bool</code> clfupd=<code>true</code>, <code>bool</code> showpos=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fsetup_005fwindow"></a>Функция С: <em><code>void</code></em> <strong>mgl_setup_window</strong> <em>(<code>HMGL</code> gr, <code>bool</code> clfupd, <code>bool</code> showpos)</em></dt>
-<dd><p>Включает/выключает:
-</p><ul>
-<li> очистку рисунка перед Update();
-</li><li> показ позиции щелчка мыши на рисунке.
-</li></ul>
-</dd></dl>
-
-<dl>
-<dt><a name="index-LastMousePos"></a>Метод класса <code>mglWnd</code>: <em><code>mglPoint</code></em> <strong>LastMousePos</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fget_005flast_005fmouse_005fpos"></a>Функция С: <em><code>void</code></em> <strong>mgl_get_last_mouse_pos</strong> <em>(<code>HMGL</code> gr, <code>mreal *</code>x, <code>mreal *</code>y, <code>mreal *</code>z)</em></dt>
-<dd><p>Возвращает положение щелчка мыши.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Widget"></a>Method on <code>mglWnd</code>: <em><code>void *</code></em> <strong>Widget</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005ffltk_005fwidget"></a>C function: <em><code>void *</code></em> <strong>mgl_fltk_widget</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dt><a name="index-mgl_005fqt_005fwidget"></a>C function: <em><code>void *</code></em> <strong>mgl_qt_widget</strong> <em>(<code>HMGL</code> gr)</em></dt>
-<dd><p>Возвращает указатель на виджет (<a href="#Fl_005fMathGL-class">Fl_MathGL class</a> or <a href="#QMathGL-class">QMathGL class</a>), используемый для рисования.
-</p></dd></dl>
-
-
-<hr>
-<a name="mglDraw-class"></a>
-<div class="header">
-<p>
-Next: <a href="#Fl_005fMathGL-class" accesskey="n" rel="next">Fl_MathGL class</a>, Previous: <a href="#mglWnd-class" accesskey="p" rel="prev">mglWnd class</a>, Up: <a href="#Widget-classes" accesskey="u" rel="up">Widget classes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="mglDraw-class-1"></a>
-<h3 class="section">5.2 mglDraw class</h3>
-
-<a name="index-mglDraw"></a>
-
-<p>This class provide base functionality for callback drawing and running calculation in separate thread. It is defined in <code>#include <mgl2/wnd.h></code>. You should make inherited class and implement virtual functions if you need it.
-</p>
-<dl>
-<dt><a name="index-Draw"></a>Virtual method on <code>mglDraw</code>: <em><code>int</code></em> <strong>Draw</strong> <em>(<code>mglGraph *</code>gr)</em></dt>
-<dd><p>This is callback drawing function, which will be called when any redrawing is required for the window. There is support of a list of plots (frames). So as one can prepare a set of frames at first and redraw it fast later (but it requires more memory). Function should return positive number of frames for the list or zero if it will plot directly.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Reload"></a>Virtual method on <code>mglDraw</code>: <em><code>void</code></em> <strong>Reload</strong> <em>()</em></dt>
-<dd><p>This is callback function, which will be called if user press menu or toolbutton to reload data.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Click"></a>Virtual method on <code>mglDraw</code>: <em><code>void</code></em> <strong>Click</strong> <em>()</em></dt>
-<dd><p>This is callback function, which will be called if user click mouse.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Calc"></a>Virtual method on <code>mglDraw</code>: <em><code>void</code></em> <strong>Calc</strong> <em>()</em></dt>
-<dd><p>This is callback function, which will be called if user start calculations in separate thread by calling <code>mglDraw::Run()</code> function. It should periodically call <code>mglDraw::Check()</code> function to check if calculations should be paused.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Run-1"></a>Method on <code>mglDraw</code>: <em><code>void</code></em> <strong>Run</strong> <em>()</em></dt>
-<dd><p>Runs <code>mglDraw::Calc()</code> function in separate thread. It also initialize <code>mglDraw::thr</code> variable and unlock <code>mglDraw::mutex</code>. Function is present only if FLTK support for widgets was enabled.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Cancel"></a>Method on <code>mglDraw</code>: <em><code>void</code></em> <strong>Cancel</strong> <em>()</em></dt>
-<dd><p>Cancels thread with calculations. Function is present only if FLTK support for widgets was enabled.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Pause"></a>Method on <code>mglDraw</code>: <em><code>void</code></em> <strong>Pause</strong> <em>()</em></dt>
-<dd><p>Pauses thread with calculations by locking <code>mglDraw::mutex</code>. You should call <code>mglDraw::Continue()</code> to continue calculations. Function is present only if FLTK support for widgets was enabled.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Continue"></a>Method on <code>mglDraw</code>: <em><code>void</code></em> <strong>Continue</strong> <em>()</em></dt>
-<dd><p>Continues calculations by unlocking <code>mglDraw::mutex</code>. Function is present only if FLTK support for widgets was enabled.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Continue-1"></a>Method on <code>mglDraw</code>: <em><code>void</code></em> <strong>Continue</strong> <em>()</em></dt>
-<dd><p>Checks if calculations should be paused and pause it. Function is present only if FLTK support for widgets was enabled.
-</p></dd></dl>
-
-
-<hr>
-<a name="Fl_005fMathGL-class"></a>
-<div class="header">
-<p>
-Next: <a href="#QMathGL-class" accesskey="n" rel="next">QMathGL class</a>, Previous: <a href="#mglDraw-class" accesskey="p" rel="prev">mglDraw class</a>, Up: <a href="#Widget-classes" accesskey="u" rel="up">Widget classes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Klass-Fl_005fMathGL"></a>
-<h3 class="section">5.3 Класс Fl_MathGL</h3>
-
-<a name="index-Fl_005fMathGL-1"></a>
-<a name="index-widgets-2"></a>
-
-<p>Класс реализует элемент интерфейса FLTK для отображения графики MathGL. Он определен в <code>#include <mgl2/Fl_MathGL.h></code>.
-</p>
-<div align="center"><img src="fltk.png" alt="Пример окна FLTK с графикой MathGL.">
-</div>
-<dl>
-<dt><a name="index-set_005fdraw-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_draw</strong> <em>(<code>int</code> (*draw)(<code>HMGL</code> gr, <code>void *</code>p))</em></dt>
-<dt><a name="index-set_005fdraw-on-Fl_005fMathGL-1"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_draw</strong> <em>(<code>int</code> (*draw)(<code>mglGraph *</code>gr))</em></dt>
-<dt><a name="index-set_005fdraw-on-Fl_005fMathGL-2"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_draw</strong> <em>(<code>mglDraw *</code>draw)</em></dt>
-<dd><p>Устанавливает функцию рисования как глобальную функцию или как функцию член класса, производного от <code>mglDraw</code>. Поддерживается список графиков (кадров), так что можно вначале их нарисовать (требует довольно много памяти), а потом достаточно быстро отображать. Функция должна возвращать положительное число создаваемых кадров или ноль для непосредственного рисования. Параметр <var>par</var> содержит указатель на данные пользователя, передаваемый функции рисования <var>draw</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-_0028_0029-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>mglDraw *</code>get_class</em> <strong>()</strong></dt>
-<dd><p>Указатель на экземпляр класса <code>mglDraw</code> или <code>NULL</code> если отсутствует.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-update-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>update</strong> <em>()</em></dt>
-<dd><p>Обновляет (перерисовывает) график.
-</p></dd></dl>
-<dl>
-<dt><a name="index-set_005fangle-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_angle</strong> <em>(<code>mreal</code> t, <code>mreal</code> p)</em></dt>
-<dd><p>Задает углы для дополнительного вращения графика.
-</p></dd></dl>
-<dl>
-<dt><a name="index-set_005fflag-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_flag</strong> <em>(<code>int</code> f)</em></dt>
-<dd><p>Задает битовые флаги для: 1 - прозрачности, 2 - освещения.
-</p></dd></dl>
-<dl>
-<dt><a name="index-set_005fstate-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_state</strong> <em>(<code>bool</code> z, <code>bool</code> r)</em></dt>
-<dd><p>Задает флаги обработки движений мыши: <var>z</var>=<code>true</code> – разрешает приближение выделения, <var>r</var>=<code>true</code> разрешает вращение/сдвиг/приближение/перспективу.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-set_005fzoom-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_zoom</strong> <em>(<code>mreal</code> X1, <code>mreal</code> Y1, <code>mreal</code> X2, <code>mreal</code> Y2)</em></dt>
-<dd><p>Задает область приближения.
-</p></dd></dl>
-<dl>
-<dt><a name="index-get_005fzoom-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>get_zoom</strong> <em>(<code>mreal *</code>X1, <code>mreal *</code>Y1, <code>mreal *</code>X2, <code>mreal *</code>Y2)</em></dt>
-<dd><p>Возвращает область приближения.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-set_005fpopup-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_popup</strong> <em>(<code>const Fl_Menu_Item *</code>pmenu, <code>Fl_Widget *</code>w, <code>void *</code>v)</em></dt>
-<dd><p>Задает указатель на всплывающее меню.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-set_005fgraph-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_graph</strong> <em>(<code>mglCanvas *</code>gr)</em></dt>
-<dt><a name="index-set_005fgraph-on-Fl_005fMathGL-1"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_graph</strong> <em>(<code>mglGraph *</code>gr)</em></dt>
-<dd><p>Задает экземпляр класс для рисования вместо встроеного. Fl_MathGL автоматически удалит его при удалении виджета и при новом вызове <code>set_graph()</code>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-get_005fgraph-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>mglGraph *</code></em> <strong>get_graph</strong> <em>()</em></dt>
-<dd><p>Возвращает указатель на объект, строящий графики.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-set_005fshow_005fwarn-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_show_warn</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Флаг показа окна с сообщениями после выполнения скрипта.
-</p></dd></dl>
-<dl>
-<dt><a name="index-stop-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>stop</strong> <em>(<code>bool</code> stop=<code>true</code>)</em></dt>
-<dd><p>Запрос на остановку рисования.
-</p></dd></dl>
-<dl>
-<dt><a name="index-set_005fhandle_005fkey-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>void</code></em> <strong>set_handle_key</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Вкл/выкл обработку нажатий клавиш (как в mglview, по умолчанию выкл).
-</p></dd></dl>
-<dl>
-<dt><a name="index-get_005flast_005fid-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>int</code></em> <strong>get_last_id</strong> <em>()</em></dt>
-<dd><p>Вернуть id последнего выделенного объекта.
-</p></dd></dl>
-<dl>
-<dt><a name="index-running-on-Fl_005fMathGL"></a>Method on Fl_MathGL: <em><code>bool</code></em> <strong>running</strong> <em>()</em></dt>
-<dd><p>Проверяет выполняется ли сейчас скрипт или нет.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-tet_005fval-of-Fl_005fMathGL"></a>Widget option of Fl_MathGL: <em><code>Fl_Valuator *</code></em> <strong>tet_val</strong></dt>
-<dd><p>Указатель на внешний элемент управления для изменения угла tet.
-</p></dd></dl>
-<dl>
-<dt><a name="index-phi_005fval-of-Fl_005fMathGL"></a>Widget option of Fl_MathGL: <em><code>Fl_Valuator *</code></em> <strong>phi_val</strong></dt>
-<dd><p>Указатель на внешний элемент управления для изменения угла phi.
-</p></dd></dl>
-
-
-<hr>
-<a name="QMathGL-class"></a>
-<div class="header">
-<p>
-Next: <a href="#wxMathGL-class" accesskey="n" rel="next">wxMathGL class</a>, Previous: <a href="#Fl_005fMathGL-class" accesskey="p" rel="prev">Fl_MathGL class</a>, Up: <a href="#Widget-classes" accesskey="u" rel="up">Widget classes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Klass-QMathGL"></a>
-<h3 class="section">5.4 Класс QMathGL</h3>
-
-<a name="index-QMathGL-1"></a>
-<a name="index-widgets-3"></a>
-
-<p>Класс реализует элемент интерфейса Qt для отображения графики MathGL. Он определен в <code>#include <mgl2/qt.h></code>.
-</p>
-<div align="center"><img src="qt.png" alt="Пример окна Qt с графикой MathGL.">
-</div>
-<dl>
-<dt><a name="index-setDraw-on-QMathGL"></a>Method on QMathGL: <em><code>void</code></em> <strong>setDraw</strong> <em>(<code>mglDraw *</code>dr)</em></dt>
-<dd><p>Задает функцию рисования из класса производного от <code>mglDraw</code>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-setDraw-on-QMathGL-1"></a>Method on QMathGL: <em><code>void</code></em> <strong>setDraw</strong> <em>(<code>int (*</code>draw<code>)(mglBase *</code>gr, <code>void *</code>p<code>)</code>, <code>void *</code>par=<code>NULL</code>)</em></dt>
-<dt><a name="index-setDraw-on-QMathGL-2"></a>Method on QMathGL: <em><code>void</code></em> <strong>setDraw</strong> <em>(<code>int (*</code>draw<code>)(mglGraph *</code>gr<code>)</code>)</em></dt>
-<dd><p>Задает функцию рисования <var>draw</var>. Поддерживается список графиков (кадров), так что можно вначале их нарисовать (требует довольно много памяти), а потом достаточно быстро отображать. Функция должна возвращать положительное число создаваемых кадров или ноль для непосредственного рисования. Параметр <var>par</var> содержит указатель на данные пользователя, передаваемый функции рисования <var>draw</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-setGraph-on-QMathGL"></a>Method on QMathGL: <em><code>void</code></em> <strong>setGraph</strong> <em>(<code>mglCanvas *</code>gr)</em></dt>
-<dt><a name="index-setGraph-on-QMathGL-1"></a>Method on QMathGL: <em><code>void</code></em> <strong>setGraph</strong> <em>(<code>mglGraph *</code>gr)</em></dt>
-<dd><p>Устанавливает указатель на внешний экземпляр класса для рисования (вместо встроенного). Отмечу, что QMathGL автоматически удалит этот объект при удалении элемента интерфейса или при новом вызове <code>setGraph()</code>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-getGraph-on-QMathGL"></a>Method on QMathGL: <em><code>HMGL</code></em> <strong>getGraph</strong> <em>()</em></dt>
-<dd><p>Возвращает указатель на объект, строящий графики.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-setPopup-on-QMathGL"></a>Method on QMathGL: <em><code>void</code></em> <strong>setPopup</strong> <em>(<code>QMenu *</code>p)</em></dt>
-<dd><p>Задает указатель на всплывающее меню.
-</p></dd></dl>
-<dl>
-<dt><a name="index-setSize-on-QMathGL"></a>Method on QMathGL: <em><code>void</code></em> <strong>setSize</strong> <em>(<code>int</code> w, <code>int</code> h)</em></dt>
-<dd><p>Задает размеры элемента управления и картинки.
-</p></dd></dl>
-<dl>
-<dt><a name="index-getRatio-on-QMathGL"></a>Method on QMathGL: <em><code>double</code></em> <strong>getRatio</strong> <em>()</em></dt>
-<dd><p>Возвращает соотношение сторон рисунка.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-getPer-on-QMathGL"></a>Method on QMathGL: <em><code>int</code></em> <strong>getPer</strong> <em>()</em></dt>
-<dd><p>Возвращает величину перспективы в процентах.
-</p></dd></dl>
-<dl>
-<dt><a name="index-getPhi-on-QMathGL"></a>Method on QMathGL: <em><code>int</code></em> <strong>getPhi</strong> <em>()</em></dt>
-<dd><p>Возвращает величину угла Phi в градусах.
-</p></dd></dl>
-<dl>
-<dt><a name="index-getTet-on-QMathGL"></a>Method on QMathGL: <em><code>int</code></em> <strong>getTet</strong> <em>()</em></dt>
-<dd><p>Возвращает величину угла Theta в градусах.
-</p></dd></dl>
-<dl>
-<dt><a name="index-getAlpha-on-QMathGL"></a>Method on QMathGL: <em><code>bool</code></em> <strong>getAlpha</strong> <em>()</em></dt>
-<dd><p>Возвращает состояние переключателя прозрачности.
-</p></dd></dl>
-<dl>
-<dt><a name="index-getLight-on-QMathGL"></a>Method on QMathGL: <em><code>bool</code></em> <strong>getLight</strong> <em>()</em></dt>
-<dd><p>Возвращает состояние переключателя освещения.
-</p></dd></dl>
-<dl>
-<dt><a name="index-getZoom-on-QMathGL"></a>Method on QMathGL: <em><code>bool</code></em> <strong>getZoom</strong> <em>()</em></dt>
-<dd><p>Возвращает состояние переключателя приближения мышью.
-</p></dd></dl>
-<dl>
-<dt><a name="index-getRotate-on-QMathGL"></a>Method on QMathGL: <em><code>bool</code></em> <strong>getRotate</strong> <em>()</em></dt>
-<dd><p>Возвращает состояние переключателя вращения мышью.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-refresh"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>refresh</strong> <em>()</em></dt>
-<dd><p>Перерисовывает (обновляет) элемент управления без вызова функции рисования.
-</p></dd></dl>
-<dl>
-<dt><a name="index-update"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>update</strong> <em>()</em></dt>
-<dd><p>Обновляет рисунок путем вызова функции рисования.
-</p></dd></dl>
-<dl>
-<dt><a name="index-copy"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>copy</strong> <em>()</em></dt>
-<dd><p>Копирует график в буфер обмена.
-</p></dd></dl>
-<dl>
-<dt><a name="index-copyClickCoor"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>copyClickCoor</strong> <em>()</em></dt>
-<dd><p>Копирует координаты щелчка мышью (как текст).
-</p></dd></dl>
-<dl>
-<dt><a name="index-print"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>print</strong> <em>()</em></dt>
-<dd><p>Печатает текущий рисунок.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-stop-1"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>stop</strong> <em>()</em></dt>
-<dd><p>Посылает сигнал остановки рисования.
-</p></dd></dl>
-<dl>
-<dt><a name="index-adjust-1"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>adjust</strong> <em>()</em></dt>
-<dd><p>Подгоняет размер картинки под размер окна.
-</p></dd></dl>
-<dl>
-<dt><a name="index-nextSlide"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>nextSlide</strong> <em>()</em></dt>
-<dd><p>Показывает следующий кадр.
-</p></dd></dl>
-<dl>
-<dt><a name="index-prevSlide"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>prevSlide</strong> <em>()</em></dt>
-<dd><p>Показывает предыдущий кадр.
-</p></dd></dl>
-<dl>
-<dt><a name="index-animation"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>animation</strong> <em>(<code>bool</code> st=<code>true</code>)</em></dt>
-<dd><p>Запускает анимацию.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-setPer"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>setPer</strong> <em>(<code>int</code> val)</em></dt>
-<dd><p>Задает величину перспективы.
-</p></dd></dl>
-<dl>
-<dt><a name="index-setPhi"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>setPhi</strong> <em>(<code>int</code> val)</em></dt>
-<dd><p>Задает величину угла Phi.
-</p></dd></dl>
-<dl>
-<dt><a name="index-setTet"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>setTet</strong> <em>(<code>int</code> val)</em></dt>
-<dd><p>Задает величину угла Theta.
-</p></dd></dl>
-<dl>
-<dt><a name="index-setAlpha"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>setAlpha</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Включает/выключает прозрачность.
-</p></dd></dl>
-<dl>
-<dt><a name="index-setLight"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>setLight</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Включает/выключает освещение.
-</p></dd></dl>
-<dl>
-<dt><a name="index-setGrid"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>setGrid</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Включает/выключает рисование сетки абсолютных координат на графике.
-</p></dd></dl>
-<dl>
-<dt><a name="index-setZoom"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>setZoom</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Включает/выключает приближение мышью.
-</p></dd></dl>
-<dl>
-<dt><a name="index-setRotate"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>setRotate</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Включает/выключает вращение мышью.
-</p></dd></dl>
-<dl>
-<dt><a name="index-zoomIn"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>zoomIn</strong> <em>()</em></dt>
-<dd><p>Приблиажет график.
-</p></dd></dl>
-<dl>
-<dt><a name="index-zoomOut"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>zoomOut</strong> <em>()</em></dt>
-<dd><p>Отдаляет график.
-</p></dd></dl>
-<dl>
-<dt><a name="index-shiftLeft"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>shiftLeft</strong> <em>()</em></dt>
-<dd><p>Сдвигает график влево.
-</p></dd></dl>
-<dl>
-<dt><a name="index-shiftRight"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>shiftRight</strong> <em>()</em></dt>
-<dd><p>Сдвигает график вправо.
-</p></dd></dl>
-<dl>
-<dt><a name="index-shiftUp"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>shiftUp</strong> <em>()</em></dt>
-<dd><p>Сдвигает график вверх.
-</p></dd></dl>
-<dl>
-<dt><a name="index-shiftDown"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>shiftDown</strong> <em>()</em></dt>
-<dd><p>Сдвигает график вниз.
-</p></dd></dl>
-<dl>
-<dt><a name="index-restore"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>restore</strong> <em>()</em></dt>
-<dd><p>Восстанавливает приближение и поворот графика в значения по умолчанию.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-exportPNG"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportPNG</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Сохраняет текущий рисунок в PNG файл.
-</p></dd></dl>
-<dl>
-<dt><a name="index-exportPNGs"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportPNGs</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Сохраняет текущий рисунок в PNG файл без прозрачности.
-</p></dd></dl>
-<dl>
-<dt><a name="index-exportJPG"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportJPG</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Сохраняет текущий рисунок в JPEG файл.
-</p></dd></dl>
-<dl>
-<dt><a name="index-exportBPS"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportBPS</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Сохраняет текущий рисунок в растровый EPS файл.
-</p></dd></dl>
-<dl>
-<dt><a name="index-exportEPS"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportEPS</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Сохраняет текущий рисунок в векторный EPS файл.
-</p></dd></dl>
-<dl>
-<dt><a name="index-exportSVG"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportSVG</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Сохраняет текущий рисунок в векторный SVG файл.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-exportGIF"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportGIF</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Сохраняет текущий рисунок в GIF файл.
-</p></dd></dl>
-<dl>
-<dt><a name="index-exportTEX"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportTEX</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Сохраняет текущий рисунок в векторный LaTeX/Tikz файл.
-</p></dd></dl>
-<dl>
-<dt><a name="index-exportTGA"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportTGA</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Сохраняет текущий рисунок в TGA файл.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-exportXYZ"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportXYZ</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Сохраняет текущий рисунок в векторный XYZ/XYZL/XYZF файл.
-</p></dd></dl>
-<dl>
-<dt><a name="index-exportOBJ"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportOBJ</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Сохраняет текущий рисунок в векторный OBJ/MTL файл.
-</p></dd></dl>
-<dl>
-<dt><a name="index-exportSTL"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportSTL</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Сохраняет текущий рисунок в векторный STL файл.
-</p></dd></dl>
-<dl>
-<dt><a name="index-exportOFF"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>exportOFF</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Сохраняет текущий рисунок в векторный OFF файл.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-setUsePrimitives"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>setUsePrimitives</strong> <em>(<code>bool</code> use)</em></dt>
-<dd><p>Разрешает использовать список примитивов для кадров. Это позволяет вращать/масштабировать кадры, но требует значительно больше памяти. По умолчанию разрешено (=<code>true</code>).
-</p></dd></dl>
-<dl>
-<dt><a name="index-setMGLFont"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>setMGLFont</strong> <em>(<code>QString</code> path)</em></dt>
-<dd><p>Восстанавливает (<var>path</var>=<code>""</code>) или загружает файлы шрифтов.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-about"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>about</strong> <em>()</em></dt>
-<dd><p>Показывает информацию о программе.
-</p></dd></dl>
-<dl>
-<dt><a name="index-aboutQt"></a>Slot on <code>QMathGL</code>: <em><code>void</code></em> <strong>aboutQt</strong> <em>()</em></dt>
-<dd><p>Показывает информацию о версии Qt.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-phiChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>phiChanged</strong> <em>(<code>int</code> val)</em></dt>
-<dd><p>Угол Phi изменен.
-</p></dd></dl>
-<dl>
-<dt><a name="index-tetChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>tetChanged</strong> <em>(<code>int</code> val)</em></dt>
-<dd><p>Угол Tet изменен.
-</p></dd></dl>
-<dl>
-<dt><a name="index-perChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>perChanged</strong> <em>(<code>int</code> val)</em></dt>
-<dd><p>Перспектива изменена.
-</p></dd></dl>
-<dl>
-<dt><a name="index-alphaChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>alphaChanged</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Прозрачность изменена.
-</p></dd></dl>
-<dl>
-<dt><a name="index-lightChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>lightChanged</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Освещение изменено.
-</p></dd></dl>
-<dl>
-<dt><a name="index-gridChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>gridChanged</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Рисование сетки изменено.
-</p></dd></dl>
-<dl>
-<dt><a name="index-zoomChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>zoomChanged</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Режим приближения мышью изменен.
-</p></dd></dl>
-<dl>
-<dt><a name="index-rotateChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>rotateChanged</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Режим вращения мышью изменен.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mouseClick"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>mouseClick</strong> <em>(<code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z)</em></dt>
-<dd><p>Был щелчок мышью в точке {x,y,z}.
-</p></dd></dl>
-<dl>
-<dt><a name="index-frameChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>frameChanged</strong> <em>(<code>int</code> val)</em></dt>
-<dd><p>Требуется новый кадр для отображения.
-</p></dd></dl>
-<dl>
-<dt><a name="index-showWarn"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>showWarn</strong> <em>(<code>QString</code> warn)</em></dt>
-<dd><p>Есть предупреждения.
-</p></dd></dl>
-<dl>
-<dt><a name="index-posChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>posChanged</strong> <em>(<code>QString</code> pos)</em></dt>
-<dd><p>Положение щелчка мышью изменилось.
-</p></dd></dl>
-<dl>
-<dt><a name="index-objChanged"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>objChanged</strong> <em>(<code>int</code> id)</em></dt>
-<dd><p>Изменился id объекта на графике (из-за щелчка мышью).
-</p></dd></dl>
-<dl>
-<dt><a name="index-refreshData"></a>Signal on <code>QMathGL</code>: <em><code>void</code></em> <strong>refreshData</strong> <em>()</em></dt>
-<dd><p>Данные могли измениться (рисование завершено).
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-appName-of-QMathGL"></a>QMathGL option of QMathGL: <em><code>QString</code></em> <strong>appName</strong></dt>
-<dd><p>Имя приложения для окон сообщений.
-</p></dd></dl>
-<dl>
-<dt><a name="index-autoResize-of-QMathGL"></a>QMathGL option of QMathGL: <em><code>bool</code></em> <strong>autoResize</strong></dt>
-<dd><p>Разрешить изменять размер рисунка (по умолчанию false).
-</p></dd></dl>
-
-
-
-
-
-<hr>
-<a name="wxMathGL-class"></a>
-<div class="header">
-<p>
-Previous: <a href="#QMathGL-class" accesskey="p" rel="prev">QMathGL class</a>, Up: <a href="#Widget-classes" accesskey="u" rel="up">Widget classes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Klass-wxMathGL"></a>
-<h3 class="section">5.5 Класс wxMathGL</h3>
-
-<a name="index-wxMathGL"></a>
-<a name="index-widgets-4"></a>
-
-<p>Класс реализует элемент интерфейса WX для отображения графики MathGL. Он определен в <code>#include <mgl2/wx.h></code>.
-</p>
-<dl>
-<dt><a name="index-SetDraw-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetDraw</strong> <em>(<code>mglDraw *</code>dr)</em></dt>
-<dd><p>Задает функцию рисования из класса производного от <code>mglDraw</code>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetDraw-on-wxMathGL-1"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetDraw</strong> <em>(<code>int (*</code>draw<code>)(mglBase *</code>gr, <code>void *</code>p<code>)</code>, <code>void *</code>par=<code>NULL</code>)</em></dt>
-<dt><a name="index-SetDraw-on-wxMathGL-2"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetDraw</strong> <em>(<code>int (*</code>draw<code>)(mglGraph *</code>gr<code>)</code>)</em></dt>
-<dd><p>Задает функцию рисования <var>draw</var>. Поддерживается список графиков (кадров), так что можно вначале их нарисовать (требует довольно много памяти), а потом достаточно быстро отображать. Функция должна возвращать положительное число создаваемых кадров или ноль для непосредственного рисования. Параметр <var>par</var> содержит указатель на данные пользователя, передаваемый функции рисования <var>draw</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetGraph-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetGraph</strong> <em>(<code>mglCanvas *</code>gr)</em></dt>
-<dt><a name="index-SetGraph-on-wxMathGL-1"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetGraph</strong> <em>(<code>mglGraph *</code>gr)</em></dt>
-<dd><p>Устанавливает указатель на внешний экземпляр класса для рисования (вместо встроенного). Отмечу, что wxMathGL автоматически удалит этот объект при удалении элемента интерфейса или при новом вызове <code>setGraph()</code>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-GetGraph-on-wxMathGL"></a>Method on wxMathGL: <em><code>HMGL</code></em> <strong>GetGraph</strong> <em>()</em></dt>
-<dd><p>Возвращает указатель на объект, строящий графики.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetPopup-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetPopup</strong> <em>(<code>QMenu *</code>p)</em></dt>
-<dd><p>Задает указатель на всплывающее меню.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetSize-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetSize</strong> <em>(<code>int</code> w, <code>int</code> h)</em></dt>
-<dd><p>Задает размеры элемента управления и картинки.
-</p></dd></dl>
-<dl>
-<dt><a name="index-GetRatio-on-wxMathGL"></a>Method on wxMathGL: <em><code>double</code></em> <strong>GetRatio</strong> <em>()</em></dt>
-<dd><p>Возвращает соотношение сторон рисунка.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetPer-on-wxMathGL"></a>Method on wxMathGL: <em><code>int</code></em> <strong>GetPer</strong> <em>()</em></dt>
-<dd><p>Возвращает величину перспективы в процентах.
-</p></dd></dl>
-<dl>
-<dt><a name="index-GetPhi-on-wxMathGL"></a>Method on wxMathGL: <em><code>int</code></em> <strong>GetPhi</strong> <em>()</em></dt>
-<dd><p>Возвращает величину угла Phi в градусах.
-</p></dd></dl>
-<dl>
-<dt><a name="index-GetTet-on-wxMathGL"></a>Method on wxMathGL: <em><code>int</code></em> <strong>GetTet</strong> <em>()</em></dt>
-<dd><p>Возвращает величину угла Theta в градусах.
-</p></dd></dl>
-<dl>
-<dt><a name="index-GetAlpha-on-wxMathGL"></a>Method on wxMathGL: <em><code>bool</code></em> <strong>GetAlpha</strong> <em>()</em></dt>
-<dd><p>Возвращает состояние переключателя прозрачности.
-</p></dd></dl>
-<dl>
-<dt><a name="index-GetLight-on-wxMathGL"></a>Method on wxMathGL: <em><code>bool</code></em> <strong>GetLight</strong> <em>()</em></dt>
-<dd><p>Возвращает состояние переключателя освещения.
-</p></dd></dl>
-<dl>
-<dt><a name="index-GetZoom-on-wxMathGL"></a>Method on wxMathGL: <em><code>bool</code></em> <strong>GetZoom</strong> <em>()</em></dt>
-<dd><p>Возвращает состояние переключателя приближения мышью.
-</p></dd></dl>
-<dl>
-<dt><a name="index-GetRotate-on-wxMathGL"></a>Method on wxMathGL: <em><code>bool</code></em> <strong>GetRotate</strong> <em>()</em></dt>
-<dd><p>Возвращает состояние переключателя вращения мышью.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-Repaint-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>Repaint</strong> <em>()</em></dt>
-<dd><p>Перерисовывает (обновляет) элемент управления без вызова функции рисования.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Update-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>Update</strong> <em>()</em></dt>
-<dd><p>Обновляет рисунок путем вызова функции рисования.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Copy-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>Copy</strong> <em>()</em></dt>
-<dd><p>Копирует график в буфер обмена.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Print-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>Print</strong> <em>()</em></dt>
-<dd><p>Печатает текущий рисунок.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Adjust-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>Adjust</strong> <em>()</em></dt>
-<dd><p>Подгоняет размер картинки под размер окна.
-</p></dd></dl>
-<dl>
-<dt><a name="index-NextSlide-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>NextSlide</strong> <em>()</em></dt>
-<dd><p>Показывает следующий кадр.
-</p></dd></dl>
-<dl>
-<dt><a name="index-PrevSlide-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>PrevSlide</strong> <em>()</em></dt>
-<dd><p>Показывает предыдущий кадр.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Animation-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>Animation</strong> <em>(<code>bool</code> st=<code>true</code>)</em></dt>
-<dd><p>Запускает анимацию.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetPer-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetPer</strong> <em>(<code>int</code> val)</em></dt>
-<dd><p>Задает величину перспективы.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetPhi-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetPhi</strong> <em>(<code>int</code> val)</em></dt>
-<dd><p>Задает величину угла Phi.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetTet-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetTet</strong> <em>(<code>int</code> val)</em></dt>
-<dd><p>Задает величину угла Theta.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetAlpha-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetAlpha</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Включает/выключает прозрачность.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetLight-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetLight</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Включает/выключает освещение.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetZoom-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetZoom</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Включает/выключает приближение мышью.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetRotate-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>SetRotate</strong> <em>(<code>bool</code> val)</em></dt>
-<dd><p>Включает/выключает вращение мышью.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ZoomIn-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ZoomIn</strong> <em>()</em></dt>
-<dd><p>Приблиажет график.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ZoomOut-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ZoomOut</strong> <em>()</em></dt>
-<dd><p>Отдаляет график.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ShiftLeft-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ShiftLeft</strong> <em>()</em></dt>
-<dd><p>Сдвигает график влево.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ShiftRight-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ShiftRight</strong> <em>()</em></dt>
-<dd><p>Сдвигает график вправо.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ShiftUp-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ShiftUp</strong> <em>()</em></dt>
-<dd><p>Сдвигает график вверх.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ShiftDown-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ShiftDown</strong> <em>()</em></dt>
-<dd><p>Сдвигает график вниз.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Restore-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>Restore</strong> <em>()</em></dt>
-<dd><p>Восстанавливает приближение и поворот графика в значения по умолчанию.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-About-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>About</strong> <em>()</em></dt>
-<dd><p>Показывает информацию о программе.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ExportPNG-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ExportPNG</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Сохраняет текущий рисунок в PNG файл.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ExportPNGs-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ExportPNGs</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Сохраняет текущий рисунок в PNG файл без прозрачности.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ExportJPG-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ExportJPG</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Сохраняет текущий рисунок в JPEG файл.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ExportBPS-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ExportBPS</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Сохраняет текущий рисунок в растровый EPS файл.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ExportEPS-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ExportEPS</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Сохраняет текущий рисунок в векторный EPS файл.
-</p></dd></dl>
-<dl>
-<dt><a name="index-ExportSVG-on-wxMathGL"></a>Method on wxMathGL: <em><code>void</code></em> <strong>ExportSVG</strong> <em>(<code>QString</code> fname=<code>""</code>)</em></dt>
-<dd><p>Сохраняет текущий рисунок в векторный SVG файл.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Data-processing"></a>
-<div class="header">
-<p>
-Next: <a href="#MGL-scripts" accesskey="n" rel="next">MGL scripts</a>, Previous: <a href="#Widget-classes" accesskey="p" rel="prev">Widget classes</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Obrabotka-dannykh"></a>
-<h2 class="chapter">6 Обработка данных</h2>
-
-
-
-<p>В данной главе описываются классы <code>mglData</code> и <code>mglDataC</code> для работы с массивами действительных и комплексных данных, определённые в <code>#include <mgl2/data.h></code> и <code>#include <mgl2/datac.h></code> соответственно. Оба класса являются наследниками абстрактного класса <code>mglDataA</code>, и могут быть использованы в аргументах всех функций рисования (см. <a href="#MathGL-core">MathGL core</a>). Классы содержат функции для выделения памяти и изменения размера данных, чтения данных из файла, численного дифференцирования, интегрирования, интерполяции и пр., заполнения по текстовой формуле и т.д. Классы позволяют работать с данными размерности не более 3 (как функции от трёх переменных – x,y,z). По умолчанию внутреннее представление данных использует тип mreal (и dual=std::complex<mreal> для <code>mglDataC</code>), который может быть сконфигурирован как float или double на этапе установки указав опцию <code>--enable-double</code> (см. <a href="#Installation">Installation</a>). Тип float удобен в силу меньшего размера занимаемой памяти и, как правило, достаточной для построения графиков точности. Однако, тип double имеет большую точность, что может быть важно, например, для осей с метками времени. Массивы которые могут быть созданы командами MGL отображаются Small Caps шрифтом (например, <small>DAT</small>).
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Public-variables" accesskey="1">Public variables</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-constructor" accesskey="2">Data constructor</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-resizing" accesskey="3">Data resizing</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-filling" accesskey="4">Data filling</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#File-I_002fO" accesskey="5">File I/O</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Make-another-data" accesskey="6">Make another data</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-changing" accesskey="7">Data changing</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Interpolation" accesskey="8">Interpolation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-information" accesskey="9">Data information</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Operators">Operators</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Global-functions">Global functions</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Evaluate-expression">Evaluate expression</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Special-data-classes">Special data classes</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Public-variables"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-constructor" accesskey="n" rel="next">Data constructor</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Peremennye"></a>
-<h3 class="section">6.1 Переменные</h3>
-
-
-
-<dl>
-<dt><a name="index-a-of-mglData"></a>Variable of mglData: <em><code>mreal *</code></em> <strong>a</strong></dt>
-<dt><a name="index-a-of-mglDataC"></a>Variable of mglDataC: <em><code>dual *</code></em> <strong>a</strong></dt>
-<dd><p>Указатель на массив данных. Это одномерный массив. Например, матрица [nx x ny x nz] представляется одномерным массивом длиной nx*ny*nz, где элемент с индексами {i, j, k} находится как a[i+nx*j+nx*ny*k] (индексы отсчитываются от нуля).
-</p></dd></dl>
-<dl>
-<dt><a name="index-nx-of-mglData"></a>Variable of mglData: <em><code>int</code></em> <strong>nx</strong></dt>
-<dt><a name="index-nx-of-mglDataC"></a>Variable of mglDataC: <em><code>long</code></em> <strong>nx</strong></dt>
-<dd><p>Размер массива по 1-ой размерности (’x’ размерности).
-</p></dd></dl>
-<dl>
-<dt><a name="index-ny-of-mglData"></a>Variable of mglData: <em><code>int</code></em> <strong>ny</strong></dt>
-<dt><a name="index-ny-of-mglDataC"></a>Variable of mglDataC: <em><code>long</code></em> <strong>ny</strong></dt>
-<dd><p>Размер массива по 2-ой размерности (’y’ размерности).
-</p></dd></dl>
-<dl>
-<dt><a name="index-nz-of-mglData"></a>Variable of mglData: <em><code>int</code></em> <strong>nz</strong></dt>
-<dt><a name="index-nz-of-mglDataC"></a>Variable of mglDataC: <em><code>long</code></em> <strong>nz</strong></dt>
-<dd><p>Размер массива по 3-ей размерности (’z’ размерности).
-</p></dd></dl>
-<dl>
-<dt><a name="index-id-of-mglData"></a>Variable of mglData: <em><code>std::string</code></em> <strong>id</strong></dt>
-<dt><a name="index-id-of-mglDataC"></a>Variable of mglDataC: <em><code>std::string</code></em> <strong>id</strong></dt>
-<dd><p>Имена колонки (или среза при nz>1) – один символ на колонку.
-</p></dd></dl>
-<dl>
-<dt><a name="index-link-of-mglData"></a>Variable of mglData: <em><code>bool</code></em> <strong>link</strong></dt>
-<dt><a name="index-link-of-mglDataC"></a>Variable of mglDataC: <em><code>bool</code></em> <strong>link</strong></dt>
-<dd><p>Флаг использования указателя на внешние данные, включает запрет на удаление массива данных.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-s-of-mglDataA"></a>Variable of mglDataA: <em><code>std::wstring</code></em> <strong>s</strong></dt>
-<dd><p>Имя массива данных, использующееся при разборе MGL скриптов.
-</p></dd></dl>
-<dl>
-<dt><a name="index-temp-of-mglDataA"></a>Variable of mglDataA: <em><code>bool</code></em> <strong>temp</strong></dt>
-<dd><p>Флаг временной переменной, которая может быть удалена в любой момент.
-</p></dd></dl>
-<dl>
-<dt><a name="index-func-of-mglDataA"></a>Variable of mglDataA: <em><code>void (*)(void *)</code></em> <strong>func</strong></dt>
-<dd><p>Указатель на callback функцию, которая будет вызвана при удлалении данных.
-</p></dd></dl>
-<dl>
-<dt><a name="index-o-of-mglDataA"></a>Variable of mglDataA: <em><code>void *</code></em> <strong>o</strong></dt>
-<dd><p>Указатель для callback функции.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetVal"></a>Метод класса <code>mglData</code>: <em><code>mreal</code></em> <strong>GetVal</strong> <em>(<code>long</code> i)</em></dt>
-<dt><a name="index-GetVal-1"></a>Метод класса <code>mglDataC</code>: <em><code>mreal</code></em> <strong>GetVal</strong> <em>(<code>long</code> i)</em></dt>
-<dt><a name="index-SetVal"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>SetVal</strong> <em>(<code>mreal</code> val, <code>long</code> i)</em></dt>
-<dt><a name="index-SetVal-1"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>SetVal</strong> <em>(<code>mreal</code> val, <code>long</code> i)</em></dt>
-<dd><p>Присваивает или возвращает значение используя "непрерывную" индексацию без проверки выхода за границы массива. Индекс <var>i</var> должен быть в диапазоне [0, nx*ny*nz-1].
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetNx-1"></a>Метод класса <code>mglDataA</code>: <em><code>long</code></em> <strong>GetNx</strong> <em>()</em></dt>
-<dt><a name="index-GetNy-1"></a>Метод класса <code>mglDataA</code>: <em><code>long</code></em> <strong>GetNy</strong> <em>()</em></dt>
-<dt><a name="index-GetNz-1"></a>Метод класса <code>mglDataA</code>: <em><code>long</code></em> <strong>GetNz</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fdata_005fget_005fnx"></a>Функция С: <em><code>long</code></em> <strong>mgl_data_get_nx</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dt><a name="index-mgl_005fdata_005fget_005fny"></a>Функция С: <em><code>long</code></em> <strong>mgl_data_get_ny</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dt><a name="index-mgl_005fdata_005fget_005fnz"></a>Функция С: <em><code>long</code></em> <strong>mgl_data_get_nz</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dd><p>Возвращает размер данных в направлении x, y и z соответственно.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mgl_005fdata_005fget_005fvalue"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_data_get_value</strong> <em>(<code>HCDT</code> dat, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fget_005fvalue"></a>Функция С: <em><code>dual</code></em> <strong>mgl_datac_get_value</strong> <em>(<code>HCDT</code> dat, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dt><a name="index-mgl_005fdata_005fvalue"></a>Функция С: <em><code>mreal *</code></em> <strong>mgl_data_value</strong> <em>(<code>HMDT</code> dat, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fvalue"></a>Функция С: <em><code>dual *</code></em> <strong>mgl_datac_value</strong> <em>(<code>HADT</code> dat, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fvalue"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_set_value</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> v, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset_005fvalue"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_set_value</strong> <em>(<code>HADT</code> dat, <code>dual</code> v, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dd><p>Присваивает или возвращает значение ячейки данных с проверкой выхода за пределы массива.
-</p></dd></dl>
-<dl>
-<dt><a name="index-mgl_005fdata_005fdata"></a>Функция С: <em><code>const mreal *</code></em> <strong>mgl_data_data</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dd><p>Возвращает указатель на внутренний массив данных.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mgl_005fdata_005fset_005ffunc"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_set_func</strong> <em>(<code>mglDataA *</code>dat, <code>void (*</code>func<code>)(void *)</code>, <code>void *</code>par)</em></dt>
-<dd><p>Задает указатель на callback функцию, которая будет вызвана при удлалении данных.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mgl_005fdata_005fset_005fname"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_set_name</strong> <em>(<code>mglDataA *</code>dat, <code>const char *</code>name)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fname_005fw"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_set_name_w</strong> <em>(<code>mglDataA *</code>dat, <code>const wchar_t *</code>name)</em></dt>
-<dd><p>Задает имя массива данных, использующееся при разборе MGL скриптов.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Data-constructor"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-resizing" accesskey="n" rel="next">Data resizing</a>, Previous: <a href="#Public-variables" accesskey="p" rel="prev">Public variables</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sozdanie-i-udalenie-dannykh"></a>
-<h3 class="section">6.2 Создание и удаление данных</h3>
-
-<a name="index-mglData"></a>
-
-
-<a name="new"></a><dl>
-<dt><a name="index-new"></a>Команда MGL: <em></em> <strong>new</strong> <em><small>DAT</small> [<code>nx=1</code> 'eq']</em></dt>
-<dt><a name="index-new-1"></a>Команда MGL: <em></em> <strong>new</strong> <em><small>DAT</small> <code>nx ny</code> ['eq']</em></dt>
-<dt><a name="index-new-2"></a>Команда MGL: <em></em> <strong>new</strong> <em><small>DAT</small> <code>nx ny nz</code> ['eq']</em></dt>
-<dt><a name="index-mglData-1"></a>Конструктор класса <code>mglData</code>: <em></em> <strong>mglData</strong> <em>(<code>int</code> mx=<code>1</code>, <code>int</code> my=<code>1</code>, <code>int</code> mz=<code>1</code>)</em></dt>
-<dt><a name="index-mglDataC"></a>Конструктор класса <code>mglDataC</code>: <em></em> <strong>mglDataC</strong> <em>(<code>int</code> mx=<code>1</code>, <code>int</code> my=<code>1</code>, <code>int</code> mz=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fdata"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_create_data</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fcreate_005fdata_005fsize"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_create_data_size</strong> <em>(<code>int</code> mx, <code>int</code> my, <code>int</code> mz)</em></dt>
-<dd><p>Выделяет память для массива данных и заполняет её нулями. Если указана формула <var>eq</var>, то данные заполняются также как при использовании <a href="#fill">fill</a>.
-</p></dd></dl>
-
-<a name="copy"></a><dl>
-<dt><a name="index-copy-1"></a>Команда MGL: <em></em> <strong>copy</strong> <em><small>DAT</small> dat2 ['eq'='']</em></dt>
-<dt><a name="index-copy-2"></a>Команда MGL: <em></em> <strong>copy</strong> <em><small>DAT</small> <code>val</code></em></dt>
-<dt><a name="index-mglData-2"></a>Конструктор класса <code>mglData</code>: <em></em> <strong>mglData</strong> <em>(<code>const mglData &</code>dat2)</em></dt>
-<dt><a name="index-mglData-3"></a>Конструктор класса <code>mglData</code>: <em></em> <strong>mglData</strong> <em>(<code>const mglDataA *</code>dat2)</em></dt>
-<dt><a name="index-mglData-4"></a>Конструктор класса <code>mglData</code>: <em></em> <strong>mglData</strong> <em>(<code>int</code> size, <code>const mreal *</code>dat2)</em></dt>
-<dt><a name="index-mglData-5"></a>Конструктор класса <code>mglData</code>: <em></em> <strong>mglData</strong> <em>(<code>int</code> size, <code>int</code> cols, <code>const mreal *</code>dat2)</em></dt>
-<dt><a name="index-mglData-6"></a>Конструктор класса <code>mglData</code>: <em></em> <strong>mglData</strong> <em>(<code>int</code> size, <code>const double *</code>dat2)</em></dt>
-<dt><a name="index-mglData-7"></a>Конструктор класса <code>mglData</code>: <em></em> <strong>mglData</strong> <em>(<code>int</code> size, <code>int</code> cols, <code>const double *</code>dat2)</em></dt>
-<dt><a name="index-mglData-8"></a>Конструктор класса <code>mglData</code>: <em></em> <strong>mglData</strong> <em>(<code>const double *</code>dat2, <code>int</code> size)</em></dt>
-<dt><a name="index-mglData-9"></a>Конструктор класса <code>mglData</code>: <em></em> <strong>mglData</strong> <em>(<code>const double *</code>dat2, <code>int</code> size, <code>int</code> cols)</em></dt>
-<dt><a name="index-mglDataC-1"></a>Конструктор класса <code>mglDataC</code>: <em></em> <strong>mglDataC</strong> <em>(<code>const mglDataA &</code>dat2)</em></dt>
-<dt><a name="index-mglDataC-2"></a>Конструктор класса <code>mglDataC</code>: <em></em> <strong>mglDataC</strong> <em>(<code>const mglDataA *</code>dat2)</em></dt>
-<dt><a name="index-mglDataC-3"></a>Конструктор класса <code>mglDataC</code>: <em></em> <strong>mglDataC</strong> <em>(<code>int</code> size, <code>const float *</code>dat2)</em></dt>
-<dt><a name="index-mglDataC-4"></a>Конструктор класса <code>mglDataC</code>: <em></em> <strong>mglDataC</strong> <em>(<code>int</code> size, <code>int</code> cols, <code>const float *</code>dat2)</em></dt>
-<dt><a name="index-mglDataC-5"></a>Конструктор класса <code>mglDataC</code>: <em></em> <strong>mglDataC</strong> <em>(<code>int</code> size, <code>const double *</code>dat2)</em></dt>
-<dt><a name="index-mglDataC-6"></a>Конструктор класса <code>mglDataC</code>: <em></em> <strong>mglDataC</strong> <em>(<code>int</code> size, <code>int</code> cols, <code>const double *</code>dat2)</em></dt>
-<dt><a name="index-mglDataC-7"></a>Конструктор класса <code>mglDataC</code>: <em></em> <strong>mglDataC</strong> <em>(<code>int</code> size, <code>const dual *</code>dat2)</em></dt>
-<dt><a name="index-mglDataC-8"></a>Конструктор класса <code>mglDataC</code>: <em></em> <strong>mglDataC</strong> <em>(<code>int</code> size, <code>int</code> cols, <code>const dual *</code>dat2)</em></dt>
-<dd><p>Копирует данные из другого экземпляра данных. Если указана формула <var>eq</var>, то данные заполняются также как при использовании <a href="#fill">fill</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-copy-3"></a>Команда MGL: <em></em> <strong>copy</strong> <em><small>REDAT</small> <small>IMDAT</small> dat2</em></dt>
-<dd><p>Копирует действительную и мнимую часть данных из комплексного массива данных <var>dat2</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-copy-4"></a>Команда MGL: <em></em> <strong>copy</strong> <em><small>DAT</small> 'name'</em></dt>
-<dd><p>Копирует данные из другого экземпляра данных с именем <var>name</var>. При этом имя <var>name</var> может быть некорректным с точки зрения MGL (например, взятым из HDF5 файла).
-</p></dd></dl>
-
-
-
-<dl>
-<dt><a name="index-read"></a>Команда MGL: <em></em> <strong>read</strong> <em><small>DAT</small> 'fname'</em></dt>
-<dt><a name="index-mglData-10"></a>Конструктор класса <code>mglData</code>: <em></em> <strong>mglData</strong> <em>(<code>const char *</code>fname)</em></dt>
-<dt><a name="index-mglDataC-9"></a>Конструктор класса <code>mglDataC</code>: <em></em> <strong>mglDataC</strong> <em>(<code>const char *</code>fname)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fdata_005ffile"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_create_data_file</strong> <em>(<code>const char *</code>fname)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fdatac_005ffile"></a>Функция С: <em><code>HADT</code></em> <strong>mgl_create_datac_file</strong> <em>(<code>const char *</code>fname)</em></dt>
-<dd><p>Читает данные из текстового файла с автоматическим определением размеров массива.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-delete"></a>Команда MGL: <em></em> <strong>delete</strong> <em>dat</em></dt>
-<dt><a name="index-delete-1"></a>Команда MGL: <em></em> <strong>delete</strong> <em>'name'</em></dt>
-<dt><a name="index-_007emglData"></a>Destructor on <code>mglData</code>: <em></em> <strong>~mglData</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fdelete_005fdata"></a>Функция С: <em><code>void</code></em> <strong>mgl_delete_data</strong> <em>(<code>HMDT</code> dat)</em></dt>
-<dt><a name="index-_007emglDataC"></a>Destructor on <code>mglDataC</code>: <em></em> <strong>~mglDataC</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fdelete_005fdatac"></a>Функция С: <em><code>void</code></em> <strong>mgl_delete_datac</strong> <em>(<code>HADT</code> dat)</em></dt>
-<dd><p>Удаляет массив данных из памяти.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Data-resizing"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-filling" accesskey="n" rel="next">Data filling</a>, Previous: <a href="#Data-constructor" accesskey="p" rel="prev">Data constructor</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Izmenenie-razmerov-dannykh"></a>
-<h3 class="section">6.3 Изменение размеров данных</h3>
-
-<a name="index-Create"></a>
-<a name="index-Rearrange"></a>
-<a name="index-Extend"></a>
-<a name="index-Transpose"></a>
-<a name="index-Squeeze"></a>
-<a name="index-Crop"></a>
-<a name="index-Insert"></a>
-<a name="index-Delete"></a>
-<a name="index-Sort"></a>
-<a name="index-Clean"></a>
-<a name="index-Join"></a>
-
-
-<dl>
-<dt><a name="index-new-3"></a>Команда MGL: <em></em> <strong>new</strong> <em><small>DAT</small> [<code>nx=1 ny=1 nz=1</code>]</em></dt>
-<dt><a name="index-Create-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Create</strong> <em>(<code>int</code> mx, <code>int</code> my=<code>1</code>, <code>int</code> mz=<code>1</code>)</em></dt>
-<dt><a name="index-Create-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Create</strong> <em>(<code>int</code> mx, <code>int</code> my=<code>1</code>, <code>int</code> mz=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fcreate"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_create</strong> <em>(<code>HMDT</code> dat, <code>int</code> mx, <code>int</code> my, <code>int</code> mz)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fcreate"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_create</strong> <em>(<code>HADT</code> dat, <code>int</code> mx, <code>int</code> my, <code>int</code> mz)</em></dt>
-<dd><p>Создает/пересоздает массив данных указанного размера и заполняет его нулями. Ничего не делает при <var>mx</var>, <var>my</var>, <var>mz</var> отрицательных или равных нулю.
-</p></dd></dl>
-
-<a name="rearrange"></a><dl>
-<dt><a name="index-rearrange"></a>Команда MGL: <em></em> <strong>rearrange</strong> <em>dat <code>mx [my=0 mz=0]</code></em></dt>
-<dt><a name="index-Rearrange-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Rearrange</strong> <em>(<code>int</code> mx, <code>int</code> my=<code>0</code>, <code>int</code> mz=<code>0</code>)</em></dt>
-<dt><a name="index-Rearrange-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Rearrange</strong> <em>(<code>int</code> mx, <code>int</code> my=<code>0</code>, <code>int</code> mz=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005frearrange"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_rearrange</strong> <em>(<code>HMDT</code> dat, <code>int</code> mx, <code>int</code> my, <code>int</code> mz)</em></dt>
-<dt><a name="index-mgl_005fdatac_005frearrange"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_rearrange</strong> <em>(<code>HADT</code> dat, <code>int</code> mx, <code>int</code> my, <code>int</code> mz)</em></dt>
-<dd><p>Изменяет размерность данных без изменения самого массива данных, так что результирующий массив <var>mx</var>*<var>my</var>*<var>mz</var> < nx*ny*nz. Если один из параметров <var>my</var> или <var>mz</var> ноль, то он будет выбран оптимальным образом. Например, если <var>my</var>=0, то будет <var>my</var>=nx*ny*nz/<var>mx</var> и <var>mz</var>=1.
-</p></dd></dl>
-
-<a name="transpose"></a><dl>
-<dt><a name="index-transpose"></a>Команда MGL: <em></em> <strong>transpose</strong> <em>dat ['dim'='yxz']</em></dt>
-<dt><a name="index-Transpose-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Transpose</strong> <em>(<code>const char *</code>dim=<code>"yx"</code>)</em></dt>
-<dt><a name="index-Transpose-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Transpose</strong> <em>(<code>const char *</code>dim=<code>"yx"</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005ftranspose"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_transpose</strong> <em>(<code>const char *</code>dim)</em></dt>
-<dt><a name="index-mgl_005fdatac_005ftranspose"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_transpose</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dim)</em></dt>
-<dd><p>Транспонирует (меняет порядок размерностей) массив данных. Новый порядок размерностей задается строкой <var>dim</var>. Функция может быть полезна для транспонирования одномерных (или квазиодномерных) массивов после чтения их из файла.
-</p></dd></dl>
-
-<a name="extend"></a><dl>
-<dt><a name="index-extend"></a>Команда MGL: <em></em> <strong>extend</strong> <em>dat <code>n1 [n2=0]</code></em></dt>
-<dt><a name="index-Extend-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Extend</strong> <em>(<code>int</code> n1, <code>int</code> n2=<code>0</code>)</em></dt>
-<dt><a name="index-Extend-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Extend</strong> <em>(<code>int</code> n1, <code>int</code> n2=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fextend"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_extend</strong> <em>(<code>HMDT</code> dat, <code>int</code> n1, <code>int</code> n2)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fextend"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_extend</strong> <em>(<code>HADT</code> dat, <code>int</code> n1, <code>int</code> n2)</em></dt>
-<dd><p>Увеличивает размер данных путем вставки (|<var>n1</var>|+1) новых срезов после (для <var>n1</var>>0) или перед (для <var>n1</var><0) существующими данными. Можно добавить сразу 2 размерности для 1d массива, используя второй параметр <var>n2</var>. Данные в новые срезы будут скопированы из существующих. Например, для <var>n1</var>>0 новый массив будет
-a_ij^new = a_i^old where j=0...<var>n1</var>. Соответственно, для <var>n1</var><0 новый массив будет a_ij^new = a_j^old, где i=0...|<var>n1</var>|.
-</p></dd></dl>
-
-<a name="squeeze"></a><dl>
-<dt><a name="index-squeeze"></a>Команда MGL: <em></em> <strong>squeeze</strong> <em>dat <code>rx [ry=1 rz=1 sm=off]</code></em></dt>
-<dt><a name="index-Squeeze-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Squeeze</strong> <em>(<code>int</code> rx, <code>int</code> ry=<code>1</code>, <code>int</code> rz=<code>1</code>, <code>bool</code> smooth=<code>false</code>)</em></dt>
-<dt><a name="index-Squeeze-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Squeeze</strong> <em>(<code>int</code> rx, <code>int</code> ry=<code>1</code>, <code>int</code> rz=<code>1</code>, <code>bool</code> smooth=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fsqueeze"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_squeeze</strong> <em>(<code>HMDT</code> dat, <code>int</code> rx, <code>int</code> ry, <code>int</code> rz, <code>int</code> smooth)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fsqueeze"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_squeeze</strong> <em>(<code>HADT</code> dat, <code>int</code> rx, <code>int</code> ry, <code>int</code> rz, <code>int</code> smooth)</em></dt>
-<dd><p>Уменьшает размер данных путём удаления элементов с индексами не кратными <var>rx</var>, <var>ry</var>, <var>rz</var> соответственно. Параметр <var>smooth</var> задает использовать сглаживания
-(т.е. out[i]=\sum_{j=i,i+r} a[j]/r) или нет (т.е. out[i]=a[j*r]).
-</p></dd></dl>
-
-<a name="crop"></a><dl>
-<dt><a name="index-crop"></a>Команда MGL: <em></em> <strong>crop</strong> <em>dat <code>n1 n2</code> 'dir'</em></dt>
-<dt><a name="index-Crop-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Crop</strong> <em>(<code>int</code> n1, <code>int</code> n2, <code>char</code> dir=<code>'x'</code>)</em></dt>
-<dt><a name="index-Crop-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Crop</strong> <em>(<code>int</code> n1, <code>int</code> n2, <code>char</code> dir=<code>'x'</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fcrop"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_crop</strong> <em>(<code>HMDT</code> dat, <code>int</code> n1, <code>int</code> n2, <code>char</code> dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fcrop"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_crop</strong> <em>(<code>HADT</code> dat, <code>int</code> n1, <code>int</code> n2, <code>char</code> dir)</em></dt>
-<dd><p>Обрезает границы данных при <var>i</var><<var>n1</var> и <var>i</var>><var>n2</var> (при <var>n2</var>>0) или <var>i</var>><code>n[xyz]</code>-<var>n2</var> (при <var>n2</var><=0) вдоль направления <var>dir</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-crop-1"></a>Команда MGL: <em></em> <strong>crop</strong> <em>dat 'how'</em></dt>
-<dt><a name="index-Crop-3"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Crop</strong> <em>(<code>const char *</code>how=<code>"235x"</code>)</em></dt>
-<dt><a name="index-Crop-4"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Crop</strong> <em>(<code>const char *</code>how=<code>"235x"</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fcrop_005fopt"></a>Функция Сn: <em><code>void</code></em> <strong>mgl_data_crop_opt</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>how)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fcrop_005fopt"></a>Функция Сn: <em><code>void</code></em> <strong>mgl_datac_crop_opt</strong> <em>(<code>HADT</code> dat, <code>const char *</code>how)</em></dt>
-<dd><p>Обрезает дальний край данных, чтобы сделать их более оптимальным для быстрого преобразования Фурье. Размер массива будет равен наиболее близким к исходному из 2^n*3^m*5^l. Строка <var>how</var> может содержать: ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’ для направлений, и ‘<samp>2</samp>’, ‘<samp>3</samp>’, ‘<samp>5</samp>’ для использования соответствующего основания.
-</p></dd></dl>
-
-<a name="insert"></a><dl>
-<dt><a name="index-insert"></a>Команда MGL: <em></em> <strong>insert</strong> <em>dat 'dir' <code>[pos=off num=0]</code></em></dt>
-<dt><a name="index-Insert-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Insert</strong> <em>(<code>char</code> dir, <code>int</code> pos=<code>0</code>, <code>int</code> num=<code>1</code>)</em></dt>
-<dt><a name="index-Insert-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Insert</strong> <em>(<code>char</code> dir, <code>int</code> pos=<code>0</code>, <code>int</code> num=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005finsert"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_insert</strong> <em>(<code>HMDT</code> dat, <code>char</code> dir, <code>int</code> pos, <code>char</code> num)</em></dt>
-<dt><a name="index-mgl_005fdatac_005finsert"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_insert</strong> <em>(<code>HADT</code> dat, <code>char</code> dir, <code>int</code> pos, <code>char</code> num)</em></dt>
-<dd><p>Вставляет <var>num</var> срезов вдоль направления <var>dir</var> с позиции <var>pos</var> и заполняет их нулями.
-</p></dd></dl>
-
-<a name="delete"></a><dl>
-<dt><a name="index-delete-2"></a>Команда MGL: <em></em> <strong>delete</strong> <em>dat 'dir' <code>[pos=off num=0]</code></em></dt>
-<dt><a name="index-Delete-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Delete</strong> <em>(<code>char</code> dir, <code>int</code> pos=<code>0</code>, <code>int</code> num=<code>1</code>)</em></dt>
-<dt><a name="index-Delete-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Delete</strong> <em>(<code>char</code> dir, <code>int</code> pos=<code>0</code>, <code>int</code> num=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fdelete"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_delete</strong> <em>(<code>HMDT</code> dat, <code>char</code> dir, <code>int</code> pos, <code>char</code> num)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fdelete"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_delete</strong> <em>(<code>HADT</code> dat, <code>char</code> dir, <code>int</code> pos, <code>char</code> num)</em></dt>
-<dd><p>Удаляет <var>num</var> срезов вдоль направления <var>dir</var> с позиции <var>pos</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-delete-3"></a>Команда MGL: <em></em> <strong>delete</strong> <em>dat</em></dt>
-<dt><a name="index-delete-4"></a>Команда MGL: <em></em> <strong>delete</strong> <em>'name'</em></dt>
-<dd><p>Удаляет массив данных из памяти.
-</p></dd></dl>
-
-<a name="sort"></a><dl>
-<dt><a name="index-sort"></a>Команда MGL: <em></em> <strong>sort</strong> <em>dat <code>idx [idy=-1]</code></em></dt>
-<dt><a name="index-Sort-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Sort</strong> <em>(<code>lond</code> idx, <code>long</code> idy=<code>-1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fsort"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_sort</strong> <em>(<code>HMDT</code> dat, <code>lond</code> idx, <code>long</code> idy)</em></dt>
-<dd><p>Сортирует строки (или срезы в 3D случае) по значениям в указанной колонке <var>idx</var> (или ячейках {<var>idx</var>,<var>idy</var>} для 3D случая). Не используйте в многопоточных функциях!
-</p></dd></dl>
-
-<a name="clean"></a><dl>
-<dt><a name="index-clean"></a>Команда MGL: <em></em> <strong>clean</strong> <em>dat <code>idx</code></em></dt>
-<dt><a name="index-Clean-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Clean</strong> <em>(<code>lond</code> idx)</em></dt>
-<dt><a name="index-mgl_005fdata_005fclean"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_clean</strong> <em>(<code>HMDT</code> dat, <code>lond</code> idx)</em></dt>
-<dd><p>Удаляет строки в которых значения для заданной колонки <var>idx</var> совпадают со значениями в следующей строке.
-</p></dd></dl>
-
-
-<a name="join"></a><dl>
-<dt><a name="index-join"></a>Команда MGL: <em></em> <strong>join</strong> <em>dat vdat [v2dat ...]</em></dt>
-<dt><a name="index-Join-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Join</strong> <em>(<code>const mglDataA &</code>vdat)</em></dt>
-<dt><a name="index-Join-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Join</strong> <em>(<code>const mglDataA &</code>vdat)</em></dt>
-<dt><a name="index-mgl_005fdata_005fjoin"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_join</strong> <em>(<code>HMDT</code> dat, <code>HCDT</code> vdat)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fjoin"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_join</strong> <em>(<code>HADT</code> dat, <code>HCDT</code> vdat)</em></dt>
-<dd><p>Объединяет данные из массива <var>vdat</var> с данными массива <var>dat</var>. При этом, функция увеличивает размер массива <var>dat</var>: в z-направлении для массивов с одинаковыми размерами по x и y; в y-направлении для массивов с одинаковыми размерами по x; в x-направлении в остальных случаях.
-</p></dd></dl>
-
-
-<hr>
-<a name="Data-filling"></a>
-<div class="header">
-<p>
-Next: <a href="#File-I_002fO" accesskey="n" rel="next">File I/O</a>, Previous: <a href="#Data-resizing" accesskey="p" rel="prev">Data resizing</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Zapolnenie-dannykh"></a>
-<h3 class="section">6.4 Заполнение данных</h3>
-
-<a name="index-Fill-1"></a>
-<a name="index-Modify"></a>
-<a name="index-Set"></a>
-<a name="index-List"></a>
-<a name="index-Var"></a>
-<a name="index-Refill"></a>
-
-<a name="list"></a><dl>
-<dt><a name="index-list"></a>Команда MGL: <em></em> <strong>list</strong> <em><small>DAT</small> <code>v1 ...</code></em></dt>
-<dd><p>Создает новый массив данных <var>dat</var> и заполняет его числовыми значениями аргументов <code>v1 ...</code>. Команда может создавать одно- и двухмерные массивы с произвольными значениями. Для создания 2d массива следует использовать разделитель ‘<samp>|</samp>’, который означает начало новой строки данных. Размер массива данных будет [maximal of row sizes * number of rows]. Например, команда <code>list 1 | 2 3</code> создаст массив [1 0; 2 3]. Замечу, что максимальное число аргументов равно 1000.
-</p></dd></dl>
-<dl>
-<dt><a name="index-list-1"></a>Команда MGL: <em></em> <strong>list</strong> <em><small>DAT</small> d1 ...</em></dt>
-<dd><p>Создает новый массив данных <var>dat</var> и заполняет его значениями из массивов <var>d1 ...</var>. Команда может создавать двух- и трёхмерные (если аргументы – двумерные массивы) массивы. Меньшая размерность всех массивов в аргументах должна совпадать. В противном случае аргумент (массив) будет пропущен.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Set-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const mreal *</code>A, <code>int</code> NX, <code>int</code> NY=<code>1</code>, <code>int</code> NZ=<code>1</code>)</em></dt>
-<dt><a name="index-Set-2"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const double *</code>A, <code>int</code> NX, <code>int</code> NY=<code>1</code>, <code>int</code> NZ=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fmreal"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_set_mreal</strong> <em>(<code>HMDT</code> dat, <code>const mreal *</code>A, <code>int</code> NX, <code>int</code> NY, <code>int</code> NZ)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fdouble"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_set_double</strong> <em>(<code>HMDT</code> dat, <code>const double *</code>A, <code>int</code> NX, <code>int</code> NY, <code>int</code> NZ)</em></dt>
-<dt><a name="index-Set-3"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const float *</code>A, <code>int</code> NX, <code>int</code> NY=<code>1</code>, <code>int</code> NZ=<code>1</code>)</em></dt>
-<dt><a name="index-Set-4"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const double *</code>A, <code>int</code> NX, <code>int</code> NY=<code>1</code>, <code>int</code> NZ=<code>1</code>)</em></dt>
-<dt><a name="index-Set-5"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const dual *</code>A, <code>int</code> NX, <code>int</code> NY=<code>1</code>, <code>int</code> NZ=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset_005ffloat"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_set_float</strong> <em>(<code>HADT</code> dat, <code>const mreal *</code>A, <code>int</code> NX, <code>int</code> NY, <code>int</code> NZ)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset_005fdouble"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_set_double</strong> <em>(<code>HADT</code> dat, <code>const double *</code>A, <code>int</code> NX, <code>int</code> NY, <code>int</code> NZ)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset_005fcomplex"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_set_complex</strong> <em>(<code>HADT</code> dat, <code>const dual *</code>A, <code>int</code> NX, <code>int</code> NY, <code>int</code> NZ)</em></dt>
-<dd><p>Выделяет память и копирует данные из массивов типа <code>mreal*</code> или <code>double*</code>, т.е. из массивов определённых как <code>mreal a[NX*NY*NZ];</code>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Set-6"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const mreal **</code>A, <code>int</code> N1, <code>int</code> N2)</em></dt>
-<dt><a name="index-Set-7"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const double **</code>A, <code>int</code> N1, <code>int</code> N2)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fmreal2"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_set_mreal2</strong> <em>(<code>HMDT</code> dat, <code>const mreal **</code>A, <code>int</code> N1, <code>int</code> N2)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fdouble2"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_set_double2</strong> <em>(<code>HMDT</code> dat, <code>const double **</code>A, <code>int</code> N1, <code>int</code> N2)</em></dt>
-<dd><p>Выделяет память и копирует данные из массивов типа <code>mreal**</code> или <code>double**</code> с размерностями <var>N1</var>, <var>N2</var>, т.е. из массивов определённых как <code>mreal a[N1][N2];</code>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Set-8"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const mreal ***</code>A, <code>int</code> N1, <code>int</code> N2)</em></dt>
-<dt><a name="index-Set-9"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const double ***</code>A, <code>int</code> N1, <code>int</code> N2)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fmreal3"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_set_mreal3</strong> <em>(<code>HMDT</code> dat, <code>const mreal ***</code>A, <code>int</code> N1, <code>int</code> N2)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fdouble3"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_set_double3</strong> <em>(<code>HMDT</code> dat, <code>const double ***</code>A, <code>int</code> N1, <code>int</code> N2)</em></dt>
-<dd><p>Выделяет память и копирует данные из массивов типа <code>mreal***</code> или <code>double***</code> с размерностями <var>N1</var>, <var>N2</var>, <var>N3</var>, т.е. из массивов определённых как <code>mreal a[N1][N2][N3];</code>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Set-10"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>gsl_vector *</code>v)</em></dt>
-<dt><a name="index-Set-11"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>gsl_vector *</code>v)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fvector"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_set_vector</strong> <em>(<code>HMDT</code> dat, <code>gsl_vector *</code>v)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset_005fvector"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_set_vector</strong> <em>(<code>HADT</code> dat, <code>gsl_vector *</code>v)</em></dt>
-<dd><p>Выделяет память и копирует данные из структуры типа <code>gsl_vector *</code>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Set-12"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>gsl_matrix *</code>m)</em></dt>
-<dt><a name="index-Set-13"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>gsl_matrix *</code>m)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fmatrix"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_set_matrix</strong> <em>(<code>HMDT</code> dat, <code>gsl_matrix *</code>m)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset_005fmatrix"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_set_matrix</strong> <em>(<code>HADT</code> dat, <code>gsl_matrix *</code>m)</em></dt>
-<dd><p>Выделяет память и копирует данные из структуры типа <code>gsl_matrix *</code>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Set-14"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const mglDataA &</code>from)</em></dt>
-<dt><a name="index-Set-15"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>HCDT</code> from)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_set</strong> <em>(<code>HMDT</code> dat, <code>HCDT</code> from)</em></dt>
-<dt><a name="index-Set-16"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const mglDataA &</code>from)</em></dt>
-<dt><a name="index-Set-17"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>HCDT</code> from)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_set</strong> <em>(<code>HADT</code> dat, <code>HCDT</code> from)</em></dt>
-<dd><p>Выделяет память и копирует данные из другого экземпляра данных <var>from</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Set-18"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const mglDataA &</code>re, <code>const mglDataA &</code>im)</em></dt>
-<dt><a name="index-Set-19"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>HCDT</code> re, <code>HCDT</code> im)</em></dt>
-<dt><a name="index-SetAmpl"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>SetAmpl</strong> <em>(<code>HCDT</code> ampl, <code>const mglDataA &</code>phase)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset_005fri"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_set_ri</strong> <em>(<code>HADT</code> dat, <code>HCDT</code> re, <code>HCDT</code> im)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset_005fap"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_set_ap</strong> <em>(<code>HADT</code> dat, <code>HCDT</code> ampl, <code>HCDT</code> phase)</em></dt>
-<dd><p>Выделяет память и копирует данные из экземпляра данных для действительной <var>re</var> и мнимой <var>im</var> частей комплексного массива данных.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Set-20"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const std::vector<int> &</code>d)</em></dt>
-<dt><a name="index-Set-21"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const std::vector<int> &</code>d)</em></dt>
-<dt><a name="index-Set-22"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const std::vector<float> &</code>d)</em></dt>
-<dt><a name="index-Set-23"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const std::vector<float> &</code>d)</em></dt>
-<dt><a name="index-Set-24"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const std::vector<double> &</code>d)</em></dt>
-<dt><a name="index-Set-25"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const std::vector<double> &</code>d)</em></dt>
-<dt><a name="index-Set-26"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const std::vector<dual> &</code>d)</em></dt>
-<dd><p>Выделяет память и копирует данные из массива типа <code>std::vector<T></code>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Set-27"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const char *</code>str, <code>int</code> NX, <code>int</code> NY=<code>1</code>, <code>int</code> NZ=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fvalues"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_set_values</strong> <em>(<code>const char *</code>str, <code>int</code> NX, <code>int</code> NY, <code>int</code> NZ)</em></dt>
-<dt><a name="index-Set-28"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Set</strong> <em>(<code>const char *</code>str, <code>int</code> NX, <code>int</code> NY=<code>1</code>, <code>int</code> NZ=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset_005fvalues"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_set_values</strong> <em>(<code>const char *</code>str, <code>int</code> NX, <code>int</code> NY, <code>int</code> NZ)</em></dt>
-<dd><p>Выделяет память и сканирует массив данных из строки.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-SetList"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>SetList</strong> <em>(<code>long</code> n, ...)</em></dt>
-<dd><p>Allocate memory and set data from variable argument list of <em>double</em> values. Note, you need to specify decimal point ‘<samp>.</samp>’ for integer values! For example, the code <code>SetList(2,0.,1.);</code> is correct, but the code <code>SetList(2,0,1);</code> is incorrect.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-Link"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Link</strong> <em>(<code>mglData &</code>from)</em></dt>
-<dt><a name="index-Link-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Link</strong> <em>(<code>mreal *</code>A, <code>int</code> NX, <code>int</code> NY=<code>1</code>, <code>int</code> NZ=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005flink"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_link</strong> <em>(<code>HMDT</code> dat, <code>const mreal *</code>A, <code>int</code> NX, <code>int</code> NY, <code>int</code> NZ)</em></dt>
-<dt><a name="index-Link-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Link</strong> <em>(<code>mglDataC &</code>from)</em></dt>
-<dt><a name="index-Link-3"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Link</strong> <em>(<code>dual *</code>A, <code>int</code> NX, <code>int</code> NY=<code>1</code>, <code>int</code> NZ=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdatac_005flink"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_link</strong> <em>(<code>HADT</code> dat, <code>const mreal *</code>A, <code>int</code> NX, <code>int</code> NY, <code>int</code> NZ)</em></dt>
-<dd><p>Устанавливает флаг использования внешнего массива данных, которые не будут удалены. Флаг может быть возвращён в исходное состояние и создан новый внутренний массив если использовались функции изменяющие размер данных.
-</p></dd></dl>
-
-<a name="var"></a><dl>
-<dt><a name="index-var"></a>Команда MGL: <em></em> <strong>var</strong> <em><small>DAT</small> <code>num v1 [v2=nan]</code></em></dt>
-<dd><p>Создает новый одномерный массив данных <var>dat</var> размером <var>num</var>, и заполняет его равномерно в диапазоне [<var>v1</var>, <var>v2</var>]. Если <var>v2</var>=<code>nan</code>, то используется <var>v2=v1</var>.
-</p></dd></dl>
-
-<a name="fill"></a><dl>
-<dt><a name="index-fill-3"></a>Команда MGL: <em></em> <strong>fill</strong> <em>dat v1 v2 ['dir'='x']</em></dt>
-<dt><a name="index-Fill-5"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>mreal</code> v1, <code>mreal</code> v2, <code>char</code> dir=<code>'x'</code>)</em></dt>
-<dt><a name="index-Fill-6"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>dual</code> v1, <code>dual</code> v2, <code>char</code> dir=<code>'x'</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005ffill"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_fill</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> v1, <code>mreal</code> v2, <code>char</code> dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005ffill"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_fill</strong> <em>(<code>HADT</code> dat, <code>dual</code> v1, <code>dual</code> v2, <code>char</code> dir)</em></dt>
-<dd><p>Заполняет значениями равно распределёнными в диапазоне [<var>x1</var>, <var>x2</var>] в направлении <var>dir</var>={‘<samp>x</samp>’,‘<samp>y</samp>’,‘<samp>z</samp>’}.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-fill-4"></a>Команда MGL: <em></em> <strong>fill</strong> <em>dat 'eq'[vdat wdat]</em></dt>
-<dt><a name="index-Fill-7"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>eq, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fill-8"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>eq, <code>const mglDataA &</code>vdat, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fill-9"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>eq, <code>const mglDataA &</code>vdat, <code>const mglDataA &</code>wdat, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fill-10"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>eq, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fill-11"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>eq, <code>const mglDataA &</code>vdat, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Fill-12"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>eq, <code>const mglDataA &</code>vdat, <code>const mglDataA &</code>wdat, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005ffill_005feq-1"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_fill_eq</strong> <em>(<code>HMGL</code> gr, <code>HMDT</code> dat, <code>const char *</code>eq, <code>HCDT</code> vdat, <code>HCDT</code> wdat, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fdatac_005ffill_005feq"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_fill_eq</strong> <em>(<code>HMGL</code> gr, <code>HADT</code> dat, <code>const char *</code>eq, <code>HCDT</code> vdat, <code>HCDT</code> wdat, <code>const char *</code>opt)</em></dt>
-<dd><p>Заполняет значениями вычисленными по формуле <var>eq</var>. Формула представляет собой произвольное выражение, зависящее от переменных ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’, ‘<samp>u</samp>’, ‘<samp>v</samp>’, ‘<samp>w</samp>’. Координаты ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’ полагаются меняющимися в диапазоне <var>Min</var> x <var>Max</var> (в отличие от функции <code>Modify</code>). Переменная ‘<samp>u</samp>’ – значения исходного массива, переменные ‘<samp>v</samp>’, ‘<samp>w</samp>’ – значения массивов <var>vdat</var>, <var>wdat</var>. Последние могут быть <code>NULL</code>, т.е. опущены.
-</p></dd></dl>
-
-<a name="modify"></a><dl>
-<dt><a name="index-modify"></a>Команда MGL: <em></em> <strong>modify</strong> <em>dat 'eq' [<code>dim=0</code>]</em></dt>
-<dt><a name="index-modify-1"></a>Команда MGL: <em></em> <strong>modify</strong> <em>dat 'eq' vdat [wdat]</em></dt>
-<dt><a name="index-Modify-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Modify</strong> <em>(<code>const char *</code>eq, <code>int</code> dim=<code>0</code>)</em></dt>
-<dt><a name="index-Modify-2"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Modify</strong> <em>(<code>const char *</code>eq, <code>const mglDataA &</code>v)</em></dt>
-<dt><a name="index-Modify-3"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Modify</strong> <em>(<code>const char *</code>eq, <code>const mglDataA &</code>v, <code>const mglDataA &</code>w)</em></dt>
-<dt><a name="index-Modify-4"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Modify</strong> <em>(<code>const char *</code>eq, <code>int</code> dim=<code>0</code>)</em></dt>
-<dt><a name="index-Modify-5"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Modify</strong> <em>(<code>const char *</code>eq, <code>const mglDataA &</code>v)</em></dt>
-<dt><a name="index-Modify-6"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Modify</strong> <em>(<code>const char *</code>eq, <code>const mglDataA &</code>v, <code>const mglDataA &</code>w)</em></dt>
-<dt><a name="index-mgl_005fdata_005fmodify"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_modify</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>eq, <code>int</code> dim)</em></dt>
-<dt><a name="index-mgl_005fdata_005fmodify_005fvw"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_modify_vw</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>eq, <code>HCDT</code> v, <code>HCDT</code> w)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fmodify"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_modify</strong> <em>(<code>HADT</code> dat, <code>const char *</code>eq, <code>int</code> dim)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fmodify_005fvw"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_modify_vw</strong> <em>(<code>HADT</code> dat, <code>const char *</code>eq, <code>HCDT</code> v, <code>HCDT</code> w)</em></dt>
-<dd><p>Аналогично предыдущему с координатами ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’, меняющимися в диапазоне [0,1]. Если указан <var>dim</var>>0, то изменяются только слои >=<var>dim</var>.
-</p></dd></dl>
-
-<a name="fillsample"></a><dl>
-<dt><a name="index-fillsample"></a>Команда MGL: <em></em> <strong>fillsample</strong> <em>dat 'how'</em></dt>
-<dt><a name="index-FillSample"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>FillSample</strong> <em>(<code>const char *</code>how)</em></dt>
-<dt><a name="index-mgl_005fdata_005ffill_005fsample"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_fill_sample</strong> <em>(<code>HMDT</code> a, <code>const char *</code>how)</em></dt>
-<dd><p>Заполняет массив данных ’x’ или ’k’ значениями для преобразований Ханкеля (’h’) или Фурье (’f’).
-</p></dd></dl>
-
-
-<a name="datagrid"></a><dl>
-<dt><a name="index-datagrid-1"></a>Команда MGL: <em></em> <strong>datagrid</strong> <em>dat xdat ydat zdat</em></dt>
-<dt><a name="index-Grid-5"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Grid</strong> <em>(<code>HMGL</code> gr, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Grid-6"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Grid</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>mglPoint</code> p1, <code>mglPoint</code> p2)</em></dt>
-<dt><a name="index-mgl_005fdata_005fgrid-1"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_grid</strong> <em>(<code>HMGL</code> gr, <code>HMDT</code> u, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fdata_005fgrid_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_grid_xy</strong> <em>(<code>HMDT</code> u, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>mreal</code> x1, <code>mreal</code> x2, <code>mreal</code> y1, <code>mreal</code> y2)</em></dt>
-<dd><p>Заполняет значения массива результатом линейной интерполяции (считая координаты равнораспределенными в диапазоне осей координат или в диапазоне [x1,x2]*[y1,y2]) по триангулированной поверхности, найденной по произвольно расположенным точкам ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’. NAN значение используется для точек сетки вне триангулированной поверхности. См. раздел <a href="#Making-regular-data">Making regular data</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-<a name="put"></a><dl>
-<dt><a name="index-put"></a>Команда MGL: <em></em> <strong>put</strong> <em>dat <code>val [i=all j=all k=all]</code></em></dt>
-<dt><a name="index-Put"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Put</strong> <em>(<code>mreal</code> val, <code>int</code> i=<code>-1</code>, <code>int</code> j=<code>-1</code>, <code>int</code> k=<code>-1</code>)</em></dt>
-<dt><a name="index-Put-1"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Put</strong> <em>(<code>dual</code> val, <code>int</code> i=<code>-1</code>, <code>int</code> j=<code>-1</code>, <code>int</code> k=<code>-1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fput_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_put_val</strong> <em>(<code>HMDT</code> a, <code>mreal</code> val, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fput_005fval"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_put_val</strong> <em>(<code>HADT</code> a, <code>dual</code> val, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dd><p>Присваивает значения (под-)массива <var>dat</var>[<var>i</var>, <var>j</var>, <var>k</var>] = <var>val</var>. Индексы <var>i</var>, <var>j</var>, <var>k</var> равные ‘<samp>-1</samp>’ задают значения <var>val</var> для всего диапазона соответствующего направления(ий). Например, <code>Put(val,-1,0,-1);</code> задает a[i,0,j]=<var>val</var> для i=0...(nx-1), j=0...(nz-1).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-put-1"></a>Команда MGL: <em></em> <strong>put</strong> <em>dat vdat [<code>i=all j=all k=all</code>]</em></dt>
-<dt><a name="index-Put-2"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Put</strong> <em>(<code>const mglDataA &</code>v, <code>int</code> i=<code>-1</code>, <code>int</code> j=<code>-1</code>, <code>int</code> k=<code>-1</code>)</em></dt>
-<dt><a name="index-Put-3"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Put</strong> <em>(<code>const mglDataA &</code>v, <code>int</code> i=<code>-1</code>, <code>int</code> j=<code>-1</code>, <code>int</code> k=<code>-1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fput_005fdat"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_put_dat</strong> <em>(<code>HMDT</code> a, <code>HCDT</code> v, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fput_005fdat"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_put_dat</strong> <em>(<code>HADT</code> a, <code>HCDT</code> v, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dd><p>Копирует значения из массива <var>v</var> в диапазон значений данного массива. Индексы <var>i</var>, <var>j</var>, <var>k</var> равные ‘<samp>-1</samp>’ задают диапазон изменения значений в соответствующих направление(ях). Младшие размерности массива <var>v</var> должны быть больше выбранного диапазона массива. Например, <code>Put(v,-1,0,-1);</code> присвоит a[i,0,j]=<var>v</var>.ny>nz ? <var>v</var>.a[i,j] : <var>v</var>.a[i], где i=0...(nx-1), j=0...(nz-1) и условие v.nx>=nx выполнено.
-</p></dd></dl>
-
-<a name="refill"></a><dl>
-<dt><a name="index-refill-3"></a>Команда MGL: <em></em> <strong>refill</strong> <em>dat xdat vdat [sl=-1]</em></dt>
-<dt><a name="index-refill-4"></a>Команда MGL: <em></em> <strong>refill</strong> <em>dat xdat ydat vdat [sl=-1]</em></dt>
-<dt><a name="index-refill-5"></a>Команда MGL: <em></em> <strong>refill</strong> <em>dat xdat ydat zdat vdat</em></dt>
-<dt><a name="index-Refill-4"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Refill</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>v, <code>mreal</code> x1, <code>mreal</code> x2, <code>long</code> sl=<code>-1</code>)</em></dt>
-<dt><a name="index-Refill-5"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Refill</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>v, <code>mglPoint</code> p1, <code>mglPoint</code> p2, <code>long</code> sl=<code>-1</code>)</em></dt>
-<dt><a name="index-Refill-6"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Refill</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>v, <code>mglPoint</code> p1, <code>mglPoint</code> p2, <code>long</code> sl=<code>-1</code>)</em></dt>
-<dt><a name="index-Refill-7"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Refill</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>v, <code>mglPoint</code> p1, <code>mglPoint</code> p2)</em></dt>
-<dt><a name="index-Refill-8"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Refill</strong> <em>(<code>HMGL</code> gr, <code>const mglDataA &</code>x, <code>const mglDataA &</code>v, <code>long</code> sl=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Refill-9"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Refill</strong> <em>(<code>HMGL</code> gr, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>v, <code>long</code> sl=<code>-1</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-Refill-10"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Refill</strong> <em>(<code>HMGL</code> gr, <code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z, <code>const mglDataA &</code>v, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005frefill_005fx"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_refill_x</strong> <em>(<code>HMDT</code> a, <code>HCDT</code> x, <code>HCDT</code> v, <code>mreal</code> x1, <code>mreal</code> x2, <code>long</code> sl)</em></dt>
-<dt><a name="index-mgl_005fdata_005frefill_005fxy"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_refill_xy</strong> <em>(<code>HMDT</code> a, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> v, <code>mreal</code> x1, <code>mreal</code> x2, <code>mreal</code> y1, <code>mreal</code> y2, <code>long</code> sl)</em></dt>
-<dt><a name="index-mgl_005fdata_005frefill_005fxyz"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_refill_xyz</strong> <em>(<code>HMDT</code> a, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> v, <code>mreal</code> x1, <code>mreal</code> x2, <code>mreal</code> y1, <code>mreal</code> y2, <code>mreal</code> z1, <code>mreal</code> z2)</em></dt>
-<dt><a name="index-mgl_005fdata_005frefill_005fgr-1"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_refill_gr</strong> <em>(<code>HMGL</code> gr, <code>HMDT</code> a, <code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z, <code>HCDT</code> v, <code>long</code> sl, <code>const char *</code>opt)</em></dt>
-<dd><p>Заполняет значениями интерполяции массива <var>v</var> в точках {<var>x</var>, <var>y</var>, <var>z</var>}={<code>X[i], Y[j], Z[k]</code>} (или {<var>x</var>, <var>y</var>, <var>z</var>}={<code>X[i,j,k], Y[i,j,k], Z[i,j,k]</code>} если <var>x</var>, <var>y</var>, <var>z</var> не 1d массивы), где <code>X,Y,Z</code> равномерно распределены в диапазоне [<var>x1</var>,<var>x2</var>]*[<var>y1</var>,<var>y2</var>]*[<var>z1</var>,<var>z2</var>] и имеют такой же размер как и заполняемый массив. Если параметр <var>sl</var> равен 0 или положительный, то изменятся будет только <var>sl</var>-ый срез.
-</p></dd></dl>
-
-<a name="gspline"></a><dl>
-<dt><a name="index-gspline"></a>Команда MGL: <em></em> <strong>gspline</strong> <em>dat xdat vdat [sl=-1]</em></dt>
-<dt><a name="index-RefillGS"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>RefillGS</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>v, <code>mreal</code> x1, <code>mreal</code> x2, <code>long</code> sl=<code>-1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005frefill_005fgs"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_refill_gs</strong> <em>(<code>HMDT</code> a, <code>HCDT</code> x, <code>HCDT</code> v, <code>mreal</code> x1, <code>mreal</code> x2, <code>long</code> sl)</em></dt>
-<dd><p>Заполняет значениями глобального кубического сплайна для массива <var>v</var> в точках <var>x</var>=<code>X[i]</code>, где <code>X</code> равномерно распределен в диапазоне [<var>x1</var>,<var>x2</var>] и имеет такой же размер как и заполняемый массив. Если параметр <var>sl</var> равен 0 или положительный, то изменятся будет только <var>sl</var>-ый срез.
-</p></dd></dl>
-
-<a name="idset"></a><dl>
-<dt><a name="index-idset"></a>Команда MGL: <em></em> <strong>idset</strong> <em>dat 'ids'</em></dt>
-<dt><a name="index-SetColumnId"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>SetColumnId</strong> <em>(<code>const char *</code>ids)</em></dt>
-<dt><a name="index-mgl_005fdata_005fset_005fid"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_set_id</strong> <em>(<code>const char *</code>ids)</em></dt>
-<dt><a name="index-SetColumnId-1"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>SetColumnId</strong> <em>(<code>const char *</code>ids)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fset_005fid"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_set_id</strong> <em>(<code>HADT</code> a, <code>const char *</code>ids)</em></dt>
-<dd><p>Задает названия <var>ids</var> для колонок массива данных. Строка должна содержать один символ ’a’...’z’ на колонку. Эти названия используются в функции <a href="#column">column</a>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="File-I_002fO"></a>
-<div class="header">
-<p>
-Next: <a href="#Make-another-data" accesskey="n" rel="next">Make another data</a>, Previous: <a href="#Data-filling" accesskey="p" rel="prev">Data filling</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Chtenie_002fsokhranenie-dannykh"></a>
-<h3 class="section">6.5 Чтение/сохранение данных</h3>
-
-<a name="index-Read"></a>
-<a name="index-ReadMat"></a>
-<a name="index-ReadRange"></a>
-<a name="index-ReadAll"></a>
-<a name="index-Save"></a>
-<a name="index-ReadHDF"></a>
-<a name="index-SaveHDF"></a>
-<a name="index-Import"></a>
-<a name="index-Export"></a>
-
-<a name="read"></a><dl>
-<dt><a name="index-read-1"></a>Команда MGL: <em></em> <strong>read</strong> <em><small>DAT</small> 'fname'</em></dt>
-<dt><a name="index-read-2"></a>Команда MGL: <em></em> <strong>read</strong> <em><small>REDAT</small> <small>IMDAT</small> 'fname'</em></dt>
-<dt><a name="index-Read-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Read</strong> <em>(<code>const char *</code>fname)</em></dt>
-<dt><a name="index-Read-2"></a>Метод класса <code>mglDataC</code>: <em><code>bool</code></em> <strong>Read</strong> <em>(<code>const char *</code>fname)</em></dt>
-<dt><a name="index-mgl_005fdata_005fread"></a>Функция С: <em><code>int</code></em> <strong>mgl_data_read</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>fname)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fread"></a>Функция С: <em><code>int</code></em> <strong>mgl_datac_read</strong> <em>(<code>HADT</code> dat, <code>const char *</code>fname)</em></dt>
-<dd><p>Читает данные из текстового файла с разделителями символом пробела/табуляции с автоматическим определением размера массива. Двойной перевод строки начинает новый срез данных (по направлению z).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-read-3"></a>Команда MGL: <em></em> <strong>read</strong> <em><small>DAT</small> 'fname' <code>mx [my=1 mz=1]</code></em></dt>
-<dt><a name="index-read-4"></a>Команда MGL: <em></em> <strong>read</strong> <em><small>REDAT</small> <small>IMDAT</small> 'fname' <code>mx [my=1 mz=1]</code></em></dt>
-<dt><a name="index-Read-3"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Read</strong> <em>(<code>const char *</code>fname, <code>int</code> mx, <code>int</code> my=<code>1</code>, <code>int</code> mz=<code>1</code>)</em></dt>
-<dt><a name="index-Read-4"></a>Метод класса <code>mglDataC</code>: <em><code>bool</code></em> <strong>Read</strong> <em>(<code>const char *</code>fname, <code>int</code> mx, <code>int</code> my=<code>1</code>, <code>int</code> mz=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fread_005fdim"></a>Функция С: <em><code>int</code></em> <strong>mgl_data_read_dim</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>fname, <code>int</code> mx, <code>int</code> my, <code>int</code> mz)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fread_005fdim"></a>Функция С: <em><code>int</code></em> <strong>mgl_datac_read_dim</strong> <em>(<code>HADT</code> dat, <code>const char *</code>fname, <code>int</code> mx, <code>int</code> my, <code>int</code> mz)</em></dt>
-<dd><p>Читает данные из текстового файла с заданными размерами. Ничего не делается если параметры <var>mx</var>, <var>my</var> или <var>mz</var> равны нулю или отрицательны.
-</p></dd></dl>
-
-<a name="readmat"></a><dl>
-<dt><a name="index-readmat"></a>Команда MGL: <em></em> <strong>readmat</strong> <em><small>DAT</small> 'fname' [<code>dim=2</code>]</em></dt>
-<dt><a name="index-ReadMat-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>ReadMat</strong> <em>(<code>const char *</code>fname, <code>int</code> dim=<code>2</code>)</em></dt>
-<dt><a name="index-ReadMat-2"></a>Метод класса <code>mglDataC</code>: <em><code>bool</code></em> <strong>ReadMat</strong> <em>(<code>const char *</code>fname, <code>int</code> dim=<code>2</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fread_005fmat"></a>Функция С: <em><code>int</code></em> <strong>mgl_data_read_mat</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>fname, <code>int</code> dim)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fread_005fmat"></a>Функция С: <em><code>int</code></em> <strong>mgl_datac_read_mat</strong> <em>(<code>HADT</code> dat, <code>const char *</code>fname, <code>int</code> dim)</em></dt>
-<dd><p>Читает данные из текстового файла с размерами, указанными в первых <var>dim</var> числах файла. При этом переменная <var>dim</var> задает размерность (1d, 2d, 3d) данных.
-</p></dd></dl>
-
-<a name="readall"></a><dl>
-<dt><a name="index-readall"></a>Команда MGL: <em></em> <strong>readall</strong> <em><small>DAT</small> 'templ' <code>v1 v2 [dv=1 slice=off]</code></em></dt>
-<dt><a name="index-ReadRange-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>ReadRange</strong> <em>(<code>const char *</code>templ, <code>mreal</code> from, <code>mreal</code> to, <code>mreal</code> step=<code>1.f</code>, <code>bool</code> as_slice=<code>false</code>)</em></dt>
-<dt><a name="index-ReadRange-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>ReadRange</strong> <em>(<code>const char *</code>templ, <code>mreal</code> from, <code>mreal</code> to, <code>mreal</code> step=<code>1</code>, <code>bool</code> as_slice=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fread_005frange"></a>Функция С: <em><code>int</code></em> <strong>mgl_data_read_range</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>templ, <code>mreal</code> from, <code>mreal</code> to, <code>mreal</code> step, <code>int</code> as_slice)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fread_005frange"></a>Функция С: <em><code>int</code></em> <strong>mgl_datac_read_range</strong> <em>(<code>HADT</code> dat, <code>const char *</code>templ, <code>mreal</code> from, <code>mreal</code> to, <code>mreal</code> step, <code>int</code> as_slice)</em></dt>
-<dd><p>Объединяет данные из нескольких текстовых файлов. Имена файлов определяются вызовом функции <code>sprintf(fname,templ,val);</code>, где <var>val</var> меняется от <var>from</var> до <var>to</var> с шагом <var>step</var>. Данные загружаются один за другим в один и тот же срез данных (при <var>as_slice</var>=<code>false</code>) или срез-за-срезом (при <var>as_slice</var>=<code>true</code>).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-readall-1"></a>Команда MGL: <em></em> <strong>readall</strong> <em><small>DAT</small> 'templ' <code>[slice=off]</code></em></dt>
-<dt><a name="index-ReadAll-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>ReadAll</strong> <em>(<code>const char *</code>templ, <code>bool</code> as_slice=<code>false</code>)</em></dt>
-<dt><a name="index-ReadAll-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>ReadAll</strong> <em>(<code>const char *</code>templ, <code>bool</code> as_slice=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fread_005fall"></a>Функция С: <em><code>int</code></em> <strong>mgl_data_read_all</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>templ, <code>int</code> as_slice)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fread_005fall"></a>Функция С: <em><code>int</code></em> <strong>mgl_datac_read_all</strong> <em>(<code>HADT</code> dat, <code>const char *</code>templ, <code>int</code> as_slice)</em></dt>
-<dd><p>Объединяет данные из нескольких текстовых файлов, чьи имена удовлетворяют шаблону <var>templ</var> (например, <var>templ</var>=<code>"t_*.dat"</code>). Данные загружаются один за другим в один и тот же срез данных (при <var>as_slice</var>=<code>false</code>) или срез-за-срезом (при <var>as_slice</var>=<code>true</code>).
-</p></dd></dl>
-
-<a name="scanfile"></a><dl>
-<dt><a name="index-scanfile"></a>Команда MGL: <em></em> <strong>scanfile</strong> <em><small>DAT</small> 'fname' 'templ'</em></dt>
-<dt><a name="index-ScanFile"></a>Метод класса <code>mglData</code>: <em><code>bool</code></em> <strong>ScanFile</strong> <em>(<code>const char *</code>fname, <code>const char *</code>templ)</em></dt>
-<dt><a name="index-mgl_005fdata_005fscan_005ffile"></a>Функция С: <em><code>int</code></em> <strong>mgl_data_scan_file</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>fname, <code>const char *</code>templ)</em></dt>
-<dd><p>Читает файл <var>fname</var> построчно и каждую строку сканирует на соответствие шаблону <var>templ</var>. Полученные числа (обозначаются как ‘<samp>%g</samp>’ в шаблоне) сохраняются. См. раздел <a href="#Saving-and-scanning-file">Saving and scanning file</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="save"></a><dl>
-<dt><a name="index-save"></a>Команда MGL: <em></em> <strong>save</strong> <em>dat 'fname'</em></dt>
-<dt><a name="index-Save-1"></a>Метод класса <code>mglDataA</code>: <em><code>void</code></em> <strong>Save</strong> <em>(<code>const char *</code>fname, <code>int</code> ns=<code>-1</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fsave"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_save</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>fname, <code>int</code> ns)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fsave"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_save</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>fname, <code>int</code> ns)</em></dt>
-<dd><p>Сохраняет весь массив данных при <var>ns</var>=<code>-1</code> или только <var>ns</var>-ый срез в текстовый файл.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-save-1"></a>Команда MGL: <em></em> <strong>save</strong> <em>'str' 'fname' ['mode'='a']</em></dt>
-<dd><p>Сохраняет строку <var>str</var> в файл <var>fname</var>. Для параметра <var>mode</var>=‘<samp>a</samp>’ происходит добавление строки (по умолчанию): для <var>mode</var>=‘<samp>w</samp>’ файл будет перезаписан. См. раздел <a href="#Saving-and-scanning-file">Saving and scanning file</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="readhdf"></a><dl>
-<dt><a name="index-readhdf"></a>Команда MGL: <em></em> <strong>readhdf</strong> <em><small>DAT</small> 'fname' 'dname'</em></dt>
-<dt><a name="index-ReadHDF-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>ReadHDF</strong> <em>(<code>const char *</code>fname, <code>const char *</code>dname)</em></dt>
-<dt><a name="index-ReadHDF-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>ReadHDF</strong> <em>(<code>const char *</code>fname, <code>const char *</code>dname)</em></dt>
-<dt><a name="index-mgl_005fdata_005fread_005fhdf"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_read_hdf</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>fname, <code>const char *</code>dname)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fread_005fhdf"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_read_hdf</strong> <em>(<code>HADT</code> dat, <code>const char *</code>fname, <code>const char *</code>dname)</em></dt>
-<dd><p>Читает массив с именем <var>dname</var> из HDF5 или HDF4 файла <var>fname</var>. Функция ничего не делает если библиотека была собрана без поддержки HDF5|HDF4.
-</p></dd></dl>
-
-<a name="savehdf"></a><dl>
-<dt><a name="index-savehdf"></a>Команда MGL: <em></em> <strong>savehdf</strong> <em>dat 'fname' 'dname' [<code>rewrite</code>=<code>off</code>]</em></dt>
-<dt><a name="index-SaveHDF-1"></a>Метод класса <code>mglDataA</code>: <em><code>void</code></em> <strong>SaveHDF</strong> <em>(<code>const char *</code>fname, <code>const char *</code>dname, <code>bool</code> rewrite=<code>false</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fsave_005fhdf"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_save_hdf</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>fname, <code>const char *</code>dname, <code>int</code> rewrite)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fsave_005fhdf"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_save_hdf</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>fname, <code>const char *</code>dname, <code>int</code> rewrite)</em></dt>
-<dd><p>Сохраняет массив под именем <var>dname</var> в HDF5 или HDF4 файл <var>fname</var>. Функция ничего не делает если библиотека была собрана без поддержки HDF5|HDF4.
-</p></dd></dl>
-
-<a name="datas"></a><dl>
-<dt><a name="index-datas"></a>Команда MGL: <em></em> <strong>datas</strong> <em>'fname'</em></dt>
-<dt><a name="index-DatasHDF"></a>Метод класса <code>mglDataA</code>: <em><code>int</code></em> <strong>DatasHDF</strong> <em>(<code>const char *</code>fname, <code>char *</code>buf, <code>long</code> size) <code>static</code></em></dt>
-<dt><a name="index-mgl_005fdatas_005fhdf"></a>Функция С: <em><code>void</code></em> <strong>mgl_datas_hdf</strong> <em>(<code>const char *</code>fname, <code>char *</code>buf, <code>long</code> size)</em></dt>
-<dd><p>Помещает имена массивов данных в HDF5 файле <var>fname</var> в строку <var>buf</var> разделёнными символом табуляции ’\t’. В версии MGL имена массивов будут выведены как сообщение. Функция ничего не делает если библиотека была собрана без поддержки HDF5.
-</p></dd></dl>
-
-<a name="openhdf"></a><dl>
-<dt><a name="index-openhdf"></a>Команда MGL: <em></em> <strong>openhdf</strong> <em>'fname'</em></dt>
-<dt><a name="index-OpenHDF"></a>Метод класса <code>mglParse</code>: <em><code>void</code></em> <strong>OpenHDF</strong> <em>(<code>const char *</code>fname)</em></dt>
-<dt><a name="index-mgl_005fparser_005fopenhdf"></a>Функция С: <em><code>void</code></em> <strong>mgl_parser_openhdf</strong> <em>(<code>HMPR</code> pr, <code>const char *</code>fname)</em></dt>
-<dd><p>Читает все массивы данных из HDF5 файла <var>fname</var> и создает переменные MGL с соответствующими именами. Если имя данных начинается с ‘<samp>!</samp>’, то будут созданы комплексные массивы.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mgl_005fdatas_005fhdf_005fstr"></a>Функция С: <em><code>const char * const *</code></em> <strong>mgl_datas_hdf_str</strong> <em>(<code>HMPR</code> pr, <code>const char *</code>fname)</em></dt>
-<dd><p>Помещает имена данных из HDF файла <var>fname</var> в массив строк (последняя строка ""). Массив строк будет изменен при следующем вызове функции.
-</p></dd></dl>
-
-<a name="import"></a><dl>
-<dt><a name="index-import"></a>Команда MGL: <em></em> <strong>import</strong> <em><small>DAT</small> 'fname' 'sch' [<code>v1=0 v2=1</code>]</em></dt>
-<dt><a name="index-Import-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Import</strong> <em>(<code>const char *</code>fname, <code>const char *</code>scheme, <code>mreal</code> v1=<code>0</code>, mreal v2=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fimport"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_import</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>fname, <code>const char *</code>scheme, <code>mreal</code> v1, mreal v2)</em></dt>
-<dd><p>Читает данные из растрового файла. RGB значения пикселов преобразуются в число в диапазоне [<var>v1</var>, <var>v2</var>] используя цветовую схему <var>sch</var> (see <a href="#Color-scheme">Color scheme</a>).
-</p></dd></dl>
-
-<a name="export"></a><dl>
-<dt><a name="index-export"></a>Команда MGL: <em></em> <strong>export</strong> <em>dat 'fname' 'sch' [<code>v1=0 v2=0</code>]</em></dt>
-<dt><a name="index-Export-1"></a>Метод класса <code>mglDataA</code>: <em><code>void</code></em> <strong>Export</strong> <em>(<code>const char *</code>fname, <code>const char *</code>scheme, <code>mreal</code> v1=<code>0</code>, mreal v2=<code>0</code>, <code>int</code> ns=<code>-1</code>) const</em></dt>
-<dt><a name="index-mgl_005fdata_005fexport"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_export</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>fname, <code>const char *</code>scheme, <code>mreal</code> v1, mreal v2, <code>int</code> ns) const</em></dt>
-<dd><p>Сохраняет данные в растровый файл. Числовые значения, нормированные в диапазон [<var>v1</var>, <var>v2</var>], преобразуются в RGB значения пикселов, используя цветовую схему <var>sch</var> (see <a href="#Color-scheme">Color scheme</a>). Если <var>v1</var>>=<var>v2</var>, то значения <var>v1</var>, <var>v2</var> определяются автоматически как минимальное и максимальное значение данных.
-</p></dd></dl>
-
-
-<hr>
-<a name="Make-another-data"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-changing" accesskey="n" rel="next">Data changing</a>, Previous: <a href="#File-I_002fO" accesskey="p" rel="prev">File I/O</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Make-another-data-1"></a>
-<h3 class="section">6.6 Make another data</h3>
-
-<a name="index-SubData"></a>
-<a name="index-Column"></a>
-<a name="index-Trace"></a>
-<a name="index-Hist-1"></a>
-<a name="index-Resize"></a>
-<a name="index-Evaluate"></a>
-<a name="index-Combine-1"></a>
-<a name="index-Momentum"></a>
-<a name="index-Sum"></a>
-<a name="index-Min"></a>
-<a name="index-Max"></a>
-<a name="index-Roots"></a>
-<a name="index-Correl"></a>
-<a name="index-AutoCorrel"></a>
-
-<a name="subdata"></a><dl>
-<dt><a name="index-subdata"></a>Команда MGL: <em></em> <strong>subdata</strong> <em><small>RES</small> dat <code>xx [yy=all zz=all]</code></em></dt>
-<dt><a name="index-SubData-1"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>SubData</strong> <em>(<code>mreal</code> xx, <code>mreal</code> yy=<code>-1</code>, <code>mreal</code> zz=<code>-1</code>) <code>const</code></em></dt>
-<dt><a name="index-SubData-2"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>SubData</strong> <em>(<code>mreal</code> xx, <code>mreal</code> yy=<code>-1</code>, <code>mreal</code> zz=<code>-1</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fsubdata"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_subdata</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> xx, <code>mreal</code> yy, <code>mreal</code> zz)</em></dt>
-<dd><p>Возвращает в <var>res</var> подмассив массива данных <var>dat</var> с фиксированными значениями индексов с положительными значениями. Например, <code>SubData(-1,2)</code> выделяет третью строку (индексы начинаются с нуля), <code>SubData(4,-1)</code> выделяет 5-ую колонку, <code>SubData(-1,-1,3)</code> выделяет 4-ый срез и т.д. В MGL скриптах обычно используется упрощенная версия <code>dat(xx,yy,zz)</code>. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-subdata-1"></a>Команда MGL: <em></em> <strong>subdata</strong> <em><small>RES</small> dat xdat [ydat zdat]</em></dt>
-<dt><a name="index-SubData-3"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>SubData</strong> <em>(<code>const mglDataA &</code>xx, <code>const mglDataA &</code>yy, <code>const mglDataA &</code>zz) <code>const</code></em></dt>
-<dt><a name="index-SubData-4"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>SubData</strong> <em>(<code>const mglDataA &</code>xx, <code>const mglDataA &</code>yy, <code>const mglDataA &</code>zz) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fsubdata_005fext"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_subdata_ext</strong> <em>(<code>HCDT</code> dat, <code>HCDT</code> xx, <code>HCDT</code> yy, <code>HCDT</code> zz)</em></dt>
-<dd><p>Возвращает в <var>res</var> подмассив массива данных <var>dat</var> с индексами, заданными в массивах <var>xx</var>, <var>yy</var>, <var>zz</var> (косвенная адресация). Результат будет иметь размерность массивов с индексами. Размеры массивов <var>xx</var>, <var>yy</var>, <var>zz</var> с индексами должна быть одинакова, либо должны быть "скаляром" (т.е. 1*1*1). В MGL скриптах обычно используется упрощенная версия <code>dat(xx,yy,zz)</code>. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="column"></a><dl>
-<dt><a name="index-column"></a>Команда MGL: <em></em> <strong>column</strong> <em><small>RES</small> dat 'eq'</em></dt>
-<dt><a name="index-Column-1"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Column</strong> <em>(<code>const char *</code>eq) <code>const</code></em></dt>
-<dt><a name="index-Column-2"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Column</strong> <em>(<code>const char *</code>eq) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fcolumn"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_column</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>eq)</em></dt>
-<dd><p>Возвращает массив данных заполненный по формуле <var>eq</var>, вычисленной для именованных колонок (или срезов). Например, <code>Column("n*w^2/exp(t)");</code>. Имена колонок должны быть предварительно заданы функцией <a href="#idset">idset</a> или при чтении файлов данных. В MGL скриптах обычно используется упрощенная версия <code>dat('eq')</code>. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="resize"></a><dl>
-<dt><a name="index-resize"></a>Команда MGL: <em></em> <strong>resize</strong> <em><small>RES</small> dat <code>mx [my=1 mz=1]</code></em></dt>
-<dt><a name="index-Resize-1"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Resize</strong> <em>(<code>int</code> mx, <code>int</code> my=<code>0</code>, <code>int</code> mz=<code>0</code>, <code>mreal</code> x1=<code>0</code>, <code>mreal</code> x2=<code>1</code>, <code>mreal</code> y1=<code>0</code>, <code>mreal</code> y2=<code>1</code>, <code>mreal</code> z1=<code>0</code>, <code>mreal</code> z2=<code>1</code>) <code>const</code></em></dt>
-<dt><a name="index-Resize-2"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Resize</strong> <em>(<code>int</code> mx, <code>int</code> my=<code>0</code>, <code>int</code> mz=<code>0</code>, <code>mreal</code> x1=<code>0</code>, <code>mreal</code> x2=<code>1</code>, <code>mreal</code> y1=<code>0</code>, <code>mreal</code> y2=<code>1</code>, <code>mreal</code> z1=<code>0</code>, <code>mreal</code> z2=<code>1</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fresize"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_resize</strong> <em>(<code>HCDT</code> dat, <code>int</code> mx, <code>int</code> my, <code>int</code> mz)</em></dt>
-<dt><a name="index-mgl_005fdata_005fresize_005fbox"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_resize_box</strong> <em>(<code>HCDT</code> dat, <code>int</code> mx, <code>int</code> my, <code>int</code> mz, <code>mreal</code> x1, <code>mreal</code> x2, <code>mreal</code> y1, <code>mreal</code> y2, <code>mreal</code> z1, <code>mreal</code> z2)</em></dt>
-<dd><p>Возвращает массив данных размером <var>mx</var>, <var>my</var>, <var>mz</var> со значениями полученными интерполяцией значений из части [<var>x1</var>,<var>x2</var>] x [<var>y1</var>,<var>y2</var>] x [<var>z1</var>,<var>z2</var>] исходного массива. Величины x,y,z полагаются нормированными в диапазоне [0,1]. Если значение <var>mx</var>, <var>my</var> или <var>mz</var> равно 0, то исходный размер используется. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="evaluate"></a><dl>
-<dt><a name="index-evaluate"></a>Команда MGL: <em></em> <strong>evaluate</strong> <em><small>RES</small> dat idat [<code>norm=on</code>]</em></dt>
-<dt><a name="index-evaluate-1"></a>Команда MGL: <em></em> <strong>evaluate</strong> <em><small>RES</small> dat idat jdat [<code>norm=on</code>]</em></dt>
-<dt><a name="index-evaluate-2"></a>Команда MGL: <em></em> <strong>evaluate</strong> <em><small>RES</small> dat idat jdat kdat [<code>norm=on</code>]</em></dt>
-<dt><a name="index-Evaluate-1"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Evaluate</strong> <em>(<code>const mglDataA &</code>idat, <code>bool</code> norm=<code>true</code>) <code>const</code></em></dt>
-<dt><a name="index-Evaluate-2"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Evaluate</strong> <em>(<code>const mglDataA &</code>idat, <code>const mglDataA &</code>jdat, <code>bool</code> norm=<code>true</code>) <code>const</code></em></dt>
-<dt><a name="index-Evaluate-3"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Evaluate</strong> <em>(<code>const mglDataA &</code>idat, <code>const mglDataA &</code>jdat, <code>const mglDataA &</code>kdat, <code>bool</code> norm=<code>true</code>) <code>const</code></em></dt>
-<dt><a name="index-Evaluate-4"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Evaluate</strong> <em>(<code>const mglDataA &</code>idat, <code>bool</code> norm=<code>true</code>) <code>const</code></em></dt>
-<dt><a name="index-Evaluate-5"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Evaluate</strong> <em>(<code>const mglDataA &</code>idat, <code>const mglDataA &</code>jdat, <code>bool</code> norm=<code>true</code>) <code>const</code></em></dt>
-<dt><a name="index-Evaluate-6"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Evaluate</strong> <em>(<code>const mglDataA &</code>idat, <code>const mglDataA &</code>jdat, <code>const mglDataA &</code>kdat, <code>bool</code> norm=<code>true</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fevaluate"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_evaluate</strong> <em>(<code>HCDT</code> dat, <code>HCDT</code> idat, <code>HCDT</code> jdat, <code>HCDT</code> kdat, <code>int</code> norm)</em></dt>
-<dd><p>Возвращает массив данных, полученный в результате интерполяции исходного массива в точках других массивов (например, res[i,j]=dat[idat[i,j],jdat[i,j]]). Размеры массивов <var>idat</var>, <var>jdat</var>, <var>kdat</var> должны совпадать. Координаты в <var>idat</var>, <var>jdat</var>, <var>kdat</var> полагаются нормированными в диапазон [0,1] (при <var>norm</var>=<code>true</code>) или в диапазоны [0,nx], [0,ny], [0,nz] соответственно. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="section"></a><dl>
-<dt><a name="index-section"></a>Команда MGL: <em></em> <strong>section</strong> <em><small>RES</small> dat ids ['dir'='y' <code>val=nan</code>]</em></dt>
-<dt><a name="index-section-1"></a>Команда MGL: <em></em> <strong>section</strong> <em><small>RES</small> dat <code>id</code> ['dir'='y' <code>val=nan</code>]</em></dt>
-<dt><a name="index-Section"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Section</strong> <em>(<code>const mglDataA &</code>ids, <code>const char *</code>dir=<code>'y'</code>, <code>mreal</code> val=<code>NAN</code>) <code>const</code></em></dt>
-<dt><a name="index-Section-1"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Section</strong> <em>(<code>long</code> id, <code>const char *</code>dir=<code>'y'</code>, <code>mreal</code> val=<code>NAN</code>) <code>const</code></em></dt>
-<dt><a name="index-Section-2"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Section</strong> <em>(<code>const mglDataA &</code>ids, <code>const char *</code>dir=<code>'y'</code>, <code>mreal</code> val=<code>NAN</code>) <code>const</code></em></dt>
-<dt><a name="index-Section-3"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Section</strong> <em>(<code>long</code> id, <code>const char *</code>dir=<code>'y'</code>, <code>mreal</code> val=<code>NAN</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fsection"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_section</strong> <em>(<code>HCDT</code> dat, <code>HCDT</code> ids, <code>const char *</code>dir, <code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fdata_005fsection_005fval"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_section_val</strong> <em>(<code>HCDT</code> dat, <code>long</code> id, <code>const char *</code>dir, <code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fsection"></a>Функция С: <em><code>HADT</code></em> <strong>mgl_datac_section</strong> <em>(<code>HCDT</code> dat, <code>HCDT</code> ids, <code>const char *</code>dir, <code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fsection_005fval"></a>Функция С: <em><code>HADT</code></em> <strong>mgl_datac_section_val</strong> <em>(<code>HCDT</code> dat, <code>long</code> id, <code>const char *</code>dir, <code>mreal</code> val)</em></dt>
-<dd><p>Возвращает массив данных, являющийся <var>id</var>-ой секцией (диапазоном срезов, разделенных значениями <var>val</var>) исходного массива <var>dat</var>. Для <var>id</var><0 используется обратный порядок (т.e. -1 даст последнюю секцию). Если указано несколько <var>ids</var>, то выходной массив будет результатом последовательного объединения секций.
-</p></dd></dl>
-
-<a name="solve"></a><dl>
-<dt><a name="index-solve"></a>Команда MGL: <em></em> <strong>solve</strong> <em><small>RES</small> dat <code>val</code> 'dir' [<code>norm=on</code>]</em></dt>
-<dt><a name="index-solve-1"></a>Команда MGL: <em></em> <strong>solve</strong> <em><small>RES</small> dat <code>val</code> 'dir' idat [<code>norm=on</code>]</em></dt>
-<dt><a name="index-Solve"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Solve</strong> <em>(<code>mreal</code> val, <code>char</code> dir, <code>bool</code> norm=<code>true</code>) <code>const</code></em></dt>
-<dt><a name="index-Solve-1"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Solve</strong> <em>(<code>mreal</code> val, <code>char</code> dir, <code>const mglDataA &</code>idat, <code>bool</code> norm=<code>true</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fsolve"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_solve</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> val, <code>char</code> dir, <code>HCDT</code> idat, <code>int</code> norm)</em></dt>
-<dd><p>Возвращает массив индексов (корней) вдоль выбранного направления <var>dir</var> в которых значения массива <var>dat</var> равны <var>val</var>. Выходной массив будет иметь размеры массива <var>dat</var> в направлениях поперечных <var>dir</var>. Если предоставлен массив <var>idat</var>, то его значения используются как стартовые при поиске. Это позволяет найти несколько веток с помощью последовательного вызова функции. Индексы полагаются нормированными в диапазон [0,1] (при <var>norm</var>=<code>true</code>) или в диапазоны [0,nx], [0,ny], [0,nz] соответственно. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов. См. раздел <a href="#Solve-sample">Solve sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="roots"></a><dl>
-<dt><a name="index-roots"></a>Команда MGL: <em></em> <strong>roots</strong> <em><small>RES</small> 'func' ini ['var'='x']</em></dt>
-<dt><a name="index-roots-1"></a>Команда MGL: <em></em> <strong>roots</strong> <em><small>RES</small> 'func' <code>ini</code> ['var'='x']</em></dt>
-<dt><a name="index-Roots-1"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Roots</strong> <em>(<code>const char *</code>func, <code>char</code> var) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005froots"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_roots</strong> <em>(<code>const char *</code>func, <code>HCDT</code> ini, <code>char</code> var)</em></dt>
-<dt><a name="index-mgl_005ffind_005froot_005ftxt"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_find_root_txt</strong> <em>(<code>const char *</code>func, <code>mreal</code> ini, <code>char</code> var)</em></dt>
-<dd><p>Возвращает массив корней уравнения ’func’=0 для переменной <var>var</var> с начальными положениями <var>ini</var>. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-roots-2"></a>Команда MGL: <em></em> <strong>roots</strong> <em><small>RES</small> 'funcs' 'vars' ini</em></dt>
-<dt><a name="index-MultiRoots"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>MultiRoots</strong> <em>(<code>const char *</code>funcs, <code>const char *</code>vars) <code>const</code></em></dt>
-<dt><a name="index-MultiRoots-1"></a>Метод класса <code>mglDataC</code>: <em><code>mglDataC</code></em> <strong>MultiRoots</strong> <em>(<code>const char *</code>funcs, <code>const char *</code>vars) <code>const</code></em></dt>
-<dt><a name="index-mgl_005ffind_005froots_005ftxt"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_find_roots_txt</strong> <em>(<code>const char *</code>func, <code>const char *</code>vars, <code>HCDT</code> ini)</em></dt>
-<dt><a name="index-mgl_005ffind_005froots_005ftxt_005fc"></a>Функция С: <em><code>HADT</code></em> <strong>mgl_find_roots_txt_c</strong> <em>(<code>const char *</code>func, <code>const char *</code>vars, <code>HCDT</code> ini)</em></dt>
-<dd><p>Возвращает массив корней системы уравнений ’funcs’=0 для переменных <var>vars</var> с начальными значениями <var>ini</var>. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="detect"></a><dl>
-<dt><a name="index-detect"></a>Команда MGL: <em></em> <strong>detect</strong> <em><small>RES</small> dat <code>lvl dj [di=0 minlen=0]</code></em></dt>
-<dt><a name="index-Detect"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Detect</strong> <em>(<code>mreal</code> lvl, <code>mreal</code> dj, <code>mreal</code> di=<code>0</code>, <code>mreal</code> minlen=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fdetect"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_detect</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> lvl, <code>mreal</code> dj, <code>mreal</code> di, <code>mreal</code> minlen)</em></dt>
-<dd><p>Возвращает массив кривых {x,y}, разделенных NAN значениями, для локальных максимумов массива <var>dat</var> как функцию координаты x. Шумы амплитудой меньше <var>lvl</var> игнорируются. Параметр <var>dj</var> (в диапазоне [0,ny]) задает область "притяжения" точек в y-направлении к кривой. Аналогично, <var>di</var> продолжает кривые в x-направлении через разрывы длиной менее <var>di</var> точек. Кривые с минимальной длинной менее <var>minlen</var> игнорируются.
-</p></dd></dl>
-
-<a name="hist"></a><dl>
-<dt><a name="index-hist-3"></a>Команда MGL: <em></em> <strong>hist</strong> <em><small>RES</small> dat <code>num v1 v2 [nsub=0]</code></em></dt>
-<dt><a name="index-hist-4"></a>Команда MGL: <em></em> <strong>hist</strong> <em><small>RES</small> dat wdat <code>num v1 v2 [nsub=0]</code></em></dt>
-<dt><a name="index-Hist-5"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Hist</strong> <em>(<code>int</code> n, <code>mreal</code> v1=<code>0</code>, <code>mreal</code> v2=<code>1</code>, <code>int</code> nsub=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-Hist-6"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Hist</strong> <em>(<code>const mglDataA &</code>w, <code>int</code> n, <code>mreal</code> v1=<code>0</code>, <code>mreal</code> v2=<code>1</code>, <code>int</code> nsub=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-Hist-7"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Hist</strong> <em>(<code>int</code> n, <code>mreal</code> v1=<code>0</code>, <code>mreal</code> v2=<code>1</code>, <code>int</code> nsub=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-Hist-8"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Hist</strong> <em>(<code>const mglDataA &</code>w, <code>int</code> n, <code>mreal</code> v1=<code>0</code>, <code>mreal</code> v2=<code>1</code>, <code>int</code> nsub=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fhist"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_hist</strong> <em>(<code>HCDT</code> dat, <code>int</code> n, <code>mreal</code> v1, <code>mreal</code> v2, <code>int</code> nsub)</em></dt>
-<dt><a name="index-mgl_005fdata_005fhist_005fw"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_hist_w</strong> <em>(<code>HCDT</code> dat, <code>HCDT</code> w, <code>int</code> n, <code>mreal</code> v1, <code>mreal</code> v2, <code>int</code> nsub)</em></dt>
-<dd><p>Возвращает распределение (гистограмму) из <var>n</var> точек от значений массива в диапазоне [<var>v1</var>, <var>v2</var>]. Массив <var>w</var> задает веса элементов (по умолчанию все веса равны 1). Параметр <var>nsub</var> задает число дополнительных точек интерполяции (для сглаживания получившейся гистограммы). Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов. См. также <a href="#Data-manipulation">Data manipulation</a>
-</p></dd></dl>
-
-<a name="momentum"></a><dl>
-<dt><a name="index-momentum"></a>Команда MGL: <em></em> <strong>momentum</strong> <em><small>RES</small> dat 'how' ['dir'='z']</em></dt>
-<dt><a name="index-Momentum-2"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Momentum</strong> <em>(<code>char</code> dir, <code>const char *</code>how) <code>const</code></em></dt>
-<dt><a name="index-Momentum-3"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Momentum</strong> <em>(<code>char</code> dir, <code>const char *</code>how) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmomentum"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_momentum</strong> <em>(<code>HCDT</code> dat, <code>char</code> dir, <code>const char *</code>how)</em></dt>
-<dd><p>Возвращает момент (1d массив) данных вдоль направления <var>dir</var>. Строка <var>how</var> определяет тип момента. Момент определяется как
-res_k = \sum_ij how(x_i,y_j,z_k) a_ij/ \sum_ij a_ij
-если <var>dir</var>=‘<samp>z</samp>’ и т.д. Координаты ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’ – индексы массива в диапазоне [0,1]. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="sum"></a><dl>
-<dt><a name="index-sum"></a>Команда MGL: <em></em> <strong>sum</strong> <em><small>RES</small> dat 'dir'</em></dt>
-<dt><a name="index-Sum-1"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Sum</strong> <em>(<code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-Sum-2"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Sum</strong> <em>(<code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fsum"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_sum</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Возвращает результат суммирования данных вдоль направления(ий) <var>dir</var>. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="max"></a><dl>
-<dt><a name="index-max"></a>Команда MGL: <em></em> <strong>max</strong> <em><small>RES</small> dat 'dir'</em></dt>
-<dt><a name="index-Max-1"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Max</strong> <em>(<code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-Max-2"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Max</strong> <em>(<code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmax_005fdir"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_max_dir</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Возвращает максимальное значение данных вдоль направления(ий) <var>dir</var>. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="min"></a><dl>
-<dt><a name="index-min"></a>Команда MGL: <em></em> <strong>min</strong> <em><small>RES</small> dat 'dir'</em></dt>
-<dt><a name="index-Min-1"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Min</strong> <em>(<code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-Min-2"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Min</strong> <em>(<code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmin_005fdir"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_min_dir</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Возвращает минимальное значение данных вдоль направления(ий) <var>dir</var>. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="combine"></a><dl>
-<dt><a name="index-combine"></a>Команда MGL: <em></em> <strong>combine</strong> <em><small>RES</small> adat bdat</em></dt>
-<dt><a name="index-Combine-3"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Combine</strong> <em>(<code>const mglDataA &</code>a) <code>const</code></em></dt>
-<dt><a name="index-Combine-4"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Combine</strong> <em>(<code>const mglDataA &</code>a) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fcombine"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_combine</strong> <em>(<code>HCDT</code> dat, <code>HCDT</code> a)</em></dt>
-<dd><p>Возвращает прямое произведение массивов (наподобие, res[i,j] = adat[i]*bdat[j] и т.д.). Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="trace"></a><dl>
-<dt><a name="index-trace"></a>Команда MGL: <em></em> <strong>trace</strong> <em><small>RES</small> dat</em></dt>
-<dt><a name="index-Trace-1"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Trace</strong> <em>() <code>const</code></em></dt>
-<dt><a name="index-Trace-2"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Trace</strong> <em>() <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005ftrace"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_trace</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dd><p>Возвращает массив диагональных элементов a[i,i] (для 2D данных) или a[i,i,i] (для 3D данных) где i=0...nx-1. В 1D случае возвращается сам массив данных. Размеры массива данных должен быть ny,nz >= nx или ny,nz = 1. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="correl"></a><dl>
-<dt><a name="index-correl"></a>Команда MGL: <em></em> <strong>correl</strong> <em><small>RES</small> adat bdat 'dir'</em></dt>
-<dt><a name="index-Correl-1"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Correl</strong> <em>(<code>const mglDataA &</code>b, <code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-AutoCorrel-1"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>AutoCorrel</strong> <em>(<code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-Correl-2"></a>Метод класса <code>mglDataC</code>: <em><code>mglDataC</code></em> <strong>Correl</strong> <em>(<code>const mglDataA &</code>b, <code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-AutoCorrel-2"></a>Метод класса <code>mglDataC</code>: <em><code>mglDataC</code></em> <strong>AutoCorrel</strong> <em>(<code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fcorrel"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_correl</strong> <em>(<code>HCDT</code> a, <code>HCDT</code> b, <code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fcorrel"></a>Функция С: <em><code>HADT</code></em> <strong>mgl_datac_correl</strong> <em>(<code>HCDT</code> a, <code>HCDT</code> b, <code>const char *</code>dir)</em></dt>
-<dd><p>Возвращает корреляцию массивов <var>a</var> (или this в C++) и <var>b</var> вдоль направлений <var>dir</var>. При вычислении используется преобразование Фурье. Поэтому может потребоваться вызов функций <a href="#swap">swap</a> и/или <a href="#norm">norm</a> перед построением. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Real"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Real</strong> <em>() <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdatac_005freal"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_datac_real</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dd><p>Возвращает массив действительных частей массива данных.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Imag"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Imag</strong> <em>() <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdatac_005fimag"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_datac_imag</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dd><p>Возвращает массив мнимых частей массива данных.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Abs"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Abs</strong> <em>() <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdatac_005fabs"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_datac_abs</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dd><p>Возвращает массив абсолютных значений массива данных.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Arg"></a>Метод класса <code>mglDataC</code>: <em><code>mglData</code></em> <strong>Arg</strong> <em>() <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdatac_005farg"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_datac_arg</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dd><p>Возвращает массив аргументов массива данных.
-</p></dd></dl>
-
-<a name="pulse"></a><dl>
-<dt><a name="index-pulse"></a>Команда MGL: <em></em> <strong>pulse</strong> <em><small>RES</small> dat 'dir'</em></dt>
-<dt><a name="index-Pulse"></a>Метод класса <code>mglData</code>: <em><code>mglData</code></em> <strong>Pulse</strong> <em>(<code>const char *</code>dir) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fpulse"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_pulse</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Находит параметры импульса вдоль направления <var>dir</var>: максимальное значение (в колонке 0), его положение (в колонке 1), ширина по параболлической аппроксимации (в колонке 3) и по полувысоте (в колонке 2), энергию около максимума (в колонке 4). NAN значения используются для ширин если максимум расположен вблизи границ массива. Отмечу, что для комплексных массивов есть неопределенность определения параметров. Обычно следует использовать квадрат абсолютного значения амплитуды (т.е. |dat[i]|^2). Поэтому MathGL не включает эту функцию в <code>mglDataC</code>, хотя формально C функция будет работать и для них, но будет использовать абсолютное значение амплитуды (т.е. |dat[i]|). Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов. См. также <a href="#max">max</a>, <a href="#min">min</a>, <a href="#momentum">momentum</a>, <a href="#sum">sum</a>. См. раздел <a href="#Pulse-properties">Pulse properties</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-<hr>
-<a name="Data-changing"></a>
-<div class="header">
-<p>
-Next: <a href="#Interpolation" accesskey="n" rel="next">Interpolation</a>, Previous: <a href="#Make-another-data" accesskey="p" rel="prev">Make another data</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Izmenenie-dannykh"></a>
-<h3 class="section">6.7 Изменение данных</h3>
-
-<a name="index-CumSum"></a>
-<a name="index-Integral"></a>
-<a name="index-Diff"></a>
-<a name="index-Diff2"></a>
-<a name="index-SinFFT"></a>
-<a name="index-CosFFT"></a>
-<a name="index-Hankel"></a>
-<a name="index-Swap"></a>
-<a name="index-Roll"></a>
-<a name="index-Mirror"></a>
-<a name="index-Sew"></a>
-<a name="index-Smooth"></a>
-<a name="index-Envelop"></a>
-<a name="index-Norm"></a>
-<a name="index-NormSl"></a>
-
-<p>These functions change the data in some direction like differentiations, integrations and so on. The direction in which the change will applied is specified by the string parameter, which may contain ‘<samp>x</samp>’, ‘<samp>y</samp>’ or ‘<samp>z</samp>’ characters for 1-st, 2-nd and 3-d dimension correspondingly.
-</p>
-<a name="cumsum"></a><dl>
-<dt><a name="index-cumsum"></a>Команда MGL: <em></em> <strong>cumsum</strong> <em>dat 'dir'</em></dt>
-<dt><a name="index-CumSum-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>CumSum</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-CumSum-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>CumSum</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdata_005fcumsum"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_cumsum</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fcumsum"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_cumsum</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Суммирует с накоплением в выбранном направлении(ях).
-</p></dd></dl>
-
-<a name="integrate"></a><dl>
-<dt><a name="index-integrate"></a>Команда MGL: <em></em> <strong>integrate</strong> <em>dat 'dir'</em></dt>
-<dt><a name="index-Integral-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Integral</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-Integral-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Integral</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdata_005fintegral"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_integral</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fintegral"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_integral</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Выполняет интегрирование (методом трапеций) в выбранном направлении(ях).
-</p></dd></dl>
-
-<a name="diff"></a><dl>
-<dt><a name="index-diff"></a>Команда MGL: <em></em> <strong>diff</strong> <em>dat 'dir'</em></dt>
-<dt><a name="index-Diff-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Diff</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-Diff-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Diff</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdata_005fdiff"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_diff</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fdiff"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_diff</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Выполняет дифференцирование в выбранном направлении(ях).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-diff-1"></a>Команда MGL: <em></em> <strong>diff</strong> <em>dat xdat ydat [zdat]</em></dt>
-<dt><a name="index-Diff-3"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Diff</strong> <em>(<code>const mglDataA &</code>x)</em></dt>
-<dt><a name="index-Diff-4"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Diff</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y)</em></dt>
-<dt><a name="index-Diff-5"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Diff</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z)</em></dt>
-<dt><a name="index-Diff-6"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Diff</strong> <em>(<code>const mglDataA &</code>x)</em></dt>
-<dt><a name="index-Diff-7"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Diff</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y)</em></dt>
-<dt><a name="index-Diff-8"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Diff</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z)</em></dt>
-<dt><a name="index-mgl_005fdata_005fdiff_005fpar"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_diff_par</strong> <em>(<code>HMDT</code> dat, <code>HCDT</code> x, <code>HCDT</code>y, <code>HCDT</code>z)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fdiff_005fpar"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_diff_par</strong> <em>(<code>HADT</code> dat, <code>HCDT</code> x, <code>HCDT</code>y, <code>HCDT</code>z)</em></dt>
-<dd><p>Выполняет дифференцирование данных, параметрически зависящих от координат, в направлении <var>x</var> с <var>y</var>, <var>z</var>=constant. Параметр <var>z</var> может быть опущен, что соответствует 2D случаю. Используются следующие формулы (2D случай): <em>da/dx = (a_j*y_i-a_i*y_j)/(x_j*y_i-x_i*y_j)</em>, где <em>a_i=da/di, a_j=da/dj</em> обозначает дифференцирование вдоль 1-ой и 2-ой размерности. Похожие формулы используются и в 3D случае. Порядок аргументов можно менять – например, если данные a(i,j) зависят от координат {x(i,j), y(i,j)}, то обычная производная по ‘<samp>x</samp>’ будет равна <code>Diff(x,y);</code>, а обычная производная по ‘<samp>y</samp>’ будет равна <code>Diff(y,x);</code>.
-</p></dd></dl>
-
-<a name="diff2"></a><dl>
-<dt><a name="index-diff2"></a>Команда MGL: <em></em> <strong>diff2</strong> <em>dat 'dir'</em></dt>
-<dt><a name="index-Diff2-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Diff2</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-Diff2-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Diff2</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdata_005fdiff2"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_diff2</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fdiff2"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_diff2</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Выполняет двойное дифференцирование (как в операторе Лапласа) в выбранном направлении(ях).
-</p></dd></dl>
-
-<a name="sinfft"></a><dl>
-<dt><a name="index-sinfft"></a>Команда MGL: <em></em> <strong>sinfft</strong> <em>dat 'dir'</em></dt>
-<dt><a name="index-SinFFT-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>SinFFT</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdata_005fsinfft"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_sinfft</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Выполняет синус преобразование в выбранном направлении(ях). Синус преобразование есть <em>\sum a_j \sin(k j)</em> (см. <a href="http://en.wikipedia.org/wiki/Discrete_sine_transform#DST-I">http://en.wikipedia.org/wiki/Discrete_sine_transform#DST-I</a>).
-</p></dd></dl>
-
-<a name="cosfft"></a><dl>
-<dt><a name="index-cosfft"></a>Команда MGL: <em></em> <strong>cosfft</strong> <em>dat 'dir'</em></dt>
-<dt><a name="index-CosFFT-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>CosFFT</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdata_005fcosfft"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_cosfft</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Выполняет косинус преобразование в выбранном направлении(ях). Синус преобразование есть <em>\sum a_j \cos(k j)</em> (см. <a href="http://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-I">http://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-I</a>).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-FFT"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>FFT</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005ffft"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_fft</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Выполняет фурье преобразование в выбранном направлении(ях). Если строка <var>dir</var> содержит ‘<samp>i</samp>’, то используется обратное преобразование фурье. Фурье преобразование есть <em>\sum a_j \exp(i k j)</em> (см. <a href="http://en.wikipedia.org/wiki/Discrete_Fourier_transform">http://en.wikipedia.org/wiki/Discrete_Fourier_transform</a>).
-</p></dd></dl>
-
-<a name="hankel"></a><dl>
-<dt><a name="index-hankel"></a>Команда MGL: <em></em> <strong>hankel</strong> <em>dat 'dir'</em></dt>
-<dt><a name="index-Hankel-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Hankel</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-Hankel-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Hankel</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdata_005fhankel"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_hankel</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fhankel"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_hankel</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Выполняет преобразование Ханкеля в выбранном направлении(ях). Преобразование Ханкеля есть <em>\sum a_j J_0(k j)</em> (см. <a href="http://en.wikipedia.org/wiki/Hankel_transform">http://en.wikipedia.org/wiki/Hankel_transform</a>).
-</p></dd></dl>
-
-<a name="wavelet"></a><dl>
-<dt><a name="index-wavelet"></a>Команда MGL: <em></em> <strong>wavelet</strong> <em>dat 'dir' <code>k</code></em></dt>
-<dt><a name="index-Wavelet"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Wavelet</strong> <em>(<code>const char *</code>dir, <code>int</code> k)</em></dt>
-<dt><a name="index-mgl_005fdata_005fwavelet"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_wavelet</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir, <code>int</code> k)</em></dt>
-<dd><p>Выполняет преобразование wavelet в выбранном направлении(ях). Параметр <var>dir</var> задает тип:
-‘<samp>d</samp>’ для daubechies, ‘<samp>D</samp>’ для центрированного daubechies, ‘<samp>h</samp>’ для haar, ‘<samp>H</samp>’ для центрированного haar, ‘<samp>b</samp>’ для bspline, ‘<samp>B</samp>’ для центрированного bspline. Если указан символ ‘<samp>i</samp>’, то выполняется обратное преобразование. Параметр <var>k</var> задает размер преобразования.
-</p></dd></dl>
-
-<a name="swap"></a><dl>
-<dt><a name="index-swap"></a>Команда MGL: <em></em> <strong>swap</strong> <em>dat 'dir'</em></dt>
-<dt><a name="index-Swap-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Swap</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-Swap-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Swap</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdata_005fswap"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_swap</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fswap"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_swap</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Меняет местами левую и правую части данных в выбранном направлении(ях). Полезно для отображения результата FFT.
-</p></dd></dl>
-
-<a name="roll"></a><dl>
-<dt><a name="index-roll"></a>Команда MGL: <em></em> <strong>roll</strong> <em>dat 'dir' num</em></dt>
-<dt><a name="index-Roll-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Roll</strong> <em>(<code>char</code> dir, <code>num</code>)</em></dt>
-<dt><a name="index-Roll-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Roll</strong> <em>(<code>char</code> dir, <code>num</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005froll"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_roll</strong> <em>(<code>HMDT</code> dat, <code>char</code> dir, <code>num</code>)</em></dt>
-<dt><a name="index-mgl_005fdatac_005froll"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_roll</strong> <em>(<code>HADT</code> dat, <code>char</code> dir, <code>num</code>)</em></dt>
-<dd><p>Сдвигает данные на <var>num</var> ячеек в выбранном направлении(ях). Соответствует замене индекса на <var>i</var>->(i+<var>num</var>)%nx при <code>dir='x'</code>.
-</p></dd></dl>
-
-<a name="mirror"></a><dl>
-<dt><a name="index-mirror"></a>Команда MGL: <em></em> <strong>mirror</strong> <em>dat 'dir'</em></dt>
-<dt><a name="index-Mirror-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Mirror</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-Mirror-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Mirror</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdata_005fmirror"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_mirror</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fmirror"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_mirror</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Отражает данные в выбранном направлении(ях). Соответствует замене индекса на <var>i</var>-><var>n</var>-<var>i</var>. Отмечу, что похожего эффекта на графике можно достичь используя опции (see <a href="#Command-options">Command options</a>), например, <code>surf dat; xrange 1 -1</code>.
-</p></dd></dl>
-
-<a name="sew"></a><dl>
-<dt><a name="index-sew"></a>Команда MGL: <em></em> <strong>sew</strong> <em>dat ['dir'='xyz' <code>da=2*pi</code>]</em></dt>
-<dt><a name="index-Sew-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Sew</strong> <em>(<code>const char *</code>dir, <code>mreal</code> da=<code>2*M_PI</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fsew"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_sew</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir, <code>mreal</code> da)</em></dt>
-<dd><p>Удаляет скачки данных (например, скачки фазы после обратных тригонометрических функций) с периодом <var>da</var> в выбранном направлении(ях).
-</p></dd></dl>
-
-<a name="smooth"></a><dl>
-<dt><a name="index-smooth"></a>Команда MGL: <em></em> <strong>smooth</strong> <em>data ['dir'='xyz']</em></dt>
-<dt><a name="index-Smooth-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Smooth</strong> <em>(<code>const char *</code>dir=<code>"xyz"</code>, <code>mreal</code> delta=<code>0</code>)</em></dt>
-<dt><a name="index-Smooth-2"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Smooth</strong> <em>(<code>const char *</code>dir=<code>"xyz"</code>, <code>mreal</code> delta=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fsmooth"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_smooth</strong> <em>(<code>HMDT</code> dat, <code>const char *</code>dir, <code>mreal</code> delta)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fsmooth"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_smooth</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dir, <code>mreal</code> delta)</em></dt>
-<dd><p>Сглаживает данные в выбранном направлении(ях) <var>dir</var>. Строка <var>dirs</var> задает направления вдоль которых будет производиться сглаживание. Строка <var>dir</var> может содержать:
-</p><ul>
-<li> ‘<samp>xyz</samp>’ – сглаживание по x-,y-,z-направлениям,
-</li><li> ‘<samp>0</samp>’ – ничего не делает,
-</li><li> ‘<samp>3</samp>’ – линейное усреднение по 3 точкам,
-</li><li> ‘<samp>5</samp>’ – линейное усреднение по 5 точкам,
-</li><li> ‘<samp>d1</samp>’...‘<samp>d9</samp>’ – линейное усреднение по (2*N+1) точкам,
-</li><li> ‘<samp>^</samp>’ – определение верхней границы,
-</li><li> ‘<samp>_</samp>’ – определение нижней границы.
-</li></ul>
-<p>По умолчанию используется квадратичное усреднение по 5 точкам.
-</p></dd></dl>
-
-<a name="envelop"></a><dl>
-<dt><a name="index-envelop"></a>Команда MGL: <em></em> <strong>envelop</strong> <em>dat ['dir'='x']</em></dt>
-<dt><a name="index-Envelop-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Envelop</strong> <em>(<code>char</code> dir=<code>'x'</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fenvelop"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_envelop</strong> <em>(<code>HMDT</code> dat, <code>char</code> dir)</em></dt>
-<dd><p>Находит огибающую данных в выбранном направлении <var>dir</var>.
-</p></dd></dl>
-
-<a name="diffract"></a><dl>
-<dt><a name="index-diffract"></a>Команда MGL: <em></em> <strong>diffract</strong> <em>dat 'how' <code>q</code></em></dt>
-<dt><a name="index-Diffraction"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Diffraction</strong> <em>(<code>const char *</code>how, <code>mreal</code> q)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fdiffr"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_diffr</strong> <em>(<code>HADT</code> dat, <code>const char *</code>how, <code>mreal</code> q)</em></dt>
-<dd><p>Вычисляет один шаг диффракции в конечно-разностной схеме с параметром <var>q</var>=<em>\delta t/\delta x^2</em> используя метод третьего порядка точности. Параметр <var>how</var> может содержать:
-</p><ul>
-<li> ‘<samp>xyz</samp>’ для расчета вдоль x-,y-,z-направления;
-</li><li> ‘<samp>r</samp>’ для аксиально симметричного лапласиана по направлению x;
-</li><li> ‘<samp>0</samp>’ для нулевых граничных условий;
-</li><li> ‘<samp>1</samp>’ для постоянных граничных условий;
-</li><li> ‘<samp>2</samp>’ для линейных граничных условий;
-</li><li> ‘<samp>3</samp>’ для параболлических граничных условий;
-</li><li> ‘<samp>4</samp>’ для экспоненциальных граничных условий;
-</li><li> ‘<samp>5</samp>’ для гауссовых граничных условий.
-</li></ul>
-</dd></dl>
-
-<a name="norm"></a><dl>
-<dt><a name="index-norm"></a>Команда MGL: <em></em> <strong>norm</strong> <em>dat <code>v1 v2 [sym=off dim=0]</code></em></dt>
-<dt><a name="index-Norm-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Norm</strong> <em>(<code>mreal</code> v1=<code>0</code>, <code>mreal</code> v2=<code>1</code>, <code>bool</code> sym=<code>false</code>, <code>long</code> dim=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fnorm"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_norm</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> v1, <code>mreal</code> v2, <code>int</code> sym, <code>long</code> dim)</em></dt>
-<dd><p>Нормирует данные в интервал [<var>v1</var>,<var>v2</var>]. Если <var>sym</var>=<code>true</code>, то используется симметричный интервал [-max(|v1|,|v2|), max(|v1|,|v2|)]. Изменения применяются только к срезам >=<var>dim</var>.
-</p></dd></dl>
-
-<a name="normsl"></a><dl>
-<dt><a name="index-normsl"></a>Команда MGL: <em></em> <strong>normsl</strong> <em>dat <code>v1 v2</code> ['dir'='z' <code>keep=on sym=off</code>]</em></dt>
-<dt><a name="index-NormSl-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>NormSl</strong> <em>(<code>mreal</code> v1=<code>0</code>, <code>mreal</code> v2=<code>1</code>, <code>char</code> dir=<code>'z'</code>, <code>bool</code> keep=<code>true</code>, <code>bool</code> sym=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fnorm_005fslice"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_norm_slice</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> v1, <code>mreal</code> v2, <code>char</code> dir, <code>int</code> keep, <code>int</code> sym)</em></dt>
-<dd><p>Нормирует данные срез-за-срезом в выбранном направлении <var>dir</var> в интервал [<var>v1</var>,<var>v2</var>]. Если <var>sym</var>=<code>true</code>, то используется симметричный интервал [-max(|v1|,|v2|), max(|v1|,|v2|)]. Если <var>keep</var>=<code>true</code>, то максимальное значение k-го среза ограничено величиной
-<em>\sqrt{\sum a_ij(k)/\sum a_ij(0)}</em>.
-</p></dd></dl>
-
-<a name="limit"></a><dl>
-<dt><a name="index-limit"></a>Команда MGL: <em></em> <strong>limit</strong> <em>dat <code>val</code></em></dt>
-<dt><a name="index-Limit"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Limit</strong> <em>(<code>mreal</code> val)</em></dt>
-<dt><a name="index-Limit-1"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>Limit</strong> <em>(<code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fdata_005flimit"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_limit</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> val)</em></dt>
-<dt><a name="index-mgl_005fdatac_005flimit"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_limit</strong> <em>(<code>HADT</code> dat, <code>mreal</code> val)</em></dt>
-<dd><p>Ограничивает амплитуду данных диапазоном [-<var>val</var>,<var>val</var>]. При этом сохраняется исходный знак (фаза для комплексных чисел). Эквивалентно операции <code>a[i] *= abs(a[i])<val?1.:val/abs(a[i]);</code>.
-</p></dd></dl>
-
-<a name="coil"></a><dl>
-<dt><a name="index-coil"></a>Команда MGL: <em></em> <strong>coil</strong> <em>dat <code>v1 v2 [sep=on]</code></em></dt>
-<dt><a name="index-Coil"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Coil</strong> <em>(<code>mreal</code> v1, <code>mreal</code> v2, <code>bool</code> sep=<code>true</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fcoil"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_coil</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> v1, <code>mreal</code> v2, <code>int</code> sep)</em></dt>
-<dd><p>Проецирует периодические данные на диапазон [<var>v1</var>,<var>v2</var>] (аналогично функции <code>mod()</code>). Разделяет ветки по значениям равным <code>NAN</code> если <var>sep</var>=<code>true</code>.
-</p></dd></dl>
-
-<a name="dilate"></a><dl>
-<dt><a name="index-dilate"></a>Команда MGL: <em></em> <strong>dilate</strong> <em>dat <code>[val=1 step=1]</code></em></dt>
-<dt><a name="index-Dilate"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Dilate</strong> <em>(<code>mreal</code> val=<code>1</code>, <code>long</code> step=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fdilate"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_dilate</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> val, <code>long</code> step)</em></dt>
-<dd><p>Возвращает "расширенный" на <var>step</var> ячеек массив из 0 и 1 для данных больших порогового значения <var>val</var>. </p></dd></dl>
-
-<a name="erode"></a><dl>
-<dt><a name="index-erode"></a>Команда MGL: <em></em> <strong>erode</strong> <em>dat <code>[val=1 step=1]</code></em></dt>
-<dt><a name="index-Erode"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>Erode</strong> <em>(<code>mreal</code> val=<code>1</code>, <code>long</code> step=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005ferode"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_erode</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> val, <code>long</code> step)</em></dt>
-<dd><p>Возвращает "суженный" на <var>step</var> ячеек массив из 0 и 1 для данных больших порогового значения <var>val</var>. </p></dd></dl>
-
-
-<hr>
-<a name="Interpolation"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-information" accesskey="n" rel="next">Data information</a>, Previous: <a href="#Data-changing" accesskey="p" rel="prev">Data changing</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Interpolyaciya"></a>
-<h3 class="section">6.8 Интерполяция</h3>
-
-
-<p>Скрипты MGL могут использовать интерполяцию кубическими сплайнами с помощью команд <a href="#evaluate">evaluate</a> или <a href="#refill">refill</a>. Также можно использовать <a href="#resize">resize</a> для массива с новыми размерами.
-</p>
-
-<p>Однако, есть специальные и более быстрые функции при использовании других языков (C/C++/Fortran/Python/...).
-</p>
-<a name="index-Spline"></a>
-<dl>
-<dt><a name="index-Spline-1"></a>Метод класса <code>mglData</code>: <em><code>mreal</code></em> <strong>Spline</strong> <em>(<code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-Spline-2"></a>Метод класса <code>mglDataC</code>: <em><code>dual</code></em> <strong>Spline</strong> <em>(<code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fspline"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_data_spline</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fspline"></a>Функция С: <em><code>dual</code></em> <strong>mgl_datac_spline</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z)</em></dt>
-<dd><p>Интерполирует данные кубическим сплайном в точке <var>x</var> в [0...nx-1], <var>y</var> в [0...ny-1], <var>z</var> в [0...nz-1].
-</p></dd></dl>
-<a name="index-Spline1"></a>
-<dl>
-<dt><a name="index-Spline1-2"></a>Метод класса <code>mglData</code>: <em><code>mreal</code></em> <strong>Spline1</strong> <em>(<code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-Spline1-3"></a>Метод класса <code>mglDataC</code>: <em><code>dual</code></em> <strong>Spline1</strong> <em>(<code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dd><p>Интерполирует данные кубическим сплайном в точке <var>x</var>, <var>y</var>, <var>z</var>, где координаты полагаются в интервале [0, 1].
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Spline-3"></a>Метод класса <code>mglData</code>: <em><code>mreal</code></em> <strong>Spline</strong> <em>(<code>mglPoint</code> &dif, <code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fspline_005fext"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_data_spline_ext</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>mreal *</code>dx, <code>mreal *</code>dy, <code>mreal *</code>dz)</em></dt>
-<dt><a name="index-mgl_005fdatac_005fspline_005fext"></a>Функция С: <em><code>dual</code></em> <strong>mgl_datac_spline_ext</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>dual *</code>dx, <code>dual *</code>dy, <code>dual *</code>dz)</em></dt>
-<dd><p>Интерполирует данные кубическим сплайном в точке <var>x</var> в [0...nx-1], <var>y</var> в [0...ny-1], <var>z</var> в [0...nz-1]. Значения производных в точке записываются в <var>dif</var>.
-</p></dd></dl>
-<a name="index-Spline1-1"></a>
-<dl>
-<dt><a name="index-Spline1-4"></a>Метод класса <code>mglData</code>: <em><code>mreal</code></em> <strong>Spline1</strong> <em>(<code>mglPoint</code> &dif, <code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dd><p>Интерполирует данные кубическим сплайном в точке <var>x</var>, <var>y</var>, <var>z</var>, где координаты полагаются в интервале [0, 1]. Значения производных в точке записываются в <var>dif</var>.
-</p></dd></dl>
-
-
-<a name="index-Linear"></a>
-<dl>
-<dt><a name="index-Linear-1"></a>Метод класса <code>mglData</code>: <em><code>mreal</code></em> <strong>Linear</strong> <em>(<code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-Linear-2"></a>Метод класса <code>mglDataC</code>: <em><code>dual</code></em> <strong>Linear</strong> <em>(<code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005flinear"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_data_linear</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z)</em></dt>
-<dt><a name="index-mgl_005fdatac_005flinear"></a>Функция С: <em><code>dual</code></em> <strong>mgl_datac_linear</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z)</em></dt>
-<dd><p>Интерполирует данные линейной функцией в точке <var>x</var> в [0...nx-1], <var>y</var> в [0...ny-1], <var>z</var> в [0...nz-1].
-</p></dd></dl>
-<a name="index-Linear1"></a>
-<dl>
-<dt><a name="index-Linear1-2"></a>Метод класса <code>mglData</code>: <em><code>mreal</code></em> <strong>Linear1</strong> <em>(<code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-Linear1-3"></a>Метод класса <code>mglDataC</code>: <em><code>dual</code></em> <strong>Linear1</strong> <em>(<code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dd><p>Интерполирует данные линейной функцией в точке <var>x</var>, <var>y</var>, <var>z</var>, где координаты полагаются в интервале [0, 1].
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Linear-3"></a>Метод класса <code>mglData</code>: <em><code>mreal</code></em> <strong>Linear</strong> <em>(<code>mglPoint</code> &dif, <code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-Linear-4"></a>Метод класса <code>mglDataC</code>: <em><code>dual</code></em> <strong>Linear</strong> <em>(<code>mglPoint</code> &dif, <code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005flinear_005fext"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_data_linear_ext</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>mreal *</code>dx, <code>mreal *</code>dy, <code>mreal *</code>dz)</em></dt>
-<dt><a name="index-mgl_005fdatac_005flinear_005fext"></a>Функция С: <em><code>dual</code></em> <strong>mgl_datac_linear_ext</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z, <code>dual *</code>dx, <code>dual *</code>dy, <code>dual *</code>dz)</em></dt>
-<dd><p>Интерполирует данные линейной функцией в точке <var>x</var>, <var>y</var>, <var>z</var>, где координаты полагаются в интервале [0, 1]. Значения производных в точке записываются в <var>dif</var>.
-</p></dd></dl>
-<a name="index-Linear1-1"></a>
-<dl>
-<dt><a name="index-Linear1-4"></a>Метод класса <code>mglData</code>: <em><code>mreal</code></em> <strong>Linear1</strong> <em>(<code>mglPoint</code> &dif, <code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-Linear1-5"></a>Метод класса <code>mglDataC</code>: <em><code>dual</code></em> <strong>Linear1</strong> <em>(<code>mglPoint</code> &dif, <code>mreal</code> x, <code>mreal</code> y=<code>0</code>, <code>mreal</code> z=<code>0</code>) <code>const</code></em></dt>
-<dd><p>Интерполирует данные линейной функцией в точке <var>x</var>, <var>y</var>, <var>z</var>, где координаты полагаются в интервале [0, 1]. Значения производных в точке записываются в <var>dif</var>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Data-information"></a>
-<div class="header">
-<p>
-Next: <a href="#Operators" accesskey="n" rel="next">Operators</a>, Previous: <a href="#Interpolation" accesskey="p" rel="prev">Interpolation</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Informacionnye-funkcii"></a>
-<h3 class="section">6.9 Информационные функции</h3>
-
-
-<p>В MathGL есть ряд функций для получения свойств массива данных. В MGL скриптах большинство из них реализовано в виде "суффиксов". Суффиксы дают числовое значение некоторой характеристики массива данных. Например, его размер, минимальное и максимальное значение, сумму элементов и т.д. Суффиксы начинаются с точки ‘<samp>.</samp>’ сразу после массива (без пробелов). Например, <code>a.nx</code> даст размер массива <var>a</var> вдоль x, <code>b(1).max</code> даст максимальное значение второй колонки массива <var>b</var>, <code>(c(:,0)^2).sum</code> даст сумму квадратов в первой строке массива <var>c</var> и т.д.
-</p>
-
-<a name="index-PrintInfo"></a>
-<a name="info"></a><dl>
-<dt><a name="index-info"></a>Команда MGL: <em></em> <strong>info</strong> <em>dat</em></dt>
-<dt><a name="index-PrintInfo-1"></a>Метод класса <code>mglDataA</code>: <em><code>const char *</code></em> <strong>PrintInfo</strong> <em>() <code>const</code></em></dt>
-<dt><a name="index-PrintInfo-2"></a>Метод класса <code>mglDataA</code>: <em><code>void</code></em> <strong>PrintInfo</strong> <em>(<code>FILE *</code>fp) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005finfo"></a>Функция С: <em><code>const char *</code></em> <strong>mgl_data_info</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dt><a name="index-mgl_005fdata_005finfo-1"></a>Fortran процедура: <em><code></code></em> <strong>mgl_data_info</strong> <em>(<code>long</code> dat, <code>char *</code>out, <code>int</code> len)</em></dt>
-<dd><p>Возвращает строку с информацией о данных (размеры, моменты и пр.) или пишет её в файл. В MGL скрипте печатает её как сообщение.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-info-1"></a>Команда MGL: <em></em> <strong>info</strong> <em>'txt'</em></dt>
-<dd><p>Печатает строку <var>txt</var> как сообщение.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-info-2"></a>Команда MGL: <em></em> <strong>info</strong> <em>val</em></dt>
-<dd><p>Печатает значение числа <var>val</var> как сообщение.
-</p></dd></dl>
-
-<a name="print"></a><dl>
-<dt><a name="index-print-1"></a>Команда MGL: <em></em> <strong>print</strong> <em>dat</em></dt>
-<dt><a name="index-print-2"></a>Команда MGL: <em></em> <strong>print</strong> <em>'txt'</em></dt>
-<dt><a name="index-print-3"></a>Команда MGL: <em></em> <strong>print</strong> <em>val</em></dt>
-<dd><p>Аналогично <a href="#info">info</a>, но сразу выводит в stdout.
-</p></dd></dl>
-
-<a name="echo"></a><dl>
-<dt><a name="index-echo"></a>Команда MGL: <em></em> <strong>echo</strong> <em>dat</em></dt>
-<dd><p>Печатает все значения массива <var>dat</var> как сообщение.
-</p></dd></dl>
-
-<a name="progress"></a><dl>
-<dt><a name="index-progress"></a>Команда MGL: <em></em> <strong>progress</strong> <em><code>val max</code></em></dt>
-<dt><a name="index-Progress"></a>Метод класса <code>mglGraph</code>: <em><code>void</code></em> <strong>Progress</strong> <em>(<code>int</code> val, <code>int</code> max)</em></dt>
-<dt><a name="index-mgl_005fprogress"></a>Функция С: <em><code>void</code></em> <strong>mgl_progress</strong> <em>(<code>int</code> val, <code>int</code> max)</em></dt>
-<dd><p>Отображает прогресс чего-либо как заполненную полоску с относительной длиной <var>val</var>/<var>max</var>. На данный момент работает только в консоли и основанных на FLTK программах, включая <code>mgllab</code> и <code>mglview</code>.
-</p></dd></dl>
-
-
-<a name="index-GetNx"></a>
-<a name="index-GetNy"></a>
-<a name="index-GetNz"></a>
-<a name="g_t_002enx"></a><a name="g_t_002eny"></a><a name="g_t_002enz"></a><dl>
-<dt><a name="index-_002enx"></a>MGL suffix: <em>(dat)</em> <strong>.nx</strong></dt>
-<dt><a name="index-_002eny"></a>MGL suffix: <em>(dat)</em> <strong>.ny</strong></dt>
-<dt><a name="index-_002enz"></a>MGL suffix: <em>(dat)</em> <strong>.nz</strong></dt>
-<dt><a name="index-GetNx-2"></a>Метод класса <code>mglDataA</code>: <em><code>long</code></em> <strong>GetNx</strong> <em>()</em></dt>
-<dt><a name="index-GetNy-2"></a>Метод класса <code>mglDataA</code>: <em><code>long</code></em> <strong>GetNy</strong> <em>()</em></dt>
-<dt><a name="index-GetNz-2"></a>Метод класса <code>mglDataA</code>: <em><code>long</code></em> <strong>GetNz</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fdata_005fget_005fnx-1"></a>Функция С: <em><code>long</code></em> <strong>mgl_data_get_nx</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dt><a name="index-mgl_005fdata_005fget_005fny-1"></a>Функция С: <em><code>long</code></em> <strong>mgl_data_get_ny</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dt><a name="index-mgl_005fdata_005fget_005fnz-1"></a>Функция С: <em><code>long</code></em> <strong>mgl_data_get_nz</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dd><p>Возвращает размер данных в направлении x, y и z соответственно.
-</p></dd></dl>
-
-
-
-<a name="index-Maximal"></a>
-<a name="g_t_002emax"></a><dl>
-<dt><a name="index-_002emax"></a>MGL suffix: <em>(dat)</em> <strong>.max</strong></dt>
-<dt><a name="index-Maximal-1"></a>Метод класса <code>mglDataA</code>: <em><code>mreal</code></em> <strong>Maximal</strong> <em>() <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmax"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_data_max</strong> <em>(<code>HCDT</code> dat)</em></dt>
-<dd><p>Возвращает максимальное значение массива данных.
-</p></dd></dl>
-
-<a name="index-Minimal"></a>
-<a name="g_t_002emin"></a><dl>
-<dt><a name="index-_002emin"></a>MGL suffix: <em>(dat)</em> <strong>.min</strong></dt>
-<dt><a name="index-Minimal-1"></a>Метод класса <code>mglDataA</code>: <em><code>mreal</code></em> <strong>Minimal</strong> <em>() <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmin"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_data_min</strong> <em>(<code>HMDT</code> dat) <code>const</code></em></dt>
-<dd><p>Возвращает минимальное значение массива данных.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Minimal-2"></a>Метод класса <code>mglDataA</code>: <em><code>mreal</code></em> <strong>Minimal</strong> <em>(<code>int</code> &i, <code>int</code> &j, <code>int</code> &k) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmin_005fint"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_data_min_int</strong> <em>(<code>HCDT</code> dat, <code>int</code> *i, <code>int</code> *j, <code>int</code> *k)</em></dt>
-<dd><p>Возвращает максимальное значение массива данных и сохраняет его положение в переменные <var>i</var>, <var>j</var>, <var>k</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Maximal-2"></a>Метод класса <code>mglDataA</code>: <em><code>mreal</code></em> <strong>Maximal</strong> <em>(<code>int</code> &i, <code>int</code> &j, <code>int</code> &k) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmax_005fint"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_data_max_int</strong> <em>(<code>HCDT</code> dat, <code>int</code> *i, <code>int</code> *j, <code>int</code> *k)</em></dt>
-<dd><p>Возвращает минимальное значение массива данных и сохраняет его положение в переменные <var>i</var>, <var>j</var>, <var>k</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Minimal-3"></a>Метод класса <code>mglDataA</code>: <em><code>mreal</code></em> <strong>Minimal</strong> <em>(<code>mreal</code> &x, <code>mreal</code> &y, <code>mreal</code> &z) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmin_005freal"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_data_min_real</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> *x, <code>mreal</code> *y, <code>mreal</code> *z)</em></dt>
-<dd><p>Возвращает максимальное значение массива данных и его приближенное (интерполированное) положение в переменные <var>x</var>, <var>y</var>, <var>z</var>.
-</p></dd></dl>
-
-<a name="g_t_002emx"></a><a name="g_t_002emy"></a><a name="g_t_002emz"></a><dl>
-<dt><a name="index-_002emx"></a>MGL suffix: <em>(dat)</em> <strong>.mx</strong></dt>
-<dt><a name="index-_002emy"></a>MGL suffix: <em>(dat)</em> <strong>.my</strong></dt>
-<dt><a name="index-_002emz"></a>MGL suffix: <em>(dat)</em> <strong>.mz</strong></dt>
-<dt><a name="index-Maximal-3"></a>Метод класса <code>mglDataA</code>: <em><code>mreal</code></em> <strong>Maximal</strong> <em>(<code>mreal</code> &x, <code>mreal</code> &y, <code>mreal</code> &z) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmax_005freal"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_data_max_real</strong> <em>(<code>HCDT</code> dat, <code>mreal</code> *x, <code>mreal</code> *y, <code>mreal</code> *z)</em></dt>
-<dd><p>Возвращает минимальное значение массива данных и его приближенное (интерполированное) положение в переменные <var>x</var>, <var>y</var>, <var>z</var>.
-</p></dd></dl>
-
-<a name="g_t_002emxf"></a><a name="g_t_002emyf"></a><a name="g_t_002emzf"></a><a name="g_t_002emxl"></a><a name="g_t_002emyl"></a><a name="g_t_002emzl"></a><dl>
-<dt><a name="index-_002emxf"></a>MGL suffix: <em>(dat)</em> <strong>.mxf</strong></dt>
-<dt><a name="index-_002emyf"></a>MGL suffix: <em>(dat)</em> <strong>.myf</strong></dt>
-<dt><a name="index-_002emzf"></a>MGL suffix: <em>(dat)</em> <strong>.mzf</strong></dt>
-<dt><a name="index-_002emxl"></a>MGL suffix: <em>(dat)</em> <strong>.mxl</strong></dt>
-<dt><a name="index-_002emyl"></a>MGL suffix: <em>(dat)</em> <strong>.myl</strong></dt>
-<dt><a name="index-_002emzl"></a>MGL suffix: <em>(dat)</em> <strong>.mzl</strong></dt>
-<dt><a name="index-Maximal-4"></a>Метод класса <code>mglDataA</code>: <em><code>long</code></em> <strong>Maximal</strong> <em>(<code>char</code> dir, <code>long</code> from) <code>const</code></em></dt>
-<dt><a name="index-Maximal-5"></a>Метод класса <code>mglDataA</code>: <em><code>long</code></em> <strong>Maximal</strong> <em>(<code>char</code> dir, <code>long</code> from, <code>long</code> &p1, <code>long</code> &p2) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmax_005ffirstl"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_data_max_firstl</strong> <em>(<code>HCDT</code> dat, <code>char</code> dir, <code>long</code> from, <code>long</code> *p1, <code>long</code> *p2)</em></dt>
-<dd><p>Возвращает положение первого (последнего при <var>from</var><0) максимума в направлении <var>dir</var>, начиная с позиции <var>from</var>. Положение остальных координат для максимума сохраняется в <var>p1</var>, <var>p2</var>.
-</p></dd></dl>
-
-
-<a name="index-Momentum-1"></a>
-<a name="g_t_002eax"></a><a name="g_t_002eay"></a><a name="g_t_002eaz"></a><a name="g_t_002eaa"></a><a name="g_t_002esum"></a><a name="g_t_002ewx"></a><a name="g_t_002ewy"></a><a name="g_t_002ewz"></a><a name="g_t_002ewa"></a><a name="g_t_002esx"></a><a name="g_t_002esy"></a><a name="g_t_002esz"></a><a name="g_t_002esa"></a><a name="g_t_002ekx"></a><a name="g_t_002eky"></a><a name="g_t_002ekz"></a><a name="g_t_002eka"></a><dl>
-<dt><a name="index-_002esum"></a>MGL suffix: <em>(dat)</em> <strong>.sum</strong></dt>
-<dt><a name="index-_002eax"></a>MGL suffix: <em>(dat)</em> <strong>.ax</strong></dt>
-<dt><a name="index-_002eay"></a>MGL suffix: <em>(dat)</em> <strong>.ay</strong></dt>
-<dt><a name="index-_002eaz"></a>MGL suffix: <em>(dat)</em> <strong>.az</strong></dt>
-<dt><a name="index-_002eaa"></a>MGL suffix: <em>(dat)</em> <strong>.aa</strong></dt>
-<dt><a name="index-_002ewx"></a>MGL suffix: <em>(dat)</em> <strong>.wx</strong></dt>
-<dt><a name="index-_002ewy"></a>MGL suffix: <em>(dat)</em> <strong>.wy</strong></dt>
-<dt><a name="index-_002ewz"></a>MGL suffix: <em>(dat)</em> <strong>.wz</strong></dt>
-<dt><a name="index-_002ewa"></a>MGL suffix: <em>(dat)</em> <strong>.wa</strong></dt>
-<dt><a name="index-_002esx"></a>MGL suffix: <em>(dat)</em> <strong>.sx</strong></dt>
-<dt><a name="index-_002esy"></a>MGL suffix: <em>(dat)</em> <strong>.sy</strong></dt>
-<dt><a name="index-_002esz"></a>MGL suffix: <em>(dat)</em> <strong>.sz</strong></dt>
-<dt><a name="index-_002esa"></a>MGL suffix: <em>(dat)</em> <strong>.sa</strong></dt>
-<dt><a name="index-_002ekx"></a>MGL suffix: <em>(dat)</em> <strong>.kx</strong></dt>
-<dt><a name="index-_002eky"></a>MGL suffix: <em>(dat)</em> <strong>.ky</strong></dt>
-<dt><a name="index-_002ekz"></a>MGL suffix: <em>(dat)</em> <strong>.kz</strong></dt>
-<dt><a name="index-_002eka"></a>MGL suffix: <em>(dat)</em> <strong>.ka</strong></dt>
-<dt><a name="index-Momentum-4"></a>Метод класса <code>mglDataA</code>: <em><code>mreal</code></em> <strong>Momentum</strong> <em>(<code>char</code> dir, <code>mreal</code> &a, <code>mreal</code> &w) <code>const</code></em></dt>
-<dt><a name="index-Momentum-5"></a>Метод класса <code>mglDataA</code>: <em><code>mreal</code></em> <strong>Momentum</strong> <em>(<code>char</code> dir, <code>mreal</code> &m, <code>mreal</code> &w, <code>mreal</code> &s, <code>mreal</code> &k) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005fmomentum_005fval"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_data_momentum_val</strong> <em>(<code>HCDT</code> dat, <code>char</code> dir, <code>mreal</code> *a, <code>mreal</code> *w, <code>mreal</code> *s, <code>mreal</code> *k)</em></dt>
-<dd><p>Возвращает нулевой момент (энергию, <em>I=\sum a_i</em>) и записывает первый (среднее, <em>m = \sum \xi_i a_i/I</em>), второй (ширину, <em>w^2 = \sum (\xi_i-m)^2 a_i/I</em>), третий (асимметрия, <em>s = \sum (\xi_i-m)^3 a_i/ I w^3</em>) и четвёртый моменты (эксцесс, <em>k = \sum (\xi_i-m)^4 a_i / 3 I w^4</em>)). Здесь <em>\xi</em> – соответствующая координата если <var>dir</var> равно ‘<samp>'x'</samp>’, ‘<samp>'y'</samp>’, ‘<samp>'z'</samp>’. В противном случае среднее, ширина, асимметрия, эксцесс равны <em>m = \sum a_i/N</em>, <em>w^2 = \sum (a_i-m)^2/N</em> и т.д.
-</p></dd></dl>
-
-<a name="g_t_002efst"></a><dl>
-<dt><a name="index-_002efst"></a>MGL suffix: <em>(dat)</em> <strong>.fst</strong></dt>
-<dd><a name="index-Find"></a>
-</dd><dt><a name="index-Find-1"></a>Метод класса <code>mglDataA</code>: <em><code>mreal</code></em> <strong>Find</strong> <em>(<code>const char *</code>cond, <code>int</code> &i, <code>int</code> &j, <code>int</code> &k) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005ffirst"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_data_first</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>cond, <code>int</code> *i, <code>int</code> *j, <code>int</code> *k)</em></dt>
-<dd><p>Находит положение (после заданного в <var>i</var>, <var>j</var>, <var>k</var>) первого не нулевого значения формулы <var>cond</var>. Функция возвращает найденное значение и записывает его положение в <var>i</var>, <var>j</var>, <var>k</var>.
-</p></dd></dl>
-
-<a name="g_t_002elst"></a><dl>
-<dt><a name="index-_002elst"></a>MGL suffix: <em>(dat)</em> <strong>.lst</strong></dt>
-<dd><a name="index-Last"></a>
-</dd><dt><a name="index-Last-1"></a>Метод класса <code>mglDataA</code>: <em><code>mreal</code></em> <strong>Last</strong> <em>(<code>const char *</code>cond, <code>int</code> &i, <code>int</code> &j, <code>int</code> &k) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005flast"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_data_last</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>cond, <code>int</code> *i, <code>int</code> *j, <code>int</code> *k)</em></dt>
-<dd><p>Находит положение (перед заданного в <var>i</var>, <var>j</var>, <var>k</var>) последнего не нулевого значения формулы <var>cond</var>. Функция возвращает найденное значение и записывает его положение в <var>i</var>, <var>j</var>, <var>k</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Find-2"></a>Метод класса <code>mglDataA</code>: <em><code>int</code></em> <strong>Find</strong> <em>(<code>const char *</code>cond, <code>char</code> dir, <code>int</code> i=<code>0</code>, <code>int</code> j=<code>0</code>, <code>int</code> k=<code>0</code>) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005ffind"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_data_find</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>cond, <code>int</code> i, <code>int</code> j, <code>int</code> k)</em></dt>
-<dd><p>Возвращает положение первого в направлении <var>dir</var> не нулевого значения формулы <var>cond</var>. Поиск начинается с точки {i,j,k}.
-</p></dd></dl>
-<a name="index-FindAny"></a>
-<dl>
-<dt><a name="index-FindAny-1"></a>Метод класса <code>mglDataA</code>: <em><code>bool</code></em> <strong>FindAny</strong> <em>(<code>const char *</code>cond) <code>const</code></em></dt>
-<dt><a name="index-mgl_005fdata_005ffind_005fany"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_data_find_any</strong> <em>(<code>HCDT</code> dat, <code>const char *</code>cond)</em></dt>
-<dd><p>Определяет есть ли хоть одно значение массива, удовлетворяющее условию <var>cond</var>.
-</p></dd></dl>
-
-<a name="g_t_002ea"></a><dl>
-<dt><a name="index-_002ea"></a>MGL suffix: <em>(dat)</em> <strong>.a</strong></dt>
-<dd><p>Возвращает первое число массива (для <code>.a</code> это <code>dat->a[0]</code>).
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Operators"></a>
-<div class="header">
-<p>
-Next: <a href="#Global-functions" accesskey="n" rel="next">Global functions</a>, Previous: <a href="#Data-information" accesskey="p" rel="prev">Data information</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Operatory"></a>
-<h3 class="section">6.10 Операторы</h3>
-
-
-<dl>
-<dt><a name="index-copy-5"></a>Команда MGL: <em></em> <strong>copy</strong> <em><small>DAT</small> dat2 ['eq'='']</em></dt>
-<dt><a name="index-operator_003d"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>operator=</strong> <em>(<code>const mglDataA &</code>d)</em></dt>
-<dd><p>Копирует данные из другого экземпляра.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-copy-6"></a>Команда MGL: <em></em> <strong>copy</strong> <em>dat <code>val</code></em></dt>
-<dt><a name="index-operator_003d-1"></a>Метод класса <code>mreal</code>: <em><code>void</code></em> <strong>operator=</strong> <em>(<code>mreal</code> val)</em></dt>
-<dd><p>Устанавливает все значения массива равными <var>val</var>.
-</p></dd></dl>
-
-<a name="multo"></a><dl>
-<dt><a name="index-multo"></a>Команда MGL: <em></em> <strong>multo</strong> <em>dat dat2</em></dt>
-<dt><a name="index-multo-1"></a>Команда MGL: <em></em> <strong>multo</strong> <em>dat <code>val</code></em></dt>
-<dt><a name="index-operator_002a_003d"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>operator*=</strong> <em>(<code>const mglDataA &</code>d)</em></dt>
-<dt><a name="index-operator_002a_003d-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>operator*=</strong> <em>(<code>mreal</code> d)</em></dt>
-<dt><a name="index-mgl_005fdata_005fmul_005fdat"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_mul_dat</strong> <em>(<code>HMDT</code> dat, <code>HCDT</code> d)</em></dt>
-<dt><a name="index-mgl_005fdata_005fmul_005fnum"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_mul_num</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> d)</em></dt>
-<dd><p>Поэлементно умножает на массив <var>d</var> или на число <var>val</var>.
-</p></dd></dl>
-
-<a name="divto"></a><dl>
-<dt><a name="index-divto"></a>Команда MGL: <em></em> <strong>divto</strong> <em>dat dat2</em></dt>
-<dt><a name="index-divto-1"></a>Команда MGL: <em></em> <strong>divto</strong> <em>dat <code>val</code></em></dt>
-<dt><a name="index-operator_002f_003d"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>operator/=</strong> <em>(<code>const mglDataA &</code>d)</em></dt>
-<dt><a name="index-operator_002f_003d-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>operator/=</strong> <em>(<code>mreal</code> d)</em></dt>
-<dt><a name="index-mgl_005fdata_005fdiv_005fdat"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_div_dat</strong> <em>(<code>HMDT</code> dat, <code>HCDT</code> d)</em></dt>
-<dt><a name="index-mgl_005fdata_005fdiv_005fnum"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_div_num</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> d)</em></dt>
-<dd><p>Поэлементно делит на массив <var>d</var> или на число <var>val</var>.
-</p></dd></dl>
-
-<a name="addto"></a><dl>
-<dt><a name="index-addto"></a>Команда MGL: <em></em> <strong>addto</strong> <em>dat dat2</em></dt>
-<dt><a name="index-addto-1"></a>Команда MGL: <em></em> <strong>addto</strong> <em>dat <code>val</code></em></dt>
-<dt><a name="index-operator_002b_003d"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>operator+=</strong> <em>(<code>const mglDataA &</code>d)</em></dt>
-<dt><a name="index-operator_002b_003d-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>operator+=</strong> <em>(<code>mreal</code> d)</em></dt>
-<dt><a name="index-mgl_005fdata_005fadd_005fdat"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_add_dat</strong> <em>(<code>HMDT</code> dat, <code>HCDT</code> d)</em></dt>
-<dt><a name="index-mgl_005fdata_005fadd_005fnum"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_add_num</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> d)</em></dt>
-<dd><p>Поэлементно прибавляет <var>d</var> или число <var>val</var>.
-</p></dd></dl>
-
-<a name="subto"></a><dl>
-<dt><a name="index-subto"></a>Команда MGL: <em></em> <strong>subto</strong> <em>dat dat2</em></dt>
-<dt><a name="index-subto-1"></a>Команда MGL: <em></em> <strong>subto</strong> <em>dat <code>val</code></em></dt>
-<dt><a name="index-operator_002d_003d"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>operator-=</strong> <em>(<code>const mglDataA &</code>d)</em></dt>
-<dt><a name="index-operator_002d_003d-1"></a>Метод класса <code>mglData</code>: <em><code>void</code></em> <strong>operator-=</strong> <em>(<code>mreal</code> d)</em></dt>
-<dt><a name="index-mgl_005fdata_005fsub_005fdat"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_sub_dat</strong> <em>(<code>HMDT</code> dat, <code>HCDT</code> d)</em></dt>
-<dt><a name="index-mgl_005fdata_005fsub_005fnum"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_sub_num</strong> <em>(<code>HMDT</code> dat, <code>mreal</code> d)</em></dt>
-<dd><p>Поэлементно вычитает <var>d</var> или число <var>val</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_002b"></a>Library Function: <em>mglData</em> <strong>operator+</strong> <em>(<code>const mglDataA &</code>a, <code>const mglDataA &</code>b)</em></dt>
-<dt><a name="index-operator_002b-1"></a>Library Function: <em>mglData</em> <strong>operator+</strong> <em>(<code>mreal</code> a, <code>const mglDataA &</code>b)</em></dt>
-<dt><a name="index-operator_002b-2"></a>Library Function: <em>mglData</em> <strong>operator+</strong> <em>(<code>const mglDataA &</code>a, <code>mreal</code> b)</em></dt>
-<dd><p>Возвращает поэлементную сумму данных.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_002d"></a>Library Function: <em>mglData</em> <strong>operator-</strong> <em>(<code>const mglDataA &</code>a, <code>const mglDataA &</code>b)</em></dt>
-<dt><a name="index-operator_002d-1"></a>Library Function: <em>mglData</em> <strong>operator-</strong> <em>(<code>mreal</code> a, <code>const mglDataA &</code>b)</em></dt>
-<dt><a name="index-operator_002d-2"></a>Library Function: <em>mglData</em> <strong>operator-</strong> <em>(<code>const mglDataA &</code>a, <code>mreal</code> b)</em></dt>
-<dd><p>Возвращает поэлементную разность данных.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_002a"></a>Library Function: <em>mglData</em> <strong>operator*</strong> <em>(<code>const mglDataA &</code>a, <code>const mglDataA &</code>b)</em></dt>
-<dt><a name="index-operator_002a-1"></a>Library Function: <em>mglData</em> <strong>operator*</strong> <em>(<code>mreal</code> a, <code>const mglDataA &</code>b)</em></dt>
-<dt><a name="index-operator_002a-2"></a>Library Function: <em>mglData</em> <strong>operator*</strong> <em>(<code>const mglDataA &</code>a, <code>mreal</code> b)</em></dt>
-<dd><p>Возвращает поэлементное произведение данных.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_002f"></a>Library Function: <em>mglData</em> <strong>operator/</strong> <em>(<code>const mglDataA &</code>a, <code>const mglDataA &</code>b)</em></dt>
-<dt><a name="index-operator_002f-1"></a>Library Function: <em>mglData</em> <strong>operator/</strong> <em>(<code>const mglDataA &</code>a, <code>mreal</code> b)</em></dt>
-<dd><p>Возвращает поэлементное деление данных.
-</p></dd></dl>
-
-
-<hr>
-<a name="Global-functions"></a>
-<div class="header">
-<p>
-Next: <a href="#Evaluate-expression" accesskey="n" rel="next">Evaluate expression</a>, Previous: <a href="#Operators" accesskey="p" rel="prev">Operators</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Globalxnye-funkcii"></a>
-<h3 class="section">6.11 Глобальные функции</h3>
-
-
-<p>Эти функции не методы класса <code>mglData</code>, но они дают дополнительные возможности по обработке данных. Поэтому я поместил их в эту главу.
-</p>
-<a name="transform"></a><dl>
-<dt><a name="index-transform"></a>Команда MGL: <em></em> <strong>transform</strong> <em><small>DAT</small> 'type' real imag</em></dt>
-<dt><a name="index-mglTransform"></a>Общая функция: <em><code>mglData</code></em> <strong>mglTransform</strong> <em>(<code>const mglDataA &</code>real, <code>const mglDataA &</code>imag, <code>const char *</code>type)</em></dt>
-<dt><a name="index-mgl_005ftransform"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_transform</strong> <em>(<code>HCDT</code> real, <code>HCDT</code> imag, <code>const char *</code>type)</em></dt>
-<dd><p>Выполняет интегральное преобразование комплексных данных <var>real</var>, <var>imag</var> в выбранном направлении и возвращает модуль результата. Порядок и тип преобразований задается строкой <var>type</var>: первый символ для x-направления, второй для y-направления, третий для z-направления. Возможные символы: ‘<samp>f</samp>’ – прямое преобразование Фурье, ‘<samp>i</samp>’ – обратное преобразование Фурье, ‘<samp>s</samp>’ – синус преобразование, ‘<samp>c</samp>’ – косинус преобразование, ‘<samp>h</samp>’ – преобразование Ханкеля, ‘<samp>n</samp>’ или ‘<samp> </samp>’ – нет преобразования.
-</p></dd></dl>
-
-<a name="transforma"></a><dl>
-<dt><a name="index-transforma"></a>Команда MGL: <em></em> <strong>transforma</strong> <em><small>DAT</small> 'type' ampl phase</em></dt>
-<dt><a name="index-mglTransformA"></a>Общая функция: <em><code>mglData</code></em> <strong>mglTransformA</strong> <em><code>const mglDataA &</code>ampl, <code>const mglDataA &</code>phase, <code>const char *</code>type)</em></dt>
-<dt><a name="index-mgl_005ftransform_005fa"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_transform_a</strong> <em><code>HCDT</code> ampl, <code>HCDT</code> phase, <code>const char *</code>type)</em></dt>
-<dd><p>Аналогично предыдущему с заданными амплитудой <var>ampl</var> и фазой <var>phase</var> комплексных чисел.
-</p></dd></dl>
-
-<a name="fourier"></a><dl>
-<dt><a name="index-fourier"></a>Команда MGL: <em></em> <strong>fourier</strong> <em>reDat imDat 'dir'</em></dt>
-<dt><a name="index-fourier-1"></a>Команда MGL: <em></em> <strong>fourier</strong> <em>complexDat 'dir'</em></dt>
-<dt><a name="index-mglFourier"></a>Общая функция: <em><code>void</code></em> <strong>mglFourier</strong> <em><code>const mglDataA &</code>re, <code>const mglDataA &</code>im, <code>const char *</code>dir)</em></dt>
-<dt><a name="index-FFT-1"></a>Метод класса <code>mglDataC</code>: <em><code>void</code></em> <strong>FFT</strong> <em>(<code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdata_005ffourier"></a>Функция С: <em><code>void</code></em> <strong>mgl_data_fourier</strong> <em><code>HCDT</code> re, <code>HCDT</code> im, <code>const char *</code>dir)</em></dt>
-<dt><a name="index-mgl_005fdatac_005ffft-1"></a>Функция С: <em><code>void</code></em> <strong>mgl_datac_fft</strong> <em>(<code>HADT</code> dat, <code>const char *</code>dir)</em></dt>
-<dd><p>Выполняет Фурье преобразование для комплексных данных <var>re</var>+i*<var>im</var> в направлениях <var>dir</var>. Результат помещается обратно в массивы <var>re</var> и <var>im</var>. Если <var>dir</var> содержит ‘<samp>i</samp>’, то выполняется обратное преобразование Фурье.
-</p></dd></dl>
-
-<a name="stfad"></a><dl>
-<dt><a name="index-stfad"></a>Команда MGL: <em></em> <strong>stfad</strong> <em><small>RES</small> real imag <code>dn</code> ['dir'='x']</em></dt>
-<dt><a name="index-mglSTFA"></a>Общая функция: <em><code>mglData</code></em> <strong>mglSTFA</strong> <em>(<code>const mglDataA &</code>real, <code>const mglDataA &</code>imag, <code>int</code> dn, <code>char</code> dir=<code>'x'</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fstfa"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_stfa</strong> <em>(<code>HCDT</code> real, <code>HCDT</code> imag, <code>int</code> dn, <code>char</code> dir)</em></dt>
-<dd><p>Выполняет оконное преобразование Фурье длиной <var>dn</var> для комплексных данных <var>real</var>, <var>imag</var> и возвращает модуль результата. Например, для <var>dir</var>=‘<samp>x</samp>’ результат будет иметь размер {int(nx/dn), dn, ny} и будет равен <em>res[i,j,k]=|\sum_d^dn exp(I*j*d)*(real[i*dn+d,k]+I*imag[i*dn+d,k])|/dn</em>.
-</p></dd></dl>
-
-
-<a name="triangulate"></a><dl>
-<dt><a name="index-triangulate"></a>Команда MGL: <em></em> <strong>triangulate</strong> <em>dat xdat ydat</em></dt>
-<dt><a name="index-mglTriangulation"></a>Общая функция: <em><code>mglData</code></em> <strong>mglTriangulation</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y)</em></dt>
-<dt><a name="index-mgl_005ftriangulation_005f2d"></a>Функция С: <em><code>void</code></em> <strong>mgl_triangulation_2d</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y)</em></dt>
-<dd><p>Выполняет триангуляцию Делоне для точек на плоскости и возвращает массив, пригодный для <a href="#triplot">triplot</a> и <a href="#tricont">tricont</a>. См. раздел <a href="#Making-regular-data">Making regular data</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="tridmat"></a><dl>
-<dt><a name="index-tridmat"></a>Команда MGL: <em></em> <strong>tridmat</strong> <em><small>RES ADAT BDAT CDAT DDAT</small> 'how'</em></dt>
-<dt><a name="index-mglTridMat"></a>Общая функция: <em><code>mglData</code></em> <strong>mglTridMat</strong> <em>(<code>const mglDataA &</code>A, <code>const mglDataA &</code>B, <code>const mglDataA &</code>C, <code>const mglDataA &</code>D, <code>const char *</code>how)</em></dt>
-<dt><a name="index-mglTridMatC"></a>Общая функция: <em><code>mglDataC</code></em> <strong>mglTridMatC</strong> <em>(<code>const mglDataA &</code>A, <code>const mglDataA &</code>B, <code>const mglDataA &</code>C, <code>const mglDataA &</code>D, <code>const char *</code>how)</em></dt>
-<dt><a name="index-mgl_005fdata_005ftridmat"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_tridmat</strong> <em>(<code>HCDT</code> A, <code>HCDT</code> B, <code>HCDT</code> C, <code>HCDT</code> D, <code>const char*</code>how)</em></dt>
-<dt><a name="index-mgl_005fdatac_005ftridmat"></a>Функция С: <em><code>HADT</code></em> <strong>mgl_datac_tridmat</strong> <em>(<code>HCDT</code> A, <code>HCDT</code> B, <code>HCDT</code> C, <code>HCDT</code> D, <code>const char*</code>how)</em></dt>
-<dd><p>Возвращает решение трехдиагональной системы уравнений <var>A</var>[i]*x[i-1]+<var>B</var>[i]*x[i]+<var>C</var>[i]*x[i+1]=<var>D</var>[i]. Строка <var>how</var> может содержать:
-</p><ul>
-<li> ‘<samp>xyz</samp>’ для решения вдоль x-,y-,z-направлений;
-</li><li> ‘<samp>h</samp>’ для решения вдоль диагонали на плоскости x-y (требует квадратную матрицу);
-</li><li> ‘<samp>c</samp>’ для использования периодических граничных условий;
-</li><li> ‘<samp>d</samp>’ для расчета диффракции/диффузии (т.е. для использования -<var>A</var>[i]*<var>D</var>[i-1]+(2-<var>B</var>[i])*<var>D</var>[i]-<var>C</var>[i]*<var>D</var>[i+1] в правой частиц вместо <var>D</var>[i]).
-</li></ul>
-<p>Размеры массивов <var>A</var>, <var>B</var>, <var>C</var> должны быть одинаковы. Также их размерности должны совпадать со всеми или с "младшими" размерностями массива <var>D</var>. См. раздел <a href="#PDE-solving-hints">PDE solving hints</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="pde"></a><dl>
-<dt><a name="index-pde-1"></a>Команда MGL: <em></em> <strong>pde</strong> <em><small>RES</small> 'ham' ini_re ini_im [<code>dz=0.1 k0=100</code>]</em></dt>
-<dt><a name="index-mglPDE"></a>Общая функция: <em><code>mglData</code></em> <strong>mglPDE</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>mreal</code> dz=<code>0.1</code>, <code>mreal</code> k0=<code>100</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mglPDEc"></a>Общая функция: <em><code>mglDataC</code></em> <strong>mglPDEc</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>mreal</code> dz=<code>0.1</code>, <code>mreal</code> k0=<code>100</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fpde_005fsolve-1"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_pde_solve</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>ham, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>mreal</code> dz, <code>mreal</code> k0, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fpde_005fsolve_005fc"></a>Функция С: <em><code>HADT</code></em> <strong>mgl_pde_solve_c</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>ham, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>mreal</code> dz, <code>mreal</code> k0, <code>const char *</code>opt)</em></dt>
-<dd><p>Решает уравнение в частных производных du/dz = i*k0*<var>ham</var>(p,q,x,y,z,|u|)[u], где p=-i/k0*d/dx, q=-i/k0*d/dy – псевдо-дифференциальные операторы. Параметры <var>ini_re</var>, <var>ini_im</var> задают начальное распределение поля. Координаты в уравнении и в решении полагаются в диапазоне осей координат. Замечу, что внутри этот диапазон увеличивается в 3/2 раза для уменьшения отражения от границ расчетного интервала. Параметр <var>dz</var> задает шаг по эволюционной координате z. В данный момент использован упрощенный алгоритм, когда все “смешанные” члена (типа ‘<samp>x*p</samp>’->x*d/dx) исключаются. Например, в 2D случае это функции типа <em>ham = f(p,z) + g(x,z,u)</em>. При этом допускаются коммутирующие комбинации (типа ‘<samp>x*q</samp>’->x*d/dy). Переменная ‘<samp>u</samp>’ используется для обозначения амплитуды поля |u|. Это позволяет решать нелинейные задачи – например, нелинейное уравнение Шредингера <code>ham='p^2+q^2-u^2'</code>. Также можно указать мнимую часть для поглощения (типа <code>ham = 'p^2+i*x*(x>0)'</code>). См. также <a href="#apde">apde</a>, <a href="#qo2d">qo2d</a>, <a href="#qo3d">qo3d</a>. См. раздел <a href="#PDE-solving-hints">PDE solving hints</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="apde"></a><dl>
-<dt><a name="index-apde"></a>Команда MGL: <em></em> <strong>apde</strong> <em><small>RES</small> 'ham' ini_re ini_im [<code>dz=0.1 k0=100</code>]</em></dt>
-<dt><a name="index-mglAPDE"></a>Общая функция: <em><code>mglData</code></em> <strong>mglAPDE</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>mreal</code> dz=<code>0.1</code>, <code>mreal</code> k0=<code>100</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mglAPDEc"></a>Общая функция: <em><code>mglDataC</code></em> <strong>mglAPDEc</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>mreal</code> dz=<code>0.1</code>, <code>mreal</code> k0=<code>100</code>, <code>const char *</code>opt=<code>""</code>)</em></dt>
-<dt><a name="index-mgl_005fpde_005fsolve_005fadv"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_pde_solve_adv</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>ham, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>mreal</code> dz, <code>mreal</code> k0, <code>const char *</code>opt)</em></dt>
-<dt><a name="index-mgl_005fpde_005fsolve_005fadv_005fc"></a>Функция С: <em><code>HADT</code></em> <strong>mgl_pde_solve_adv_c</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>ham, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>mreal</code> dz, <code>mreal</code> k0, <code>const char *</code>opt)</em></dt>
-<dd><p>Решает уравнение в частных производных du/dz = i*k0*<var>ham</var>(p,q,x,y,z,|u|)[u], где p=-i/k0*d/dx, q=-i/k0*d/dy – псевдо-дифференциальные операторы. Параметры <var>ini_re</var>, <var>ini_im</var> задают начальное распределение поля. Координаты в уравнении и в решении полагаются в диапазоне осей координат. Замечу, что внутри этот диапазон увеличивается в 3/2 раза для уменьшения отражения от границ расчетного интервала. Параметр <var>dz</var> задает шаг по эволюционной координате z. Используется достаточно сложный и медленный алгоритм, способный учесть одновременное влияние пространственной дисперсии и неоднородности среды [см. А.А. Балакин, Е.Д. Господчиков, А.Г. Шалашов, Письма ЖЭТФ 104, 701 (2016)]. Переменная ‘<samp>u</samp>’ используется для обозначения амплитуды поля |u|. Это позволяет решать нелинейные задачи – например, нелинейное уравнение Шредингера <code>ham='p^2+q^2-u^2'</code>. Также можно указать мнимую часть для поглощения (типа <code>ham = 'p^2+i*x*(x>0)'</code>). См. также <a href="#apde">apde</a>. См. раздел <a href="#PDE-solving-hints">PDE solving hints</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="ray"></a><dl>
-<dt><a name="index-ray"></a>Команда MGL: <em></em> <strong>ray</strong> <em><small>RES</small> 'ham' <code>x0 y0 z0 p0 q0 v0 [dt=0.1 tmax=10]</code></em></dt>
-<dt><a name="index-mglRay"></a>Общая функция: <em><code>mglData</code></em> <strong>mglRay</strong> <em>(<code>const char *</code>ham, <code>mglPoint</code> r0, <code>mglPoint</code> p0, <code>mreal</code> dt=<code>0.1</code>, <code>mreal</code> tmax=<code>10</code>)</em></dt>
-<dt><a name="index-mgl_005fray_005ftrace"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_ray_trace</strong> <em>(<code>const char *</code>ham, <code>mreal</code> x0, <code>mreal</code> y0, <code>mreal</code> z0, <code>mreal</code> px, <code>mreal</code> py, <code>mreal</code> pz, <code>mreal</code> dt, <code>mreal</code> tmax)</em></dt>
-<dd><p>Решает систему геометрооптических уравнений d<em>r</em>/dt = d <var>ham</var>/d<em>p</em>, d<em>p</em>/dt = -d <var>ham</var>/d<em>r</em>. Это гамильтоновы уравнения для траектории частицы в 3D случае. Гамильтониан <var>ham</var> может зависеть от координат ‘<samp>x</samp>’, ‘<samp>y</samp>’, ‘<samp>z</samp>’, импульсов ‘<samp>p</samp>’=px, ‘<samp>q</samp>’=py, ‘<samp>v</samp>’=pz и времени ‘<samp>t</samp>’: <em>ham = H(x,y,z,p,q,v,t)</em>. Начальная точка (при <code>t=0</code>) задается переменными {<var>x0</var>, <var>y0</var>, <var>z0</var>, <var>p0</var>, <var>q0</var>, <var>v0</var>}. Параметры <var>dt</var> и <var>tmax</var> задают шаг и максимальное время интегрирования. Результат – массив {x,y,z,p,q,v,t} с размером {7 * int(<var>tmax</var>/<var>dt</var>+1) }.
-</p></dd></dl>
-
-<a name="ode"></a><dl>
-<dt><a name="index-ode"></a>Команда MGL: <em></em> <strong>ode</strong> <em><small>RES</small> 'df' 'var' ini [<code>dt=0.1 tmax=10</code>]</em></dt>
-<dt><a name="index-mglODE"></a>Общая функция: <em><code>mglData</code></em> <strong>mglODE</strong> <em>(<code>const char *</code>df, <code>const char *</code>var, <code>const mglDataA &</code>ini, <code>mreal</code> dt=<code>0.1</code>, <code>mreal</code> tmax=<code>10</code>)</em></dt>
-<dt><a name="index-mglODEc"></a>Общая функция: <em><code>mglDataC</code></em> <strong>mglODEc</strong> <em>(<code>const char *</code>df, <code>const char *</code>var, <code>const mglDataA &</code>ini, <code>mreal</code> dt=<code>0.1</code>, <code>mreal</code> tmax=<code>10</code>)</em></dt>
-<dt><a name="index-mgl_005fode_005fsolve_005fstr"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_ode_solve_str</strong> <em>(<code>const char *</code>df, <code>const char *</code>var, <code>HCDT</code> ini, <code>mreal</code> dt, <code>mreal</code> tmax)</em></dt>
-<dt><a name="index-mgl_005fode_005fsolve_005fstr_005fc"></a>Функция С: <em><code>HADT</code></em> <strong>mgl_ode_solve_str_c</strong> <em>(<code>const char *</code>df, <code>const char *</code>var, <code>HCDT</code> ini, <code>mreal</code> dt, <code>mreal</code> tmax)</em></dt>
-<dt><a name="index-mgl_005fode_005fsolve"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_ode_solve</strong> <em>(<code>void (*</code>df<code>)(const mreal *x, mreal *dx, void *par)</code>, <code>int</code> n, <code>const mreal *</code>ini, <code>mreal</code> dt, <code>mreal</code> tmax)</em></dt>
-<dt><a name="index-mgl_005fode_005fsolve_005fex"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_ode_solve_ex</strong> <em>(<code>void (*</code>df<code>)(const mreal *x, mreal *dx, void *par)</code>, <code>int</code> n, <code>const mreal *</code>ini, <code>mreal</code> dt, <code>mreal</code> tmax, <code>void (*</code>bord<code>)(mreal *x, const mreal *xprev, void *par)</code>)</em></dt>
-<dd><p>Решает систему обыкновенных дифференциальных уравнений dx/dt = df(x). Функции <var>df</var> могут быть заданны строкой с разделенными ’;’ формулами (аргумент <var>var</var> задает символы для переменных x[i]) или указателем на функцию, которая заполняет <code>dx</code> по заданным значениям <code>x</code>. Параметры <var>ini</var>, <var>dt</var>, <var>tmax</var> задают начальные значения, шаг и максимальное время интегрирования. Функция обрывает расчет при появлении значений <code>NAN</code> или <code>INF</code>. Результат – массив размером {<var>n</var> * <var>Nt</var>}, где <var>Nt</var> <= int(<var>tmax</var>/<var>dt</var>+1).
-</p></dd></dl>
-
-<a name="qo2d"></a><dl>
-<dt><a name="index-qo2d"></a>Команда MGL: <em></em> <strong>qo2d</strong> <em><small>RES</small> 'ham' ini_re ini_im ray [<code>r=1 k0=100</code> xx yy]</em></dt>
-<dt><a name="index-mglQO2d"></a>Общая функция: <em><code>mglData</code></em> <strong>mglQO2d</strong> <em>(<code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>const mglDataA &</code>ray, <code>mreal</code> r=<code>1</code>, <code>mreal</code> k0=<code>100</code>, <code>mglData *</code>xx=<code>0</code>, <code>mglData *</code>yy=<code>0</code>)</em></dt>
-<dt><a name="index-mglQO2d-1"></a>Общая функция: <em><code>mglData</code></em> <strong>mglQO2d</strong> <em>(<code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>const mglDataA &</code>ray, <code>mglData &</code>xx, <code>mglData &</code>yy, <code>mreal</code> r=<code>1</code>, <code>mreal</code> k0=<code>100</code>)</em></dt>
-<dt><a name="index-mglQO2dc"></a>Общая функция: <em><code>mglDataC</code></em> <strong>mglQO2dc</strong> <em>(<code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>const mglDataA &</code>ray, <code>mreal</code> r=<code>1</code>, <code>mreal</code> k0=<code>100</code>)</em></dt>
-<dt><a name="index-mglQO2dc-1"></a>Общая функция: <em><code>mglDataC</code></em> <strong>mglQO2dc</strong> <em>(<code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>const mglDataA &</code>ray, <code>mglData &</code>xx, <code>mglData &</code>yy, <code>mreal</code> r=<code>1</code>, <code>mreal</code> k0=<code>100</code>)</em></dt>
-<dt><a name="index-mgl_005fqo2d_005fsolve"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_qo2d_solve</strong> <em>(<code>const char *</code>ham, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>HCDT</code> ray, <code>mreal</code> r, <code>mreal</code> k0, <code>HMDT</code> xx, <code>HMDT</code> yy)</em></dt>
-<dt><a name="index-mgl_005fqo2d_005fsolve_005fc"></a>Функция С: <em><code>HADT</code></em> <strong>mgl_qo2d_solve_c</strong> <em>(<code>const char *</code>ham, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>HCDT</code> ray, <code>mreal</code> r, <code>mreal</code> k0, <code>HMDT</code> xx, <code>HMDT</code> yy)</em></dt>
-<dt><a name="index-mgl_005fqo2d_005ffunc"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_qo2d_func</strong> <em>(<code>dual (*</code>ham<code>)(mreal u, mreal x, mreal y, mreal px, mreal py, void *par)</code>, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>HCDT</code> ray, <code>mreal</code> r, <code>mreal</code> k0, <code>HMDT</code> xx, <code>HMDT</code> yy)</em></dt>
-<dt><a name="index-mgl_005fqo2d_005ffunc_005fc"></a>Функция С: <em><code>HADT</code></em> <strong>mgl_qo2d_func_c</strong> <em>(<code>dual (*</code>ham<code>)(mreal u, mreal x, mreal y, mreal px, mreal py, void *par)</code>, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>HCDT</code> ray, <code>mreal</code> r, <code>mreal</code> k0, <code>HMDT</code> xx, <code>HMDT</code> yy)</em></dt>
-<dd><p>Решает уравнение в частных производных du/dt = i*k0*<var>ham</var>(p,q,x,y,|u|)[u] в сопровождающей системе координат, где p=-i/k0*d/dx, q=-i/k0*d/dy – псевдо-дифференциальные операторы. Параметры <var>ini_re</var>, <var>ini_im</var> задают начальное распределение поля. Параметр <var>ray</var> задает опорный луч для сопровождающей системы координат. Можно использовать луч найденный с помощью <a href="#ray">ray</a>. Опорный луч должен быть достаточно гладкий, чтобы система координат была однозначной и для исключения ошибок интегрирования. Если массивы <var>xx</var> и <var>yy</var> указаны, то в них записываются декартовы координаты для каждой точки найденного решения. См. также <a href="#pde">pde</a>, <a href="#qo3d">qo3d</a>. См. раздел <a href="#PDE-solving-hints">PDE solving hints</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="qo3d"></a><dl>
-<dt><a name="index-qo3d"></a>Команда MGL: <em></em> <strong>qo3d</strong> <em><small>RES</small> 'ham' ini_re ini_im ray [<code>r=1 k0=100</code> xx yy zz]</em></dt>
-<dt><a name="index-mglQO3d"></a>Общая функция: <em><code>mglData</code></em> <strong>mglQO3d</strong> <em>(<code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>const mglDataA &</code>ray, <code>mreal</code> r=<code>1</code>, <code>mreal</code> k0=<code>100</code>)</em></dt>
-<dt><a name="index-mglQO3d-1"></a>Общая функция: <em><code>mglData</code></em> <strong>mglQO3d</strong> <em>(<code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>const mglDataA &</code>ray, <code>mglData &</code>xx, <code>mglData &</code>yy, <code>mglData &</code>zz, <code>mreal</code> r=<code>1</code>, <code>mreal</code> k0=<code>100</code>)</em></dt>
-<dt><a name="index-mglQO3dc"></a>Общая функция: <em><code>mglDataC</code></em> <strong>mglQO3dc</strong> <em>(<code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>const mglDataA &</code>ray, <code>mreal</code> r=<code>1</code>, <code>mreal</code> k0=<code>100</code>)</em></dt>
-<dt><a name="index-mglQO3dc-1"></a>Общая функция: <em><code>mglDataC</code></em> <strong>mglQO3dc</strong> <em>(<code>const char *</code>ham, <code>const mglDataA &</code>ini_re, <code>const mglDataA &</code>ini_im, <code>const mglDataA &</code>ray, <code>mglData &</code>xx, <code>mglData &</code>yy, <code>mglData &</code>zz, <code>mreal</code> r=<code>1</code>, <code>mreal</code> k0=<code>100</code>)</em></dt>
-<dt><a name="index-mgl_005fqo3d_005fsolve"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_qo3d_solve</strong> <em>(<code>const char *</code>ham, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>HCDT</code> ray, <code>mreal</code> r, <code>mreal</code> k0, <code>HMDT</code> xx, <code>HMDT</code> yy, <code>HMDT</code> zz)</em></dt>
-<dt><a name="index-mgl_005fqo3d_005fsolve_005fc"></a>Функция С: <em><code>HADT</code></em> <strong>mgl_qo3d_solve_c</strong> <em>(<code>const char *</code>ham, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>HCDT</code> ray, <code>mreal</code> r, <code>mreal</code> k0, <code>HMDT</code> xx, <code>HMDT</code> yy, <code>HMDT</code> zz)</em></dt>
-<dt><a name="index-mgl_005fqo3d_005ffunc"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_qo3d_func</strong> <em>(<code>dual (*</code>ham<code>)(mreal u, mreal x, mreal y, mreal z, mreal px, mreal py, mreal pz, void *par)</code>, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>HCDT</code> ray, <code>mreal</code> r, <code>mreal</code> k0, <code>HMDT</code> xx, <code>HMDT</code> yy, <code>HMDT</code> zz)</em></dt>
-<dt><a name="index-mgl_005fqo3d_005ffunc_005fc"></a>Функция С: <em><code>HADT</code></em> <strong>mgl_qo3d_func_c</strong> <em>(<code>dual (*</code>ham<code>)(mreal u, mreal x, mreal y, mreal z, mreal px, mreal py, mreal pz, void *par)</code>, <code>HCDT</code> ini_re, <code>HCDT</code> ini_im, <code>HCDT</code> ray, <code>mreal</code> r, <code>mreal</code> k0, <code>HMDT</code> xx, <code>HMDT</code> yy, <code>HMDT</code> zz)</em></dt>
-<dd><p>Решает уравнение в частных производных du/dt = i*k0*<var>ham</var>(p,q,v,x,y,z,|u|)[u] в сопровождающей системе координат, где p=-i/k0*d/dx, q=-i/k0*d/dy, v=-i/k0*d/dz – псевдо-дифференциальные операторы. Параметры <var>ini_re</var>, <var>ini_im</var> задают начальное распределение поля. Параметр <var>ray</var> задает опорный луч для сопровождающей системы координат. Можно использовать луч найденный с помощью <a href="#ray">ray</a>. Опорный луч должен быть достаточно гладкий, чтобы система координат была однозначной и для исключения ошибок интегрирования. Если массивы <var>xx</var>, <var>yy</var> и <var>zz</var> указаны, то в них записываются декартовы координаты для каждой точки найденного решения. См. также <a href="#pde">pde</a>, <a href="#qo2d">qo2d</a>.
-</p></dd></dl>
-
-<a name="jacobian"></a><dl>
-<dt><a name="index-jacobian"></a>Команда MGL: <em></em> <strong>jacobian</strong> <em><small>RES</small> xdat ydat [zdat]</em></dt>
-<dt><a name="index-mglJacobian"></a>Общая функция: <em><code>mglData</code></em> <strong>mglJacobian</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y)</em></dt>
-<dt><a name="index-mglJacobian-1"></a>Общая функция: <em><code>mglData</code></em> <strong>mglJacobian</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z)</em></dt>
-<dt><a name="index-mgl_005fjacobian_005f2d"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_jacobian_2d</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y)</em></dt>
-<dt><a name="index-mgl_005fjacobian_005f3d"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_jacobian_3d</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z)</em></dt>
-<dd><p>Вычисляет якобиан преобразования {i,j,k} в {<var>x</var>,<var>y</var>,<var>z</var>}, где координаты {i,j,k} полагаются нормированными в интервал [0,1]. Якобиан находится по формуле det||<em>dr_\alpha/d\xi_\beta</em>||, где <em>r</em>={<var>x</var>,<var>y</var>,<var>z</var>} и <em>\xi</em>={i,j,k}. Все размерности всех массивов должны быть одинаковы. Данные должны быть трехмерными если указаны все 3 массива {<var>x</var>,<var>y</var>,<var>z</var>} или двумерными если только 2 массива {<var>x</var>,<var>y</var>}.
-</p></dd></dl>
-
-<a name="triangulation"></a><dl>
-<dt><a name="index-triangulation"></a>Команда MGL: <em></em> <strong>triangulation</strong> <em><small>RES</small> xdat ydat [zdat]</em></dt>
-<dt><a name="index-mglTriangulation-1"></a>Общая функция: <em><code>mglData</code></em> <strong>mglTriangulation</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y)</em></dt>
-<dt><a name="index-mglTriangulation-2"></a>Общая функция: <em><code>mglData</code></em> <strong>mglTriangulation</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y, <code>const mglDataA &</code>z)</em></dt>
-<dt><a name="index-mgl_005ftriangulation_005f2d-1"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_triangulation_2d</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y)</em></dt>
-<dt><a name="index-mgl_005ftriangulation_005f3d"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_triangulation_3d</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y, <code>HCDT</code> z)</em></dt>
-<dd><p>Выполняет триангуляцию для произвольно расположенных точек с координатами {<var>x</var>,<var>y</var>,<var>z</var>} (т.е. находит треугольники, соединяющие точки). Первая размерность всех массивов должна быть одинакова <code>x.nx=y.nx=z.nx</code>. Получившийся массив можно использовать в <a href="#triplot">triplot</a> или <a href="#tricont">tricont</a> для визуализации реконструированной поверхности. См. раздел <a href="#Making-regular-data">Making regular data</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-
-<dl>
-<dt><a name="index-mglGSplineInit"></a>Общая функция: <em><code>mglData</code></em> <strong>mglGSplineInit</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y)</em></dt>
-<dt><a name="index-mglGSplineCInit"></a>Общая функция: <em><code>mglDataC</code></em> <strong>mglGSplineCInit</strong> <em>(<code>const mglDataA &</code>x, <code>const mglDataA &</code>y)</em></dt>
-<dt><a name="index-mgl_005fgspline_005finit"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_gspline_init</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y)</em></dt>
-<dt><a name="index-mgl_005fgsplinec_005finit"></a>Функция С: <em><code>HADT</code></em> <strong>mgl_gsplinec_init</strong> <em>(<code>HCDT</code> x, <code>HCDT</code> y)</em></dt>
-<dd><p>Подготавливает коэффициенты для глобального кубического сплайна.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mglGSpline"></a>Общая функция: <em><code>mreal</code></em> <strong>mglGSpline</strong> <em>(<code>const mglDataA &</code>coef, <code>mreal</code> dx, <code>mreal *</code>d1=<code>0</code>, <code>mreal *</code>d2=<code>0</code>)</em></dt>
-<dt><a name="index-mglGSplineC"></a>Общая функция: <em><code>dual</code></em> <strong>mglGSplineC</strong> <em>(<code>const mglDataA &</code>coef, <code>mreal</code> dx, <code>dual *</code>d1=<code>0</code>, <code>dual *</code>d2=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fgspline"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_gspline</strong> <em>(<code>HCDT</code> coef, <code>mreal</code> dx, <code>mreal *</code>d1, <code>mreal *</code>d2)</em></dt>
-<dt><a name="index-mgl_005fgsplinec"></a>Функция С: <em><code>dual</code></em> <strong>mgl_gsplinec</strong> <em>(<code>HCDT</code> coef, <code>mreal</code> dx, <code>dual *</code>d1, <code>dual *</code>d2)</em></dt>
-<dd><p>Вычисляет глобальный кубический сплайн (а также 1ую и 2ую производные <var>d1</var>, <var>d2</var> если они не <code>NULL</code>), используя коэффициенты <var>coef</var> в точке <var>dx</var>+<var>x0</var> (здесь <var>x0</var> – 1ый элемент массива <var>x</var> в функции <code>mglGSpline*Init()</code>).
-</p></dd></dl>
-
-
-<a name="ifs2d"></a><dl>
-<dt><a name="index-ifs2d"></a>Команда MGL: <em></em> <strong>ifs2d</strong> <em><small>RES</small> dat <code>num</code> [<code>skip=20</code>]</em></dt>
-<dt><a name="index-mglIFS2d"></a>Общая функция: <em><code>mglData</code></em> <strong>mglIFS2d</strong> <em>(<code>const mglDataA &</code>dat, <code>long</code> num, <code>long</code> skip=<code>20</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fifs_005f2d"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_ifs_2d</strong> <em>(<code>HCDT</code> dat, <code>long</code> num, <code>long</code> skip)</em></dt>
-<dd><p>Находит <var>num</var> точек {x[i]=res[0,i], y[i]=res[1,i]} фрактала с использованием итерационной системы функций (IFS). Матрица <var>dat</var> используется для генерации в соответствии с формулами
-</p><pre class="verbatim">x[i+1] = dat[0,i]*x[i] + dat[1,i]*y[i] + dat[4,i];
-y[i+1] = dat[2,i]*x[i] + dat[3,i]*y[i] + dat[5,i];
-</pre><p>Значение <code>dat[6,i]</code> – весовой коэффициент для i-ой строки матрицы <var>dat</var>. Первые <var>skip</var> итераций будут опущены. Массив <var>dat</var> должен иметь размер по x больше или равный 7. См. также <a href="#ifs3d">ifs3d</a>, <a href="#flame2d">flame2d</a>. См. раздел <a href="#ifs2d-sample">ifs2d sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="ifs3d"></a><dl>
-<dt><a name="index-ifs3d"></a>Команда MGL: <em></em> <strong>ifs3d</strong> <em><small>RES</small> dat <code>num</code> [<code>skip=20</code>]</em></dt>
-<dt><a name="index-mglIFS3d"></a>Общая функция: <em><code>mglData</code></em> <strong>mglIFS3d</strong> <em>(<code>const mglDataA &</code>dat, <code>long</code> num, <code>long</code> skip=<code>20</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fifs_005f3d"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_ifs_3d</strong> <em>(<code>HCDT</code> dat, <code>long</code> num, <code>long</code> skip)</em></dt>
-<dd><p>Находит <var>num</var> точек {x[i]=res[0,i], y[i]=res[1,i], z[i]=res[2,i]} фрактала с использованием итерационной системы функций (IFS). Матрица <var>dat</var> используется для генерации в соответствии с формулами
-</p><pre class="verbatim">x[i+1] = dat[0,i]*x[i] + dat[1,i]*y[i] + dat[2,i]*z[i] + dat[9,i];
-y[i+1] = dat[3,i]*x[i] + dat[4,i]*y[i] + dat[5,i]*z[i] + dat[10,i];
-z[i+1] = dat[6,i]*x[i] + dat[7,i]*y[i] + dat[8,i]*z[i] + dat[11,i];
-</pre><p>Значение <code>dat[12,i]</code> – весовой коэффициент для i-ой строки матрицы <var>dat</var>. Первые <var>skip</var> итераций будут опущены. Массив <var>dat</var> должен иметь размер по x больше или равный 13. См. также <a href="#ifs2d">ifs2d</a>. См. раздел <a href="#ifs3d-sample">ifs3d sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="ifsfile"></a><dl>
-<dt><a name="index-ifsfile"></a>Команда MGL: <em></em> <strong>ifsfile</strong> <em><small>RES</small> 'fname' 'name' <code>num</code> [<code>skip=20</code>]</em></dt>
-<dt><a name="index-mglIFSfile"></a>Общая функция: <em><code>mglData</code></em> <strong>mglIFSfile</strong> <em>(<code>const char *</code>fname, <code>const char *</code>name, <code>long</code> num, <code>long</code> skip=<code>20</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fifs_005ffile"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_ifs_file</strong> <em>(<code>const char *</code>fname, <code>const char *</code>name, <code>long</code> num, <code>long</code> skip)</em></dt>
-<dd><p>Считывает параметры фрактала <var>name</var> из файла <var>fname</var> и находит <var>num</var> точек для него. Первые <var>skip</var> итераций будут опущены. См. также <a href="#ifs2d">ifs2d</a>, <a href="#ifs3d">ifs3d</a>.
-</p>
-<p>Файл IFS может содержать несколько записей. Каждая запись содержит имя фрактала (‘<samp>binary</samp>’ в примере ниже) и тело в фигурных скобках {} с параметрами фрактала. Символ ‘<samp>;</samp>’ начинает комментарий. Если имя содержит ‘<samp>(3D)</samp>’ или ‘<samp>(3d)</samp>’, то определен 3d IFS фрактал. Пример содержит два фрактала: ‘<samp>binary</samp>’ – обычный 2d фрактал, и ‘<samp>3dfern (3D)</samp>’ – 3d фрактал. См. также <a href="#ifs2d">ifs2d</a>, <a href="#ifs3d">ifs3d</a>.
-</p>
-<pre class="verbatim"> binary
- { ; comment allowed here
- ; and here
- .5 .0 .0 .5 -2.563477 -0.000003 .333333 ; also comment allowed here
- .5 .0 .0 .5 2.436544 -0.000003 .333333
- .0 -.5 .5 .0 4.873085 7.563492 .333333
- }
-
- 3dfern (3D) {
- .00 .00 0 .0 .18 .0 0 0.0 0.00 0 0.0 0 .01
- .85 .00 0 .0 .85 .1 0 -0.1 0.85 0 1.6 0 .85
- .20 -.20 0 .2 .20 .0 0 0.0 0.30 0 0.8 0 .07
- -.20 .20 0 .2 .20 .0 0 0.0 0.30 0 0.8 0 .07
- }
-</pre></dd></dl>
-
-<a name="flame2d"></a><dl>
-<dt><a name="index-flame2d"></a>Команда MGL: <em></em> <strong>flame2d</strong> <em><small>RES</small> dat func <code>num</code> [<code>skip=20</code>]</em></dt>
-<dt><a name="index-mglFlame2d"></a>Общая функция: <em><code>mglData</code></em> <strong>mglFlame2d</strong> <em>(<code>const mglDataA &</code>dat, <code>const mglDataA &</code>func, <code>long</code> num, <code>long</code> skip=<code>20</code>)</em></dt>
-<dt><a name="index-mgl_005fdata_005fflame_005f2d"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_data_flame_2d</strong> <em>(<code>HCDT</code> dat, <code>HCDT</code> func, <code>long</code> num, <code>long</code> skip)</em></dt>
-<dd><p>Находит <var>num</var> точек {x[i]=res[0,i], y[i]=res[1,i]} фрактала с использованием итерационной системы функций (IFS). Массив <var>func</var> задает идентификатор функции (<var>func</var>[0,i,j]), ее вес (<var>func</var>[0,i,j]) и аргументы (<var>func</var>[2 ... 5,i,j]). Матрица <var>dat</var> используется для преобразования координат для аргументов функции. Результирующее преобразование имеет вид:
-</p><pre class="verbatim">xx = dat[0,i]*x[j] + dat[1,j]*y[i] + dat[4,j];
-yy = dat[2,i]*x[j] + dat[3,j]*y[i] + dat[5,j];
-x[j+1] = sum_i @var{func}[1,i,j]*@var{func}[0,i,j]_x(xx, yy; @var{func}[2,i,j],...,@var{func}[5,i,j]);
-y[j+1] = sum_i @var{func}[1,i,j]*@var{func}[0,i,j]_y(xx, yy; @var{func}[2,i,j],...,@var{func}[5,i,j]);
-</pre><p>Значение <code>dat[6,i]</code> – весовой коэффициент для i-ой строки матрицы <var>dat</var>. Первые <var>skip</var> итераций будут опущены. Массив <var>dat</var> должен иметь размер по x больше или равный 7.
-Доступные идентификаторы функций: <code>mglFlame2d_linear=0, mglFlame2d_sinusoidal, mglFlame2d_spherical, mglFlame2d_swirl, mglFlame2d_horseshoe,
- mglFlame2d_polar, mglFlame2d_handkerchief,mglFlame2d_heart, mglFlame2d_disc, mglFlame2d_spiral,
- mglFlame2d_hyperbolic, mglFlame2d_diamond, mglFlame2d_ex, mglFlame2d_julia, mglFlame2d_bent,
- mglFlame2d_waves, mglFlame2d_fisheye, mglFlame2d_popcorn, mglFlame2d_exponential, mglFlame2d_power,
- mglFlame2d_cosine, mglFlame2d_rings, mglFlame2d_fan, mglFlame2d_blob, mglFlame2d_pdj,
- mglFlame2d_fan2, mglFlame2d_rings2, mglFlame2d_eyefish, mglFlame2d_bubble, mglFlame2d_cylinder,
- mglFlame2d_perspective, mglFlame2d_noise, mglFlame2d_juliaN, mglFlame2d_juliaScope, mglFlame2d_blur,
- mglFlame2d_gaussian, mglFlame2d_radialBlur, mglFlame2d_pie, mglFlame2d_ngon, mglFlame2d_curl,
- mglFlame2d_rectangles, mglFlame2d_arch, mglFlame2d_tangent, mglFlame2d_square, mglFlame2d_blade,
- mglFlame2d_secant, mglFlame2d_rays, mglFlame2d_twintrian, mglFlame2d_cross, mglFlame2d_disc2,
- mglFlame2d_supershape, mglFlame2d_flower, mglFlame2d_conic, mglFlame2d_parabola, mglFlame2d_bent2,
- mglFlame2d_bipolar, mglFlame2d_boarders, mglFlame2d_butterfly, mglFlame2d_cell, mglFlame2d_cpow,
- mglFlame2d_curve, mglFlame2d_edisc, mglFlame2d_elliptic, mglFlame2d_escher, mglFlame2d_foci,
- mglFlame2d_lazySusan, mglFlame2d_loonie, mglFlame2d_preBlur, mglFlame2d_modulus, mglFlame2d_oscope,
- mglFlame2d_polar2, mglFlame2d_popcorn2, mglFlame2d_scry, mglFlame2d_separation, mglFlame2d_split,
- mglFlame2d_splits, mglFlame2d_stripes, mglFlame2d_wedge, mglFlame2d_wedgeJulia, mglFlame2d_wedgeSph,
- mglFlame2d_whorl, mglFlame2d_waves2, mglFlame2d_exp, mglFlame2d_log, mglFlame2d_sin,
- mglFlame2d_cos, mglFlame2d_tan, mglFlame2d_sec, mglFlame2d_csc, mglFlame2d_cot,
- mglFlame2d_sinh, mglFlame2d_cosh, mglFlame2d_tanh, mglFlame2d_sech, mglFlame2d_csch,
- mglFlame2d_coth, mglFlame2d_auger, mglFlame2d_flux.</code>
-Значение <code>dat[6,i]</code> – весовой коэффициент для i-ой строки матрицы <var>dat</var>. Первые <var>skip</var> итераций будут опущены. Размеры массивов должны удовлетворять требованиям: <var>dat</var>.nx>=7, <var>func</var>.nx>=2 и <var>func</var>.nz=<var>dat</var>.ny. См. также <a href="#ifs2d">ifs2d</a>, <a href="#ifs3d">ifs3d</a>. См. раздел <a href="#flame2d-sample">flame2d sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Evaluate-expression"></a>
-<div class="header">
-<p>
-Next: <a href="#Special-data-classes" accesskey="n" rel="next">Special data classes</a>, Previous: <a href="#Global-functions" accesskey="p" rel="prev">Global functions</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Vychislenie-vyrazhenii"></a>
-<h3 class="section">6.12 Вычисление выражений</h3>
-
-
-
-<p>В MathGL есть специальные классы <code>mglExpr</code> и <code>mglExprC</code> для вычисления формул заданных строкой для действительных и комплексных чисел соответственно. Классы определены в <code>#include <mgl2/data.h></code> и <code>#include <mgl2/datac.h></code> соответственно. При создании класса происходит разбор формулы в древовидную структуру. А при вычислении только выполняется достаточно быстрый обход по дереву. В данный момент нет различия между верхним и нижним регистром. Если аргумент какой-либо функции лежит вне её области определения, то возвращается NaN. See <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-<dl>
-<dt><a name="index-mglExpr"></a>Конструктор класса <code>mglExpr</code>: <em><code></code></em> <strong>mglExpr</strong> <em>(<code>const char *</code>expr)</em></dt>
-<dt><a name="index-mglExprC"></a>Конструктор класса <code>mglExprC</code>: <em><code></code></em> <strong>mglExprC</strong> <em>(<code>const char *</code>expr)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fexpr"></a>Функция С: <em><code>HMEX</code></em> <strong>mgl_create_expr</strong> <em>(<code>const char *</code>expr)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fcexpr"></a>Функция С: <em><code>HAEX</code></em> <strong>mgl_create_cexpr</strong> <em>(<code>const char *</code>expr)</em></dt>
-<dd><p>Разбирает формулу <var>expr</var> и создает древовидную структуру, содержащую последовательность вызова функций и операторов для последующего быстрого вычисления формулы с помощью функций <code>Calc()</code> и/или <code>CalcD()</code>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-_007emglExpr"></a>Destructor on <code>mglExpr</code>: <em><code></code></em> <strong>~mglExpr</strong> <em>()</em></dt>
-<dt><a name="index-_007emglExprC"></a>Destructor on <code>mglExprC</code>: <em><code></code></em> <strong>~mglExprC</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fdelete_005fexpr"></a>Функция С: <em><code>void</code></em> <strong>mgl_delete_expr</strong> <em>(<code>HMEX</code> ex)</em></dt>
-<dt><a name="index-mgl_005fdelete_005fcexpr"></a>Функция С: <em><code>void</code></em> <strong>mgl_delete_cexpr</strong> <em>(<code>HAEX</code> ex)</em></dt>
-<dd><p>Удаляет объект типа <code>mglExpr</code>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Eval"></a>Метод класса <code>mglExpr</code>: <em><code>mreal</code></em> <strong>Eval</strong> <em>(<code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z)</em></dt>
-<dt><a name="index-Eval-1"></a>Метод класса <code>mglExprC</code>: <em><code>dual</code></em> <strong>Eval</strong> <em>(<code>dual</code> x, <code>dual</code> y, <code>dual</code> z)</em></dt>
-<dt><a name="index-mgl_005fexpr_005feval"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_expr_eval</strong> <em>(<code>HMEX</code> ex, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z)</em></dt>
-<dt><a name="index-mgl_005fcexpr_005feval"></a>Функция С: <em><code>dual</code></em> <strong>mgl_cexpr_eval</strong> <em>(<code>HAEX</code> ex, <code>dual</code> x, <code>dual</code> y, <code>dual</code> z)</em></dt>
-<dd><p>Вычисляет значение формулы для <code>'x','r'</code>=<var>x</var>, <code>'y','n'</code>=<var>y</var>, <code>'z','t'</code>=<var>z</var>, <code>'a','u'</code>=<var>u</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Eval-2"></a>Метод класса <code>mglExpr</code>: <em><code>mreal</code></em> <strong>Eval</strong> <em>(<code>mreal</code> var[26])</em></dt>
-<dt><a name="index-Eval-3"></a>Метод класса <code>mglExprC</code>: <em><code>dual</code></em> <strong>Eval</strong> <em>(<code>dual</code> var[26])</em></dt>
-<dt><a name="index-mgl_005fexpr_005feval_005fv"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_expr_eval_v</strong> <em>(<code>HMEX</code> ex, <code>mreal *</code>var)</em></dt>
-<dt><a name="index-mgl_005fcexpr_005feval_005fv"></a>Функция С: <em><code>dual</code></em> <strong>mgl_cexpr_eval_v</strong> <em>(<code>HMEX</code> ex, <code>dual *</code>var)</em></dt>
-<dd><p>Вычисляет значение формулы для переменных в массиве <var>var</var>[0,...,’z’-’a’].
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-Diff-9"></a>Метод класса <code>mglExpr</code>: <em><code>mreal</code></em> <strong>Diff</strong> <em>(<code>char</code> dir, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z)</em></dt>
-<dt><a name="index-mgl_005fexpr_005fdiff"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_expr_diff</strong> <em>(<code>HMEX</code> ex, <code>char</code> dir, <code>mreal</code> x, <code>mreal</code> y, <code>mreal</code> z)</em></dt>
-<dd><p>Вычисляет производную от формулы по переменной <var>dir</var> для <code>'x','r'</code>=<var>x</var>, <code>'y','n'</code>=<var>y</var>, <code>'z','t'</code>=<var>z</var>, <code>'a','u'</code>=<var>u</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Diff-10"></a>Метод класса <code>mglExpr</code>: <em><code>mreal</code></em> <strong>Diff</strong> <em>(<code>char</code> dir, <code>mreal</code> var[26])</em></dt>
-<dt><a name="index-mgl_005fexpr_005fdiff_005fv"></a>Функция С: <em><code>mreal</code></em> <strong>mgl_expr_diff_v</strong> <em>(<code>HMEX</code> ex, <code>char</code> dir, <code>mreal *</code>var)</em></dt>
-<dd><p>Вычисляет производную от формулы по переменной <var>dir</var> для переменных в массиве <var>var</var>[0,...,’z’-’a’].
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Special-data-classes"></a>
-<div class="header">
-<p>
-Previous: <a href="#Evaluate-expression" accesskey="p" rel="prev">Evaluate expression</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Special-data-classes-1"></a>
-<h3 class="section">6.13 Special data classes</h3>
-
-
-
-<p>Раздел описывает специальные классы данных <code>mglDataV</code>, <code>mglDataF</code>, <code>mglDataT</code> и <code>mglDataR</code>, которые могут заметно ускорить рисование и обработку данных. Классы определены в <code>#include <mgl2/data.h></code>. Отмечу, что все функции рисования и обработки данных можно выполнить используя только основные классы <code>mglData</code> и/или <code>mglDataC</code>. Также специальные классы доступны только в коде на С++.
-</p>
-<a name="Klass-mglDataV"></a>
-<h3 class="heading">Класс <code>mglDataV</code></h3>
-<p>представляет переменную со значениями равнораспределенными в заданном интервале.
-</p><dl>
-<dt><a name="index-mglDataV"></a>Конструктор <code>mglDataV</code>: <em><code></code></em> <strong>mglDataV</strong> <em>(<code>const mglDataV &</code> d)</em></dt>
-<dd><p>Конструктор копирования.
-</p></dd></dl>
-<dl>
-<dt><a name="index-mglDataV-1"></a>Конструктор <code>mglDataV</code>: <em><code></code></em> <strong>mglDataV</strong> <em>(<code>long</code> nx=<code>1</code>, <code>long</code> ny=<code>1</code>, <code>long</code> nz=<code>1</code>, <code>mreal</code> v1=<code>0</code>, <code>mreal</code> v2=<code>NaN</code>, <code>char</code> dir=<code>'x'</code>)</em></dt>
-<dd><p>Создает переменную "размером" <var>nx</var>x<var>ny</var>x<var>nz</var>, изменяющуюся от <var>v1</var> до <var>v2</var> (или постоянную при <var>v2</var>=<code>NaN</code>) вдоль направления <var>dir</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Create-3"></a>Метод класса <code>mglDataV</code>: <em><code>void</code></em> <strong>Create</strong> <em>(<code>long</code> nx=<code>1</code>, <code>long</code> ny=<code>1</code>, <code>long</code> nz=<code>1</code>)</em></dt>
-<dd><p>Задает "размеры" переменной <var>nx</var>x<var>ny</var>x<var>nz</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Fill-13"></a>Метод класса <code>mglDataV</code>: <em><code>void</code></em> <strong>Fill</strong> <em>(<code>mreal</code> x1, <code>mreal</code> x2=<code>NaN</code>, <code>char</code> dir=<code>'x'</code>)</em></dt>
-<dd><p>Задает диапазон изменения переменной.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Freq"></a>Метод класса <code>mglDataV</code>: <em><code>void</code></em> <strong>Freq</strong> <em>(<code>mreal</code> dp, <code>char</code> dir=<code>'x'</code>)</em></dt>
-<dd><p>Задает переменную для частоты с шагом <var>dp</var>.
-</p></dd></dl>
-
-<a name="Klass-mglDataF"></a>
-<h3 class="heading">Класс <code>mglDataF</code></h3>
-<p>представляет функцию, которая будет вызываться вместо обращения к элементам массива (как в классе <code>mglData</code>).
-</p><dl>
-<dt><a name="index-mglDataF"></a>Конструктор <code>mglDataF</code>: <em><code></code></em> <strong>mglDataF</strong> <em>(<code>const mglDataF &</code> d)</em></dt>
-<dd><p>Конструктор копирования.
-</p></dd></dl>
-<dl>
-<dt><a name="index-mglDataF-1"></a>Конструктор <code>mglDataF</code>: <em><code></code></em> <strong>mglDataF</strong> <em>(<code>long</code> nx=<code>1</code>, <code>long</code> ny=<code>1</code>, <code>long</code> nz=<code>1</code>)</em></dt>
-<dd><p>Создает данные "размером" <var>nx</var>x<var>ny</var>x<var>nz</var> с нулевой функцией.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Create-4"></a>Метод класса <code>mglDataF</code>: <em><code>void</code></em> <strong>Create</strong> <em>(<code>long</code> nx=<code>1</code>, <code>long</code> ny=<code>1</code>, <code>long</code> nz=<code>1</code>)</em></dt>
-<dd><p>Задает "размеры" данных <var>nx</var>x<var>ny</var>x<var>nz</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetRanges-6"></a>Метод класса <code>mglDataF</code>: <em><code>void</code></em> <strong>SetRanges</strong> <em>(<code>mglPoint</code> p1, <code>mglPoint</code> p2)</em></dt>
-<dd><p>Задает диапазоны изменения внутренних переменных x,y,z.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetFormula"></a>Метод класса <code>mglDataF</code>: <em><code>void</code></em> <strong>SetFormula</strong> <em>(<code>const char *</code>func)</em></dt>
-<dd><p>Задает строку, которая будет разобрана в функцию. Это вариант более чем 10 раз медленнее в сравнении с <code>SetFunc</code>().
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetFunc-2"></a>Метод класса <code>mglDataF</code>: <em><code>void</code></em> <strong>SetFunc</strong> <em>(<code>mreal (*</code>f<code>)(mreal x,mreal y,mreal z,void *p)</code>, <code>void *</code>p=<code>NULL</code>)</em></dt>
-<dd><p>Задает указатель на функцию, которая будет использована вместо доступа к элементам массива.
-</p></dd></dl>
-
-<a name="Klass-mglDataT"></a>
-<h3 class="heading">Класс <code>mglDataT</code></h3>
-<p>представляет именнованную ссылку на столбец в другом массиве данных.
-</p><dl>
-<dt><a name="index-mglDataT"></a>Конструктор <code>mglDataT</code>: <em><code></code></em> <strong>mglDataT</strong> <em>(<code>const mglDataT &</code> d)</em></dt>
-<dd><p>Конструктор копирования.
-</p></dd></dl>
-<dl>
-<dt><a name="index-mglDataT-1"></a>Конструктор <code>mglDataT</code>: <em><code></code></em> <strong>mglDataT</strong> <em>(<code>const mglDataA &</code> d, <code>long</code> col=<code>0</code>)</em></dt>
-<dd><p>Создает ссылку на <var>col</var>-ый столбец данных <var>d</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetInd"></a>Метод класса <code>mglDataT</code>: <em><code>void</code></em> <strong>SetInd</strong> <em>(<code>long</code> col, <code>wchar_t</code> name)</em></dt>
-<dt><a name="index-SetInd-1"></a>Метод класса <code>mglDataT</code>: <em><code>void</code></em> <strong>SetInd</strong> <em>(<code>long</code> col, <code>const wchar_t *</code> name)</em></dt>
-<dd><p>Задает ссылку на другой столбец того же массива данных.
-</p></dd></dl>
-
-
-<a name="Klass-mglDataR"></a>
-<h3 class="heading">Класс <code>mglDataR</code></h3>
-<p>представляет именнованную ссылку на строку в другом массиве данных.
-</p><dl>
-<dt><a name="index-mglDataR"></a>Конструктор <code>mglDataR</code>: <em><code></code></em> <strong>mglDataR</strong> <em>(<code>const mglDataR &</code> d)</em></dt>
-<dd><p>Конструктор копирования.
-</p></dd></dl>
-<dl>
-<dt><a name="index-mglDataR-1"></a>Конструктор <code>mglDataR</code>: <em><code></code></em> <strong>mglDataR</strong> <em>(<code>const mglDataA &</code> d, <code>long</code> row=<code>0</code>)</em></dt>
-<dd><p>Создает ссылку на <var>row</var>-ую строку данных <var>d</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-SetInd-2"></a>Метод класса <code>mglDataR</code>: <em><code>void</code></em> <strong>SetInd</strong> <em>(<code>long</code> row, <code>wchar_t</code> name)</em></dt>
-<dt><a name="index-SetInd-3"></a>Метод класса <code>mglDataR</code>: <em><code>void</code></em> <strong>SetInd</strong> <em>(<code>long</code> row, <code>const wchar_t *</code> name)</em></dt>
-<dd><p>Задает ссылку на другой столбец того же массива данных.
-</p></dd></dl>
-
-
-<a name="Class-mglDataW"></a>
-<h3 class="heading">Class <code>mglDataW</code></h3>
-<p>представляет часоту для FFT в виде массива данных.
-</p><dl>
-<dt><a name="index-mglDataW"></a>Конструктор <code>mglDataW</code>: <em><code></code></em> <strong>mglDataW</strong> <em>(<code>const mglDataW &</code> d)</em></dt>
-<dd><p>Конструктор копирования.
-</p></dd></dl>
-<dl>
-<dt><a name="index-mglDataW-1"></a>Конструктор <code>mglDataW</code>: <em><code></code></em> <strong>mglDataW</strong> <em>(<code>long</code> xx=<code>1</code>, <code>long</code> yy=<code>1</code>, <code>long</code> zz=<code>1</code>, <code>double</code> dp=<code>0</code>, <code>char</code> dir=<code>'x'</code>)</em></dt>
-<dd><p>Задает размеры, направление <var>dir</var> и шаг <var>dp</var> для частоты.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Freq-1"></a>Метод класса <code>mglDataR</code>: <em><code>void</code></em> <strong>Freq</strong> <em>(<code>double</code> dp, <code>char</code> dir=<code>'x'</code>)</em></dt>
-<dd><p>Равномерно распределяет данные с шагом <var>dp</var> в направлении <var>dir</var>.
-</p></dd></dl>
-
-
-<a name="Class-mglDataS"></a>
-<h3 class="heading">Class <code>mglDataS</code></h3>
-<p>представляет std::vector в виде массива данных.
-</p><dl>
-<dt><a name="index-dat-of-mglDataS"></a>Variable of mglDataS: <em><code>std::vector<mreal></code></em> <strong>dat</strong></dt>
-<dd><p>Собственно данные.
-</p></dd></dl>
-<dl>
-<dt><a name="index-mglDataS"></a>Конструктор <code>mglDataS</code>: <em><code></code></em> <strong>mglDataS</strong> <em>(<code>const mglDataS &</code> d)</em></dt>
-<dd><p>Конструктор копирования.
-</p></dd></dl>
-<dl>
-<dt><a name="index-mglDataS-1"></a>Конструктор <code>mglDataS</code>: <em><code></code></em> <strong>mglDataS</strong> <em>(<code>const std::vector<mreal> &</code> d)</em></dt>
-<dd><p>Копирует данные из <var>d</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-mglDataS-2"></a>Конструктор <code>mglDataS</code>: <em><code></code></em> <strong>mglDataS</strong> <em>(<code>size_t</code> s)</em></dt>
-<dd><p>Выделяет память для <var>s</var> элементов.
-</p></dd></dl>
-<dl>
-<dt><a name="index-reserve"></a>Метод класса <code>mglDataS</code>: <em><code>void</code></em> <strong>reserve</strong> <em>(<code>size_t</code> num)</em></dt>
-<dd><p>Резервирует место для <var>num</var> элементов.
-</p></dd></dl>
-<dl>
-<dt><a name="index-push_005fback"></a>Метод класса <code>mglDataS</code>: <em><code>void</code></em> <strong>push_back</strong> <em>(<code>double</code> v)</em></dt>
-<dd><p>Добавляет значение <var>v</var> к концу массива данных.
-</p></dd></dl>
-
-
-
-
-
-<hr>
-<a name="MGL-scripts"></a>
-<div class="header">
-<p>
-Next: <a href="#UDAV" accesskey="n" rel="next">UDAV</a>, Previous: <a href="#Data-processing" accesskey="p" rel="prev">Data processing</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-
-<a name="Skripty-MGL"></a>
-<h2 class="chapter">7 Скрипты MGL</h2>
-
-
-<p>MathGL имеет встроенный скриптовый язык MGL для обработки и отображения данных. Скрипты MGL могут быть выполнены независимо (с помощью программ UDAV, mglconv, mglview и др.
-, см. <a href="#Utilities">Utilities</a>) или с использованием вызовов библиотеки.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#MGL-definition" accesskey="1">MGL definition</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Program-flow-commands" accesskey="2">Program flow commands</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Special-comments" accesskey="3">Special comments</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#LaTeX-package" accesskey="4">LaTeX package</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mglParse-class" accesskey="5">mglParse class</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-
-<hr>
-<a name="MGL-definition"></a>
-<div class="header">
-<p>
-Next: <a href="#Program-flow-commands" accesskey="n" rel="next">Program flow commands</a>, Up: <a href="#MGL-scripts" accesskey="u" rel="up">MGL scripts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Osnovy-MGL"></a>
-<h3 class="section">7.1 Основы MGL</h3>
-
-
-<p>Язык MGL достаточно простой. Каждая строка – отдельная команда. Первое слово – имя команды, а все остальные ее аргументы. Команда может иметь до 1000 аргументов (по крайней мере сейчас). Слова разделяются одно от другого пробелом или символом табуляции. Различий между верхним и нижним индексом нет, т.е. переменные <var>a</var> и <var>A</var> идентичны. Символ ‘<samp>#</samp>’ начинает комментарий – все символы после него игнорируются до конца строки. Исключением является случай, когда ‘<samp>#</samp>’ входит в строку. Опции команды указываются после символа ‘<samp>;</samp>’ (see <a href="#Command-options">Command options</a>). Символ ‘<samp>:</samp>’ начинает новую команду (подобно переводу строки) если он расположен не внутри скобок или строки.
-</p>
-<p>Если строка содержит ссылки на внешние параметры (‘<samp>$0</samp>’, ‘<samp>$1</samp>’ ... ‘<samp>$9</samp>’) или макроопределения (‘<samp>$a</samp>’, ‘<samp>$b</samp>’ ... ‘<samp>$z</samp>’), то текущие значения параметров/макроопределений подставляются в строку вместо ссылки до выполнением команды. Это позволяет использовать один и тот же скрипт при различных входных параметрах командной строки или вводить макроопределения по ходу исполнения команд скрипта.
-</p>
-<p>Аргументы команды могут быть строками, переменными или числами.
-</p><ul>
-<li> Строка – произвольный набор символов между метками ‘<samp>'</samp>’. Длинные строки могут быть соединены из нескольких линий файла символом ‘<samp>\</samp>’. Т.е. строки файла ‘<samp>'a +'\<br>' b'</samp>’ дадут строку ‘<samp>'a + b'</samp>’ (здесь ‘<samp><br></samp>’ – перевод строки). MGL поддерживает несколько операций над строками:
-<ul>
-<li> Соединение строк и чисел, используя ‘<samp>,</samp>’ без пробелов (например, ‘<samp>'max(u)=',u.max,' a.u.'</samp>’ или ‘<samp>'u=',!(1+i2)</samp>’ для комплексных чисел);
-</li><li> Получение n-го символа строки, используя ‘<samp>[]</samp>’ (например, ‘<samp>'abc'[1]</samp>’ даст <code>'b'</code>);
-</li><li> Инкремент последнего символа строки, используя ‘<samp>+</samp>’ (например, ‘<samp>'abc'+3</samp>’ даст <code>'abf'</code>).
-</li></ul>
-
-</li><li> Обычно переменная имеет имя, состоящее из букв и чисел (должно начинаться с буквы и не быть длиннее 64 символов). Если выражение или переменная начинается с символа ‘<samp>!</samp>’, то будут использованы комплексные значения. Например, код <code>new x 100 'x':copy !b !exp(1i*x)</code> создаст массив действительных чисел <var>x</var> и массив комплексных чисел <var>b</var>, который будет равен <em>exp(I*x)</em>, где <em>I^2=-1</em>.
-В качестве переменной можно использовать также и временные массивы, включающие в себя:
-<ul>
-<li> срезы (“подмассивы”) массивов данных (подобно команде <a href="#subdata">subdata</a>). Например, <code>a(1)</code> или <code>a(1,:)</code> или <code>a(1,:,:)</code> – вторая строка массива <var>a</var>, <code>a(:,2)</code> или <code>a(:,2,:)</code> – третий столбец, <code>a(:,:,0)</code> – первый срез и т.д. Также можно выделить часть массива с m-го по n-ый элемент <code>a(m:n,:,:)</code> или просто <code>a(m:n)</code>.
-
-</li><li> произвольные комбинации столбцов данных (например, <code>a('n*w^2/exp(t)')</code>), если столбцы данных были именованы командой <a href="#idset">idset</a> или в файле данных (в строке начинающейся с <code>##</code>).
-
-</li><li> произвольное выражение из существующих переменных и констант. Например, ‘<samp>sqrt(dat(:,5)+1)</samp>’ даст временный массив данных с элементами равными <code>tmp[i,j] = sqrt(dat[i,5,j]+1)</code>. При этом символ ‘<samp>`</samp>’ возвращает транспонированный массив: ‘<samp>`sqrt(dat(:,5)+1)</samp>’ и ‘<samp>sqrt(`dat(:,5)+1)</samp>’ оба дадут временный массив данных с элементами равными <code>tmp[i,j] = sqrt(dat[j,5,i]+1)</code>.
-
-</li><li> массивы с элементами заданными в квадратных скобках [], разделенные ‘<samp>,</samp>’. При этом внутри выражения не должно быть пробелов! Например, ‘<samp>[1,2,3]</samp>’ даст временный массив из 3 элементов {1, 2, 3}; ‘<samp>[[11,12],[21,22]]</samp>’ даст матрицу 2*2 и т.д. Элементами такой конструкции могут быть и массивы если их размерности одинаковые, например ‘<samp>[v1,v2,...,vn]</samp>’.
-
-</li><li> результат команд построения новых данных (see <a href="#Make-another-data">Make another data</a>), если они заключены в фигурные скобки {}. Например, ‘<samp>{sum dat 'x'}</samp>’ даст временный массив, который есть результат суммирования <var>dat</var> вдоль ’x’. Это такой же массив как и <var>tmp</var>, полученный командой ‘<samp>sum tmp dat 'x'</samp>’. При этом можно использовать вложенные конструкции, например ‘<samp>{sum {max dat 'z'} 'x'}</samp>’.
-</li></ul>
-<p>Временные массивы не могут стоять в качестве первого аргумента команд, создающих массивы (например, ‘<samp>new</samp>’, ‘<samp>read</samp>’, ‘<samp>hist</samp>’ и т.д.).
-</p>
-</li><li> К скалярным переменным, кроме собственно чисел, относятся: специальные переменные <code>nan=#QNAN, inf=бесконечность, rnd=случайное число, pi=3.1415926..., on=1, off=0, all=-1, :=-1</code>, переменные с суффиксами (see <a href="#Data-information">Data information</a>), переменные определенные командой <a href="#define">define</a>, значения времени (в формате "hh-mm-ss_DD.MM.YYYY", "hh-mm-ss" или "DD.MM.YYYY") . Также массивы размером 1x1x1 считаются скалярами (например, ‘<samp>pi/dat.nx</samp>’).
-</li></ul>
-<p>Перед первым использованием все переменные должны быть определены с помощью команд, создающих массивы (<a href="#new">new</a>, <a href="#var">var</a>, <a href="#list">list</a>, <a href="#copy">copy</a>, <a href="#read">read</a>, <a href="#hist">hist</a>, <a href="#sum">sum</a> и др., см. <a href="#Data-constructor">Data constructor</a>, <a href="#Data-filling">Data filling</a> и <a href="#Make-another-data">Make another data</a>).
-</p>
-<p>Команды могут иметь несколько наборов аргументов (например, <code>plot ydat</code> и <code>plot xdat ydat</code>). Все аргументы команды для выбранного набора должны быть указаны, однако часть из них могут иметь значения по умолчанию. Такие аргументы в описании команд будут помещены в квадратные скобки [], например <code>plot ydat ['stl'='' zval=nan]</code>. При этом запись <code>[arg1 arg2 arg3 ...]</code> подразумевает <code>[arg1 [arg2 [arg3 ...]]]</code>, т.е. опускать можно только аргументы с конца, если вы согласны с их значениями по умолчанию. Например, <code>plot ydat '' 1</code> или <code>plot ydat ''</code> правильно, а <code>plot ydat 1</code> не правильно (аргумент <code>'stl'</code> пропущен).
-</p>
-<p>Можно предоставить несколько вариантов аргументов комманд при использовании символа ‘<samp>?</samp>’ для их разделения. Конкретный вариант аргумента, используемый при выполнении команды, задается значением команды <a href="#variant">variant</a>. При этом будет использован последний вариант, если задано слишком большое значение. По умолчанию используется первый вариант (т.е. как при <code>variant 0</code>). Например в следующем коде будет сначала нарисован график синим цветом (первый аргумент ‘<samp>b</samp>’), а затем красным пунктиром – после <code>variant 1</code> будет использован второй аргумент ‘<samp>r|</samp>’:
-</p><pre class="verbatim">fplot 'x' 'b'?'r'
-variant 1
-fplot 'x^3' 'b'?'r|'
-</pre>
-
-<hr>
-<a name="Program-flow-commands"></a>
-<div class="header">
-<p>
-Next: <a href="#Special-comments" accesskey="n" rel="next">Special comments</a>, Previous: <a href="#MGL-definition" accesskey="p" rel="prev">MGL definition</a>, Up: <a href="#MGL-scripts" accesskey="u" rel="up">MGL scripts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Upravlenie-khodom-vypolneniya"></a>
-<h3 class="section">7.2 Управление ходом выполнения</h3>
-
-
-<p>Ниже собраны команды, управляющие порядком выполнения других команд (условия, циклы, подпрограммы), (пере-)определяют аргументы скрипта и пр. Прочие команды могут быть найдены в главах <a href="#MathGL-core">MathGL core</a> и <a href="#Data-processing">Data processing</a>. Отмечу, что некоторые из команд (например, <a href="#define">define</a>, <a href="#ask">ask</a>, <a href="#call">call</a>, <a href="#for">for</a>, <a href="#func">func</a>) должны быть расположены на отдельной строке.
-</p>
-<a name="index-chdir"></a>
-<a name="chdir"></a><dl>
-<dt><a name="index-chdir-1"></a>Команда MGL: <em></em> <strong>chdir</strong> <em>'path'</em></dt>
-<dd><p>Переходит в папку <var>path</var>.
-</p></dd></dl>
-
-<a name="index-ask"></a>
-<a name="ask"></a><dl>
-<dt><a name="index-ask-1"></a>Команда MGL: <em></em> <strong>ask</strong> <em>$N 'question'</em></dt>
-<dd><p>Задает <var>N</var>-ый аргумент скрипта равным ответу пользователя на вопрос <var>question</var>. Обычно команда показывает диалог с вопросом и полем ввода текста ответа. Здесь <var>N</var> это цифра (0...9) или буква (a...z).
-</p></dd></dl>
-
-<a name="index-define"></a>
-<a name="define"></a><dl>
-<dt><a name="index-define-1"></a>Команда MGL: <em></em> <strong>define</strong> <em>$N smth</em></dt>
-<dd><p>Задает <var>N</var>-ый аргумент скрипта равным <var>smth</var>. Отмечу, что <var>smth</var> используется как есть (с символами ‘<samp>'</samp>’ если присутствуют). Выполняется только подстановка других макроопределений $0...$9, $a...$z. Здесь <var>N</var> это цифра (0...9) или буква (a...z).
-</p></dd></dl>
-<dl>
-<dt><a name="index-define-2"></a>Команда MGL: <em></em> <strong>define</strong> <em>name smth</em></dt>
-<dd><p>Определяет константу (скаляр) с именем <code>name</code> и числовым значением <code>smth</code>. Позднее она может быть использована как обычное число.
-</p></dd></dl>
-<a name="index-defchr"></a>
-<a name="defchr"></a><dl>
-<dt><a name="index-defchr-1"></a>Команда MGL: <em></em> <strong>defchr</strong> <em>$N smth</em></dt>
-<dd><p>Задает <var>N</var>-ый аргумент скрипта равным символу с UTF кодом <var>smth</var>. Здесь <var>N</var> это цифра (0...9) или буква (a...z).
-</p></dd></dl>
-<a name="index-defnum"></a>
-<a name="defnum"></a><dl>
-<dt><a name="index-defnum-1"></a>Команда MGL: <em></em> <strong>defnum</strong> <em>$N smth</em></dt>
-<dd><p>Задает <var>N</var>-ый аргумент скрипта равным числовому значению <var>smth</var>. Здесь <var>N</var> это цифра (0...9) или буква (a...z).
-</p></dd></dl>
-
-
-<a name="index-call"></a>
-<a name="call"></a><dl>
-<dt><a name="index-call-1"></a>Команда MGL: <em></em> <strong>call</strong> <em>'fname' [ARG1 ARG2 ... ARG9]</em></dt>
-<dd><p>Переходит к выполнению (вызывает) подпрограммы <var>fname</var> (или внешнего скрипта, если функция не была найдена). Опциональные аргументы передаются в подпрограмму. См. также <a href="#func">func</a>.
-</p></dd></dl>
-
-<a name="index-func"></a>
-<a name="func"></a><dl>
-<dt><a name="index-func-1"></a>Команда MGL: <em></em> <strong>func</strong> <em>'fname' [narg=0]</em></dt>
-<dd><p>Определяет подпрограмму с именем <var>fname</var> и задает число требуемых аргументов. Аргументы будут помещены в параметры скрипта $1, $2, ... $9. Отмечу, что выполнение основной программы будет остановлено при встрече <code>func</code> – действует аналогично комманде <a href="#stop">stop</a>. См. также <a href="#return">return</a>.
-</p>
-</dd></dl>
-<a name="index-return"></a>
-<a name="return"></a><dl>
-<dt><a name="index-return-1"></a>Команда MGL: <em></em> <strong>return</strong></dt>
-<dd><p>Возвращается из подпрограммы. См. также <a href="#func">func</a>.
-</p></dd></dl>
-
-<a name="index-load"></a>
-<a name="load"></a><dl>
-<dt><a name="index-load-1"></a>Команда MGL: <em></em> <strong>load</strong> <em>'filename'</em></dt>
-<dd><p>Загружает дополнительные команды MGL из внешней динамической библиотеки <var>filename</var>. Данная библиотека должна содержать массив с именем <code>mgl_cmd_extra</code> типа <code>mglCommand</code>, который содержит описание новых комманд.
-</p></dd></dl>
-
-
-<a name="index-if"></a>
-<a name="if"></a><a name="then"></a><dl>
-<dt><a name="index-if-1"></a>Команда MGL: <em></em> <strong>if</strong> <em><code>val</code> <strong>then</strong> <code>CMD</code></em></dt>
-<dd><p>Выполняет команду <code>CMD</code> только если <code>val</code> не ноль.
-</p></dd></dl>
-<dl>
-<dt><a name="index-if-2"></a>Команда MGL: <em></em> <strong>if</strong> <em><code>val</code></em></dt>
-<dd><p>Начинает блок команд, выполняемый если <code>val</code> не ноль.
-</p></dd></dl>
-<dl>
-<dt><a name="index-if-3"></a>Команда MGL: <em></em> <strong>if</strong> <em>dat 'cond'</em></dt>
-<dd><p>Начинает блок команд, выполняемый если каждый элемент <var>dat</var> удовлетворяет условию <var>cond</var>.
-</p></dd></dl>
-<a name="index-elseif"></a>
-<a name="elseif"></a><dl>
-<dt><a name="index-elseif-1"></a>Команда MGL: <em></em> <strong>elseif</strong> <em>dat 'cond'</em></dt>
-<dd><p>Начинает блок команд, выполняемый если предыдущий <code>if</code> или <code>elseif</code> не был выполнен и каждый элемент <var>dat</var> удовлетворяет условию <var>cond</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-elseif-2"></a>Команда MGL: <em></em> <strong>elseif</strong> <em><code>val</code></em></dt>
-<dd><p>Начинает блок команд, выполняемый если предыдущий <code>if</code> или <code>elseif</code> не был выполнен и <code>val</code> не ноль.
-</p></dd></dl>
-<a name="index-else"></a>
-<a name="else"></a><dl>
-<dt><a name="index-else-1"></a>Команда MGL: <em></em> <strong>else</strong></dt>
-<dd><p>Начинает блок команд, выполняемый если предыдущий <code>if</code> или <code>elseif</code> не был выполнен.
-</p></dd></dl>
-<a name="index-endif"></a>
-<a name="endif"></a><dl>
-<dt><a name="index-endif-1"></a>Команда MGL: <em></em> <strong>endif</strong></dt>
-<dd><p>Заканчивает определение блока <code>if/elseif/else</code>.
-</p></dd></dl>
-
-<a name="index-for"></a>
-<a name="for"></a><dl>
-<dt><a name="index-for-1"></a>Команда MGL: <em></em> <strong>for</strong> <em>$N <code>v1 v2 [dv=1]</code></em></dt>
-<dd><p>Начинает блок команд, выполняемый в цикле с $<var>N</var>-ым аргументом изменяющимся от <var>v1</var> до <var>v2</var> с шагом <var>dv</var>. Здесь <var>N</var> это цифра (0...9) или буква (a...z).
-</p></dd></dl>
-<dl>
-<dt><a name="index-for-2"></a>Команда MGL: <em></em> <strong>for</strong> <em>$N dat</em></dt>
-<dd><p>Начинает блок команд, выполняемый в цикле с $<var>N</var>-ым аргументом пробегающим значения массива <var>dat</var>. Здесь <var>N</var> это цифра (0...9) или буква (a...z).
-</p></dd></dl>
-<a name="index-next"></a>
-<a name="next"></a><dl>
-<dt><a name="index-next-1"></a>Команда MGL: <em></em> <strong>next</strong></dt>
-<dd><p>Заканчивает блок цикла <code>for</code>.
-</p></dd></dl>
-
-<a name="index-do"></a>
-<a name="do"></a><dl>
-<dt><a name="index-do-1"></a>Команда MGL: <em></em> <strong>do</strong></dt>
-<dd><p>Начинает бесконечный цикл.
-</p></dd></dl>
-<a name="index-while"></a>
-<a name="while"></a><dl>
-<dt><a name="index-while-1"></a>Команда MGL: <em></em> <strong>while</strong> <em><code>val</code></em></dt>
-<dd><p>Переходит к следующей итерации цикла если <var>val</var> не ноль, в противном случае заканчивает цикл.
-</p></dd></dl>
-<dl>
-<dt><a name="index-while-2"></a>Команда MGL: <em></em> <strong>while</strong> <em>dat 'cond'</em></dt>
-<dd><p>Переходит к следующей итерации цикла если <var>dat</var> удовлетворяет условию <var>cond</var>, в противном случае заканчивает цикл.
-</p></dd></dl>
-
-<a name="index-once"></a>
-<a name="once"></a><dl>
-<dt><a name="index-once-1"></a>Команда MGL: <em></em> <strong>once</strong> <em><code>val</code></em></dt>
-<dd><p>Определяет код (между <code>once on</code> и <code>once off</code>) который будет выполнен только один раз. Полезно для работы с большими данными в программах типа UDAV.
-</p></dd></dl>
-<a name="index-stop"></a>
-<a name="stop"></a><dl>
-<dt><a name="index-stop-2"></a>Команда MGL: <em></em> <strong>stop</strong></dt>
-<dd><p>Останавливает выполнение скрипта.
-</p></dd></dl>
-
-<a name="index-variant"></a>
-<a name="variant"></a><dl>
-<dt><a name="index-variant-1"></a>Команда MGL: <em></em> <strong>variant</strong> <em><code>val</code></em></dt>
-<dd><p>Задает вариант аргумента(ов), разделенных символом ‘<samp>?</samp>’, для всех последующих комманд.
-</p></dd></dl>
-
-<a name="index-rkstep"></a>
-<a name="rkstep"></a><dl>
-<dt><a name="index-rkstep-1"></a>Команда MGL: <em></em> <strong>rkstep</strong> <em>eq1;... var1;... [<code>dt=1</code>]</em></dt>
-<dd><p>Выполняет один шаг решения системы обыкновенных дифференциальных уравнений {var1’ = eq1, ... } с временным шагом <var>dt</var>. Здесь переменные ‘<samp>var1</samp>’, ... – переменные, определенные в MGL скрипте ранее. При решении используется метод Рунге-Кутта 4-го порядка.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Special-comments"></a>
-<div class="header">
-<p>
-Next: <a href="#LaTeX-package" accesskey="n" rel="next">LaTeX package</a>, Previous: <a href="#Program-flow-commands" accesskey="p" rel="prev">Program flow commands</a>, Up: <a href="#MGL-scripts" accesskey="u" rel="up">MGL scripts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Specialxnye-kommentarii"></a>
-<h3 class="section">7.3 Специальные комментарии</h3>
-
-
-<p>There are number of special comments for MGL script, which set some global behavior (like, animation, dialog for parameters and so on). All these special comments starts with double sign <code>##</code>. Let consider them.
-</p>
-<dl compact="compact">
-<dt>‘<samp><strong>##c</strong> <code>v1 v2 [dv=1]</code></samp>’</dt>
-<dd><p>Sets the parameter for animation loop relative to variable <code>$0</code>. Here <var>v1</var> and <var>v2</var> are initial and final values, <var>dv</var> is the increment.
-</p>
-</dd>
-<dt>‘<samp><strong>##a</strong> val</samp>’</dt>
-<dd><p>Adds the parameter <var>val</var> to the list of animation relative to variable <code>$0</code>. You can use it several times (one parameter per line) or combine it with animation loop <strong>##c</strong>.
-</p>
-</dd>
-<dt>‘<samp><strong>##d</strong> $I kind|label|par1|par2|...</samp>’</dt>
-<dd><p>Creates custom dialog for changing plot properties. Each line adds one widget to the dialog. Here <var>$I</var> is id ($0,$1...$9,$a,$b...$z), <var>label</var> is the label of widget, <var>kind</var> is the kind of the widget:
-</p><ul>
-<li> ’e’ for editor or input line (parameter is initial value) ,
-</li><li> ’v’ for spinner or counter (parameters are "ini|min|max|step|big_step"),
-</li><li> ’s’ for slider (parameters are "ini|min|max|step"),
-</li><li> ’b’ for check box (parameter is "ini"; also understand "on"=1),
-</li><li> ’c’ for choice (parameters are possible choices).
-</li></ul>
-<p>Now, it work in FLTK-based <code>mgllab</code> and <code>mglview</code> only.
-</p>
-<p>You can make custom dialog in C/C++ code too by using one of following functions.
-</p>
-<dl>
-<dt><a name="index-MakeDialog"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>MakeDialog</strong> <em>(<code>const char *</code>ids, <code>char const * const *</code>args, <code>const char *</code>title)</em></dt>
-<dt><a name="index-MakeDialog-1"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>MakeDialog</strong> <em>(<code>const std::string &</code>ids, <code>const std::vector<std::string> &</code>args, <code>const char *</code>title)</em></dt>
-<dt><a name="index-mgl_005fwnd_005fmake_005fdialog"></a>C function: <em><code>void</code></em> <strong>mgl_wnd_make_dialog</strong> <em>(<code>HMGL</code> gr, <code>const char *</code>ids, <code>char const * const *</code>args, <code>const char *</code>title)</em></dt>
-<dd><p>Makes custom dialog for parameters ids of element properties defined by args.
-</p></dd></dl>
-
-<p>At this you need to provide callback function for setting up properties. You can do it by overloading <code>Param()</code> function of <code>mglDraw</code> class or set it manually.
-</p>
-<dl>
-<dt><a name="index-Param"></a>Method on <code>mglDraw</code>: <em><code>void</code></em> <strong>Param</strong> <em>(<code>char</code> id, <code>const char *</code> val)</em></dt>
-<dt><a name="index-SetPropFunc"></a>Method on <code>mglWnd</code>: <em><code>void</code></em> <strong>SetPropFunc</strong> <em>(<code>void (*</code>prop<code>)(char id, const char *val, void *p)</code>, <code>void *</code>par=<code>NULL</code>)</em></dt>
-<dt><a name="index-mgl_005fwnd_005fset_005fprop"></a>C function: <em><code>void</code></em> <strong>mgl_wnd_set_prop</strong> <em>(<code>void (*</code>prop<code>)(char id, const char *val, void *p)</code>, <code>void *</code>par)</em></dt>
-<dd><p>Set callback function for properties setup.
-</p></dd></dl>
-
-
-</dd>
-</dl>
-
-
-<hr>
-<a name="LaTeX-package"></a>
-<div class="header">
-<p>
-Next: <a href="#mglParse-class" accesskey="n" rel="next">mglParse class</a>, Previous: <a href="#Special-comments" accesskey="p" rel="prev">Special comments</a>, Up: <a href="#MGL-scripts" accesskey="u" rel="up">MGL scripts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="LaTeX-package-1"></a>
-<h3 class="section">7.4 LaTeX package</h3>
-
-
-<p>There is LaTeX package <code>mgltex</code> (was made by Diego Sejas Viscarra) which allow one to make figures directly from MGL script located in LaTeX file.
-</p>
-<p>For using this package you need to specify <code>--shell-escape</code> option for <em>latex/pdflatex</em> or manually run <em>mglconv</em> tool with produced MGL scripts for generation of images. Don’t forgot to run <em>latex/pdflatex</em> second time to insert generated images into the output document. Also you need to run <em>pdflatex</em> third time to update converted from EPS images if you are using vector EPS output (default).
-</p>
-<p>The package may have following options: <code>draft</code>, <code>final</code> — the same as in the <em>graphicx</em> package; <code>on</code>, <code>off</code> — to activate/deactivate the creation of scripts and graphics; <code>comments</code>, <code>nocomments</code> — to make visible/invisible comments contained inside <code>mglcomment</code> environments; <code>jpg</code>, <code>jpeg</code>, <code>png</code> — to export graphics as JPEG/PNG images; <code>eps</code>, <code>epsz</code> — to export to uncompressed/compressed EPS format as primitives; <code>bps</code>, <code>bpsz</code> — to export to uncompressed/compressed EPS format as bitmap (doesn’t work with <em>pdflatex</em>); <code>pdf</code> — to export to 3D PDF; <code>tex</code> — to export to <em>LaTeX/tikz</em> document.
-</p>
-<p>The package defines the following environments:
-</p><dl compact="compact">
-<dt>‘<samp>mgl</samp>’</dt>
-<dd><p>It writes its contents to a general script which has the same name as the LaTeX document, but its extension is <em>.mgl</em>. The code in this environment is compiled and the image produced is included. It takes exactly the same optional arguments as the <code>\includegraphics</code> command, plus an additional argument <var>imgext</var>, which specifies the extension to save the image.
-</p>
-<p>An example of usage of ‘<samp>mgl</samp>’ environment would be:
-</p><pre class="verbatim">\begin{mglfunc}{prepare2d}
- new a 50 40 '0.6*sin(pi*(x+1))*sin(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
- new b 50 40 '0.6*cos(pi*(x+1))*cos(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-\end{mglfunc}
-
-\begin{figure}[!ht]
- \centering
- \begin{mgl}[width=0.85\textwidth,height=7.5cm]
- fog 0.5
- call 'prepare2d'
- subplot 2 2 0 : title 'Surf plot (default)' : rotate 50 60 : light on : box : surf a
-
- subplot 2 2 1 : title '"\#" style; meshnum 10' : rotate 50 60 : box
- surf a '#'; meshnum 10
-
- subplot 2 2 2 : title 'Mesh plot' : rotate 50 60 : box
- mesh a
-
- new x 50 40 '0.8*sin(pi*x)*sin(pi*(y+1)/2)'
- new y 50 40 '0.8*cos(pi*x)*sin(pi*(y+1)/2)'
- new z 50 40 '0.8*cos(pi*(y+1)/2)'
- subplot 2 2 3 : title 'parametric form' : rotate 50 60 : box
- surf x y z 'BbwrR'
- \end{mgl}
-\end{figure}
-</pre>
-</dd>
-<dt>‘<samp>mgladdon</samp>’</dt>
-<dd><p>It adds its contents to the general script, without producing any image.
-</p></dd>
-<dt>‘<samp>mglcode</samp>’</dt>
-<dd><p>Is exactly the same as ‘<samp>mgl</samp>’, but it writes its contents verbatim to its own file, whose name is specified as a mandatory argument.
-</p></dd>
-<dt>‘<samp>mglscript</samp>’</dt>
-<dd><p>Is exactly the same as ‘<samp>mglcode</samp>’, but it doesn’t produce any image, nor accepts optional arguments. It is useful, for example, to create a MGL script, which can later be post processed by another package like "listings".
-</p></dd>
-<dt>‘<samp>mglblock</samp>’</dt>
-<dd><p>It writes its contents verbatim to a file, specified as a mandatory argument, and to the LaTeX document, and numerates each line of code.
-</p>
-</dd>
-<dt>‘<samp>mglverbatim</samp>’</dt>
-<dd><p>Exactly the same as ‘<samp>mglblock</samp>’, but it doesn’t write to a file. This environment doesn’t have arguments.
-</p></dd>
-<dt>‘<samp>mglfunc</samp>’</dt>
-<dd><p>Is used to define MGL functions. It takes one mandatory argument, which is the name of the function, plus one additional argument, which specifies the number of arguments of the function. The environment needs to contain only the body of the function, since the first and last lines are appended automatically, and the resulting code is written at the end of the general script, after the <a href="#stop">stop</a> command, which is also written automatically. The warning is produced if 2 or more function with the same name is defined.
-</p></dd>
-<dt>‘<samp>mglcomment</samp>’</dt>
-<dd><p>Is used to contain multiline comments. This comments will be visible/invisible in the output document, depending on the use of the package options <code>comments</code> and <code>nocomments</code> (see above), or the <code>\mglcomments</code> and <code>\mglnocomments</code> commands (see bellow).
-</p></dd>
-<dt>‘<samp>mglsetup</samp>’</dt>
-<dd><p>If many scripts with the same code are to be written, the repetitive code can be written inside this environment only once, then this code will be used automatically every time the ‘<samp>\mglplot</samp>’ command is used (see below). It takes one optional argument, which is a name to be associated to the corresponding contents of the environment; this name can be passed to the ‘<samp>\mglplot</samp>’ command to use the corresponding block of code automatically (see below).
-</p></dd>
-</dl>
-
-<p>The package also defines the following commands:
-</p><dl compact="compact">
-<dt>‘<samp>\mglplot</samp>’</dt>
-<dd><p>It takes one mandatory argument, which is MGL instructions separated by the symbol ‘<samp>:</samp>’ this argument can be more than one line long. It takes the same optional arguments as the ‘<samp>mgl</samp>’ environment, plus an additional argument <var>setup</var>, which indicates the name associated to a block of code inside a ‘<samp>mglsetup</samp>’ environment. The code inside the mandatory argument will be appended to the block of code specified, and the resulting code will be written to the general script.
-</p>
-<p>An example of usage of ‘<samp>\mglplot</samp>’ command would be:
-</p><pre class="verbatim">\begin{mglsetup}
- box '@{W9}' : axis
-\end{mglsetup}
-\begin{mglsetup}[2d]
- box : axis
- grid 'xy' ';k'
-\end{mglsetup}
-\begin{mglsetup}[3d]
- rotate 50 60
- box : axis : grid 'xyz' ';k'
-\end{mglsetup}
-\begin{figure}[!ht]
- \centering
- \mglplot[scale=0.5]{new a 200 'sin(pi*x)' : plot a '2B'}
-\end{figure}
-\begin{figure}[!ht]
- \centering
- \mglplot[scale=0.5,setup=2d]{
- fplot 'sin(pi*x)' '2B' :
- fplot 'cos(pi*x^2)' '2R'
- }
-\end{figure}
-\begin{figure}[!ht]
- \centering
- \mglplot[setup=3d]{fsurf 'sin(pi*x)+cos(pi*y)'}
-\end{figure}
-</pre>
-</dd>
-<dt>‘<samp>\mglgraphics</samp>’</dt>
-<dd><p>This command takes the same optional arguments as the ‘<samp>mgl</samp>’ environment, and one mandatory argument, which is the name of a MGL script. This command will compile the corresponding script and include the resulting image. It is useful when you have a script outside the LaTeX document, and you want to include the image, but you don’t want to type the script again.
-</p></dd>
-<dt>‘<samp>\mglinclude</samp>’</dt>
-<dd><p>This is like ‘<samp>\mglgraphics</samp>’ but, instead of creating/including the corresponding image, it writes the contents of the MGL script to the LaTeX document, and numerates the lines.
-</p></dd>
-<dt>‘<samp>\mgldir</samp>’</dt>
-<dd><p>This command can be used in the preamble of the document to specify a directory where LaTeX will save the MGL scripts and generate the corresponding images. This directory is also where ‘<samp>\mglgraphics</samp>’ and ‘<samp>\mglinclude</samp>’ will look for scripts.
-</p></dd>
-<dt>‘<samp>\mglquality</samp>’</dt>
-<dd><p>Adjust the quality of the MGL graphics produced similarly to <a href="#quality">quality</a>.
-</p></dd>
-<dt>‘<samp>\mgltexon, \mgltexoff</samp>’</dt>
-<dd><p>Activate/deactivate the creation of MGL scripts and images. Notice these commands have local behavior in the sense that their effect is from the point they are called on.
-</p></dd>
-<dt>‘<samp>\mglcomment, \mglnocomment</samp>’</dt>
-<dd><p>Make visible/invisible the contents of the <code>mglcomment</code> environments. These commands have local effect too.
-</p></dd>
-<dt>‘<samp>\mglTeX</samp>’</dt>
-<dd><p>It just pretty prints the name of the package.
-</p></dd>
-</dl>
-
-<p>As an additional feature, when an image is not found or cannot be included, instead of issuing an error, <code>mgltex</code> prints a box with the word ‘<samp>MGL image not found</samp>’ in the LaTeX document.
-</p>
-
-
-
-<hr>
-<a name="mglParse-class"></a>
-<div class="header">
-<p>
-Previous: <a href="#LaTeX-package" accesskey="p" rel="prev">LaTeX package</a>, Up: <a href="#MGL-scripts" accesskey="u" rel="up">MGL scripts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="mglParse-class-1"></a>
-<h3 class="section">7.5 mglParse class</h3>
-
-<a name="index-mglParse"></a>
-
-<p>Класс разбирает и выполняет скрипты MGL. Он определен в <code>#include <mgl2/mgl.h></code>.
-</p>
-<p>Основная функция класса mglParse – <code>Execute()</code>, выполняющая построчный разбор скрипта. Также есть вспомогательные функции для поиска и создания переменных MGL (объектов, производных от <code>mglDataA</code>). Эти функции полезны для отображения значений массивов во внешних объектах (например, в отдельном окне) или для предоставления доступа к внутренним массивам. Функция <code>AllowSetSize()</code> позволяет запретить изменение размера картинки (запрещает команду <code>setsize</code>). Функция <code>AllowFileIO()</code> позволяет запретить доступ к файлам на диске.
-</p>
-
-<dl>
-<dt><a name="index-mglParse-1"></a>Конструктор класса <code>mglParse</code>: <em><code></code></em> <strong>mglParse</strong> <em>(<code>bool</code> setsize=<code>false</code>)</em></dt>
-<dt><a name="index-mglParse-2"></a>Конструктор класса <code>mglParse</code>: <em><code></code></em> <strong>mglParse</strong> <em>(<code>HMPR</code> pr)</em></dt>
-<dt><a name="index-mglParse-3"></a>Конструктор класса <code>mglParse</code>: <em><code></code></em> <strong>mglParse</strong> <em>(<code>mglParse &</code>pr)</em></dt>
-<dt><a name="index-mgl_005fcreate_005fparser"></a>Функция С: <em><code>HMPR</code></em> <strong>mgl_create_parser</strong> <em>()</em></dt>
-<dd><p>Создает экземпляр класса <code>mglParse</code> и устанавливает значение <var>AllowSetSize</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-_007emglParse"></a>Деструктор класса <code>mglParse</code>: <em><code></code></em> <strong>~mglParse</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fdelete_005fparser"></a>Функция С: <em><code>void</code></em> <strong>mgl_delete_parser</strong> <em>(<code>HMPR</code> p)</em></dt>
-<dd><p>Удаляет экземпляр класса.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Self-1"></a>Метод класса <code>mglParse</code>: <em><code>HMPR</code></em> <strong>Self</strong> <em>()</em></dt>
-<dd><p>Возвращает указатель на используемый объект типа <code>HMPR</code>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Execute"></a>Метод класса <code>mglParse</code>: <em><code>void</code></em> <strong>Execute</strong> <em>(<code>mglGraph *</code>gr, <code>const char *</code>text)</em></dt>
-<dt><a name="index-Execute-1"></a>Метод класса <code>mglParse</code>: <em><code>void</code></em> <strong>Execute</strong> <em>(<code>mglGraph *</code>gr, <code>const wchar_t *</code>text)</em></dt>
-<dt><a name="index-mgl_005fparse_005ftext"></a>Функция С: <em><code>void</code></em> <strong>mgl_parse_text</strong> <em>(<code>HMGL</code> gr, <code>HMPR</code> p, <code>const char *</code>text)</em></dt>
-<dt><a name="index-mgl_005fparse_005ftextw"></a>Функция С: <em><code>void</code></em> <strong>mgl_parse_textw</strong> <em>(<code>HMGL</code> gr, <code>HMPR</code> p, <code>const wchar_t *</code>text)</em></dt>
-<dd><p>Выполняет построчно скрипт MGL, содержащийся в <var>text</var>. Строки считаются разделенными символом ‘<samp>\n</samp>’. Это основная функция класса.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Execute-2"></a>Метод класса <code>mglParse</code>: <em><code>void</code></em> <strong>Execute</strong> <em>(<code>mglGraph *</code>gr, <code>FILE *</code>fp, <code>bool</code> print=<code>false</code>)</em></dt>
-<dt><a name="index-mgl_005fparse_005ffile"></a>Функция С: <em><code>void</code></em> <strong>mgl_parse_file</strong> <em>(<code>HMGL</code> gr, <code>HMPR</code> p, <code>FILE *</code>fp, <code>int</code> print)</em></dt>
-<dd><p>Аналогично предыдущему, но скрипт читается из файла <var>fp</var>. Если <var>print</var>=<code>true</code>, то предупреждения и информационные сообщения печатаются в stdout.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Parse"></a>Метод класса <code>mglParse</code>: <em><code>int</code></em> <strong>Parse</strong> <em>(<code>mglGraph *</code>gr, <code>const char *</code>str, <code>long</code> pos=<code>0</code>)</em></dt>
-<dt><a name="index-Parse-1"></a>Метод класса <code>mglParse</code>: <em><code>int</code></em> <strong>Parse</strong> <em>(<code>mglGraph *</code>gr, <code>const wchar_t *</code>str, <code>long</code> pos=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fparse_005fline"></a>Функция С: <em><code>int</code></em> <strong>mgl_parse_line</strong> <em>(<code>HMGL</code> gr, <code>HMPR</code> p, <code>const char *</code>str, <code>int</code> pos)</em></dt>
-<dt><a name="index-mgl_005fparse_005flinew"></a>Функция С: <em><code>int</code></em> <strong>mgl_parse_linew</strong> <em>(<code>HMGL</code> gr, <code>HMPR</code> p, <code>const wchar_t *</code>str, <code>int</code> pos)</em></dt>
-<dd><p>Выполняет строку <var>str</var> с выводом графики на <var>gr</var>. Возвращает код ошибки: 0 – нет ошибок, 1 – неправильные аргументы, 2 – неизвестная команда, 3 – строка слишком длинная, 4 – нет закрывающей скобки или ‘<samp>'</samp>’. Аргумент <var>pos</var> задает позицию строки в документе/файле для использования в команде <a href="#for">for</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Calc-1"></a>Метод класса <code>mglParse</code>: <em><code>mglData</code></em> <strong>Calc</strong> <em>(<code>const char *</code>formula)</em></dt>
-<dt><a name="index-Calc-2"></a>Метод класса <code>mglParse</code>: <em><code>mglData</code></em> <strong>Calc</strong> <em>(<code>const wchar_t *</code>formula)</em></dt>
-<dt><a name="index-mgl_005fparser_005fcalc"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_parser_calc</strong> <em>(<code>HMPR</code> p, <code>const char *</code>formula)</em></dt>
-<dt><a name="index-mgl_005fparser_005fcalcw"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_parser_calcw</strong> <em>(<code>HMPR</code> p, <code>const wchar_t *</code>formula)</em></dt>
-<dd><p>Разбирает строку <var>formula</var> и возвращает полученный массив. В отличие от <code>AddVar()</code> или <code>FindVar()</code>, это обычный массив данных, который следует удалить после использования.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-CalcComplex"></a>Метод класса <code>mglParse</code>: <em><code>mglDataC</code></em> <strong>CalcComplex</strong> <em>(<code>const char *</code>formula)</em></dt>
-<dt><a name="index-CalcComplex-1"></a>Метод класса <code>mglParse</code>: <em><code>mglDataC</code></em> <strong>CalcComplex</strong> <em>(<code>const wchar_t *</code>formula)</em></dt>
-<dt><a name="index-mgl_005fparser_005fcalc_005fcomplex"></a>Функция С: <em><code>HADT</code></em> <strong>mgl_parser_calc_complex</strong> <em>(<code>HMPR</code> p, <code>const char *</code>formula)</em></dt>
-<dt><a name="index-mgl_005fparser_005fcalc_005fcomplexw"></a>Функция С: <em><code>HADT</code></em> <strong>mgl_parser_calc_complexw</strong> <em>(<code>HMPR</code> p, <code>const wchar_t *</code>formula)</em></dt>
-<dd><p>Разбирает строку <var>formula</var> и возвращает полученный массив с комплексными значениями. В отличие от <code>AddVar()</code> или <code>FindVar()</code>, это обычный массив данных, который следует удалить после использования.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-AddParam"></a>Метод класса <code>mglParse</code>: <em><code>void</code></em> <strong>AddParam</strong> <em>(<code>int</code> n, <code>const char *</code>str)</em></dt>
-<dt><a name="index-AddParam-1"></a>Метод класса <code>mglParse</code>: <em><code>void</code></em> <strong>AddParam</strong> <em>(<code>int</code> n, <code>const wchar_t *</code>str)</em></dt>
-<dt><a name="index-mgl_005fparser_005fadd_005fparam"></a>Функция С: <em><code>void</code></em> <strong>mgl_parser_add_param</strong> <em>(<code>HMPR</code> p, <code>int</code> id, <code>const char *</code>val)</em></dt>
-<dt><a name="index-mgl_005fparser_005fadd_005fparamw"></a>Функция С: <em><code>void</code></em> <strong>mgl_parser_add_paramw</strong> <em>(<code>HMPR</code> p, <code>int</code> id, <code>const wchar_t *</code>val)</em></dt>
-<dd><p>Устанавливает значение <var>n</var>-го параметра строкой <var>str</var> (<var>n</var>=0, 1 ... ’z’-’a’+10). Строка <var>str</var> не должна содержать символ ‘<samp>$</samp>’.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-FindVar"></a>Метод класса <code>mglParse</code>: <em><code>mglVar *</code></em> <strong>FindVar</strong> <em>(<code>const char *</code>name)</em></dt>
-<dt><a name="index-FindVar-1"></a>Метод класса <code>mglParse</code>: <em><code>mglVar *</code></em> <strong>FindVar</strong> <em>(<code>const wchar_t *</code>name)</em></dt>
-<dt><a name="index-mgl_005fparser_005ffind_005fvar"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_parser_find_var</strong> <em>(<code>HMPR</code> p, <code>const char *</code>name)</em></dt>
-<dt><a name="index-mgl_005fparser_005ffind_005fvarw"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_parser_find_varw</strong> <em>(<code>HMPR</code> p, <code>const wchar_t *</code>name)</em></dt>
-<dd><p>Возвращает указатель на переменную с именем <var>name</var> или <code>NULL</code> если переменная отсутствует. Используйте эту функцию для добавления внешних массивов в скрипт. <strong>Не удаляйте</strong> полученный массив!
-</p></dd></dl>
-<dl>
-<dt><a name="index-AddVar"></a>Метод класса <code>mglParse</code>: <em><code>mglVar *</code></em> <strong>AddVar</strong> <em>(<code>const char *</code>name)</em></dt>
-<dt><a name="index-AddVar-1"></a>Метод класса <code>mglParse</code>: <em><code>mglVar *</code></em> <strong>AddVar</strong> <em>(<code>const wchar_t *</code>name)</em></dt>
-<dt><a name="index-mgl_005fparser_005fadd_005fvar"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_parser_add_var</strong> <em>(<code>HMPR</code> p, <code>const char *</code>name)</em></dt>
-<dt><a name="index-mgl_005fparser_005fadd_005fvarw"></a>Функция С: <em><code>HMDT</code></em> <strong>mgl_parser_add_varw</strong> <em>(<code>HMPR</code> p, <code>const wchar_t *</code>name)</em></dt>
-<dd><p>Возвращает указатель на переменную с именем <var>name</var>. Если переменная отсутствует, то она будет создана. Используйте эту функцию для добавления внешних массивов в скрипт. <strong>Не удаляйте</strong> полученный массив!
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-OpenHDF-1"></a>Метод класса <code>mglParse</code>: <em><code>void</code></em> <strong>OpenHDF</strong> <em>(<code>const char *</code>fname)</em></dt>
-<dt><a name="index-mgl_005fparser_005fopenhdf-1"></a>Функция С: <em><code>void</code></em> <strong>mgl_parser_openhdf</strong> <em>(<code>HMPR</code> pr, <code>const char *</code>fname)</em></dt>
-<dd><p>Читает все массивы данных из HDF5 файла <var>fname</var> и создает переменные MGL с соответствующими именами. Если имя данных начинается с ‘<samp>!</samp>’, то будут созданы комплексные массивы.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-DeleteVar"></a>Метод класса <code>mglParse</code> (C++): <em><code>void</code></em> <strong>DeleteVar</strong> <em>(<code>const char *</code>name)</em></dt>
-<dt><a name="index-DeleteVar-1"></a>Метод класса <code>mglParse</code> (C++): <em><code>void</code></em> <strong>DeleteVar</strong> <em>(<code>const wchar_t *</code>name)</em></dt>
-<dt><a name="index-mgl_005fparser_005fdel_005fvar"></a>Функция С: <em><code>void</code></em> <strong>mgl_parser_del_var</strong> <em>(<code>HMPR</code> p, <code>const char *</code>name)</em></dt>
-<dt><a name="index-mgl_005fparser_005fdel_005fvarw"></a>Функция С: <em><code>void</code></em> <strong>mgl_parser_del_varw</strong> <em>(<code>HMPR</code> p, <code>const wchar_t *</code>name)</em></dt>
-<dd><p>Удаляет переменную по имени <var>name</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-DeleteAll"></a>Метод класса <code>mglParse</code> (C++): <em><code>void</code></em> <strong>DeleteAll</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fparser_005fdel_005fall"></a>Функция С: <em><code>void</code></em> <strong>mgl_parser_del_all</strong> <em>(<code>HMPR</code> p)</em></dt>
-<dd><p>Удаляет все переменные и сбрасывает список команд к списку по умолчанию в данном классе.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-RestoreOnce"></a>Метод класса <code>mglParse</code>: <em><code>void</code></em> <strong>RestoreOnce</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fparser_005frestore_005fonce"></a>Функция С: <em><code>void</code></em> <strong>mgl_parser_restore_once</strong> <em>(<code>HMPR</code> p)</em></dt>
-<dd><p>Восстанавливает состояние флага Once.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-AllowSetSize"></a>Метод класса <code>mglParse</code>: <em><code>void</code></em> <strong>AllowSetSize</strong> <em>(<code>bool</code> a)</em></dt>
-<dt><a name="index-mgl_005fparser_005fallow_005fsetsize"></a>Функция С: <em><code>void</code></em> <strong>mgl_parser_allow_setsize</strong> <em>(<code>HMPR</code> p, <code>int</code> a)</em></dt>
-<dd><p>Разрешает/запрещает команду <a href="#setsize">setsize</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-AllowFileIO"></a>Метод класса <code>mglParse</code>: <em><code>void</code></em> <strong>AllowFileIO</strong> <em>(<code>bool</code> a)</em></dt>
-<dt><a name="index-mgl_005fparser_005fallow_005ffile_005fio"></a>Функция С: <em><code>void</code></em> <strong>mgl_parser_allow_file_io</strong> <em>(<code>HMPR</code> p, <code>int</code> a)</em></dt>
-<dd><p>Разрешает/запрещает команды чтения файлов.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-AllowDllCall"></a>Метод класса <code>mglParse</code>: <em><code>void</code></em> <strong>AllowDllCall</strong> <em>(<code>bool</code> a)</em></dt>
-<dt><a name="index-mgl_005fparser_005fallow_005fdll_005fcall"></a>Функция С: <em><code>void</code></em> <strong>mgl_parser_allow_dll_call</strong> <em>(<code>HMPR</code> p, <code>int</code> a)</em></dt>
-<dd><p>Разрешает/запрещает команду <a href="#load">load</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-Stop-2"></a>Метод класса <code>mglParse</code>: <em><code>void</code></em> <strong>Stop</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fparser_005fstop"></a>Функция С: <em><code>void</code></em> <strong>mgl_parser_stop</strong> <em>(<code>HMPR</code> p)</em></dt>
-<dd><p>Посылает сигнал завершения выполнения для следующей команды.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-SetVariant"></a>Метод класса <code>mglParse</code>: <em><code>void</code></em> <strong>SetVariant</strong> <em>(<code>int</code> var=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fparser_005fvariant"></a>Функция С: <em><code>void</code></em> <strong>mgl_parser_variant</strong> <em>(<code>HMPR</code> p, <code>int</code> var=<code>0</code>)</em></dt>
-<dd><p>Задает вариант аргумента(ов), разделенных символом ‘<samp>?</samp>’, для всех последующих комманд.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-StartID"></a>Метод класса <code>mglParse</code>: <em><code>void</code></em> <strong>StartID</strong> <em>(<code>int</code> id=<code>0</code>)</em></dt>
-<dt><a name="index-mgl_005fparser_005fstart_005fid"></a>Функция С: <em><code>void</code></em> <strong>mgl_parser_start_id</strong> <em>(<code>HMPR</code> p, <code>int</code> id)</em></dt>
-<dd><p>Задает начальный id (обычно это номер строки) первой строки при последующем выполнении скрипта.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-GetCmdNum"></a>Метод класса <code>mglParse</code>: <em><code>long</code></em> <strong>GetCmdNum</strong> <em>()</em></dt>
-<dt><a name="index-mgl_005fparser_005fcmd_005fnum"></a>Функция С: <em><code>long</code></em> <strong>mgl_parser_cmd_num</strong> <em>(<code>HMPR</code> p)</em></dt>
-<dd><p>Возвращает число зарегистрированных команд MGL.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-GetCmdName"></a>Метод класса <code>mglParse</code>: <em><code>const char *</code></em> <strong>GetCmdName</strong> <em>(<code>long</code> id)</em></dt>
-<dt><a name="index-mgl_005fparser_005fcmd_005fname"></a>Функция С: <em><code>const char *</code></em> <strong>mgl_parser_cmd_name</strong> <em>(<code>HMPR</code> p, <code>long</code> id)</em></dt>
-<dd><p>Возвращает имя команды MGL с заданным номером <var>id</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-CmdType"></a>Метод класса <code>mglParse</code>: <em><code>int</code></em> <strong>CmdType</strong> <em>(<code>const char *</code>name)</em></dt>
-<dt><a name="index-mgl_005fparser_005fcmd_005ftype"></a>Функция С: <em><code>int</code></em> <strong>mgl_parser_cmd_type</strong> <em>(<code>HMPR</code> p, <code>const char *</code>name)</em></dt>
-<dd><p>Возвращает тип команды MGL с именем <var>name</var>. Типы команд: 0 – не команда, 1 - графики по данным, 2 - прочие графики, 3 - настройка, 4 - обработка данных, 5 - создание данных, 6 - трансформация, 7 - ход выполнения, 8 - 1d графики, 9 - 2d графики, 10 - 3d графики, 11 - двойные графики, 12 - векторные поля, 13 - оси координат, 14 - примитивы, 15 - настройка осей, 16 - текст/легенда, 17 - изменение данных.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-CmdFormat"></a>Метод класса <code>mglParse</code>: <em><code>const char *</code></em> <strong>CmdFormat</strong> <em>(<code>const char *</code>name)</em></dt>
-<dt><a name="index-mgl_005fparser_005fcmd_005ffrmt"></a>Функция С: <em><code>const char *</code></em> <strong>mgl_parser_cmd_frmt</strong> <em>(<code>HMPR</code> p, <code>const char *</code>name)</em></dt>
-<dd><p>Возвращает формат аргументов команды MGL с именем <var>name</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-CmdDesc"></a>Метод класса <code>mglParse</code>: <em><code>const char *</code></em> <strong>CmdDesc</strong> <em>(<code>const char *</code>name)</em></dt>
-<dt><a name="index-mgl_005fparser_005fcmd_005fdesc"></a>Функция С: <em><code>const char *</code></em> <strong>mgl_parser_cmd_desc</strong> <em>(<code>HMPR</code> p, <code>const char *</code>name)</em></dt>
-<dd><p>Возвращает описание команды MGL с именем <var>name</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-RK_005fStep"></a>Метод класса <code>mglParse</code>: <em><code>void</code></em> <strong>RK_Step</strong> <em>(<code>const char *</code>eqs, <code>const char *</code>vars, <code>mreal</code> dt=<code>1</code>)</em></dt>
-<dt><a name="index-RK_005fStep-1"></a>Метод класса <code>mglParse</code>: <em><code>void</code></em> <strong>RK_Step</strong> <em>(<code>const wchar_t *</code>eqs, <code>const wchar_t *</code>vars, <code>mreal</code> dt=<code>1</code>)</em></dt>
-<dt><a name="index-mgl_005frk_005fstep"></a>Функция С: <em><code>void</code></em> <strong>mgl_rk_step</strong> <em>(<code>HMPR</code> p, <code>const char *</code>eqs, <code>const char *</code>vars, <code>mreal</code> dt)</em></dt>
-<dt><a name="index-mgl_005frk_005fstep_005fw"></a>Функция С: <em><code>void</code></em> <strong>mgl_rk_step_w</strong> <em>(<code>HMPR</code> p, <code>const wchar_t *</code>eqs, <code>const wchar_t *</code>vars, <code>mreal</code> dt)</em></dt>
-<dd><p>Make one step for ordinary differential equation(s) {var1’ = eq1, ... } with time-step <var>dt</var>. Here strings <var>eqs</var> and <var>vars</var> contain the equations and variable names separated by symbol ‘<samp>;</samp>’. The variable(s) ‘<samp>var1</samp>’, ... are the ones, defined in MGL script previously. The Runge-Kutta 4-th order method is used.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="UDAV"></a>
-<div class="header">
-<p>
-Next: <a href="#Other-classes" accesskey="n" rel="next">Other classes</a>, Previous: <a href="#MGL-scripts" accesskey="p" rel="prev">MGL scripts</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="UDAV-1"></a>
-<h2 class="chapter">8 UDAV</h2>
-
-
-<p>UDAV (Universal Data Array Visualizator) is cross-platform program for data arrays visualization based on MathGL library. It support wide spectrum of graphics, simple script language and visual data handling and editing. It has window interface for data viewing, changing and plotting. Also it can execute MGL scripts, setup and rotate graphics and so on. UDAV hot-keys can be found in the appendix <a href="#Hot_002dkeys-for-UDAV">Hot-keys for UDAV</a>.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#UDAV-overview" accesskey="1">UDAV overview</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#UDAV-dialogs" accesskey="2">UDAV dialogs</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#UDAV-hints" accesskey="3">UDAV hints</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="UDAV-overview"></a>
-<div class="header">
-<p>
-Next: <a href="#UDAV-dialogs" accesskey="n" rel="next">UDAV dialogs</a>, Up: <a href="#UDAV" accesskey="u" rel="up">UDAV</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="UDAV-overview-1"></a>
-<h3 class="section">8.1 UDAV overview</h3>
-
-
-<p>UDAV have main window divided by 2 parts in general case and optional bottom panel(s). Left side contain tabs for MGL script and data arrays. Right side contain tabs with graphics itself, with list of variables and with help on MGL. Bottom side may contain the panel with MGL messages and warnings, and the panel with calculator.
-</p>
-<div align="center"><img src="udav/udav_main.png" alt="Main window">
-</div>
-<p>Main window is shown on the figure above. You can see the script (at left) with current line highlighted by light-yellow, and result of its execution at right. Each panel have its own set of toolbuttons.
-</p>
-<p>Editor toolbuttons allow: open and save script from/to file; undo and redo changes; cut, copy and paste selection; find/replace text; show dialogs for command arguments and for plot setup; show calculator at bottom.
-</p>
-<p>Graphics toolbuttons allow: enable/disable additional transparency and lighting; show grid of absolute coordinates; enable mouse rotation; restore image view; refresh graphics (execute the script); stop calculation; copy graphics into clipboard; add primitives (line, curve, box, rhombus, ellipse, mark, text) to the image; change view angles manually. Vertical toolbuttons allow: shift and zoom in/out of image as whole; show next and previous frame of animation, or start animation (if one present).
-</p>
-<p>Graphics panel support plot editing by mouse.
-</p><ul>
-<li> Axis range can be changed by mouse wheel or by dragging image by middle mouse button. Right button show popup menu. Left button show the coordinates of mouse click. At this double click will highlight plot under mouse and jump to the corresponded string of the MGL script.
-</li><li> Pressing "mouse rotation" toolbutton will change mouse actions: dragging by left button will rotate plot, middle button will shift the plot as whole, right button will zoom in/out plot as whole and add perspective, mouse wheel will zoom in/out plot as whole.
-</li><li> Manual primitives can be added by pressing corresponding toolbutton. They can be shifted as whole at any time by mouse dragging. At this double click open dialog with its properties. If toolbutton "grid of absolute coordinates" is pressed then editing of active points for primitives is enabled.
-</li></ul>
-
-<div align="center"><img src="udav/udav_help.png" alt="Main window - help panel">
-</div>
-<p>Short command description and list of its arguments are shown at the status-bar, when you move cursor to the new line of code. You can press <tt class="key">F1</tt> to see more detailed help on special panel.
-</p>
-<div align="center"><img src="udav/udav_data.png" alt="Main window - data viewing">
-</div>
-<p>Also you can look the current list of variables, its dimensions and its size in the memory (right side of above figure). Toolbuttons allow: create new variable, edit variable, delete variable, preview variable plot and its properties, refresh list of variables. Pressing on any column will sort table according its contents. Double click on a variable will open panel with data cells of the variable, where you can view/edit each cell independently or apply a set of transformations.
-</p>
-<div align="center"><img src="udav/udav_calc.png" alt="Main window - calculator and messages">
-</div>
-<p>Finally, pressing <tt class="key">F2</tt> or <tt class="key">F4</tt> you can show/hide windows with messages/warnings and with calculator. Double click on a warning in message window will jump to corresponding line in editor. Calculator allow you type expression by keyboard as well as by toolbuttons. It know about all current variables, so you can use them in formulas.
-</p>
-
-<hr>
-<a name="UDAV-dialogs"></a>
-<div class="header">
-<p>
-Next: <a href="#UDAV-hints" accesskey="n" rel="next">UDAV hints</a>, Previous: <a href="#UDAV-overview" accesskey="p" rel="prev">UDAV overview</a>, Up: <a href="#UDAV" accesskey="u" rel="up">UDAV</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="UDAV-dialogs-1"></a>
-<h3 class="section">8.2 UDAV dialogs</h3>
-
-
-<p>There are a set of dialogs, which allow change/add a command, setup global plot properties, or setup UDAV itself.
-</p>
-<div align="center"><img src="udav/udav_cmd.png" alt="New command dialog">
-</div>
-<p>One of most interesting dialog (hotkey <tt class="key">Meta-C</tt> or <tt class="key">Win-C</tt>) is dialog which help to enter new command or change arguments of existed one. It allows consequently select the category of command, command name in category and appropriate set of command arguments. At this right side show detailed command description. Required argument(s) are denoted by bold text. Strings are placed in apostrophes, like <code>'txt'</code>. Buttons below table allow to call dialogs for changing style of command (if argument <code>'fmt'</code> is present in the list of command arguments); to set variable or expression for argument(s); to add options for command. Note, you can click on a cell to enter value, or double-click to call corresponding dialog.
-</p>
-<div align="center"><img src="udav/udav_pen.png" alt="Style dialog - pen style">
-</div><div align="center"><img src="udav/udav_sch.png" alt="Style dialog - color scheme">
-</div><div align="center"><img src="udav/udav_txt.png" alt="Style dialog - text style">
-</div><div align="center"><img src="udav/udav_mask.png" alt="Style dialog - manual mask">
-</div>
-<p>Dialog for changing style can be called independently, but usually is called from <em>New command</em> dialog or by double click on primitive. It contain 3 tabs: one for pen style, one for color scheme, one for text style. You should select appropriate one. Resulting string of style and sample picture are shown at bottom of dialog. Usually it can be called from New command dialog.
-</p>
-<div align="center"><img src="udav/udav_var.png" alt="Variable dialog">
-</div>
-<p>Dialog for entering variable allow to select variable or expression which can be used as argument of a command. Here you can select the variable name; range of indexes in each directions; operation which will be applied (like, summation, finding minimal/maximal values and so on). Usually it can be called from New command dialog.
-</p>
-<div align="center"><img src="udav/udav_opt.png" alt="Dialog for options of a command">
-</div>
-<p>Dialog for command options allow to change <a href="#Command-options">Command options</a>. Usually it can be called from New command dialog.
-</p>
-
-
-<div align="center"><img src="udav/udav_inplot.png" alt="New inplot dialog">
-</div>
-<p>Another interesting dialog, which help to select and properly setup a <a href="#subplot">subplot</a>, <a href="#inplot">inplot</a>, <a href="#columnplot">columnplot</a>, <a href="#stickplot">stickplot</a> and similar commands.
-</p>
-
-<div align="center"><img src="udav/udav_gen_set.png" alt="Dialog for general properties">
-</div><div align="center"><img src="udav/udav_light.png" alt="Dialog for light properties">
-</div>
-<p>There is dialog for setting general plot properties, including tab for setting lighting properties. It can be called by called by hotkey <tt class="key">???</tt> and put setup commands at the beginning of MGL script.
-</p>
-<div align="center"><img src="udav/udav_arg.png" alt="Dialog for script parameters">
-</div>
-<p>Also you can set or change script parameters (‘<samp>$0</samp>’ ... ‘<samp>$9</samp>’, see <a href="#MGL-definition">MGL definition</a>).
-</p>
-<div align="center"><img src="udav/udav_prop.png" alt="Dialog for UDAV settings">
-</div>
-<p>Finally, there is dialog for UDAV settings. It allow to change most of things in UDAV appearance and working, including colors of keywords and numbers, default font and image size, and so on (see figure above).
-</p>
-<p>There are also a set of dialogs for data handling, but they are too simple and clear. So, I will not put them here.
-</p>
-
-<hr>
-<a name="UDAV-hints"></a>
-<div class="header">
-<p>
-Previous: <a href="#UDAV-dialogs" accesskey="p" rel="prev">UDAV dialogs</a>, Up: <a href="#UDAV" accesskey="u" rel="up">UDAV</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="UDAV-hints-1"></a>
-<h3 class="section">8.3 UDAV hints</h3>
-
-
-<ul>
-<li> You can shift axis range by pressing middle button and moving mouse. Also, you can zoom in/out axis range by using mouse wheel.
-</li><li> You can rotate/shift/zoom whole plot by mouse. Just press ’Rotate’ toolbutton, click image and hold a mouse button: left button for rotation, right button for zoom/perspective, middle button for shift.
-</li><li> You may quickly draw the data from file. Just use: udav ’filename.dat’ in command line.
-</li><li> You can copy the current image to clipboard by pressing <tt class="key">Ctrl-Shift-C</tt>. Later you can paste it directly into yours document or presentation.
-</li><li> You can export image into a set of format (EPS, SVG, PNG, JPEG) by pressing right mouse button inside image and selecting ’Export as ...’.
-</li><li> You can setup colors for script highlighting in Property dialog. Just select menu item ’Settings/Properties’.
-</li><li> You can save the parameter of animation inside MGL script by using comment started from ’##a ’ or ’##c ’ for loops.
-</li><li> New drawing never clears things drawn already. For example, you can make a surface with contour lines by calling commands ’surf’ and ’cont’ one after another (in any order).
-</li><li> You can put several plots in the same image by help of commands ’subplot’ or ’inplot’.
-</li><li> All indexes (of data arrays, subplots and so on) are always start from 0.
-</li><li> You can edit MGL file in any text editor. Also you can run it in console by help of commands: <code>mglconv</code>, <code>mglview</code>.
-</li><li> You can use command ’once on|off’ for marking the block which should be executed only once. For example, this can be the block of large data reading/creating/handling. Press <tt class="key">F9</tt> (or menu item ’Graphics/Reload’) to re-execute this block.
-</li><li> You can use command ’stop’ for terminating script parsing. It is useful if you don’t want to execute a part of script.
-</li><li> You can type arbitrary expression as input argument for data or number. In last case (for numbers), the first value of data array is used.
-</li><li> There is powerful calculator with a lot of special functions. You can use buttons or keyboard to type the expression. Also you can use existed variables in the expression.
-</li><li> The calculator can help you to put complex expression in the script. Just type the expression (which may depend on coordinates x,y,z and so on) and put it into the script.
-</li><li> You can easily insert file or folder names, last fitted formula or numerical value of selection by using menu Edit|Insert.
-</li><li> The special dialog (Edit|Insert|New Command) help you select the command, fill its arguments and put it into the script.
-</li><li> You can put several plotting commands in the same line or in separate function, for highlighting all of them simultaneously.
-</li></ul>
-
-
-
-<hr>
-<a name="Other-classes"></a>
-<div class="header">
-<p>
-Next: <a href="#All-samples" accesskey="n" rel="next">All samples</a>, Previous: <a href="#UDAV" accesskey="p" rel="prev">UDAV</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Other-classes-1"></a>
-<h2 class="chapter">9 Other classes</h2>
-
-
-<p>There are few end-user classes: <code>mglGraph</code> (see <a href="#MathGL-core">MathGL core</a>), <code>mglWindow</code> and <code>mglGLUT</code> (see <a href="#Widget-classes">Widget classes</a>), <code>mglData</code> (see <a href="#Data-processing">Data processing</a>), <code>mglParse</code> (see <a href="#MGL-scripts">MGL scripts</a>). Exactly these classes I recommend to use in most of user programs. All methods in all of these classes are inline and have exact C/Fortran analogue functions. This give compiler independent binary libraries for MathGL.
-</p>
-<p>However, sometimes you may need to extend MathGL by writing yours own plotting functions or handling yours own data structures. In these cases you may need to use low-level API. This chapter describes it.
-</p>
-<div align="center"><img src="classes.png" alt="Class diagram for MathGL">
-</div>
-<p>The internal structure of MathGL is rather complicated. There are C++ classes <code>mglBase</code>, <code>mglCanvas</code>, ... for drawing primitives and positioning the plot (blue ones in the figure). There is a layer of C functions, which include interface for most important methods of these classes. Also most of plotting functions are implemented as C functions. After it, there are “inline” front-end classes which are created for user convenience (yellow ones in the figure). Also there are widgets for FLTK and Qt libraries (green ones in the figure).
-</p>
-<p>Below I show how this internal classes can be used.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#mglBase-class" accesskey="1">mglBase class</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mglDataA-class" accesskey="2">mglDataA class</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mglColor-class" accesskey="3">mglColor class</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mglPoint-class" accesskey="4">mglPoint class</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-
-<hr>
-<a name="mglBase-class"></a>
-<div class="header">
-<p>
-Next: <a href="#mglDataA-class" accesskey="n" rel="next">mglDataA class</a>, Up: <a href="#Other-classes" accesskey="u" rel="up">Other classes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Define-new-kind-of-plot-_0028mglBase-class_0029"></a>
-<h3 class="section">9.1 Define new kind of plot (mglBase class)</h3>
-
-
-<p>Basically most of new kinds of plot can be created using just MathGL primitives (see <a href="#Primitives">Primitives</a>). However the usage of <code>mglBase</code> methods can give you higher speed of drawing and better control of plot settings.
-</p>
-<p>All plotting functions should use a pointer to <code>mglBase</code> class (or <code>HMGL</code> type in C functions) due to compatibility issues. Exactly such type of pointers are used in front-end classes (<code>mglGraph, mglWindow</code>) and in widgets (<code>QMathGL, Fl_MathGL</code>).
-</p>
-<p>MathGL tries to remember all vertexes and all primitives and plot creation stage, and to use them for making final picture by demand. Basically for making plot, you need to add vertexes by <code>AddPnt()</code> function, which return index for new vertex, and call one of primitive drawing function (like <code>mark_plot(), arrow_plot(), line_plot(), trig_plot(), quad_plot(), text_plot()</code>), using vertex indexes as argument(s). <code>AddPnt()</code> function use 2 mreal numbers for color specification. First one is positioning in textures – integer part is texture index, fractional part is relative coordinate in the texture. Second number is like a transparency of plot (or second coordinate in the 2D texture).
-</p>
-<p>I don’t want to put here detailed description of <code>mglBase</code> class. It was rather well documented in <code>mgl2/base.h</code> file. I just show and example of its usage on the base of circle drawing.
-</p>
-<p>First, we should prototype new function <code>circle()</code> as C function.
-</p><pre class="verbatim">#ifdef __cplusplus
-extern "C" {
-#endif
-void circle(HMGL gr, mreal x, mreal y, mreal z, mreal r, const char *stl, const char *opt);
-#ifdef __cplusplus
-}
-#endif
-</pre><p>This is done for generating compiler independent binary. Because only C-functions have standard naming mechanism, the same for any compilers.
-</p>
-<p>Now, we create a C++ file and put the code of function. I’ll write it line by line and try to comment all important points.
-</p><pre class="verbatim">void circle(HMGL gr, mreal x, mreal y, mreal z, mreal r, const char *stl, const char *opt)
-{
-</pre><p>First, we need to check all input arguments and send warnings if something is wrong. In our case it is negative value of <var>r</var> argument. We just send warning, since it is not critical situation – other plot still can be drawn.
-</p><pre class="verbatim"> if(r<=0) { gr->SetWarn(mglWarnNeg,"Circle"); return; }
-</pre><p>Next step is creating a group. Group keep some general setting for plot (like options) and useful for export in 3d files.
-</p><pre class="verbatim"> static int cgid=1; gr->StartGroup("Circle",cgid++);
-</pre><p>Now let apply options. Options are rather useful things, generally, which allow one easily redefine axis range(s), transparency and other settings (see <a href="#Command-options">Command options</a>).
-</p><pre class="verbatim"> gr->SaveState(opt);
-</pre><p>I use global setting for determining the number of points in circle approximation. Note, that user can change <code>MeshNum</code> by options easily.
-</p><pre class="verbatim"> const int n = gr->MeshNum>1?gr->MeshNum : 41;
-</pre><p>Let try to determine plot specific flags. MathGL functions expect that most of flags will be sent in string. In our case it is symbol ‘<samp>@</samp>’ which set to draw filled circle instead of border only (last will be default). Note, you have to handle <code>NULL</code> as string pointer.
-</p><pre class="verbatim"> bool fill = mglchr(stl,'@');
-</pre><p>Now, time for coloring. I use palette mechanism because circle have few colors: one for filling and another for border. <code>SetPenPal()</code> function parse input string and write resulting texture index in <var>pal</var>. Function return the character for marker, which can be specified in string <var>str</var>. Marker will be plotted at the center of circle. I’ll show on next sample how you can use color schemes (smooth colors) too.
-</p><pre class="verbatim"> long pal=0;
- char mk=gr->SetPenPal(stl,&pal);
-</pre><p>Next step, is determining colors for filling and for border. First one for filling.
-</p><pre class="verbatim"> mreal c=gr->NextColor(pal), d;
-</pre><p>Second one for border. I use black color (call <code>gr->AddTexture('k')</code>) if second color is not specified.
-</p><pre class="verbatim"> mreal k=(gr->GetNumPal(pal)>1)?gr->NextColor(pal):gr->AddTexture('k');
-</pre><p>If user want draw only border (<code>fill=false</code>) then I use first color for border.
-</p><pre class="verbatim"> if(!fill) k=c;
-</pre><p>Now we should reserve space for vertexes. This functions need <code>n</code> for border, <code>n+1</code> for filling and <code>1</code> for marker. So, maximal number of vertexes is <code>2*n+2</code>. Note, that such reservation is not required for normal work but can sufficiently speed up the plotting.
-</p><pre class="verbatim"> gr->Reserve(2*n+2);
-</pre><p>We’ve done with setup and ready to start drawing. First, we need to add vertex(es). Let define NAN as normals, since I don’t want handle lighting for this plot,
-</p><pre class="verbatim"> mglPoint q(NAN,NAN);
-</pre><p>and start adding vertexes. First one for central point of filling. I use <code>-1</code> if I don’t need this point. The arguments of <code>AddPnt()</code> function is: <code>mglPoint(x,y,z)</code> – coordinate of vertex, <code>c</code> – vertex color, <code>q</code> – normal at vertex, <code>-1</code> – vertex transparency (<code>-1</code> for default), <code>3</code> bitwise flag which show that coordinates will be scaled (<code>0x1</code>) and will not be cutted (<code>0x2</code>).
-</p><pre class="verbatim"> long n0,n1,n2,m1,m2,i;
- n0 = fill ? gr->AddPnt(mglPoint(x,y,z),c,q,-1,3):-1;
-</pre><p>Similar for marker, but we use different color <var>k</var>.
-</p><pre class="verbatim"> n2 = mk ? gr->AddPnt(mglPoint(x,y,z),k,q,-1,3):-1;
-</pre><p>Draw marker.
-</p><pre class="verbatim"> if(mk) gr->mark_plot(n2,mk);
-</pre><p>Time for drawing circle itself. I use <code>-1</code> for <var>m1</var>, <var>n1</var> as sign that primitives shouldn’t be drawn for first point <code>i=0</code>.
-</p><pre class="verbatim"> for(i=0,m1=n1=-1;i<n;i++)
- {
-</pre><p>Each function should check <code>Stop</code> variable and return if it is non-zero. It is done for interrupting drawing for system which don’t support multi-threading.
-</p><pre class="verbatim"> if(gr->Stop) return;
-</pre><p>Let find coordinates of vertex.
-</p><pre class="verbatim"> mreal t = i*2*M_PI/(n-1.);
- mglPoint p(x+r*cos(t), y+r*sin(t), z);
-</pre><p>Save previous vertex and add next one
-</p><pre class="verbatim"> n2 = n1; n1 = gr->AddPnt(p,c,q,-1,3);
-</pre><p>and copy it for border but with different color. Such copying is much faster than adding new vertex using <code>AddPnt()</code>.
-</p><pre class="verbatim"> m2 = m1; m1 = gr->CopyNtoC(n1,k);
-</pre><p>Now draw triangle for filling internal part
-</p><pre class="verbatim"> if(fill) gr->trig_plot(n0,n1,n2);
-</pre><p>and draw line for border.
-</p><pre class="verbatim"> gr->line_plot(m1,m2);
- }
-</pre><p>Drawing is done. Let close group and return.
-</p><pre class="verbatim"> gr->EndGroup();
-}
-</pre>
-<p>Another sample I want to show is exactly the same function but with smooth coloring using color scheme. So, I’ll add comments only in the place of difference.
-</p>
-<pre class="verbatim">void circle_cs(HMGL gr, mreal x, mreal y, mreal z, mreal r, const char *stl, const char *opt)
-{
-</pre><p>In this case let allow negative radius too. Formally it is not the problem for plotting (formulas the same) and this allow us to handle all color range.
-</p><pre class="verbatim">//if(r<=0) { gr->SetWarn(mglWarnNeg,"Circle"); return; }
-
- static int cgid=1; gr->StartGroup("CircleCS",cgid++);
- gr->SaveState(opt);
- const int n = gr->MeshNum>1?gr->MeshNum : 41;
- bool fill = mglchr(stl,'@');
-</pre><p>Here is main difference. We need to create texture for color scheme specified by user
-</p><pre class="verbatim"> long ss = gr->AddTexture(stl);
-</pre><p>But we need also get marker and color for it (if filling is enabled). Let suppose that marker and color is specified after ‘<samp>:</samp>’. This is standard delimiter which stop color scheme entering. So, just lets find it and use for setting pen.
-</p><pre class="verbatim"> const char *pen=0;
- if(stl) pen = strchr(stl,':');
- if(pen) pen++;
-</pre><p>The substring is placed in <var>pen</var> and it will be used as line style.
-</p><pre class="verbatim"> long pal=0;
- char mk=gr->SetPenPal(pen,&pal);
-</pre><p>Next step, is determining colors for filling and for border. First one for filling.
-</p><pre class="verbatim"> mreal c=gr->GetC(ss,r);
-</pre><p>Second one for border.
-</p><pre class="verbatim"> mreal k=gr->NextColor(pal);
-</pre><p>The rest part is the same as in previous function.
-</p><pre class="verbatim"> if(!fill) k=c;
-
- gr->Reserve(2*n+2);
- mglPoint q(NAN,NAN);
- long n0,n1,n2,m1,m2,i;
- n0 = fill ? gr->AddPnt(mglPoint(x,y,z),c,q,-1,3):-1;
- n2 = mk ? gr->AddPnt(mglPoint(x,y,z),k,q,-1,3):-1;
- if(mk) gr->mark_plot(n2,mk);
- for(i=0,m1=n1=-1;i<n;i++)
- {
- if(gr->Stop) return;
- mreal t = i*2*M_PI/(n-1.);
- mglPoint p(x+r*cos(t), y+r*sin(t), z);
- n2 = n1; n1 = gr->AddPnt(p,c,q,-1,3);
- m2 = m1; m1 = gr->CopyNtoC(n1,k);
- if(fill) gr->trig_plot(n0,n1,n2);
- gr->line_plot(m1,m2);
- }
- gr->EndGroup();
-}
-</pre>
-<p>The last thing which we can do is derive our own class with new plotting functions. Good idea is to derive it from <code>mglGraph</code> (if you don’t need extended window), or from <code>mglWindow</code> (if you need to extend window). So, in our case it will be
-</p><pre class="verbatim">class MyGraph : public mglGraph
-{
-public:
- inline void Circle(mglPoint p, mreal r, const char *stl="", const char *opt="")
- { circle(p.x,p.y,p.z, r, stl, opt); }
- inline void CircleCS(mglPoint p, mreal r, const char *stl="", const char *opt="")
- { circle_cs(p.x,p.y,p.z, r, stl, opt); }
-};
-</pre><p>Note, that I use <code>inline</code> modifier for using the same binary code with different compilers.
-</p>
-<p>So, the complete sample will be
-</p><pre class="verbatim">#include <mgl2/mgl.h>
-//---------------------------------------------------------
-#ifdef __cplusplus
-extern "C" {
-#endif
-void circle(HMGL gr, mreal x, mreal y, mreal z, mreal r, const char *stl, const char *opt);
-void circle_cs(HMGL gr, mreal x, mreal y, mreal z, mreal r, const char *stl, const char *opt);
-#ifdef __cplusplus
-}
-#endif
-//---------------------------------------------------------
-class MyGraph : public mglGraph
-{
-public:
- inline void CircleCF(mglPoint p, mreal r, const char *stl="", const char *opt="")
- { circle(p.x,p.y,p.z, r, stl, opt); }
- inline void CircleCS(mglPoint p, mreal r, const char *stl="", const char *opt="")
- { circle_cs(p.x,p.y,p.z, r, stl, opt); }
-};
-//---------------------------------------------------------
-void circle(HMGL gr, mreal x, mreal y, mreal z, mreal r, const char *stl, const char *opt)
-{
- if(r<=0) { gr->SetWarn(mglWarnNeg,"Circle"); return; }
- static int cgid=1; gr->StartGroup("Circle",cgid++);
- gr->SaveState(opt);
- const int n = gr->MeshNum>1?gr->MeshNum : 41;
- bool fill = mglchr(stl,'@');
- long pal=0;
- char mk=gr->SetPenPal(stl,&pal);
- mreal c=gr->NextColor(pal), d;
- mreal k=(gr->GetNumPal(pal)>1)?gr->NextColor(pal):gr->AddTexture('k');
- if(!fill) k=c;
- gr->Reserve(2*n+2);
- mglPoint q(NAN,NAN);
- long n0,n1,n2,m1,m2,i;
- n0 = fill ? gr->AddPnt(mglPoint(x,y,z),c,q,-1,3):-1;
- n2 = mk ? gr->AddPnt(mglPoint(x,y,z),k,q,-1,3):-1;
- if(mk) gr->mark_plot(n2,mk);
- for(i=0,m1=n1=-1;i<n;i++)
- {
- if(gr->Stop) return;
- mreal t = i*2*M_PI/(n-1.);
- mglPoint p(x+r*cos(t), y+r*sin(t), z);
- n2 = n1; n1 = gr->AddPnt(p,c,q,-1,3);
- m2 = m1; m1 = gr->CopyNtoC(n1,k);
- if(fill) gr->trig_plot(n0,n1,n2);
- gr->line_plot(m1,m2);
- }
- gr->EndGroup();
-}
-//---------------------------------------------------------
-void circle_cs(HMGL gr, mreal x, mreal y, mreal z, mreal r, const char *stl, const char *opt)
-{
- static int cgid=1; gr->StartGroup("CircleCS",cgid++);
- gr->SaveState(opt);
- const int n = gr->MeshNum>1?gr->MeshNum : 41;
- bool fill = mglchr(stl,'@');
- long ss = gr->AddTexture(stl);
- const char *pen=0;
- if(stl) pen = strchr(stl,':');
- if(pen) pen++;
- long pal=0;
- char mk=gr->SetPenPal(pen,&pal);
- mreal c=gr->GetC(ss,r);
- mreal k=gr->NextColor(pal);
- if(!fill) k=c;
-
- gr->Reserve(2*n+2);
- mglPoint q(NAN,NAN);
- long n0,n1,n2,m1,m2,i;
- n0 = fill ? gr->AddPnt(mglPoint(x,y,z),c,q,-1,3):-1;
- n2 = mk ? gr->AddPnt(mglPoint(x,y,z),k,q,-1,3):-1;
- if(mk) gr->mark_plot(n2,mk);
- for(i=0,m1=n1=-1;i<n;i++)
- {
- if(gr->Stop) return;
- mreal t = i*2*M_PI/(n-1.);
- mglPoint p(x+r*cos(t), y+r*sin(t), z);
- n2 = n1; n1 = gr->AddPnt(p,c,q,-1,3);
- m2 = m1; m1 = gr->CopyNtoC(n1,k);
- if(fill) gr->trig_plot(n0,n1,n2);
- gr->line_plot(m1,m2);
- }
- gr->EndGroup();
-}
-//---------------------------------------------------------
-int main()
-{
- MyGraph gr;
- gr.Box();
- // first let draw circles with fixed colors
- for(int i=0;i<10;i++)
- gr.CircleCF(mglPoint(2*mgl_rnd()-1, 2*mgl_rnd()-1), mgl_rnd());
- // now let draw circles with color scheme
- for(int i=0;i<10;i++)
- gr.CircleCS(mglPoint(2*mgl_rnd()-1, 2*mgl_rnd()-1), 2*mgl_rnd()-1);
-}
-</pre>
-
-
-
-
-<hr>
-<a name="mglDataA-class"></a>
-<div class="header">
-<p>
-Next: <a href="#mglColor-class" accesskey="n" rel="next">mglColor class</a>, Previous: <a href="#mglBase-class" accesskey="p" rel="prev">mglBase class</a>, Up: <a href="#Other-classes" accesskey="u" rel="up">Other classes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="User-defined-types-_0028mglDataA-class_0029"></a>
-<h3 class="section">9.2 User defined types (mglDataA class)</h3>
-
-
-<p><code>mglData</code> class have abstract predecessor class <code>mglDataA</code>. Exactly the pointers to <code>mglDataA</code> instances are used in all plotting functions and some of data processing functions. This was done for taking possibility to define yours own class, which will handle yours own data (for example, complex numbers, or differently organized data). And this new class will be almost the same as <code>mglData</code> for plotting purposes.
-</p>
-<p>However, the most of data processing functions will be slower as if you used <code>mglData</code> instance. This is more or less understandable – I don’t know how data in yours particular class will be organized, and couldn’t optimize the these functions generally.
-</p>
-<p>There are few virtual functions which must be provided in derived classes. This functions give:
-</p><ul>
-<li> the sizes of the data (<code>GetNx</code>, <code>GetNy</code>, <code>GetNz</code>),
-</li><li> give data value and numerical derivatives for selected cell (<code>v</code>, <code>dvx</code>, <code>dvy</code>, <code>dvz</code>),
-</li><li> give maximal and minimal values (<code>Maximal</code>, <code>Minimal</code>) – you can use provided functions (like <code>mgl_data_max</code> and <code>mgl_data_min</code>), but yours own realization can be more efficient,
-</li><li> give access to all element as in single array (<code>vthr</code>) – you need this only if you want using MathGL’s data processing functions.
-</li></ul>
-
-<p>Let me, for example define class <code>mglComplex</code> which will handle complex number and draw its amplitude or phase, depending on flag <var>use_abs</var>:
-</p><pre class="verbatim">#include <complex>
-#include <mgl2/mgl.h>
-#define dual std::complex<double>
-class mglComplex : public mglDataA
-{
-public:
- long nx; ///< number of points in 1st dimensions ('x' dimension)
- long ny; ///< number of points in 2nd dimensions ('y' dimension)
- long nz; ///< number of points in 3d dimensions ('z' dimension)
- dual *a; ///< data array
- bool use_abs; ///< flag to use abs() or arg()
-
- inline mglComplex(long xx=1,long yy=1,long zz=1)
- { a=0; use_abs=true; Create(xx,yy,zz); }
- virtual ~mglComplex() { if(a) delete []a; }
-
- /// Get sizes
- inline long GetNx() const { return nx; }
- inline long GetNy() const { return ny; }
- inline long GetNz() const { return nz; }
- /// Create or recreate the array with specified size and fill it by zero
- inline void Create(long mx,long my=1,long mz=1)
- { nx=mx; ny=my; nz=mz; if(a) delete []a;
- a = new dual[nx*ny*nz]; }
- /// Get maximal value of the data
- inline mreal Maximal() const { return mgl_data_max(this); }
- /// Get minimal value of the data
- inline mreal Minimal() const { return mgl_data_min(this); }
-
-protected:
- inline mreal v(long i,long j=0,long k=0) const
- { return use_abs ? abs(a[i+nx*(j+ny*k)]) : arg(a[i+nx*(j+ny*k)]); }
- inline mreal vthr(long i) const
- { return use_abs ? abs(a[i]) : arg(a[i]); }
- inline mreal dvx(long i,long j=0,long k=0) const
- { long i0=i+nx*(j+ny*k);
- std::complex<double> res=i>0? (i<nx-1? (a[i0+1]-a[i0-1])/2.:a[i0]-a[i0-1]) : a[i0+1]-a[i0];
- return use_abs? abs(res) : arg(res); }
- inline mreal dvy(long i,long j=0,long k=0) const
- { long i0=i+nx*(j+ny*k);
- std::complex<double> res=j>0? (j<ny-1? (a[i0+nx]-a[i0-nx])/2.:a[i0]-a[i0-nx]) : a[i0+nx]-a[i0];
- return use_abs? abs(res) : arg(res); }
- inline mreal dvz(long i,long j=0,long k=0) const
- { long i0=i+nx*(j+ny*k), n=nx*ny;
- std::complex<double> res=k>0? (k<nz-1? (a[i0+n]-a[i0-n])/2.:a[i0]-a[i0-n]) : a[i0+n]-a[i0];
- return use_abs? abs(res) : arg(res); }
-};
-int main()
-{
- mglComplex dat(20);
- for(long i=0;i<20;i++)
- dat.a[i] = 3*exp(-0.05*(i-10)*(i-10))*dual(cos(M_PI*i*0.3), sin(M_PI*i*0.3));
- mglGraph gr;
- gr.SetRange('y', -M_PI, M_PI); gr.Box();
-
- gr.Plot(dat,"r","legend 'abs'");
- dat.use_abs=false;
- gr.Plot(dat,"b","legend 'arg'");
- gr.Legend();
- gr.WritePNG("complex.png");
- return 0;
-}
-</pre>
-
-
-<hr>
-<a name="mglColor-class"></a>
-<div class="header">
-<p>
-Next: <a href="#mglPoint-class" accesskey="n" rel="next">mglPoint class</a>, Previous: <a href="#mglDataA-class" accesskey="p" rel="prev">mglDataA class</a>, Up: <a href="#Other-classes" accesskey="u" rel="up">Other classes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="mglColor-class-1"></a>
-<h3 class="section">9.3 mglColor class</h3>
-
-<a name="index-mglColor"></a>
-
-<p>Structure for working with colors. This structure is defined in <code>#include <mgl2/type.h></code>.
-</p>
-<p>There are two ways to set the color in MathGL. First one is using of mreal values of red, green and blue channels for precise color definition. The second way is the using of character id. There are a set of characters specifying frequently used colors. Normally capital letter gives more dark color than lowercase one. See <a href="#Line-styles">Line styles</a>.
-</p>
-<dl>
-<dt><a name="index-r_002c-g_002c-b_002c-a-of-mglColor"></a>Parameter of mglColor: <em><code>mreal</code></em> <strong>r, g, b, a</strong></dt>
-<dd><p>Reg, green and blue component of color.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mglColor-on-mglColor"></a>Method on mglColor: <em><code></code></em> <strong>mglColor</strong> <em>(<code>mreal</code> R, <code>mreal</code> G, <code>mreal</code> B, <code>mreal</code> A=<code>1</code>)</em></dt>
-<dd><p>Constructor sets the color by mreal values of Red, Green, Blue and Alpha channels. These values should be in interval [0,1].
-</p></dd></dl>
-<dl>
-<dt><a name="index-mglColor-on-mglColor-1"></a>Method on mglColor: <em><code></code></em> <strong>mglColor</strong> <em>(<code>char</code> c=<code>'k'</code>, <code>mreal</code> bright=<code>1</code>)</em></dt>
-<dd><p>Constructor sets the color from character id. The black color is used by default. Parameter <var>br</var> set additional “lightness” of color.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Set-on-mglColor"></a>Method on mglColor: <em><code>void</code></em> <strong>Set</strong> <em>(<code>mreal</code> R, <code>mreal</code> G, <code>mreal</code> B, <code>mreal</code> A=<code>1</code>)</em></dt>
-<dd><p>Sets color from values of Red, Green, Blue and Alpha channels. These values should be in interval [0,1].
-</p></dd></dl>
-<dl>
-<dt><a name="index-Set-on-mglColor-1"></a>Method on mglColor: <em><code>void</code></em> <strong>Set</strong> <em>(<code>mglColor</code> c, <code>mreal</code> bright=<code>1</code>)</em></dt>
-<dd><p>Sets color as “lighted” version of color <var>c</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Set-on-mglColor-2"></a>Method on mglColor: <em><code>void</code></em> <strong>Set</strong> <em>(<code>char</code> p, <code>mreal</code> bright=<code>1</code>)</em></dt>
-<dd><p>Sets color from symbolic id.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Valid-on-mglColor"></a>Method on mglColor: <em><code>bool</code></em> <strong>Valid</strong> <em>()</em></dt>
-<dd><p>Checks correctness of the color.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Norm-on-mglColor"></a>Method on mglColor: <em><code>mreal</code></em> <strong>Norm</strong> <em>()</em></dt>
-<dd><p>Gets maximal of spectral component.
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_003d_003d-on-mglColor"></a>Method on mglColor: <em><code>bool</code></em> <strong>operator==</strong> <em>(<code>const mglColor &</code>c)</em></dt>
-<dt><a name="index-operator_0021_003d-on-mglColor"></a>Method on mglColor: <em><code>bool</code></em> <strong>operator!=</strong> <em>(<code>const mglColor &</code>c)</em></dt>
-<dd><p>Compare with another color
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_002a_003d-on-mglColor"></a>Method on mglColor: <em><code>bool</code></em> <strong>operator*=</strong> <em>(<code>mreal</code> v)</em></dt>
-<dd><p>Multiplies color components by number <var>v</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_002b_003d-on-mglColor"></a>Method on mglColor: <em><code>bool</code></em> <strong>operator+=</strong> <em>(<code>const mglColor &</code>c)</em></dt>
-<dd><p>Adds color <var>c</var> component by component.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_002d_003d-on-mglColor"></a>Method on mglColor: <em><code>bool</code></em> <strong>operator-=</strong> <em>(<code>const mglColor &</code>c)</em></dt>
-<dd><p>Subtracts color <var>c</var> component by component.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-operator_002b-3"></a>Library Function: <em>mglColor</em> <strong>operator+</strong> <em>(<code>const mglColor &</code>a, <code>const mglColor &</code>b)</em></dt>
-<dd><p>Adds colors by its RGB values.
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_002d-3"></a>Library Function: <em><code>mglColor</code></em> <strong>operator-</strong> <em>(<code>const mglColor &</code>a, <code>const mglColor &</code>b)</em></dt>
-<dd><p>Subtracts colors by its RGB values.
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_002a-3"></a>Library Function: <em><code>mglColor</code></em> <strong>operator*</strong> <em>(<code>const mglColor &</code>a, <code>mreal</code> b)</em></dt>
-<dt><a name="index-operator_002a-4"></a>Library Function: <em><code>mglColor</code></em> <strong>operator*</strong> <em>(<code>mreal</code> a, <code>const mglColor &</code>b)</em></dt>
-<dd><p>Multiplies color by number.
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_002f-2"></a>Library Function: <em><code>mglColor</code></em> <strong>operator/</strong> <em>(<code>const mglColor &</code>a, <code>mreal</code> b)</em></dt>
-<dd><p>Divide color by number.
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_0021"></a>Library Function: <em><code>mglColor</code></em> <strong>operator!</strong> <em>(<code>const mglColor &</code>a)</em></dt>
-<dd><p>Return inverted color.
-</p></dd></dl>
-
-
-<hr>
-<a name="mglPoint-class"></a>
-<div class="header">
-<p>
-Previous: <a href="#mglColor-class" accesskey="p" rel="prev">mglColor class</a>, Up: <a href="#Other-classes" accesskey="u" rel="up">Other classes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="mglPoint-class-1"></a>
-<h3 class="section">9.4 mglPoint class</h3>
-
-<a name="index-mglPoint"></a>
-
-<p>Structure describes point in space. This structure is defined in <code>#include <mgl2/type.h></code>
-</p>
-<dl>
-<dt><a name="index-x_002c-y_002c-z_002c-c-of-mglPoint"></a>Parameter of mglPoint: <em><code>mreal</code></em> <strong>x, y, z, c</strong></dt>
-<dd><p>Point coordinates {x,y,z} and one extra value <var>c</var> used for amplitude, transparency and so on. By default all values are zero.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mglPoint-on-mglPoint"></a>Method on mglPoint: <em><code></code></em> <strong>mglPoint</strong> <em>(<code>mreal</code> X=<code>0</code>, <code>mreal</code> Y=<code>0</code>, <code>mreal</code> Z=<code>0</code>, <code>mreal</code> C=<code>0</code>)</em></dt>
-<dd><p>Constructor sets the color by mreal values of Red, Green, Blue and Alpha channels. These values should be in interval [0,1].
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-IsNAN-on-mglPoint"></a>Method on mglPoint: <em><code>bool</code></em> <strong>IsNAN</strong> <em>()</em></dt>
-<dd><p>Returns <code>true</code> if point contain NAN values.
-</p></dd></dl>
-<dl>
-<dt><a name="index-norm-on-mglPoint"></a>Method on mglPoint: <em><code>mreal</code></em> <strong>norm</strong> <em>()</em></dt>
-<dd><p>Returns the norm <em>\sqrt{x^2+y^2+z^2}</em> of vector.
-</p></dd></dl>
-<dl>
-<dt><a name="index-Normalize-on-mglPoint"></a>Method on mglPoint: <em><code>void</code></em> <strong>Normalize</strong> <em>()</em></dt>
-<dd><p>Normalizes vector to be unit vector.
-</p></dd></dl>
-<dl>
-<dt><a name="index-val-on-mglPoint"></a>Method on mglPoint: <em><code>mreal</code></em> <strong>val</strong> <em>(<code>int</code> i)</em></dt>
-<dd><p>Returns point component: <var>x</var> for <var>i</var>=0, <var>y</var> for <var>i</var>=1, <var>z</var> for <var>i</var>=2, <var>c</var> for <var>i</var>=3.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-operator_002b-4"></a>Library Function: <em><code>mglPoint</code></em> <strong>operator+</strong> <em>(<code>const mglPoint &</code>a, <code>const mglPoint &</code>b)</em></dt>
-<dd><p>Point of summation (summation of vectors).
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_002d-4"></a>Library Function: <em><code>mglPoint</code></em> <strong>operator-</strong> <em>(<code>const mglPoint &</code>a, <code>const mglPoint &</code>b)</em></dt>
-<dd><p>Point of difference (difference of vectors).
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_002a-5"></a>Library Function: <em><code>mglPoint</code></em> <strong>operator*</strong> <em>(<code>mreal</code> a, <code>const mglPoint &</code>b)</em></dt>
-<dt><a name="index-operator_002a-6"></a>Library Function: <em><code>mglPoint</code></em> <strong>operator*</strong> <em>(<code>const mglPoint &</code>a, <code>mreal</code> b)</em></dt>
-<dd><p>Multiplies (scale) points by number.
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_002f-3"></a>Library Function: <em><code>mglPoint</code></em> <strong>operator/</strong> <em>(<code>const mglPoint &</code>a, <code>mreal</code> b)</em></dt>
-<dd><p>Multiplies (scale) points by number 1/b.
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_002a-7"></a>Library Function: <em><code>mreal</code></em> <strong>operator*</strong> <em>(<code>const mglPoint &</code>a, <code>const mglPoint &</code>b)</em></dt>
-<dd><p>Scalar product of vectors.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_002f-4"></a>Library Function: <em><code>mglPoint</code></em> <strong>operator/</strong> <em>(<code>const mglPoint &</code>a, <code>const mglPoint &</code>b)</em></dt>
-<dd><p>Return vector of element-by-element product.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_005e"></a>Library Function: <em><code>mglPoint</code></em> <strong>operator^</strong> <em>(<code>const mglPoint &</code>a, <code>const mglPoint &</code>b)</em></dt>
-<dd><p>Cross-product of vectors.
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_0026"></a>Library Function: <em><code>mglPoint</code></em> <strong>operator&</strong> <em>(<code>const mglPoint &</code>a, <code>const mglPoint &</code>b)</em></dt>
-<dd><p>The part of <var>a</var> which is perpendicular to vector <var>b</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_007c"></a>Library Function: <em><code>mglPoint</code></em> <strong>operator|</strong> <em>(<code>const mglPoint &</code>a, <code>const mglPoint &</code>b)</em></dt>
-<dd><p>The part of <var>a</var> which is parallel to vector <var>b</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_0021-1"></a>Library Function: <em><code>mglPoint</code></em> <strong>operator!</strong> <em>(<code>const mglPoint &</code>a)</em></dt>
-<dd><p>Return vector perpendicular to vector <var>a</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-mgl_005fnorm"></a>Library Function: <em><code>mreal</code></em> <strong>mgl_norm</strong> <em>(<code>const mglPoint &</code>a)</em></dt>
-<dd><p>Return the norm sqrt(|<var>a</var>|^2) of vector <var>a</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-operator_003d_003d"></a>Library Function: <em><code>bool</code></em> <strong>operator==</strong> <em>(<code>const mglPoint &</code>a, <code>const mglPoint &</code>b)</em></dt>
-<dd><p>Return true if points are the same.
-</p></dd></dl>
-<dl>
-<dt><a name="index-operator_0021_003d"></a>Library Function: <em><code>bool</code></em> <strong>operator!=</strong> <em>(<code>const mglPoint &</code>a, <code>const mglPoint &</code>b)</em></dt>
-<dd><p>Return true if points are different.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="All-samples"></a>
-<div class="header">
-<p>
-Next: <a href="#Symbols-and-hot_002dkeys" accesskey="n" rel="next">Symbols and hot-keys</a>, Previous: <a href="#Other-classes" accesskey="p" rel="prev">Other classes</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="All-samples-1"></a>
-<h2 class="chapter">10 All samples</h2>
-
-
-<p>This chapter contain alphabetical list of MGL and C++ samples for most of MathGL graphics and features.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#initialization-sample" accesskey="1">initialization sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#g_t3wave-sample" accesskey="2">3wave sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#alpha-sample" accesskey="3">alpha sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#apde-sample" accesskey="4">apde sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#area-sample" accesskey="5">area sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#aspect-sample" accesskey="6">aspect sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#axial-sample" accesskey="7">axial sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#axis-sample" accesskey="8">axis sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#barh-sample" accesskey="9">barh sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#bars-sample">bars sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#belt-sample">belt sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#bifurcation-sample">bifurcation sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#box-sample">box sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#boxplot-sample">boxplot sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#boxs-sample">boxs sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#candle-sample">candle sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#chart-sample">chart sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cloud-sample">cloud sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#colorbar-sample">colorbar sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#combined-sample">combined sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cones-sample">cones sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cont-sample">cont sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cont3-sample">cont3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cont_005fxyz-sample">cont_xyz sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#contd-sample">contd sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#contf-sample">contf sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#contf3-sample">contf3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#contf_005fxyz-sample">contf_xyz sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#contv-sample">contv sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#correl-sample">correl sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#curvcoor-sample">curvcoor sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cut-sample">cut sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dat_005fdiff-sample">dat_diff sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dat_005fextra-sample">dat_extra sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#data1-sample">data1 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#data2-sample">data2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dens-sample">dens sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dens3-sample">dens3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dens_005fxyz-sample">dens_xyz sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#detect-sample">detect sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dew-sample">dew sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#diffract-sample">diffract sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dilate-sample">dilate sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dots-sample">dots sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#earth-sample">earth sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#error-sample">error sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#error2-sample">error2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#export-sample">export sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#fall-sample">fall sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#fexport-sample">fexport sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#fit-sample">fit sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#flame2d-sample">flame2d sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#flow-sample">flow sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#flow3-sample">flow3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#fog-sample">fog sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#fonts-sample">fonts sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#grad-sample">grad sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#hist-sample">hist sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ifs2d-sample">ifs2d sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ifs3d-sample">ifs3d sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#indirect-sample">indirect sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#inplot-sample">inplot sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#iris-sample">iris sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#label-sample">label sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#lamerey-sample">lamerey sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#legend-sample">legend sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#light-sample">light sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#loglog-sample">loglog sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#map-sample">map sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mark-sample">mark sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mask-sample">mask sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mesh-sample">mesh sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mirror-sample">mirror sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#molecule-sample">molecule sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ode-sample">ode sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ohlc-sample">ohlc sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#param1-sample">param1 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#param2-sample">param2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#param3-sample">param3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#paramv-sample">paramv sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#parser-sample">parser sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#pde-sample">pde sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#pendelta-sample">pendelta sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#pipe-sample">pipe sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#plot-sample">plot sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#pmap-sample">pmap sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#primitives-sample">primitives sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#projection-sample">projection sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#projection5-sample">projection5 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#pulse-sample">pulse sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#qo2d-sample">qo2d sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality0-sample">quality0 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality1-sample">quality1 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality2-sample">quality2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality4-sample">quality4 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality5-sample">quality5 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality6-sample">quality6 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality8-sample">quality8 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#radar-sample">radar sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#refill-sample">refill sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#region-sample">region sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#scanfile-sample">scanfile sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#schemes-sample">schemes sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#section-sample">section sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#several_005flight-sample">several_light sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#solve-sample">solve sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#stem-sample">stem sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#step-sample">step sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#stereo-sample">stereo sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#stfa-sample">stfa sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#style-sample">style sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surf-sample">surf sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surf3-sample">surf3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surf3a-sample">surf3a sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surf3c-sample">surf3c sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surf3ca-sample">surf3ca sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surfa-sample">surfa sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surfc-sample">surfc sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surfca-sample">surfca sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#table-sample">table sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#tape-sample">tape sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#tens-sample">tens sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ternary-sample">ternary sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#text-sample">text sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#text2-sample">text2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#textmark-sample">textmark sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ticks-sample">ticks sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#tile-sample">tile sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#tiles-sample">tiles sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#torus-sample">torus sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#traj-sample">traj sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#triangulation-sample">triangulation sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#triplot-sample">triplot sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#tube-sample">tube sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#type0-sample">type0 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#type1-sample">type1 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#type2-sample">type2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#vect-sample">vect sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#vect3-sample">vect3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#venn-sample">venn sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-<hr>
-<a name="initialization-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#g_t3wave-sample" accesskey="n" rel="next">3wave sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Functions-for-initialization"></a>
-<h3 class="section">10.1 Functions for initialization</h3>
-
-
-<p>This section contain functions for input data for most of further samples.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">
-func 'prepare1d'
-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 x1 50 'x'
-new x2 50 '0.05-0.03*cos(pi*x)'
-new y1 50 '0.5-0.3*cos(pi*x)'
-new y2 50 '-0.3*sin(pi*x)'
-return
-
-func 'prepare2d'
-new a 50 40 '0.6*sin(pi*(x+1))*sin(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-new b 50 40 '0.6*cos(pi*(x+1))*cos(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-return
-
-func 'prepare3d'
-new c 61 50 40 '-2*(x^2+y^2+z^4-z^2)+0.2'
-new d 61 50 40 '1-2*tanh((x+y)*(x+y))'
-return
-
-func 'prepare2v'
-new a 20 30 '0.6*sin(pi*(x+1))*sin(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-new b 20 30 '0.6*cos(pi*(x+1))*cos(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-return
-
-func 'prepare3v'
-define $1 pow(x*x+y*y+(z-0.3)*(z-0.3)+0.03,1.5)
-define $2 pow(x*x+y*y+(z+0.3)*(z+0.3)+0.03,1.5)
-new ex 10 10 10 '0.2*x/$1-0.2*x/$2'
-new ey 10 10 10 '0.2*y/$1-0.2*y/$2'
-new ez 10 10 10 '0.2*(z-0.3)/$1-0.2*(z+0.3)/$2'
-return
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void mgls_prepare1d(mglData *y, mglData *y1, mglData *y2, mglData *x1, mglData *x2)\r
-{\r
- long n=50;\r
- if(y) y->Create(n,3);\r
- if(x1) x1->Create(n);\r
- if(x2) x2->Create(n);\r
- if(y1) y1->Create(n);\r
- if(y2) y2->Create(n);\r
- for(long i=0;i<n;i++)\r
- {\r
- double xx = i/(n-1.);\r
- if(y)\r
- {\r
- y->a[i] = 0.7*sin(2*M_PI*xx) + 0.5*cos(3*M_PI*xx) + 0.2*sin(M_PI*xx);\r
- y->a[i+n] = sin(2*M_PI*xx);\r
- y->a[i+2*n] = cos(2*M_PI*xx);\r
- }\r
- if(y1) y1->a[i] = 0.5+0.3*cos(2*M_PI*xx);\r
- if(y2) y2->a[i] = 0.3*sin(2*M_PI*xx);\r
- if(x1) x1->a[i] = xx*2-1;\r
- if(x2) x2->a[i] = 0.05+0.03*cos(2*M_PI*xx);\r
- }\r
-}\r
-//-----------------------------------------------------------------------------\r
-void mgls_prepare2d(mglData *a, mglData *b, mglData *v)\r
-{\r
- long n=50,m=40;\r
- if(a) a->Create(n,m);\r
- if(b) b->Create(n,m);\r
- if(v) { v->Create(9); v->Fill(-1,1); }\r
- for(long j=0;j<m;j++) for(long i=0;i<n;i++)\r
- {\r
- double x = i/(n-1.), y = j/(m-1.);\r
- long i0 = i+n*j;\r
- if(a) a->a[i0] = 0.6*sin(2*M_PI*x)*sin(3*M_PI*y)+0.4*cos(3*M_PI*x*y);\r
- if(b) b->a[i0] = 0.6*cos(2*M_PI*x)*cos(3*M_PI*y)+0.4*cos(3*M_PI*x*y);\r
- }\r
-}\r
-//-----------------------------------------------------------------------------\r
-void mgls_prepare3d(mglData *a, mglData *b)\r
-{\r
- long n=61,m=50,l=40;\r
- if(a) a->Create(n,m,l);\r
- if(b) b->Create(n,m,l);\r
- for(long k=0;k<l;k++) for(long j=0;j<m;j++) for(long i=0;i<n;i++)\r
- {\r
- double x=2*i/(n-1.)-1, y=2*j/(m-1.)-1, z=2*k/(l-1.)-1;\r
- long i0 = i+n*(j+m*k);\r
- if(a) a->a[i0] = -2*(x*x + y*y + z*z*z*z - z*z - 0.1);\r
- if(b) b->a[i0] = 1-2*tanh((x+y)*(x+y));\r
- }\r
-}\r
-//-----------------------------------------------------------------------------\r
-void mgls_prepare2v(mglData *a, mglData *b)\r
-{\r
- long n=20,m=30;\r
- if(a) a->Create(n,m);\r
- if(b) b->Create(n,m);\r
- for(long j=0;j<m;j++) for(long i=0;i<n;i++)\r
- {\r
- double x=i/(n-1.), y=j/(m-1.);\r
- long i0 = i+n*j;\r
- if(a) a->a[i0] = 0.6*sin(2*M_PI*x)*sin(3*M_PI*y)+0.4*cos(3*M_PI*x*y);\r
- if(b) b->a[i0] = 0.6*cos(2*M_PI*x)*cos(3*M_PI*y)+0.4*cos(3*M_PI*x*y);\r
- }\r
-}\r
-//-----------------------------------------------------------------------------\r
-void mgls_prepare3v(mglData *ex, mglData *ey, mglData *ez)\r
-{\r
- long n=10;\r
- double z0=0.3;\r
- if(!ex || !ey || !ez) return;\r
- ex->Create(n,n,n); ey->Create(n,n,n); ez->Create(n,n,n);\r
- for(long k=0;k<n;k++) for(long j=0;j<n;j++) for(long i=0;i<n;i++)\r
- {\r
- double x=2*i/(n-1.)-1, y=2*j/(n-1.)-1, z=2*k/(n-1.)-1;\r
- long i0 = i+n*(j+k*n);\r
- double r1 = pow(x*x+y*y+(z-z0)*(z-z0)+0.03,1.5);\r
- double r2 = pow(x*x+y*y+(z+z0)*(z+z0)+0.03,1.5);\r
- ex->a[i0]=0.2*x/r1 - 0.2*x/r2;\r
- ey->a[i0]=0.2*y/r1 - 0.2*y/r2;\r
- ez->a[i0]=0.2*(z-z0)/r1 - 0.2*(z+z0)/r2;\r
- }\r
-}\r
-//-----------------------------------------------------------------------------\r
-
-</pre>
-
-<hr>
-<a name="g_t3wave-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#alpha-sample" accesskey="n" rel="next">alpha sample</a>, Previous: <a href="#initialization-sample" accesskey="p" rel="prev">initialization sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-3wave"></a>
-<h3 class="section">10.2 Sample ‘<samp>3wave</samp>’</h3>
-
-
-<p>Example of complex <a href="#ode">ode</a> on basis of 3-wave decay.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">define t 50
-ode !r '-b*f;a*conj(f);a*conj(b)-0.1*f' 'abf' [1,1e-3,0] 0.1 t
-ranges 0 t 0 r.max
-plot r(0) 'b';legend 'a'
-plot r(1) 'g';legend 'b'
-plot r(2) 'r';legend 'f'
-axis:box:legend
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_3wave(mglGraph *gr)
-{
- gr->SubPlot(1,1,0,"<_");
- if(big!=3) gr->Title("Complex ODE sample");
- double t=50;
- mglData ini; ini.SetList(3, 1., 1e-3, 0.);
- mglDataC r(mglODEc("-b*f;a*conj(f);a*conj(b)-0.1*f","abf",ini,0.1,t));
- gr->SetRanges(0, t, 0, r.Maximal());
- gr->Plot(r.SubData(0),"b","legend 'a'");
- gr->Plot(r.SubData(1),"g","legend 'b'");
- gr->Plot(r.SubData(2),"r","legend 'f'");
- gr->Axis(); gr->Box(); gr->Legend();
-}
-</pre><div align="center"><img src="png/3wave.png" alt="Sample 3wave">
-</div>
-<hr>
-<a name="alpha-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#apde-sample" accesskey="n" rel="next">apde sample</a>, Previous: <a href="#g_t3wave-sample" accesskey="p" rel="prev">3wave sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-alpha"></a>
-<h3 class="section">10.3 Sample ‘<samp>alpha</samp>’</h3>
-
-
-<p>Example of <a href="#light">light</a> and <a href="#alpha">alpha</a> (transparency).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-subplot 2 2 0:title 'default':rotate 50 60:box
-surf a
-subplot 2 2 1:title 'light on':rotate 50 60:box
-light on:surf a
-subplot 2 2 3:title 'light on; alpha on':rotate 50 60:box
-alpha on:surf a
-subplot 2 2 2:title 'alpha on':rotate 50 60:box
-light off:surf a
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_alpha(mglGraph *gr) // alpha and lighting
-{
- mglData a; mgls_prepare2d(&a);
- gr->SubPlot(2,2,0); gr->Title("default"); gr->Rotate(50,60);
- gr->Box(); gr->Surf(a);
- gr->SubPlot(2,2,1); gr->Title("light on"); gr->Rotate(50,60);
- gr->Box(); gr->Light(true); gr->Surf(a);
- gr->SubPlot(2,2,3); gr->Title("alpha on; light on"); gr->Rotate(50,60);
- gr->Box(); gr->Alpha(true); gr->Surf(a);
- gr->SubPlot(2,2,2); gr->Title("alpha on"); gr->Rotate(50,60);
- gr->Box(); gr->Light(false); gr->Surf(a);
-}
-</pre><div align="center"><img src="png/alpha.png" alt="Sample alpha">
-</div>
-<hr>
-<a name="apde-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#area-sample" accesskey="n" rel="next">area sample</a>, Previous: <a href="#alpha-sample" accesskey="p" rel="prev">alpha sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-apde"></a>
-<h3 class="section">10.4 Sample ‘<samp>apde</samp>’</h3>
-
-
-<p>Comparison of advanced PDE solver (<a href="#apde">apde</a>) and ordinary one (<a href="#pde">pde</a>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">ranges -1 1 0 2 0 2
-new ar 256 'exp(-2*(x+0.0)^2)'
-new ai 256
-
-apde res1 'exp(-x^2-p^2)' ar ai 0.01:transpose res1
-pde res2 'exp(-x^2-p^2)' ar ai 0.01
-
-subplot 1 2 0 '_':title 'Advanced PDE solver'
-ranges 0 2 -1 1:crange res1
-dens res1:box
-axis:xlabel '\i z':ylabel '\i x'
-text -0.5 0.2 'i\partial_z\i u = exp(-\i x^2+\partial_x^2)[\i u]' 'y'
-
-subplot 1 2 1 '_':title 'Simplified PDE solver'
-dens res2:box
-axis:xlabel '\i z':ylabel '\i x'
-text -0.5 0.2 'i\partial_z\i u \approx\ exp(-\i x^2)\i u+exp(\partial_x^2)[\i u]' 'y'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_apde(mglGraph *gr)
-{
- gr->SetRanges(-1,1,0,2,0,2);
- mglData ar(256), ai(256); gr->Fill(ar,"exp(-2*(x+0.0)^2)");
-
- mglData res1(gr->APDE("exp(-x^2-p^2)",ar,ai,0.01)); res1.Transpose();
- mglData res2(gr->PDE("exp(-x^2-p^2)",ar,ai,0.01));
-
- gr->SubPlot(1,2,0,"_"); gr->Title("Advanced PDE solver");
- gr->SetRanges(0,2,-1,1); gr->SetRange('c',res1);
- gr->Dens(res1); gr->Axis(); gr->Box();
- gr->Label('x',"\\i z"); gr->Label('y',"\\i x");
- gr->Puts(mglPoint(-0.5,0.2),"i\\partial_z\\i u = exp(-\\i x^2+\\partial_x^2)[\\i u]","y");
-
- gr->SubPlot(1,2,1,"_"); gr->Title("Simplified PDE solver");
- gr->Dens(res2); gr->Axis(); gr->Box();
- gr->Label('x',"\\i z"); gr->Label('y',"\\i x");
- gr->Puts(mglPoint(-0.5,0.2),"i\\partial_z\\i u \\approx\\ exp(-\\i x^2)\\i u+exp(\\partial_x^2)[\\i u]","y");
-}
-</pre><div align="center"><img src="png/apde.png" alt="Sample apde">
-</div>
-<hr>
-<a name="area-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#aspect-sample" accesskey="n" rel="next">aspect sample</a>, Previous: <a href="#apde-sample" accesskey="p" rel="prev">apde sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-area"></a>
-<h3 class="section">10.5 Sample ‘<samp>area</samp>’</h3>
-
-
-<p>Function <a href="#area">area</a> fill the area between curve and axis plane. It support gradient filling if 2 colors per curve is specified.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-origin 0 0 0
-subplot 2 2 0 '':title 'Area plot (default)':box:area y
-subplot 2 2 1 '':title '2 colors':box:area y 'cbgGyr'
-subplot 2 2 2 '':title '"!" style':box:area y '!'
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 2 2 3:title '3d variant':rotate 50 60:box
-area xc yc z 'r'
-area xc -yc z 'b#'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_area(mglGraph *gr)
-{
- mglData y; mgls_prepare1d(&y); gr->SetOrigin(0,0,0);
- if(big!=3) { gr->SubPlot(2,2,0,""); gr->Title("Area plot (default)"); }
- gr->Box(); gr->Area(y);
- if(big==3) return;
- gr->SubPlot(2,2,1,""); gr->Title("2 colors"); gr->Box(); gr->Area(y,"cbgGyr");
- gr->SubPlot(2,2,2,""); gr->Title("'!' style"); gr->Box(); gr->Area(y,"!");
- gr->SubPlot(2,2,3); gr->Title("3d variant"); gr->Rotate(50,60); gr->Box();
- mglData yc(30), xc(30), z(30); z.Modify("2*x-1");
- yc.Modify("sin(pi*(2*x-1))"); xc.Modify("cos(pi*2*x-pi)");
- gr->Area(xc,yc,z,"r");
- yc.Modify("-sin(pi*(2*x-1))"); gr->Area(xc,yc,z,"b#");
-}
-</pre><div align="center"><img src="png/area.png" alt="Sample area">
-</div>
-<hr>
-<a name="aspect-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#axial-sample" accesskey="n" rel="next">axial sample</a>, Previous: <a href="#area-sample" accesskey="p" rel="prev">area sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-aspect"></a>
-<h3 class="section">10.6 Sample ‘<samp>aspect</samp>’</h3>
-
-
-<p>Example of <a href="#subplot">subplot</a>, <a href="#inplot">inplot</a>, <a href="#rotate">rotate</a>, <a href="#aspect">aspect</a>, <a href="#shear">shear</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0:box:text -1 1.1 'Just box' ':L'
-inplot 0.2 0.5 0.7 1 off:box:text 0 1.2 'InPlot example'
-subplot 2 2 1:title 'Rotate only':rotate 50 60:box
-subplot 2 2 2:title 'Rotate and Aspect':rotate 50 60:aspect 1 1 2:box
-subplot 2 2 3:title 'Shear':box 'c':shear 0.2 0.1:box
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_aspect(mglGraph *gr) // transformation
-{
- gr->SubPlot(2,2,0); gr->Box();
- gr->Puts(mglPoint(-1,1.1),"Just box",":L");
- gr->InPlot(0.2,0.5,0.7,1,false); gr->Box();
- gr->Puts(mglPoint(0,1.2),"InPlot example");
- gr->SubPlot(2,2,1); gr->Title("Rotate only");
- gr->Rotate(50,60); gr->Box();
- gr->SubPlot(2,2,2); gr->Title("Rotate and Aspect");
- gr->Rotate(50,60); gr->Aspect(1,1,2); gr->Box();
- gr->SubPlot(2,2,3); gr->Title("Shear");
- gr->Box("c"); gr->Shear(0.2,0.1); gr->Box();
-}
-</pre><div align="center"><img src="png/aspect.png" alt="Sample aspect">
-</div>
-<hr>
-<a name="axial-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#axis-sample" accesskey="n" rel="next">axis sample</a>, Previous: <a href="#aspect-sample" accesskey="p" rel="prev">aspect sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-axial"></a>
-<h3 class="section">10.7 Sample ‘<samp>axial</samp>’</h3>
-
-
-<p>Function <a href="#axial">axial</a> draw surfaces of rotation for contour lines. You can draw wire surfaces (‘<samp>#</samp>’ style) or ones rotated in other directions (‘<samp>x</samp>’, ‘<samp>z</samp>’ styles).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-subplot 2 2 0:title 'Axial plot (default)':light on:alpha on:rotate 50 60:box:axial a
-subplot 2 2 1:title '"x" style;"." style':light on:rotate 50 60:box:axial a 'x.'
-subplot 2 2 2:title '"z" style':light on:rotate 50 60:box:axial a 'z'
-subplot 2 2 3:title '"\#" style':light on:rotate 50 60:box:axial a '#'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_axial(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("Axial plot (default)"); }
- gr->Light(true); gr->Alpha(true); gr->Rotate(50,60); gr->Box(); gr->Axial(a);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("'x' style; '.'style"); gr->Rotate(50,60); gr->Box(); gr->Axial(a,"x.");
- gr->SubPlot(2,2,2); gr->Title("'z' style"); gr->Rotate(50,60); gr->Box(); gr->Axial(a,"z");
- gr->SubPlot(2,2,3); gr->Title("'\\#' style"); gr->Rotate(50,60); gr->Box(); gr->Axial(a,"#");
-}
-</pre><div align="center"><img src="png/axial.png" alt="Sample axial">
-</div>
-<hr>
-<a name="axis-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#barh-sample" accesskey="n" rel="next">barh sample</a>, Previous: <a href="#axial-sample" accesskey="p" rel="prev">axial sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-axis"></a>
-<h3 class="section">10.8 Sample ‘<samp>axis</samp>’</h3>
-
-
-<p>Different forms of <a href="#axis">axis</a> position.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0:title 'Axis origin, Grid':origin 0 0:axis:grid:fplot 'x^3'
-subplot 2 2 1:title '2 axis':ranges -1 1 -1 1:origin -1 -1:axis:ylabel 'axis_1':fplot 'sin(pi*x)' 'r2'
-ranges 0 1 0 1:origin 1 1:axis:ylabel 'axis_2':fplot 'cos(pi*x)'
-subplot 2 2 3:title 'More axis':origin nan nan:xrange -1 1:axis:xlabel 'x' 0:ylabel 'y_1' 0:fplot 'x^2' 'k'
-yrange -1 1:origin -1.3 -1:axis 'y' 'r':ylabel '#r{y_2}' 0.2:fplot 'x^3' 'r'
-
-subplot 2 2 2:title '4 segments, inverted axis':origin 0 0:
-inplot 0.5 1 0.5 1 on:ranges 0 10 0 2:axis
-fplot 'sqrt(x/2)':xlabel 'W' 1:ylabel 'U' 1
-inplot 0 0.5 0.5 1 on:ranges 1 0 0 2:axis 'x':fplot 'sqrt(x)+x^3':xlabel '\tau' 1
-inplot 0.5 1 0 0.5 on:ranges 0 10 4 0:axis 'y':fplot 'x/4':ylabel 'L' -1
-inplot 0 0.5 0 0.5 on:ranges 1 0 4 0:fplot '4*x^2'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_axis(mglGraph *gr)
-{
- gr->SubPlot(2,2,0); gr->Title("Axis origin, Grid"); gr->SetOrigin(0,0);
- gr->Axis(); gr->Grid(); gr->FPlot("x^3");
-
- gr->SubPlot(2,2,1); gr->Title("2 axis");
- gr->SetRanges(-1,1,-1,1); gr->SetOrigin(-1,-1,-1); // first axis
- gr->Axis(); gr->Label('y',"axis 1",0); gr->FPlot("sin(pi*x)","r2");
- gr->SetRanges(0,1,0,1); gr->SetOrigin(1,1,1); // second axis
- gr->Axis(); gr->Label('y',"axis 2",0); gr->FPlot("cos(pi*x)");
-
- gr->SubPlot(2,2,3); gr->Title("More axis"); gr->SetOrigin(NAN,NAN); gr->SetRange('x',-1,1);
- gr->Axis(); gr->Label('x',"x",0); gr->Label('y',"y_1",0); gr->FPlot("x^2","k");
- gr->SetRanges(-1,1,-1,1); gr->SetOrigin(-1.3,-1); // second axis
- gr->Axis("y","r"); gr->Label('y',"#r{y_2}",0.2); gr->FPlot("x^3","r");
-
- gr->SubPlot(2,2,2); gr->Title("4 segments, inverted axis"); gr->SetOrigin(0,0);
- gr->InPlot(0.5,1,0.5,1); gr->SetRanges(0,10,0,2); gr->Axis();
- gr->FPlot("sqrt(x/2)"); gr->Label('x',"W",1); gr->Label('y',"U",1);
- gr->InPlot(0,0.5,0.5,1); gr->SetRanges(1,0,0,2); gr->Axis("x");
- gr->FPlot("sqrt(x)+x^3"); gr->Label('x',"\\tau",-1);
- gr->InPlot(0.5,1,0,0.5); gr->SetRanges(0,10,4,0); gr->Axis("y");
- gr->FPlot("x/4"); gr->Label('y',"L",-1);
- gr->InPlot(0,0.5,0,0.5); gr->SetRanges(1,0,4,0); gr->FPlot("4*x^2");
-}
-</pre><div align="center"><img src="png/axis.png" alt="Sample axis">
-</div>
-<hr>
-<a name="barh-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#bars-sample" accesskey="n" rel="next">bars sample</a>, Previous: <a href="#axis-sample" accesskey="p" rel="prev">axis sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-barh"></a>
-<h3 class="section">10.9 Sample ‘<samp>barh</samp>’</h3>
-
-
-<p>Function <a href="#barh">barh</a> is the similar to <a href="#bars">bars</a> but draw horizontal bars.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ys 10 3 '0.8*sin(pi*(x+y/4+1.25))+0.2*rnd':origin 0 0 0
-subplot 2 2 0 '':title 'Barh plot (default)':box:barh ys
-subplot 2 2 1 '':title '2 colors':box:barh ys 'cbgGyr'
-ranges -3 3 -1 1:subplot 2 2 2 '':title '"a" style':box:barh ys 'a'
-subplot 2 2 3 '': title '"f" style':box:barh ys 'f'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_barh(mglGraph *gr)
-{
- mglData ys(10,3); ys.Modify("0.8*sin(pi*(2*x+y/2))+0.2*rnd");
- gr->SetOrigin(0,0,0);
- if(big!=3) { gr->SubPlot(2,2,0,""); gr->Title("Barh plot (default)"); }
- gr->Box(); gr->Barh(ys);
- if(big==3) return;
- gr->SubPlot(2,2,1,""); gr->Title("2 colors"); gr->Box(); gr->Barh(ys,"cbgGyr");
- gr->SetRanges(-3,3,-1,1); // increase range since summation can exceed [-1,1]
- gr->SubPlot(2,2,2,""); gr->Title("'a' style"); gr->Box(); gr->Barh(ys,"a");
- gr->SubPlot(2,2,3,""); gr->Title("'f' style"); gr->Box(); gr->Barh(ys,"f");
-}
-</pre><div align="center"><img src="png/barh.png" alt="Sample barh">
-</div>
-<hr>
-<a name="bars-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#belt-sample" accesskey="n" rel="next">belt sample</a>, Previous: <a href="#barh-sample" accesskey="p" rel="prev">barh sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-bars"></a>
-<h3 class="section">10.10 Sample ‘<samp>bars</samp>’</h3>
-
-
-<p>Function <a href="#bars">bars</a> draw vertical bars. It have a lot of options: bar-above-bar (‘<samp>a</samp>’ style), fall like (‘<samp>f</samp>’ style), 2 colors for positive and negative values, wired bars (‘<samp>#</samp>’ style), 3D variant.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ys 10 3 '0.8*sin(pi*(x+y/4+1.25))+0.2*rnd':origin 0 0 0
-subplot 3 2 0 '':title 'Bars plot (default)':box:bars ys
-subplot 3 2 1 '':title '2 colors':box:bars ys 'cbgGyr'
-subplot 3 2 4 '':title '"\#" style':box:bars ys '#'
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 3 2 5:title '3d variant':rotate 50 60:box:bars xc yc z 'r'
-ranges -1 1 -3 3:subplot 3 2 2 '':title '"a" style':box:bars ys 'a'
-subplot 3 2 3 '':title '"f" style':box:bars ys 'f'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_bars(mglGraph *gr)
-{
- mglData ys(10,3); ys.Modify("0.8*sin(pi*(2*x+y/2))+0.2*rnd");
- gr->SetOrigin(0,0,0);
- if(big!=3) { gr->SubPlot(3,2,0,""); gr->Title("Bars plot (default)"); }
- gr->Box(); gr->Bars(ys);
- if(big==3) return;
- gr->SubPlot(3,2,1,""); gr->Title("2 colors"); gr->Box(); gr->Bars(ys,"cbgGyr");
- gr->SubPlot(3,2,4,""); gr->Title("'\\#' style"); gr->Box(); gr->Bars(ys,"#");
- gr->SubPlot(3,2,5); gr->Title("3d variant"); gr->Rotate(50,60); gr->Box();
- mglData yc(30), xc(30), z(30); z.Modify("2*x-1");
- yc.Modify("sin(pi*(2*x-1))"); xc.Modify("cos(pi*2*x-pi)");
- gr->Bars(xc,yc,z,"r");
- gr->SetRanges(-1,1,-3,3); // increase range since summation can exceed [-1,1]
- gr->SubPlot(3,2,2,""); gr->Title("'a' style"); gr->Box(); gr->Bars(ys,"a");
- gr->SubPlot(3,2,3,""); gr->Title("'f' style"); gr->Box(); gr->Bars(ys,"f");
-}
-</pre><div align="center"><img src="png/bars.png" alt="Sample bars">
-</div>
-<hr>
-<a name="belt-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#bifurcation-sample" accesskey="n" rel="next">bifurcation sample</a>, Previous: <a href="#bars-sample" accesskey="p" rel="prev">bars sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-belt"></a>
-<h3 class="section">10.11 Sample ‘<samp>belt</samp>’</h3>
-
-
-<p>Function <a href="#belt">belt</a> draw surface by belts. You can use ‘<samp>x</samp>’ style for drawing lines in other direction.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Belt plot':rotate 50 60:box:belt a
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_belt(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- if(big!=3) gr->Title("Belt plot");
- gr->Rotate(50,60); gr->Box(); gr->Belt(a);
-}
-</pre><div align="center"><img src="png/belt.png" alt="Sample belt">
-</div>
-<hr>
-<a name="bifurcation-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#box-sample" accesskey="n" rel="next">box sample</a>, Previous: <a href="#belt-sample" accesskey="p" rel="prev">belt sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-bifurcation"></a>
-<h3 class="section">10.12 Sample ‘<samp>bifurcation</samp>’</h3>
-
-
-<p>Function <a href="#bifurcation">bifurcation</a> draw Bifurcation diagram for multiple stationary points of the map (like logistic map).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Bifurcation sample'
-ranges 0 4 0 1:axis
-bifurcation 0.005 'x*y*(1-y)' 'r'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_bifurcation(mglGraph *gr)
-{
- gr->SubPlot(1,1,0,"<_");
- if(big!=3) gr->Title("Bifurcation sample");
- gr->SetRanges(0,4,0,1); gr->Axis();
- gr->Bifurcation(0.005,"x*y*(1-y)","r");
-}
-</pre><div align="center"><img src="png/bifurcation.png" alt="Sample bifurcation">
-</div>
-<hr>
-<a name="box-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#boxplot-sample" accesskey="n" rel="next">boxplot sample</a>, Previous: <a href="#bifurcation-sample" accesskey="p" rel="prev">bifurcation sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-box"></a>
-<h3 class="section">10.13 Sample ‘<samp>box</samp>’</h3>
-
-
-<p>Different styles of bounding <a href="#box">box</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0:title 'Box (default)':rotate 50 60:box
-subplot 2 2 1:title 'colored':rotate 50 60:box 'r'
-subplot 2 2 2:title 'with faces':rotate 50 60:box '@'
-subplot 2 2 3:title 'both':rotate 50 60:box '@cm'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_boxplot(mglGraph *gr) // flow threads and density plot
-{
- mglData a(10,7); a.Modify("(2*rnd-1)^3/2");
- if(big!=3) { gr->SubPlot(1,1,0,""); gr->Title("Boxplot plot"); }
- gr->Box(); gr->BoxPlot(a);
-}
-</pre><div align="center"><img src="png/box.png" alt="Sample box">
-</div>
-<hr>
-<a name="boxplot-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#boxs-sample" accesskey="n" rel="next">boxs sample</a>, Previous: <a href="#box-sample" accesskey="p" rel="prev">box sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-boxplot"></a>
-<h3 class="section">10.14 Sample ‘<samp>boxplot</samp>’</h3>
-
-
-<p>Function <a href="#boxplot">boxplot</a> draw box-and-whisker diagram.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 10 7 '(2*rnd-1)^3/2'
-subplot 1 1 0 '':title 'Boxplot plot':box:boxplot a
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_boxplot(mglGraph *gr) // flow threads and density plot
-{
- mglData a(10,7); a.Modify("(2*rnd-1)^3/2");
- if(big!=3) { gr->SubPlot(1,1,0,""); gr->Title("Boxplot plot"); }
- gr->Box(); gr->BoxPlot(a);
-}
-</pre><div align="center"><img src="png/boxplot.png" alt="Sample boxplot">
-</div>
-<hr>
-<a name="boxs-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#candle-sample" accesskey="n" rel="next">candle sample</a>, Previous: <a href="#boxplot-sample" accesskey="p" rel="prev">boxplot sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-boxs"></a>
-<h3 class="section">10.15 Sample ‘<samp>boxs</samp>’</h3>
-
-
-<p>Function <a href="#boxs">boxs</a> draw surface by boxes. You can use ‘<samp>#</samp>’ for drawing wire plot.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-origin 0 0 0
-subplot 2 2 0:title 'Boxs plot (default)':rotate 40 60:light on:box:boxs a
-subplot 2 2 1:title '"\@" style':rotate 50 60:box:boxs a '@'
-subplot 2 2 2:title '"\#" style':rotate 50 60:box:boxs a '#'
-subplot 2 2 3:title 'compare with Tile':rotate 50 60:box:tile a
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_boxs(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- gr->SetOrigin(0,0,0); gr->Light(true);
- if(big!=3) {gr->SubPlot(2,2,0); gr->Title("Boxs plot (default)");}
- gr->Rotate(40,60); gr->Box(); gr->Boxs(a);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("'\\@' style");
- gr->Rotate(50,60); gr->Box(); gr->Boxs(a,"@");
- gr->SubPlot(2,2,2); gr->Title("'\\#' style");
- gr->Rotate(50,60); gr->Box(); gr->Boxs(a,"#");
- gr->SubPlot(2,2,3); gr->Title("compare with Tile");
- gr->Rotate(50,60); gr->Box(); gr->Tile(a);
-}
-</pre><div align="center"><img src="png/boxs.png" alt="Sample boxs">
-</div>
-<hr>
-<a name="candle-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#chart-sample" accesskey="n" rel="next">chart sample</a>, Previous: <a href="#boxs-sample" accesskey="p" rel="prev">boxs sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-candle"></a>
-<h3 class="section">10.16 Sample ‘<samp>candle</samp>’</h3>
-
-
-<p>Function <a href="#candle">candle</a> draw candlestick chart. This is a combination of a line-chart and a bar-chart, in that each bar represents the range of price movement over a given time interval.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new y 30 'sin(pi*x/2)^2'
-subplot 1 1 0 '':title 'Candle plot (default)'
-yrange 0 1:box
-candle y y/2 (y+1)/2
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_candle(mglGraph *gr)
-{
- mglData y(30); gr->Fill(y,"sin(pi*x/2)^2");
- mglData y1(30); gr->Fill(y1,"v/2",y);
- mglData y2(30); gr->Fill(y2,"(1+v)/2",y);
- if(big!=3) { gr->SubPlot(1,1,0,""); gr->Title("Candle plot (default)"); }
- gr->SetRange('y',0,1); gr->Box(); gr->Candle(y,y1,y2);
-}
-</pre><div align="center"><img src="png/candle.png" alt="Sample candle">
-</div>
-<hr>
-<a name="chart-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cloud-sample" accesskey="n" rel="next">cloud sample</a>, Previous: <a href="#candle-sample" accesskey="p" rel="prev">candle sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-chart"></a>
-<h3 class="section">10.17 Sample ‘<samp>chart</samp>’</h3>
-
-
-<p>Function <a href="#chart">chart</a> draw colored boxes with width proportional to data values. Use ‘<samp> </samp>’ for empty box. It produce well known pie chart if drawn in polar coordinates.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ch 7 2 'rnd+0.1':light on
-subplot 2 2 0:title 'Chart plot (default)':rotate 50 60:box:chart ch
-subplot 2 2 1:title '"\#" style':rotate 50 60:box:chart ch '#'
-subplot 2 2 2:title 'Pie chart; " " color':rotate 50 60:
-axis '(y+1)/2*cos(pi*x)' '(y+1)/2*sin(pi*x)' '':box:chart ch 'bgr cmy#'
-subplot 2 2 3:title 'Ring chart; " " color':rotate 50 60:
-axis '(y+2)/3*cos(pi*x)' '(y+2)/3*sin(pi*x)' '':box:chart ch 'bgr cmy#'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_chart(mglGraph *gr)
-{
- mglData ch(7,2); for(int i=0;i<7*2;i++) ch.a[i]=mgl_rnd()+0.1;
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("Chart plot (default)"); }
- gr->Light(true); gr->Rotate(50,60); gr->Box(); gr->Chart(ch);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("'\\#' style");
- gr->Rotate(50,60); gr->Box(); gr->Chart(ch,"#");
- gr->SubPlot(2,2,2); gr->Title("Pie chart; ' ' color");
- gr->SetFunc("(y+1)/2*cos(pi*x)","(y+1)/2*sin(pi*x)","");
- gr->Rotate(50,60); gr->Box(); gr->Chart(ch,"bgr cmy#");
- gr->SubPlot(2,2,3); gr->Title("Ring chart; ' ' color");
- gr->SetFunc("(y+2)/3*cos(pi*x)","(y+2)/3*sin(pi*x)","");
- gr->Rotate(50,60); gr->Box(); gr->Chart(ch,"bgr cmy#");
-}
-</pre><div align="center"><img src="png/chart.png" alt="Sample chart">
-</div>
-<hr>
-<a name="cloud-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#colorbar-sample" accesskey="n" rel="next">colorbar sample</a>, Previous: <a href="#chart-sample" accesskey="p" rel="prev">chart sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cloud"></a>
-<h3 class="section">10.18 Sample ‘<samp>cloud</samp>’</h3>
-
-
-<p>Function <a href="#cloud">cloud</a> draw cloud-like object which is less transparent for higher data values. Similar plot can be created using many (about 10...20 – <code>surf3a a a;value 10</code>) isosurfaces <a href="#surf3a">surf3a</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-subplot 2 2 0:title 'Cloud plot':rotate 50 60:alpha on:box:cloud c 'wyrRk'
-subplot 2 2 1:title '"i" style':rotate 50 60:box:cloud c 'iwyrRk'
-subplot 2 2 2:title '"." style':rotate 50 60:box:cloud c '.wyrRk'
-subplot 2 2 3:title 'meshnum 10':rotate 50 60:box:cloud c 'wyrRk'; meshnum 10
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_cloud(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("Cloud plot"); }
- gr->Rotate(50,60); gr->Alpha(true);
- gr->Box(); gr->Cloud(c,"wyrRk");
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("'i' style");
- gr->Rotate(50,60); gr->Box(); gr->Cloud(c,"iwyrRk");
- gr->SubPlot(2,2,2); gr->Title("'.' style");
- gr->Rotate(50,60); gr->Box(); gr->Cloud(c,".wyrRk");
- gr->SubPlot(2,2,3); gr->Title("meshnum 10");
- gr->Rotate(50,60); gr->Box(); gr->Cloud(c,"wyrRk","meshnum 10");
-}
-</pre><div align="center"><img src="png/cloud.png" alt="Sample cloud">
-</div>
-<hr>
-<a name="colorbar-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#combined-sample" accesskey="n" rel="next">combined sample</a>, Previous: <a href="#cloud-sample" accesskey="p" rel="prev">cloud sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-colorbar"></a>
-<h3 class="section">10.19 Sample ‘<samp>colorbar</samp>’</h3>
-
-
-<p>Example of <a href="#colorbar">colorbar</a> position and styles.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-new v 9 'x'
-subplot 2 2 0:title 'Colorbar out of box':box
-colorbar '<':colorbar '>':colorbar '_':colorbar '^'
-subplot 2 2 1:title 'Colorbar near box':box
-colorbar '<I':colorbar '>I':colorbar '_I':colorbar '^I'
-subplot 2 2 2:title 'manual colors':box:contd v a
-colorbar v '<':colorbar v '>':colorbar v '_':colorbar v '^'
-subplot 2 2 3:title '':text -0.5 1.55 'Color positions' ':C' -2
-colorbar 'bwr>' 0.25 0:text -0.9 1.2 'Default'
-colorbar 'b{w,0.3}r>' 0.5 0:text -0.1 1.2 'Manual'
-crange 0.01 1e3
-colorbar '>' 0.75 0:text 0.65 1.2 'Normal scale':colorbar '>':text 1.35 1.2 'Log scale'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_colorbar(mglGraph *gr)
-{
- gr->SubPlot(2,2,0); gr->Title("Colorbar out of box"); gr->Box();
- gr->Colorbar("<"); gr->Colorbar(">"); gr->Colorbar("_"); gr->Colorbar("^");
- gr->SubPlot(2,2,1); gr->Title("Colorbar near box"); gr->Box();
- gr->Colorbar("<I"); gr->Colorbar(">I"); gr->Colorbar("_I"); gr->Colorbar("^I");
- gr->SubPlot(2,2,2); gr->Title("manual colors");
- mglData a,v; mgls_prepare2d(&a,0,&v);
- gr->Box(); gr->ContD(v,a);
- gr->Colorbar(v,"<"); gr->Colorbar(v,">"); gr->Colorbar(v,"_"); gr->Colorbar(v,"^");
-
- gr->SubPlot(2,2,3); gr->Title(" ");
- gr->Puts(mglPoint(-0.5,1.55),"Color positions",":C",-2);
- gr->Colorbar("bwr>",0.25,0); gr->Puts(mglPoint(-0.9,1.2),"Default");
- gr->Colorbar("b{w,0.3}r>",0.5,0); gr->Puts(mglPoint(-0.1,1.2),"Manual");
-
- gr->Puts(mglPoint(1,1.55),"log-scale",":C",-2);
- gr->SetRange('c',0.01,1e3);
- gr->Colorbar(">",0.75,0); gr->Puts(mglPoint(0.65,1.2),"Normal scale");
- gr->SetFunc("","","","lg(c)");
- gr->Colorbar(">"); gr->Puts(mglPoint(1.35,1.2),"Log scale");
-}
-</pre><div align="center"><img src="png/colorbar.png" alt="Sample colorbar">
-</div>
-<hr>
-<a name="combined-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cones-sample" accesskey="n" rel="next">cones sample</a>, Previous: <a href="#colorbar-sample" accesskey="p" rel="prev">colorbar sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-combined"></a>
-<h3 class="section">10.20 Sample ‘<samp>combined</samp>’</h3>
-
-
-<p>Example of several plots in the same axis.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2v'
-call 'prepare3d'
-new v 10:fill v -0.5 1:copy d sqrt(a^2+b^2)
-subplot 2 2 0:title 'Surf + Cont':rotate 50 60:light on:box:surf a:cont a 'y'
-subplot 2 2 1 '':title 'Flow + Dens':light off:box:flow a b 'br':dens d
-subplot 2 2 2:title 'Mesh + Cont':rotate 50 60:box:mesh a:cont a '_'
-subplot 2 2 3:title 'Surf3 + ContF3':rotate 50 60:light on
-box:contf3 v c 'z' 0:contf3 v c 'x':contf3 v c
-cut 0 -1 -1 1 0 1.1
-contf3 v c 'z' c.nz-1:surf3 c -0.5
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_combined(mglGraph *gr) // flow threads and density plot
-{
- mglData a,b,d; mgls_prepare2v(&a,&b); d = a;
- for(int i=0;i<a.nx*a.ny;i++) d.a[i] = hypot(a.a[i],b.a[i]);
- mglData c; mgls_prepare3d(&c);
- mglData v(10); v.Fill(-0.5,1);
- gr->SubPlot(2,2,1,""); gr->Title("Flow + Dens");
- gr->Flow(a,b,"br"); gr->Dens(d); gr->Box();
- gr->SubPlot(2,2,0); gr->Title("Surf + Cont"); gr->Rotate(50,60);
- gr->Light(true); gr->Surf(a); gr->Cont(a,"y"); gr->Box();
- gr->SubPlot(2,2,2); gr->Title("Mesh + Cont"); gr->Rotate(50,60);
- gr->Box(); gr->Mesh(a); gr->Cont(a,"_");
- gr->SubPlot(2,2,3); gr->Title("Surf3 + ContF3");gr->Rotate(50,60);
- gr->Box(); gr->ContF3(v,c,"z",0); gr->ContF3(v,c,"x"); gr->ContF3(v,c);
- gr->SetCutBox(mglPoint(0,-1,-1), mglPoint(1,0,1.1));
- gr->ContF3(v,c,"z",c.nz-1); gr->Surf3(-0.5,c);
-}
-</pre><div align="center"><img src="png/combined.png" alt="Sample combined">
-</div>
-<hr>
-<a name="cones-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cont-sample" accesskey="n" rel="next">cont sample</a>, Previous: <a href="#combined-sample" accesskey="p" rel="prev">combined sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cones"></a>
-<h3 class="section">10.21 Sample ‘<samp>cones</samp>’</h3>
-
-
-<p>Function <a href="#cones">cones</a> is similar to <a href="#bars">bars</a> but draw cones.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ys 10 3 '0.8*sin(pi*(x+y/4+1.25))+0.2*rnd'
-light on:origin 0 0 0
-subplot 3 2 0:title 'Cones plot':rotate 50 60:box:cones ys
-subplot 3 2 1:title '2 colors':rotate 50 60:box:cones ys 'cbgGyr'
-subplot 3 2 2:title '"\#" style':rotate 50 60:box:cones ys '#'
-subplot 3 2 3:title '"a" style':rotate 50 60:zrange -2 2:box:cones ys 'a'
-subplot 3 2 4:title '"t" style':rotate 50 60:box:cones ys 't'
-subplot 3 2 5:title '"4" style':rotate 50 60:box:cones ys '4'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_cones(mglGraph *gr)
-{
- mglData ys(10,3); ys.Modify("0.8*sin(pi*(2*x+y/2))+0.2*rnd");
- gr->Light(true); gr->SetOrigin(0,0,0);
- if(big!=3) { gr->SubPlot(3,2,0); gr->Title("Cones plot"); }
- gr->Rotate(50,60); gr->Box(); gr->Cones(ys);
- if(big==3) return;
- gr->SubPlot(3,2,1); gr->Title("2 colors");
- gr->Rotate(50,60); gr->Box(); gr->Cones(ys,"cbgGyr");
- gr->SubPlot(3,2,2); gr->Title("'\\#' style");
- gr->Rotate(50,60); gr->Box(); gr->Cones(ys,"#");
- gr->SubPlot(3,2,3); gr->Title("'a' style");
- gr->SetRange('z',-2,2); // increase range since summation can exceed [-1,1]
- gr->Rotate(50,60); gr->Box(); gr->Cones(ys,"a");
- gr->SubPlot(3,2,4); gr->Title("'t' style");
- gr->Rotate(50,60); gr->Box(); gr->Cones(ys,"t");
- gr->SubPlot(3,2,5); gr->Title("'4' style");
- gr->Rotate(50,60); gr->Box(); gr->Cones(ys,"4");
-}
-</pre><div align="center"><img src="png/cones.png" alt="Sample cones">
-</div>
-<hr>
-<a name="cont-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cont3-sample" accesskey="n" rel="next">cont3 sample</a>, Previous: <a href="#cones-sample" accesskey="p" rel="prev">cones sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cont"></a>
-<h3 class="section">10.22 Sample ‘<samp>cont</samp>’</h3>
-
-
-<p>Function <a href="#cont">cont</a> draw contour lines for surface. You can select automatic (default) or manual levels for contours, print contour labels, draw it on the surface (default) or at plane (as <code>Dens</code>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-list v -0.5 -0.15 0 0.15 0.5
-subplot 2 2 0:title 'Cont plot (default)':rotate 50 60:box:cont a
-subplot 2 2 1:title 'manual levels':rotate 50 60:box:cont v a
-subplot 2 2 2:title '"\_" and "." styles':rotate 50 60:box:cont a '_':cont a '_.2k'
-subplot 2 2 3 '':title '"t" style':box:cont a 't'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_cont3(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) gr->Title("Cont3 sample");
- gr->Rotate(50,60); gr->Box();
- gr->Cont3(c,"x"); gr->Cont3(c); gr->Cont3(c,"z");
-}
-</pre><div align="center"><img src="png/cont.png" alt="Sample cont">
-</div>
-<hr>
-<a name="cont3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cont_005fxyz-sample" accesskey="n" rel="next">cont_xyz sample</a>, Previous: <a href="#cont-sample" accesskey="p" rel="prev">cont sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cont3"></a>
-<h3 class="section">10.23 Sample ‘<samp>cont3</samp>’</h3>
-
-
-<p>Function <a href="#contf3">contf3</a> draw ordinary contour lines but at slices of 3D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Cont3 sample':rotate 50 60:box
-cont3 c 'x':cont3 c:cont3 c 'z'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_cont3(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) gr->Title("Cont3 sample");
- gr->Rotate(50,60); gr->Box();
- gr->Cont3(c,"x"); gr->Cont3(c); gr->Cont3(c,"z");
-}
-</pre><div align="center"><img src="png/cont3.png" alt="Sample cont3">
-</div>
-<hr>
-<a name="cont_005fxyz-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#contd-sample" accesskey="n" rel="next">contd sample</a>, Previous: <a href="#cont3-sample" accesskey="p" rel="prev">cont3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cont_005fxyz"></a>
-<h3 class="section">10.24 Sample ‘<samp>cont_xyz</samp>’</h3>
-
-
-<p>Functions <a href="#contz">contz</a>, <a href="#conty">conty</a>, <a href="#contx">contx</a> draw contour lines on plane perpendicular to corresponding axis. One of possible application is drawing projections of 3D field.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Cont[XYZ] sample':rotate 50 60:box
-contx {sum c 'x'} '' -1:conty {sum c 'y'} '' 1:contz {sum c 'z'} '' -1
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_cont_xyz(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) gr->Title("Cont[XYZ] sample");
- gr->Rotate(50,60); gr->Box(); gr->ContX(c.Sum("x"),"",-1);
- gr->ContY(c.Sum("y"),"",1); gr->ContZ(c.Sum("z"),"",-1);
-}
-</pre><div align="center"><img src="png/cont_xyz.png" alt="Sample cont_xyz">
-</div>
-<hr>
-<a name="contd-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#contf-sample" accesskey="n" rel="next">contf sample</a>, Previous: <a href="#cont_005fxyz-sample" accesskey="p" rel="prev">cont_xyz sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-contd"></a>
-<h3 class="section">10.25 Sample ‘<samp>contd</samp>’</h3>
-
-
-<p>Function <a href="#contd">contd</a> is similar to <a href="#contf">contf</a> but with manual contour colors.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-list v -0.5 -0.15 0 0.15 0.5
-new a1 30 40 3 '0.6*sin(2*pi*x+pi*(z+1)/2)*sin(3*pi*y+pi*z) + 0.4*cos(3*pi*(x*y)+pi*(z+1)^2/2)'
-subplot 2 2 0:title 'ContD plot (default)':rotate 50 60:box:contd a
-subplot 2 2 1:title 'manual levels':rotate 50 60:box:contd v a
-subplot 2 2 2:title '"\_" style':rotate 50 60:box:contd a '_'
-subplot 2 2 3:title 'several slices':rotate 50 60:box:contd a1
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_contd(mglGraph *gr)
-{
- mglData a,v(5),a1(30,40,3); mgls_prepare2d(&a); v.a[0]=-0.5;
- v.a[1]=-0.15; v.a[2]=0; v.a[3]=0.15; v.a[4]=0.5;
- gr->Fill(a1,"0.6*sin(2*pi*x+pi*(z+1)/2)*sin(3*pi*y+pi*z) + 0.4*cos(3*pi*(x*y)+pi*(z+1)^2/2)");
-
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("ContD plot (default)"); }
- gr->Rotate(50,60); gr->Box(); gr->ContD(a);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("manual levels");
- gr->Rotate(50,60); gr->Box(); gr->ContD(v,a);
- gr->SubPlot(2,2,2); gr->Title("'\\_' style");
- gr->Rotate(50,60); gr->Box(); gr->ContD(a,"_");
- gr->SubPlot(2,2,3); gr->Title("several slices");
- gr->Rotate(50,60); gr->Box(); gr->ContD(a1);
-}
-</pre><div align="center"><img src="png/contd.png" alt="Sample contd">
-</div>
-<hr>
-<a name="contf-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#contf3-sample" accesskey="n" rel="next">contf3 sample</a>, Previous: <a href="#contd-sample" accesskey="p" rel="prev">contd sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-contf"></a>
-<h3 class="section">10.26 Sample ‘<samp>contf</samp>’</h3>
-
-
-<p>Function <a href="#contf">contf</a> draw filled contours. You can select automatic (default) or manual levels for contours.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-list v -0.5 -0.15 0 0.15 0.5
-new a1 30 40 3 '0.6*sin(2*pi*x+pi*(z+1)/2)*sin(3*pi*y+pi*z) + 0.4*cos(3*pi*(x*y)+pi*(z+1)^2/2)'
-subplot 2 2 0:title 'ContF plot (default)':rotate 50 60:box:contf a
-subplot 2 2 1:title 'manual levels':rotate 50 60:box:contf v a
-subplot 2 2 2:title '"\_" style':rotate 50 60:box:contf a '_'
-subplot 2 2 3:title 'several slices':rotate 50 60:box:contf a1
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_contf3(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) gr->Title("ContF3 sample");
- gr->Rotate(50,60); gr->Light(true); gr->Box();
- gr->ContF3(c,"x"); gr->ContF3(c); gr->ContF3(c,"z");
- gr->Cont3(c,"kx"); gr->Cont3(c,"k"); gr->Cont3(c,"kz");
-}
-</pre><div align="center"><img src="png/contf.png" alt="Sample contf">
-</div>
-<hr>
-<a name="contf3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#contf_005fxyz-sample" accesskey="n" rel="next">contf_xyz sample</a>, Previous: <a href="#contf-sample" accesskey="p" rel="prev">contf sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-contf3"></a>
-<h3 class="section">10.27 Sample ‘<samp>contf3</samp>’</h3>
-
-
-<p>Function <a href="#contf3">contf3</a> draw ordinary filled contours but at slices of 3D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Cont3 sample':rotate 50 60:box:light on
-contf3 c 'x':contf3 c:contf3 c 'z'
-cont3 c 'xk':cont3 c 'k':cont3 c 'zk'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_contf3(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) gr->Title("ContF3 sample");
- gr->Rotate(50,60); gr->Light(true); gr->Box();
- gr->ContF3(c,"x"); gr->ContF3(c); gr->ContF3(c,"z");
- gr->Cont3(c,"kx"); gr->Cont3(c,"k"); gr->Cont3(c,"kz");
-}
-</pre><div align="center"><img src="png/contf3.png" alt="Sample contf3">
-</div>
-<hr>
-<a name="contf_005fxyz-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#contv-sample" accesskey="n" rel="next">contv sample</a>, Previous: <a href="#contf3-sample" accesskey="p" rel="prev">contf3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-contf_005fxyz"></a>
-<h3 class="section">10.28 Sample ‘<samp>contf_xyz</samp>’</h3>
-
-
-<p>Functions <a href="#contfz">contfz</a>, <a href="#contfy">contfy</a>, <a href="#contfx">contfx</a>, draw filled contours on plane perpendicular to corresponding axis. One of possible application is drawing projections of 3D field.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'ContF[XYZ] sample':rotate 50 60:box
-contfx {sum c 'x'} '' -1:contfy {sum c 'y'} '' 1:contfz {sum c 'z'} '' -1
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_contf_xyz(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) gr->Title("ContF[XYZ] sample");
- gr->Rotate(50,60); gr->Box(); gr->ContFX(c.Sum("x"),"",-1);
- gr->ContFY(c.Sum("y"),"",1); gr->ContFZ(c.Sum("z"),"",-1);
-}
-</pre><div align="center"><img src="png/contf_xyz.png" alt="Sample contf_xyz">
-</div>
-<hr>
-<a name="contv-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#correl-sample" accesskey="n" rel="next">correl sample</a>, Previous: <a href="#contf_005fxyz-sample" accesskey="p" rel="prev">contf_xyz sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-contv"></a>
-<h3 class="section">10.29 Sample ‘<samp>contv</samp>’</h3>
-
-
-<p>Function <a href="#contv">contv</a> draw vertical cylinders (belts) at contour lines.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-list v -0.5 -0.15 0 0.15 0.5
-subplot 2 2 0:title 'ContV plot (default)':rotate 50 60:box:contv a
-subplot 2 2 1:title 'manual levels':rotate 50 60:box:contv v a
-subplot 2 2 2:title '"\_" style':rotate 50 60:box:contv a '_'
-subplot 2 2 3:title 'ContV and ContF':rotate 50 60:light on:box
-contv a:contf a:cont a 'k'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_contv(mglGraph *gr)
-{
- mglData a,v(5); mgls_prepare2d(&a); v.a[0]=-0.5;
- v.a[1]=-0.15; v.a[2]=0; v.a[3]=0.15; v.a[4]=0.5;
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("ContV plot (default)"); }
- gr->Rotate(50,60); gr->Box(); gr->ContV(a);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("manual levels");
- gr->Rotate(50,60); gr->Box(); gr->ContV(v,a);
- gr->SubPlot(2,2,2); gr->Title("'\\_' style");
- gr->Rotate(50,60); gr->Box(); gr->ContV(a,"_");
- gr->SubPlot(2,2,3); gr->Title("ContV and ContF");
- gr->Rotate(50,60); gr->Box(); gr->Light(true);
- gr->ContV(a); gr->ContF(a); gr->Cont(a,"k");
-}
-</pre><div align="center"><img src="png/contv.png" alt="Sample contv">
-</div>
-<hr>
-<a name="correl-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#curvcoor-sample" accesskey="n" rel="next">curvcoor sample</a>, Previous: <a href="#contv-sample" accesskey="p" rel="prev">contv sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-correl"></a>
-<h3 class="section">10.30 Sample ‘<samp>correl</samp>’</h3>
-
-
-<p>Test of correlation function (<a href="#correl">correl</a>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 100 'exp(-10*x^2)'
-new b 100 'exp(-10*(x+0.5)^2)'
-yrange 0 1
-subplot 1 2 0 '_':title 'Input fields'
-plot a:plot b:box:axis
-correl r a b 'x'
-norm r 0 1:swap r 'x' # make it human readable
-subplot 1 2 1 '_':title 'Correlation of a and b'
-plot r 'r':axis:box
-line 0.5 0 0.5 1 'B|'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_correl(mglGraph *gr)
-{
- mglData a(100),b(100);
- gr->Fill(a,"exp(-10*x^2)"); gr->Fill(b,"exp(-10*(x+0.5)^2)");
- gr->SetRange('y',0,1);
- gr->SubPlot(1,2,0,"_"); gr->Title("Input fields");
- gr->Plot(a); gr->Plot(b); gr->Axis(); gr->Box();
- mglData r = a.Correl(b,"x");
- r.Norm(0,1); r.Swap("x"); // make it human readable
- gr->SubPlot(1,2,1,"_"); gr->Title("Correlation of a and b");
- gr->Plot(r,"r"); gr->Axis(); gr->Box();
- gr->Line(mglPoint(0.5,0),mglPoint(0.5,1),"B|");
-}
-</pre><div align="center"><img src="png/correl.png" alt="Sample correl">
-</div>
-<hr>
-<a name="curvcoor-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cut-sample" accesskey="n" rel="next">cut sample</a>, Previous: <a href="#correl-sample" accesskey="p" rel="prev">correl sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-curvcoor"></a>
-<h3 class="section">10.31 Sample ‘<samp>curvcoor</samp>’</h3>
-
-
-<p>Some common curvilinear coordinates.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">origin -1 1 -1
-subplot 2 2 0:title 'Cartesian':rotate 50 60:fplot '2*t-1' '0.5' '0' '2r':axis:grid
-axis 'y*sin(pi*x)' 'y*cos(pi*x)' '':subplot 2 2 1:title 'Cylindrical':rotate 50 60:fplot '2*t-1' '0.5' '0' '2r':axis:grid
-axis '2*y*x' 'y*y - x*x' '':subplot 2 2 2:title 'Parabolic':rotate 50 60:fplot '2*t-1' '0.5' '0' '2r':axis:grid
-axis 'y*sin(pi*x)' 'y*cos(pi*x)' 'x+z':subplot 2 2 3:title 'Spiral':rotate 50 60:fplot '2*t-1' '0.5' '0' '2r':axis:grid
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_curvcoor(mglGraph *gr) // curvilinear coordinates
-{
- gr->SetOrigin(-1,1,-1);
-
- gr->SubPlot(2,2,0); gr->Title("Cartesian"); gr->Rotate(50,60);
- gr->FPlot("2*t-1","0.5","0","r2");
- gr->Axis(); gr->Grid();
-
- gr->SetFunc("y*sin(pi*x)","y*cos(pi*x)",0);
- gr->SubPlot(2,2,1); gr->Title("Cylindrical"); gr->Rotate(50,60);
- gr->FPlot("2*t-1","0.5","0","r2");
- gr->Axis(); gr->Grid();
-
- gr->SetFunc("2*y*x","y*y - x*x",0);
- gr->SubPlot(2,2,2); gr->Title("Parabolic"); gr->Rotate(50,60);
- gr->FPlot("2*t-1","0.5","0","r2");
- gr->Axis(); gr->Grid();
-
- gr->SetFunc("y*sin(pi*x)","y*cos(pi*x)","x+z");
- gr->SubPlot(2,2,3); gr->Title("Spiral"); gr->Rotate(50,60);
- gr->FPlot("2*t-1","0.5","0","r2");
- gr->Axis(); gr->Grid();
- gr->SetFunc(0,0,0); // set to default Cartesian
-}
-</pre><div align="center"><img src="png/curvcoor.png" alt="Sample curvcoor">
-</div>
-<hr>
-<a name="cut-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dat_005fdiff-sample" accesskey="n" rel="next">dat_diff sample</a>, Previous: <a href="#curvcoor-sample" accesskey="p" rel="prev">curvcoor sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cut"></a>
-<h3 class="section">10.32 Sample ‘<samp>cut</samp>’</h3>
-
-
-<p>Example of point cutting (<a href="#cut">cut</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-call 'prepare3d'
-subplot 2 2 0:title 'Cut on (default)':rotate 50 60:light on:box:surf a; zrange -1 0.5
-subplot 2 2 1:title 'Cut off':rotate 50 60:box:surf a; zrange -1 0.5; cut off
-subplot 2 2 2:title 'Cut in box':rotate 50 60:box:alpha on
-cut 0 -1 -1 1 0 1.1:surf3 c
-cut 0 0 0 0 0 0 # restore back
-subplot 2 2 3:title 'Cut by formula':rotate 50 60:box
-cut '(z>(x+0.5*y-1)^2-1) & (z>(x-0.5*y-1)^2-1)':surf3 c
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_cut(mglGraph *gr) // cutting
-{
- mglData a,c,v(1); mgls_prepare2d(&a); mgls_prepare3d(&c); v.a[0]=0.5;
- gr->SubPlot(2,2,0); gr->Title("Cut on (default)"); gr->Rotate(50,60); gr->Light(true);
- gr->Box(); gr->Surf(a,"","zrange -1 0.5");
- gr->SubPlot(2,2,1); gr->Title("Cut off"); gr->Rotate(50,60);
- gr->Box(); gr->Surf(a,"","zrange -1 0.5; cut off");
- gr->SubPlot(2,2,2); gr->Title("Cut in box"); gr->Rotate(50,60);
- gr->SetCutBox(mglPoint(0,-1,-1), mglPoint(1,0,1.1));
- gr->Alpha(true); gr->Box(); gr->Surf3(c);
- gr->SetCutBox(mglPoint(0), mglPoint(0)); // switch it off
- gr->SubPlot(2,2,3); gr->Title("Cut by formula"); gr->Rotate(50,60);
- gr->CutOff("(z>(x+0.5*y-1)^2-1) & (z>(x-0.5*y-1)^2-1)");
- gr->Box(); gr->Surf3(c); gr->CutOff(""); // switch it off
-}
-</pre><div align="center"><img src="png/cut.png" alt="Sample cut">
-</div>
-<hr>
-<a name="dat_005fdiff-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dat_005fextra-sample" accesskey="n" rel="next">dat_extra sample</a>, Previous: <a href="#cut-sample" accesskey="p" rel="prev">cut sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dat_005fdiff"></a>
-<h3 class="section">10.33 Sample ‘<samp>dat_diff</samp>’</h3>
-
-
-<p>Example of <a href="#diff">diff</a> and <a href="#integrate">integrate</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">ranges 0 1 0 1 0 1:new a 30 40 'x*y'
-subplot 2 2 0:title 'a(x,y)':rotate 60 40:surf a:box
-subplot 2 2 1:title 'da/dx':rotate 60 40:diff a 'x':surf a:box
-subplot 2 2 2:title '\int da/dx dxdy':rotate 60 40:integrate a 'xy':surf a:box
-subplot 2 2 3:title '\int {d^2}a/dxdy dx':rotate 60 40:diff2 a 'y':surf a:box
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_dat_diff(mglGraph *gr) // differentiate
-{
- gr->SetRanges(0,1,0,1,0,1);
- mglData a(30,40); a.Modify("x*y");
- gr->SubPlot(2,2,0); gr->Title("a(x,y)"); gr->Rotate(60,40);
- gr->Surf(a); gr->Box();
- gr->SubPlot(2,2,1); gr->Title("da/dx"); gr->Rotate(60,40);
- a.Diff("x"); gr->Surf(a); gr->Box();
- gr->SubPlot(2,2,2); gr->Title("\\int da/dx dxdy"); gr->Rotate(60,40);
- a.Integral("xy"); gr->Surf(a); gr->Box();
- gr->SubPlot(2,2,3); gr->Title("\\int {d^2}a/dxdy dx"); gr->Rotate(60,40);
- a.Diff2("y"); gr->Surf(a); gr->Box();
-}
-</pre><div align="center"><img src="png/dat_diff.png" alt="Sample dat_diff">
-</div>
-<hr>
-<a name="dat_005fextra-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#data1-sample" accesskey="n" rel="next">data1 sample</a>, Previous: <a href="#dat_005fdiff-sample" accesskey="p" rel="prev">dat_diff sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dat_005fextra"></a>
-<h3 class="section">10.34 Sample ‘<samp>dat_extra</samp>’</h3>
-
-
-<p>Example of <a href="#envelop">envelop</a>, <a href="#sew">sew</a>, <a href="#smooth">smooth</a> and <a href="#resize">resize</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0 '':title 'Envelop sample':new d1 1000 'exp(-8*x^2)*sin(10*pi*x)'
-axis:plot d1 'b':envelop d1 'x':plot d1 'r'
-subplot 2 2 1 '':title 'Smooth sample':ranges 0 1 0 1
-new y0 30 '0.4*sin(pi*x) + 0.3*cos(1.5*pi*x) - 0.4*sin(2*pi*x)+0.5*rnd'
-copy y1 y0:smooth y1 'x3':plot y1 'r';legend '"3" style'
-copy y2 y0:smooth y2 'x5':plot y2 'g';legend '"5" style'
-copy y3 y0:smooth y3 'x':plot y3 'b';legend 'default'
-plot y0 '{m7}:s';legend 'none'
-legend:box
-subplot 2 2 2:title 'Sew sample':rotate 50 60:light on:alpha on
-new d2 100 100 'mod((y^2-(1-x)^2)/2,0.1)'
-box:surf d2 'b':sew d2 'xy' 0.1:surf d2 'r'
-subplot 2 2 3:title 'Resize sample (interpolation)'
-new x0 10 'rnd':new v0 10 'rnd'
-resize x1 x0 100:resize v1 v0 100
-plot x0 v0 'b+ ':plot x1 v1 'r-':label x0 v0 '%n'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_dat_extra(mglGraph *gr) // differentiate
-{
- gr->SubPlot(2,2,0,""); gr->Title("Envelop sample");
- mglData d1(1000); gr->Fill(d1,"exp(-8*x^2)*sin(10*pi*x)");
- gr->Axis(); gr->Plot(d1, "b");
- d1.Envelop('x'); gr->Plot(d1, "r");
-
- gr->SubPlot(2,2,1,""); gr->Title("Smooth sample");
- mglData y0(30),y1,y2,y3;
- gr->SetRanges(0,1,0,1);
- gr->Fill(y0, "0.4*sin(pi*x) + 0.3*cos(1.5*pi*x) - 0.4*sin(2*pi*x)+0.5*rnd");
-
- y1=y0; y1.Smooth("x3");
- y2=y0; y2.Smooth("x5");
- y3=y0; y3.Smooth("x");
-
- gr->Plot(y0,"{m7}:s", "legend 'none'"); //gr->AddLegend("none","k");
- gr->Plot(y1,"r", "legend ''3' style'");
- gr->Plot(y2,"g", "legend ''5' style'");
- gr->Plot(y3,"b", "legend 'default'");
- gr->Legend(); gr->Box();
-
- gr->SubPlot(2,2,2); gr->Title("Sew sample");
- mglData d2(100, 100); gr->Fill(d2, "mod((y^2-(1-x)^2)/2,0.1)");
- gr->Rotate(50, 60); gr->Light(true); gr->Alpha(true);
- gr->Box(); gr->Surf(d2, "b");
- d2.Sew("xy", 0.1); gr->Surf(d2, "r");
-
- gr->SubPlot(2,2,3); gr->Title("Resize sample (interpolation)");
- mglData x0(10), v0(10), x1, v1;
- gr->Fill(x0,"rnd"); gr->Fill(v0,"rnd");
- x1 = x0.Resize(100); v1 = v0.Resize(100);
- gr->Plot(x0,v0,"b+ "); gr->Plot(x1,v1,"r-");
- gr->Label(x0,v0,"%n");
-}
-</pre><div align="center"><img src="png/dat_extra.png" alt="Sample dat_extra">
-</div>
-<hr>
-<a name="data1-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#data2-sample" accesskey="n" rel="next">data2 sample</a>, Previous: <a href="#dat_005fextra-sample" accesskey="p" rel="prev">dat_extra sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-data1"></a>
-<h3 class="section">10.35 Sample ‘<samp>data1</samp>’</h3>
-
-
-
-
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 40 50 60 'exp(-x^2-4*y^2-16*z^2)'
-light on:alpha on
-copy b a:diff b 'x':subplot 5 3 0:call 'splot'
-copy b a:diff2 b 'x':subplot 5 3 1:call 'splot'
-copy b a:cumsum b 'x':subplot 5 3 2:call 'splot'
-copy b a:integrate b 'x':subplot 5 3 3:call 'splot'
-mirror b 'x':subplot 5 3 4:call 'splot'
-copy b a:diff b 'y':subplot 5 3 5:call 'splot'
-copy b a:diff2 b 'y':subplot 5 3 6:call 'splot'
-copy b a:cumsum b 'y':subplot 5 3 7:call 'splot'
-copy b a:integrate b 'y':subplot 5 3 8:call 'splot'
-mirror b 'y':subplot 5 3 9:call 'splot'
-copy b a:diff b 'z':subplot 5 3 10:call 'splot'
-copy b a:diff2 b 'z':subplot 5 3 11:call 'splot'
-copy b a:cumsum b 'z':subplot 5 3 12:call 'splot'
-copy b a:integrate b 'z':subplot 5 3 13:call 'splot'
-mirror b 'z':subplot 5 3 14:call 'splot'
-stop
-func splot 0
-title 'max=',b.max:norm b -1 1 on:rotate 70 60:box:surf3 b
-return
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_data1(mglGraph *gr) // basic data operations
-{
- mglData a(40,50,60),b; gr->Fill(a,"exp(-x^2-4*y^2-16*z^2)");
- gr->Light(true); gr->Alpha(true);
- b.Set(a); b.Diff("x"); gr->SubPlot(5,3,0); splot1(gr,b);
- b.Set(a); b.Diff2("x"); gr->SubPlot(5,3,1); splot1(gr,b);
- b.Set(a); b.CumSum("x"); gr->SubPlot(5,3,2); splot1(gr,b);
- b.Set(a); b.Integral("x");gr->SubPlot(5,3,3); splot1(gr,b);
- b.Mirror("x"); gr->SubPlot(5,3,4); splot1(gr,b);
- b.Set(a); b.Diff("y"); gr->SubPlot(5,3,5); splot1(gr,b);
- b.Set(a); b.Diff2("y"); gr->SubPlot(5,3,6); splot1(gr,b);
- b.Set(a); b.CumSum("y"); gr->SubPlot(5,3,7); splot1(gr,b);
- b.Set(a); b.Integral("y");gr->SubPlot(5,3,8); splot1(gr,b);
- b.Mirror("y"); gr->SubPlot(5,3,9); splot1(gr,b);
- b.Set(a); b.Diff("z"); gr->SubPlot(5,3,10);splot1(gr,b);
- b.Set(a); b.Diff2("z"); gr->SubPlot(5,3,11);splot1(gr,b);
- b.Set(a); b.CumSum("z"); gr->SubPlot(5,3,12);splot1(gr,b);
- b.Set(a); b.Integral("z");gr->SubPlot(5,3,13);splot1(gr,b);
- b.Mirror("z"); gr->SubPlot(5,3,14);splot1(gr,b);
-}
-</pre><div align="center"><img src="png/data1.png" alt="Sample data1">
-</div>
-<hr>
-<a name="data2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dens-sample" accesskey="n" rel="next">dens sample</a>, Previous: <a href="#data1-sample" accesskey="p" rel="prev">data1 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-data2"></a>
-<h3 class="section">10.36 Sample ‘<samp>data2</samp>’</h3>
-
-
-
-
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 40 50 60 'exp(-x^2-4*y^2-16*z^2)'
-light on:alpha on
-copy b a:sinfft b 'x':subplot 5 3 0:call 'splot'
-copy b a:cosfft b 'x':subplot 5 3 1:call 'splot'
-copy b a:hankel b 'x':subplot 5 3 2:call 'splot'
-copy b a:swap b 'x':subplot 5 3 3:call 'splot'
-copy b a:smooth b 'x':subplot 5 3 4:call 'splot'
-copy b a:sinfft b 'y':subplot 5 3 5:call 'splot'
-copy b a:cosfft b 'y':subplot 5 3 6:call 'splot'
-copy b a:hankel b 'y':subplot 5 3 7:call 'splot'
-copy b a:swap b 'y':subplot 5 3 8:call 'splot'
-copy b a:smooth b 'y':subplot 5 3 9:call 'splot'
-copy b a:sinfft b 'z':subplot 5 3 10:call 'splot'
-copy b a:cosfft b 'z':subplot 5 3 11:call 'splot'
-copy b a:hankel b 'z':subplot 5 3 12:call 'splot'
-copy b a:swap b 'z':subplot 5 3 13:call 'splot'
-copy b a:smooth b 'z':subplot 5 3 14:call 'splot'
-stop
-func splot 0
-title 'max=',b.max:norm b -1 1 on:rotate 70 60:box
-surf3 b 0.5:surf3 b -0.5
-return
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_data2(mglGraph *gr) // data transforms
-{
- mglData a(40,50,60),b; gr->Fill(a,"exp(-x^2-4*y^2-16*z^2)");
- gr->Light(true); gr->Alpha(true);
- b.Set(a); b.SinFFT("x"); gr->SubPlot(5,3,0); splot2(gr,b);
- b.Set(a); b.CosFFT("x"); gr->SubPlot(5,3,1); splot2(gr,b);
- b.Set(a); b.Hankel("x"); gr->SubPlot(5,3,2); splot2(gr,b);
- b.Set(a); b.Swap("x"); gr->SubPlot(5,3,3); splot2(gr,b);
- b.Set(a); b.Smooth("x"); gr->SubPlot(5,3,4); splot2(gr,b);
- b.Set(a); b.SinFFT("y"); gr->SubPlot(5,3,5); splot2(gr,b);
- b.Set(a); b.CosFFT("y"); gr->SubPlot(5,3,6); splot2(gr,b);
- b.Set(a); b.Hankel("y"); gr->SubPlot(5,3,7); splot2(gr,b);
- b.Set(a); b.Swap("y"); gr->SubPlot(5,3,8); splot2(gr,b);
- b.Set(a); b.Smooth("y"); gr->SubPlot(5,3,9); splot2(gr,b);
- b.Set(a); b.SinFFT("z"); gr->SubPlot(5,3,10);splot2(gr,b);
- b.Set(a); b.CosFFT("z"); gr->SubPlot(5,3,11);splot2(gr,b);
- b.Set(a); b.Hankel("z"); gr->SubPlot(5,3,12);splot2(gr,b);
- b.Set(a); b.Swap("z"); gr->SubPlot(5,3,13);splot2(gr,b);
- b.Set(a); b.Smooth("z"); gr->SubPlot(5,3,14);splot2(gr,b);
-}
-</pre><div align="center"><img src="png/data2.png" alt="Sample data2">
-</div>
-<hr>
-<a name="dens-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dens3-sample" accesskey="n" rel="next">dens3 sample</a>, Previous: <a href="#data2-sample" accesskey="p" rel="prev">data2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dens"></a>
-<h3 class="section">10.37 Sample ‘<samp>dens</samp>’</h3>
-
-
-<p>Function <a href="#dens">dens</a> draw density plot (also known as color-map) for surface.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-new a1 30 40 3 '0.6*sin(2*pi*x+pi*(z+1)/2)*sin(3*pi*y+pi*z) + 0.4*cos(3*pi*(x*y)+pi*(z+1)^2/2)'
-subplot 2 2 0 '':title 'Dens plot (default)':box:dens a
-subplot 2 2 1:title '3d variant':rotate 50 60:box:dens a
-subplot 2 2 2 '':title '"\#" style; meshnum 10':box:dens a '#'; meshnum 10
-subplot 2 2 3:title 'several slices':rotate 50 60:box:dens a1
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_dens3(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) gr->Title("Dens3 sample");
- gr->Rotate(50,60); gr->Alpha(true); gr->SetAlphaDef(0.7);
- gr->SetOrigin(0,0,0); gr->Axis("_xyz"); gr->Box();
- gr->Dens3(c,"x"); gr->Dens3(c); gr->Dens3(c,"z");
-}
-</pre><div align="center"><img src="png/dens.png" alt="Sample dens">
-</div>
-<hr>
-<a name="dens3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dens_005fxyz-sample" accesskey="n" rel="next">dens_xyz sample</a>, Previous: <a href="#dens-sample" accesskey="p" rel="prev">dens sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dens3"></a>
-<h3 class="section">10.38 Sample ‘<samp>dens3</samp>’</h3>
-
-
-<p>Function <a href="#dens3">dens3</a> draw ordinary density plots but at slices of 3D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Dens3 sample':rotate 50 60:alpha on:alphadef 0.7
-origin 0 0 0:box:axis '_xyz'
-dens3 c 'x':dens3 c ':y':dens3 c 'z'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_dens3(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) gr->Title("Dens3 sample");
- gr->Rotate(50,60); gr->Alpha(true); gr->SetAlphaDef(0.7);
- gr->SetOrigin(0,0,0); gr->Axis("_xyz"); gr->Box();
- gr->Dens3(c,"x"); gr->Dens3(c); gr->Dens3(c,"z");
-}
-</pre><div align="center"><img src="png/dens3.png" alt="Sample dens3">
-</div>
-<hr>
-<a name="dens_005fxyz-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#detect-sample" accesskey="n" rel="next">detect sample</a>, Previous: <a href="#dens3-sample" accesskey="p" rel="prev">dens3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dens_005fxyz"></a>
-<h3 class="section">10.39 Sample ‘<samp>dens_xyz</samp>’</h3>
-
-
-<p>Functions <a href="#densz">densz</a>, <a href="#densy">densy</a>, <a href="#densx">densx</a> draw density plot on plane perpendicular to corresponding axis. One of possible application is drawing projections of 3D field.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Dens[XYZ] sample':rotate 50 60:box
-densx {sum c 'x'} '' -1:densy {sum c 'y'} '' 1:densz {sum c 'z'} '' -1
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_dens_xyz(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) gr->Title("Dens[XYZ] sample");
- gr->Rotate(50,60); gr->Box(); gr->DensX(c.Sum("x"),0,-1);
- gr->DensY(c.Sum("y"),0,1); gr->DensZ(c.Sum("z"),0,-1);
-}
-</pre><div align="center"><img src="png/dens_xyz.png" alt="Sample dens_xyz">
-</div>
-<hr>
-<a name="detect-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dew-sample" accesskey="n" rel="next">dew sample</a>, Previous: <a href="#dens_005fxyz-sample" accesskey="p" rel="prev">dens_xyz sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-detect"></a>
-<h3 class="section">10.40 Sample ‘<samp>detect</samp>’</h3>
-
-
-<p>Example of curve <a href="#detect">detect</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '':title 'Detect sample'
-new a 200 100 'exp(-30*(y-0.5*sin(pi*x))^2-rnd/10)+exp(-30*(y+0.5*sin(pi*x))^2-rnd/10)+exp(-30*(x+y)^2-rnd/10)'
-ranges 0 a.nx 0 a.ny:box
-alpha on:crange a:dens a
-
-detect r a 0.1 5
-plot r(0) r(1) '.'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_detect(mglGraph *gr)
-{
- mglData a(200, 100);
- gr->Fill(a,"exp(-30*(y-0.5*sin(pi*x))^2-rnd/10)+exp(-30*(y+0.5*sin(pi*x))^2-rnd/10)+exp(-30*(x+y)^2-rnd/10)");
- gr->SubPlot(1,1,0,"");
- if(big!=3) gr->Title("Detect sample");
- gr->SetRanges(0,a.nx,0,a.ny); gr->SetRange('c',a);
- gr->Alpha(true); gr->Box(); gr->Dens(a);
- mglData r(a.Detect(0.1,5));
- gr->Plot(r.SubData(0), r.SubData(1), ".");
-}
-</pre><div align="center"><img src="png/detect.png" alt="Sample detect">
-</div>
-<hr>
-<a name="dew-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#diffract-sample" accesskey="n" rel="next">diffract sample</a>, Previous: <a href="#detect-sample" accesskey="p" rel="prev">detect sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dew"></a>
-<h3 class="section">10.41 Sample ‘<samp>dew</samp>’</h3>
-
-
-<p>Function <a href="#dew">dew</a> is similar to <a href="#vect">vect</a> but use drops instead of arrows.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2v'
-subplot 1 1 0 '':title 'Dew plot':light on:box:dew a b
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_dew(mglGraph *gr)
-{
- mglData a,b; mgls_prepare2v(&a,&b);
- if(big!=3) {gr->SubPlot(1,1,0,""); gr->Title("Dew plot");}
- gr->Box(); gr->Light(true); gr->Dew(a,b);
-}
-</pre><div align="center"><img src="png/dew.png" alt="Sample dew">
-</div>
-<hr>
-<a name="diffract-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dilate-sample" accesskey="n" rel="next">dilate sample</a>, Previous: <a href="#dew-sample" accesskey="p" rel="prev">dew sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-diffract"></a>
-<h3 class="section">10.42 Sample ‘<samp>diffract</samp>’</h3>
-
-
-
-
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">define n 32 #number of points
-define m 20 # number of iterations
-define dt 0.01 # time step
-new res n m+1
-ranges -1 1 0 m*dt 0 1
-
-#tridmat periodic variant
-new !a n 'i',dt*(n/2)^2/2
-copy !b !(1-2*a)
-
-new !u n 'exp(-6*x^2)'
-put res u all 0
-for $i 0 m
-tridmat u a b a u 'xdc'
-put res u all $i+1
-next
-subplot 2 2 0 '<_':title 'Tridmat, periodic b.c.'
-axis:box:dens res
-
-#fourier variant
-new k n:fillsample k 'xk'
-copy !e !exp(-i1*dt*k^2)
-
-new !u n 'exp(-6*x^2)'
-put res u all 0
-for $i 0 m
-fourier u 'x'
-multo u e
-fourier u 'ix'
-put res u all $i+1
-next
-subplot 2 2 1 '<_':title 'Fourier method'
-axis:box:dens res
-
-#tridmat zero variant
-new !u n 'exp(-6*x^2)'
-put res u all 0
-for $i 0 m
-tridmat u a b a u 'xd'
-put res u all $i+1
-next
-subplot 2 2 2 '<_':title 'Tridmat, zero b.c.'
-axis:box:dens res
-
-#diffract exp variant
-new !u n 'exp(-6*x^2)'
-define q dt*(n/2)^2/8 # need q<0.4 !!!
-put res u all 0
-for $i 0 m
-for $j 1 8 # due to smaller dt
-diffract u 'xe' q
-next
-put res u all $i+1
-next
-subplot 2 2 3 '<_':title 'Diffract, exp b.c.'
-axis:box:dens res
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_diffract(mglGraph *gr)
-{
- long n=32; // number of points
- long m=20; // number of iterations
- double dt=0.01; // time step
- mglData res(n,m+1);
- gr->SetRanges(-1,1, 0,m*dt, 0,1);
-
- // tridmat periodic variant
- mglDataC a(n), b(n); a = dual(0,dt*n*n/8);
- for(long i=0;i<n;i++) b.a[i] = mreal(1)-mreal(2)*a.a[i];
- mglDataC u(n); gr->Fill(u,"exp(-6*x^2)"); res.Put(u,-1,0);
- for(long i=0;i<m;i++)
- {
- u = mglTridMatC(a,b,a,u,"xdc");
- res.Put(u,-1,i+1);
- }
- gr->SubPlot(2,2,0,"<_"); gr->Title("Tridmat, periodic b.c.");
- gr->Axis(); gr->Box(); gr->Dens(res);
-
- // fourier variant
- mglData k(n); k.FillSample("xk");
- mglDataC e(n); for(long i=0;i<n;i++) e.a[i] = exp(-dual(0,dt*k.a[i]*k.a[i]));
- gr->Fill(u,"exp(-6*x^2)"); res.Put(u,-1,0);
- for(long i=0;i<m;i++)
- {
- u.FFT("x"); u *= e; u.FFT("ix");
- res.Put(u,-1,i+1);
- }
- gr->SubPlot(2,2,1,"<_"); gr->Title("Fourier method");
- gr->Axis(); gr->Box(); gr->Dens(res);
-
- // tridmat zero variant
- gr->Fill(u,"exp(-6*x^2)"); res.Put(u,-1,0);
- for(long i=0;i<m;i++)
- {
- u = mglTridMatC(a,b,a,u,"xd");
- res.Put(u,-1,i+1);
- }
- gr->SubPlot(2,2,2,"<_"); gr->Title("Tridmat, zero b.c.");
- gr->Axis(); gr->Box(); gr->Dens(res);
-
- // diffract exp variant
- gr->Fill(u,"exp(-6*x^2)"); res.Put(u,-1,0);
- double q=dt*n*n/4/8; // NOTE: need q<0.4 !!!
- for(long i=0;i<m;i++)
- {
- for(long j=0;j<8;j++) // due to smaller dt
- u.Diffraction("xe",q);
- res.Put(u,-1,i+1);
- }
- gr->SubPlot(2,2,3,"<_"); gr->Title("Diffract, exp b.c.");
- gr->Axis(); gr->Box(); gr->Dens(res);
-}
-</pre><div align="center"><img src="png/diffract.png" alt="Sample diffract">
-</div>
-<hr>
-<a name="dilate-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dots-sample" accesskey="n" rel="next">dots sample</a>, Previous: <a href="#diffract-sample" accesskey="p" rel="prev">diffract sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dilate"></a>
-<h3 class="section">10.43 Sample ‘<samp>dilate</samp>’</h3>
-
-
-<p>Example of <a href="#dilate">dilate</a> and <a href="#erode">erode</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0:title 'Dilate&Erode 1D sample'
-new y 11:put y 1 5
-ranges 0 10 0 1:axis:box
-plot y 'b*'
-dilate y 0.5 2
-plot y 'rs'
-erode y 0.5 1
-plot y 'g#o'
-
-subplot 2 2 1:title 'Dilate&Erode 2D sample':rotate 40 60
-ranges 0 10 0 10 0 3
-axis:box
-new z 11 11:put z 3 5 5
-boxs z 'b':boxs z 'k#'
-dilate z 1 2
-boxs z 'r':boxs z 'k#'
-erode z 1 1
-boxs 2*z 'g':boxs 2*z 'k#'
-
-subplot 2 2 2
-text 0.5 0.7 'initial' 'ba';size -2
-text 0.5 0.5 'dilate=2' 'ra';size -2
-text 0.5 0.3 'erode=1' 'ga';size -2
-
-subplot 2 2 3:title 'Dilate&Erode 3D sample'
-rotate 60 50:light on:alpha on
-ranges 0 10 0 10 0 10:crange 0 3
-axis:box
-new a 11 11 11:put a 3 5 5 5
-surf3a a a 1.5 'b'
-dilate a 1 2
-surf3a a a 0.5 'r'
-erode a 1 1
-surf3a 2*a 2*a 1 'g'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_dilate(mglGraph *gr)
-{
- mglData y(11), z(11,11), a(11,11,11);
- y.a[5]=1; z.a[5+11*5]=a.a[5+11*(5+11*5)] = 3;
-
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("Dilate&Erode 1D sample"); }
- else gr->SubPlot(1,1,0,"");
- gr->SetRanges(0,10,0,1); gr->Axis(); gr->Box(); gr->Plot(y,"b*");
- y.Dilate(1,2); gr->Plot(y,"rs");
- y.Erode(1,1); gr->Plot(y,"g#o");
- if(big==3) return;
-
- gr->SubPlot(2,2,1); gr->Title("Dilate&Erode 2D sample");
- gr->Rotate(40,60); gr->SetRanges(0,10,0,10,0,3);
- gr->Axis(); gr->Box(); gr->Boxs(z,"b"); gr->Boxs(z,"k#");
- z.Dilate(1,2); gr->Boxs(z,"r"); gr->Boxs(z,"k#");
- z.Erode(1,1); z*=2; gr->Boxs(z,"g"); gr->Boxs(z,"k#");
-
- gr->SubPlot(2,2,2);
- gr->Puts(0.5,0.7,"initial","ba",-2);
- gr->Puts(0.5,0.5,"dilate=2","ra",-2);
- gr->Puts(0.5,0.3,"erode=1","ga",-2);
-
- gr->SubPlot(2,2,3); gr->Title("Dilate&Erode 3D sample");
- gr->Rotate(60,50); gr->Alpha(true); gr->Light(true);
- gr->SetRanges(0,10,0,10,0,10); gr->SetRange('c',0,3);
- gr->Axis(); gr->Box(); gr->Surf3A(1.5,a,a,"b");
- a.Dilate(1,2); gr->Surf3A(0.5,a,a,"r");
- a.Erode(1,1); a*=2; gr->Surf3A(1,a,a,"g");
-}
-</pre><div align="center"><img src="png/dilate.png" alt="Sample dilate">
-</div>
-<hr>
-<a name="dots-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#earth-sample" accesskey="n" rel="next">earth sample</a>, Previous: <a href="#dilate-sample" accesskey="p" rel="prev">dilate sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dots"></a>
-<h3 class="section">10.44 Sample ‘<samp>dots</samp>’</h3>
-
-
-<p>Function <a href="#dots">dots</a> is another way to draw irregular points. <code>Dots</code> use color scheme for coloring (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new t 2000 'pi*(rnd-0.5)':new f 2000 '2*pi*rnd'
-copy x 0.9*cos(t)*cos(f):copy y 0.9*cos(t)*sin(f):copy z 0.6*sin(t):copy c cos(2*t)
-subplot 2 2 0:title 'Dots sample':rotate 50 60
-box:dots x y z
-alpha on
-subplot 2 2 1:title 'add transparency':rotate 50 60
-box:dots x y z c
-subplot 2 2 2:title 'add colorings':rotate 50 60
-box:dots x y z x c
-subplot 2 2 3:title 'Only coloring':rotate 50 60
-box:tens x y z x ' .'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_dots(mglGraph *gr)
-{
- int i, n=1000;
- mglData x(n),y(n),z(n),c(n);
- for(i=0;i<n;i++)
- {
- double t=M_PI*(mgl_rnd()-0.5), f=2*M_PI*mgl_rnd();
- x.a[i] = 0.9*cos(t)*cos(f);
- y.a[i] = 0.9*cos(t)*sin(f);
- z.a[i] = 0.6*sin(t);
- c.a[i] = cos(2*t);
- }
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("Dots sample"); }
- gr->Rotate(50,60); gr->Box(); gr->Dots(x,y,z);
- if(big==3) return;
- gr->Alpha(true);
- gr->SubPlot(2,2,1); gr->Title("add transparency"); gr->Rotate(50,60); gr->Box(); gr->Dots(x,y,z,c);
- gr->SubPlot(2,2,2); gr->Title("add coloring"); gr->Rotate(50,60); gr->Box(); gr->Dots(x,y,z,x,c);
- gr->SubPlot(2,2,3); gr->Title("Only coloring"); gr->Rotate(50,60); gr->Box(); gr->Tens(x,y,z,x," .");
-}
-</pre><div align="center"><img src="png/dots.png" alt="Sample dots">
-</div>
-<hr>
-<a name="earth-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#error-sample" accesskey="n" rel="next">error sample</a>, Previous: <a href="#dots-sample" accesskey="p" rel="prev">dots sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-earth"></a>
-<h3 class="section">10.45 Sample ‘<samp>earth</samp>’</h3>
-
-
-<p>Example of Earth map by using <a href="#import">import</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">import dat 'Equirectangular-projection.jpg' 'BbGYw' -1 1
-subplot 1 1 0 '<>':title 'Earth in 3D':rotate 40 60
-copy phi dat 'pi*x':copy tet dat 'pi*y/2'
-copy x cos(tet)*cos(phi)
-copy y cos(tet)*sin(phi)
-copy z sin(tet)
-
-light on
-surfc x y z dat 'BbGYw'
-contp [-0.51,-0.51] x y z dat 'y'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_earth(mglGraph *gr)
-{
- mglData dat; dat.Import("Equirectangular-projection.jpg","BbGYw",-1,1);
- // Calc proper 3d coordinates from projection
- mglData phi(dat.nx,dat.ny); phi.Fill(-M_PI,M_PI);
- mglData tet(dat.nx,dat.ny); tet.Fill(-M_PI/2,M_PI/2,'y');
- mglData x(dat.nx,dat.ny), y(dat.nx,dat.ny), z(dat.nx,dat.ny);
-#pragma omp parallel for
- for(long i=0;i<dat.nx*dat.ny;i++)
- { x.a[i] = cos(tet.a[i])*cos(phi.a[i]);
- y.a[i] = cos(tet.a[i])*sin(phi.a[i]);
- z.a[i] = sin(tet.a[i]); }
-
- gr->SubPlot(1,1,0,"<>");
- if(big!=3) gr->Title("Earth in 3D");
- gr->Rotate(40,60); gr->Light(true);
- gr->SurfC(x,y,z,dat,"BbGYw");
- mglData vals(1); vals.a[0]=-0.51;
- gr->ContP(vals, x,y,z,dat,"y");
-}
-</pre><div align="center"><img src="png/earth.png" alt="Sample earth">
-</div>
-<hr>
-<a name="error-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#error2-sample" accesskey="n" rel="next">error2 sample</a>, Previous: <a href="#earth-sample" accesskey="p" rel="prev">earth sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-error"></a>
-<h3 class="section">10.46 Sample ‘<samp>error</samp>’</h3>
-
-
-<p>Function <a href="#error">error</a> draw error boxes around the points. You can draw default boxes or semi-transparent symbol (like marker, see <a href="#Line-styles">Line styles</a>). Also you can set individual color for each box. See also <a href="#error2-sample">error2 sample</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-new y 50 '0.7*sin(pi*x-pi) + 0.5*cos(3*pi*(x+1)/2) + 0.2*sin(pi*(x+1)/2)'
-new x0 10 'x + 0.1*rnd-0.05':new ex 10 '0.1':new ey 10 '0.2'
-new y0 10 '0.7*sin(pi*x-pi) + 0.5*cos(3*pi*(x+1)/2) + 0.2*sin(pi*(x+1)/2) + 0.2*rnd-0.1'
-subplot 2 2 0 '':title 'Error plot (default)':box:plot y:error x0 y0 ex ey 'k'
-subplot 2 2 1 '':title '"!" style; no e_x':box:plot y:error x0 y0 ey 'o!rgb'
-subplot 2 2 2 '':title '"\@" style':alpha on:box:plot y:error x0 y0 ex ey '@'; alpha 0.5
-subplot 2 2 3:title '3d variant':rotate 50 60:axis
-for $1 0 9
- errbox 2*rnd-1 2*rnd-1 2*rnd-1 0.2 0.2 0.2 'bo'
-next
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_error2(mglGraph *gr)
-{
- mglData x0(10), y0(10), ex(10), ey(10);
- for(int i=0;i<10;i++)
- { x0.a[i] = mgl_rnd(); y0.a[i] = mgl_rnd(); ey.a[i] = ex.a[i] = 0.1; }
- gr->SetRanges(0,1,0,1); gr->Alpha(true);
- gr->SubPlot(4,3,0,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#+@");
- gr->SubPlot(4,3,1,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#x@");
- gr->SubPlot(4,3,2,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#s@","alpha 0.5");
- gr->SubPlot(4,3,3,""); gr->Box(); gr->Error(x0,y0,ex,ey,"s@");
- gr->SubPlot(4,3,4,""); gr->Box(); gr->Error(x0,y0,ex,ey,"d@");
- gr->SubPlot(4,3,5,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#d@","alpha 0.5");
- gr->SubPlot(4,3,6,""); gr->Box(); gr->Error(x0,y0,ex,ey,"+@");
- gr->SubPlot(4,3,7,""); gr->Box(); gr->Error(x0,y0,ex,ey,"x@");
- gr->SubPlot(4,3,8,""); gr->Box(); gr->Error(x0,y0,ex,ey,"o@");
- gr->SubPlot(4,3,9,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#o@","alpha 0.5");
- gr->SubPlot(4,3,10,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#.@");
- gr->SubPlot(4,3,11,""); gr->Box(); gr->Error(x0,y0,ex,ey);
-}
-</pre><div align="center"><img src="png/error.png" alt="Sample error">
-</div>
-<hr>
-<a name="error2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#export-sample" accesskey="n" rel="next">export sample</a>, Previous: <a href="#error-sample" accesskey="p" rel="prev">error sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-error2"></a>
-<h3 class="section">10.47 Sample ‘<samp>error2</samp>’</h3>
-
-
-<p>Example of <a href="#error">error</a> kinds.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x0 10 'rnd':new ex 10 '0.1'
-new y0 10 'rnd':new ey 10 '0.1'
-ranges 0 1 0 1
-subplot 4 3 0 '':box:error x0 y0 ex ey '#+@'
-subplot 4 3 1 '':box:error x0 y0 ex ey '#x@'
-subplot 4 3 2 '':box:error x0 y0 ex ey '#s@'; alpha 0.5
-subplot 4 3 3 '':box:error x0 y0 ex ey 's@'
-subplot 4 3 4 '':box:error x0 y0 ex ey 'd@'
-subplot 4 3 5 '':box:error x0 y0 ex ey '#d@'; alpha 0.5
-subplot 4 3 6 '':box:error x0 y0 ex ey '+@'
-subplot 4 3 7 '':box:error x0 y0 ex ey 'x@'
-subplot 4 3 8 '':box:error x0 y0 ex ey 'o@'
-subplot 4 3 9 '':box:error x0 y0 ex ey '#o@'; alpha 0.5
-subplot 4 3 10 '':box:error x0 y0 ex ey '#.@'
-subplot 4 3 11 '':box:error x0 y0 ex ey; alpha 0.5
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_error2(mglGraph *gr)
-{
- mglData x0(10), y0(10), ex(10), ey(10);
- for(int i=0;i<10;i++)
- { x0.a[i] = mgl_rnd(); y0.a[i] = mgl_rnd(); ey.a[i] = ex.a[i] = 0.1; }
- gr->SetRanges(0,1,0,1); gr->Alpha(true);
- gr->SubPlot(4,3,0,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#+@");
- gr->SubPlot(4,3,1,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#x@");
- gr->SubPlot(4,3,2,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#s@","alpha 0.5");
- gr->SubPlot(4,3,3,""); gr->Box(); gr->Error(x0,y0,ex,ey,"s@");
- gr->SubPlot(4,3,4,""); gr->Box(); gr->Error(x0,y0,ex,ey,"d@");
- gr->SubPlot(4,3,5,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#d@","alpha 0.5");
- gr->SubPlot(4,3,6,""); gr->Box(); gr->Error(x0,y0,ex,ey,"+@");
- gr->SubPlot(4,3,7,""); gr->Box(); gr->Error(x0,y0,ex,ey,"x@");
- gr->SubPlot(4,3,8,""); gr->Box(); gr->Error(x0,y0,ex,ey,"o@");
- gr->SubPlot(4,3,9,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#o@","alpha 0.5");
- gr->SubPlot(4,3,10,""); gr->Box(); gr->Error(x0,y0,ex,ey,"#.@");
- gr->SubPlot(4,3,11,""); gr->Box(); gr->Error(x0,y0,ex,ey);
-}
-</pre><div align="center"><img src="png/error2.png" alt="Sample error2">
-</div>
-<hr>
-<a name="export-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#fall-sample" accesskey="n" rel="next">fall sample</a>, Previous: <a href="#error2-sample" accesskey="p" rel="prev">error2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-export"></a>
-<h3 class="section">10.48 Sample ‘<samp>export</samp>’</h3>
-
-
-<p>Example of data <a href="#export">export</a> and <a href="#import">import</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 100 100 'x^2*y':new b 100 100
-export a 'test_data.png' 'BbcyrR' -1 1
-import b 'test_data.png' 'BbcyrR' -1 1
-subplot 2 1 0 '':title 'initial':box:dens a
-subplot 2 1 1 '':title 'imported':box:dens b
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_export(mglGraph *gr) // basic data operations
-{
- mglData a(100,100), b; gr->Fill(a,"x^2*y");
- a.Export("test_data.png","BbcyrR");
- b.Import("test_data.png","BbcyrR",-1,1);
- gr->SubPlot(2,1,0,""); gr->Title("initial"); gr->Box(); gr->Dens(a);
- gr->SubPlot(2,1,1,""); gr->Title("imported"); gr->Box(); gr->Dens(b);
-}
-</pre><div align="center"><img src="png/export.png" alt="Sample export">
-</div>
-<hr>
-<a name="fall-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#fexport-sample" accesskey="n" rel="next">fexport sample</a>, Previous: <a href="#export-sample" accesskey="p" rel="prev">export sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-fall"></a>
-<h3 class="section">10.49 Sample ‘<samp>fall</samp>’</h3>
-
-
-<p>Function <a href="#fall">fall</a> draw waterfall surface. You can use <a href="#meshnum">meshnum</a> for changing number of lines to be drawn. Also you can use ‘<samp>x</samp>’ style for drawing lines in other direction.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Fall plot':rotate 50 60:box:fall a
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_fall(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- if(big!=3) gr->Title("Fall plot");
- gr->Rotate(50,60); gr->Box(); gr->Fall(a);
-}
-</pre><div align="center"><img src="png/fall.png" alt="Sample fall">
-</div>
-<hr>
-<a name="fexport-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#fit-sample" accesskey="n" rel="next">fit sample</a>, Previous: <a href="#fall-sample" accesskey="p" rel="prev">fall sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-fexport"></a>
-<h3 class="section">10.50 Sample ‘<samp>fexport</samp>’</h3>
-
-
-<p>Example of <a href="#write">write</a> to different file formats.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-write 'fexport.jpg':#write 'fexport.png'
-write 'fexport.bmp':write 'fexport.tga'
-write 'fexport.eps':write 'fexport.svg'
-write 'fexport.gif':write 'fexport.xyz'
-write 'fexport.stl':write 'fexport.off'
-write 'fexport.tex':write 'fexport.obj'
-write 'fexport.prc':write 'fexport.json'
-write 'fexport.mgld'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_fexport(mglGraph *gr) // test file export
-{
- all_prims(gr);
- gr->WriteJPEG("fexport.jpg");
-// gr->WritePNG("fexport.png");
- gr->WriteBMP("fexport.bmp");
- gr->WriteTGA("fexport.tga");
- gr->WriteEPS("fexport.eps");
- gr->WriteSVG("fexport.svg");
- gr->WriteGIF("fexport.gif");
-
- gr->WriteXYZ("fexport.xyz");
- gr->WriteSTL("fexport.stl");
- gr->WriteOFF("fexport.off");
- gr->WriteTEX("fexport.tex");
- gr->WriteOBJ("fexport.obj");
- gr->WritePRC("fexport.prc");
- gr->WriteJSON("fexport.json");
-
- gr->ExportMGLD("fexport.mgld");
- gr->Clf();
- gr->ImportMGLD("fexport.mgld");
-}
-</pre><div align="center"><img src="png/fexport.png" alt="Sample fexport">
-</div>
-<hr>
-<a name="fit-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#flame2d-sample" accesskey="n" rel="next">flame2d sample</a>, Previous: <a href="#fexport-sample" accesskey="p" rel="prev">fexport sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-fit"></a>
-<h3 class="section">10.51 Sample ‘<samp>fit</samp>’</h3>
-
-
-<p>Example of nonlinear <a href="#fit">fit</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new dat 100 '0.4*rnd+0.1+sin(2*pi*x)'
-new in 100 '0.3+sin(2*pi*x)'
-list ini 1 1 3:fit res dat 'a+b*sin(c*x)' 'abc' ini
-title 'Fitting sample':yrange -2 2:box:axis:plot dat 'k. '
-plot res 'r':plot in 'b'
-text -0.9 -1.3 'fitted:' 'r:L'
-putsfit 0 -1.8 'y = ' 'r':text 0 2.2 'initial: y = 0.3+sin(2\pi x)' 'b'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_fit(mglGraph *gr) // nonlinear fitting
-{
- mglData dat(100), in(100), res;
- gr->Fill(dat,"0.4*rnd+0.1+sin(2*pi*x)");
- gr->Fill(in,"0.3+sin(2*pi*x)");
- double ini[3] = {1,1,3};
- mglData Ini(3,ini);
- res = gr->Fit(dat, "a+b*sin(c*x)", "abc", Ini);
- if(big!=3) gr->Title("Fitting sample");
- gr->SetRange('y',-2,2); gr->Box(); gr->Plot(dat, "k. ");
- gr->Axis(); gr->Plot(res, "r"); gr->Plot(in, "b");
- gr->Puts(mglPoint(-0.9, -1.3), "fitted:", "r:L");
- gr->PutsFit(mglPoint(0, -1.8), "y = ", "r");
- gr->Puts(mglPoint(0, 2.2), "initial: y = 0.3+sin(2\\pi x)", "b");
-// gr->SetRanges(mglPoint(-1,-1,-1),mglPoint(1,1,1)); gr->SetOrigin(0,0,0);
-}
-</pre><div align="center"><img src="png/fit.png" alt="Sample fit">
-</div>
-<hr>
-<a name="flame2d-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#flow-sample" accesskey="n" rel="next">flow sample</a>, Previous: <a href="#fit-sample" accesskey="p" rel="prev">fit sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-flame2d"></a>
-<h3 class="section">10.52 Sample ‘<samp>flame2d</samp>’</h3>
-
-
-<p>Function <a href="#flame2d">flame2d</a> generate points for flame fractals in 2d case.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">list A [0.33,0,0,0.33,0,0,0.2] [0.33,0,0,0.33,0.67,0,0.2] [0.33,0,0,0.33,0.33,0.33,0.2]\
- [0.33,0,0,0.33,0,0.67,0.2] [0.33,0,0,0.33,0.67,0.67,0.2]
-new B 2 3 A.ny '0.3'
-put B 3 0 0 -1
-put B 3 0 1 -1
-put B 3 0 2 -1
-flame2d fx fy A B 1000000
-subplot 1 1 0 '<_':title 'Flame2d sample'
-ranges fx fy:box:axis
-plot fx fy 'r#o ';size 0.05
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_flame2d(mglGraph *gr)
-{
- mglData A, B(2,3,5);
- A.SetList(35, 0.33,0.,0.,0.33,0.,0.,0.2, 0.33,0.,0.,0.33,0.67,0.,0.2, 0.33,0.,0.,0.33,0.33,0.33,0.2,
- 0.33,0.,0.,0.33,0.,0.67,0.2, 0.33,0.,0.,0.33,0.67,0.67,0.2);
- A.Rearrange(7);
- for(long i=0;i<2*3*5;i++) B.a[i] = 0.3;
- for(long i=0;i<5;i++) B.a[2*3*i] = B.a[2*3*i+1*2] = B.a[2*3*i+2*2] = 3;
- mglData f(mglFlame2d(A,B,1000000));
- gr->SubPlot(1,1,0,"<_");
- if(big!=3) gr->Title("Flame2d sample");
- gr->SetRanges(f.SubData(0), f.SubData(1));
- gr->Axis(); gr->Box();
- gr->Plot(f.SubData(0), f.SubData(1),"r#o ","size 0.05");
-}
-</pre><div align="center"><img src="png/flame2d.png" alt="Sample flame2d">
-</div>
-<hr>
-<a name="flow-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#flow3-sample" accesskey="n" rel="next">flow3 sample</a>, Previous: <a href="#flame2d-sample" accesskey="p" rel="prev">flame2d sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-flow"></a>
-<h3 class="section">10.53 Sample ‘<samp>flow</samp>’</h3>
-
-
-<p>Function <a href="#flow">flow</a> is another standard way to visualize vector fields – it draw lines (threads) which is tangent to local vector field direction. MathGL draw threads from edges of bounding box and from central slices. Sometimes it is not most appropriate variant – you may want to use <code>flowp</code> to specify manual position of threads. The color scheme is used for coloring (see <a href="#Color-scheme">Color scheme</a>). At this warm color corresponds to normal flow (like attractor), cold one corresponds to inverse flow (like source).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2v'
-call 'prepare3v'
-subplot 2 2 0 '':title 'Flow plot (default)':box:flow a b
-subplot 2 2 1 '':title '"v" style':box:flow a b 'v'
-subplot 2 2 2 '':title '"#" and "." styles':box:flow a b '#':flow a b '.2k'
-subplot 2 2 3:title '3d variant':rotate 50 60:box:flow ex ey ez
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_flow(mglGraph *gr)
-{
- mglData a,b; mgls_prepare2v(&a,&b);
- if(big!=3) {gr->SubPlot(2,2,0,""); gr->Title("Flow plot (default)");}
- gr->Box(); gr->Flow(a,b);
- if(big==3) return;
- gr->SubPlot(2,2,1,""); gr->Title("'v' style");
- gr->Box(); gr->Flow(a,b,"v");
- gr->SubPlot(2,2,2,""); gr->Title("'\\#' and '.' styles");
- gr->Box(); gr->Flow(a,b,"#"); gr->Flow(a,b,".2k");
- mglData ex,ey,ez; mgls_prepare3v(&ex,&ey,&ez);
- gr->SubPlot(2,2,3); gr->Title("3d variant"); gr->Rotate(50,60);
- gr->Box(); gr->Flow(ex,ey,ez);
-}
-</pre><div align="center"><img src="png/flow.png" alt="Sample flow">
-</div>
-<hr>
-<a name="flow3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#fog-sample" accesskey="n" rel="next">fog sample</a>, Previous: <a href="#flow-sample" accesskey="p" rel="prev">flow sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-flow3"></a>
-<h3 class="section">10.54 Sample ‘<samp>flow3</samp>’</h3>
-
-
-<p>Function <a href="#flow3">flow3</a> draw flow threads, which start from given plane.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3v'
-subplot 2 2 0:title 'Flow3 plot (default)':rotate 50 60:box
-flow3 ex ey ez
-subplot 2 2 1:title '"v" style, from boundary':rotate 50 60:box
-flow3 ex ey ez 'v' 0
-subplot 2 2 2:title '"t" style':rotate 50 60:box
-flow3 ex ey ez 't' 0
-subplot 2 2 3:title 'from \i z planes':rotate 50 60:box
-flow3 ex ey ez 'z' 0
-flow3 ex ey ez 'z' 9
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_flow3(mglGraph *gr)
-{
- mglData ex,ey,ez; mgls_prepare3v(&ex,&ey,&ez);
- if(big!=3) {gr->SubPlot(2,2,0); gr->Title("Flow3 plot (default)");}
- gr->Rotate(50,60); gr->Box(); gr->Flow3(ex,ey,ez);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("'v' style, from boundary");
- gr->Rotate(50,60); gr->Box(); gr->Flow3(ex,ey,ez,"v",0);
- gr->SubPlot(2,2,2); gr->Title("'t' style");
- gr->Rotate(50,60); gr->Box(); gr->Flow3(ex,ey,ez,"t",0);
- gr->SubPlot(2,2,3); gr->Title("from \\i z planes");
- gr->Rotate(50,60); gr->Box(); gr->Flow3(ex,ey,ez,"z",0); gr->Flow3(ex,ey,ez,"z",9);
-}
-</pre><div align="center"><img src="png/flow3.png" alt="Sample flow3">
-</div>
-<hr>
-<a name="fog-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#fonts-sample" accesskey="n" rel="next">fonts sample</a>, Previous: <a href="#flow3-sample" accesskey="p" rel="prev">flow3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-fog"></a>
-<h3 class="section">10.55 Sample ‘<samp>fog</samp>’</h3>
-
-
-<p>Example of <a href="#fog">fog</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Fog sample':rotate 50 60:light on:fog 1
-box:surf a:cont a 'y'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_fog(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- if(big!=3) gr->Title("Fog sample");
- gr->Light(true); gr->Rotate(50,60); gr->Fog(1); gr->Box();
- gr->Surf(a); gr->Cont(a,"y");
-}
-</pre><div align="center"><img src="png/fog.png" alt="Sample fog">
-</div>
-<hr>
-<a name="fonts-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#grad-sample" accesskey="n" rel="next">grad sample</a>, Previous: <a href="#fog-sample" accesskey="p" rel="prev">fog sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-fonts"></a>
-<h3 class="section">10.56 Sample ‘<samp>fonts</samp>’</h3>
-
-
-<p>Example of <a href="#font">font</a> typefaces.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">define d 0.25
-loadfont 'STIX':text 0 1.1 'default font (STIX)'
-loadfont 'adventor':text 0 1.1-d 'adventor font'
-loadfont 'bonum':text 0 1.1-2*d 'bonum font'
-loadfont 'chorus':text 0 1.1-3*d 'chorus font'
-loadfont 'cursor':text 0 1.1-4*d 'cursor font'
-loadfont 'heros':text 0 1.1-5*d 'heros font'
-loadfont 'heroscn':text 0 1.1-6*d 'heroscn font'
-loadfont 'pagella':text 0 1.1-7*d 'pagella font'
-loadfont 'schola':text 0 1.1-8*d 'schola font'
-loadfont 'termes':text 0 1.1-9*d 'termes font'
-loadfont ''
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_fonts(mglGraph *gr) // font typefaces
-{
- double h=1.1, d=0.25;
- gr->LoadFont("STIX"); gr->Puts(mglPoint(0,h), "default font (STIX)");
- gr->LoadFont("adventor"); gr->Puts(mglPoint(0,h-d), "adventor font");
- gr->LoadFont("bonum"); gr->Puts(mglPoint(0,h-2*d), "bonum font");
- gr->LoadFont("chorus"); gr->Puts(mglPoint(0,h-3*d), "chorus font");
- gr->LoadFont("cursor"); gr->Puts(mglPoint(0,h-4*d), "cursor font");
- gr->LoadFont("heros"); gr->Puts(mglPoint(0,h-5*d), "heros font");
- gr->LoadFont("heroscn"); gr->Puts(mglPoint(0,h-6*d), "heroscn font");
- gr->LoadFont("pagella"); gr->Puts(mglPoint(0,h-7*d), "pagella font");
- gr->LoadFont("schola"); gr->Puts(mglPoint(0,h-8*d), "schola font");
- gr->LoadFont("termes"); gr->Puts(mglPoint(0,h-9*d), "termes font");
- gr->LoadFont("");
-}
-</pre><div align="center"><img src="png/fonts.png" alt="Sample fonts">
-</div>
-<hr>
-<a name="grad-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#hist-sample" accesskey="n" rel="next">hist sample</a>, Previous: <a href="#fonts-sample" accesskey="p" rel="prev">fonts sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-grad"></a>
-<h3 class="section">10.57 Sample ‘<samp>grad</samp>’</h3>
-
-
-<p>Function <a href="#grad">grad</a> draw gradient lines for matrix.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-subplot 1 1 0 '':title 'Grad plot':box:grad a:dens a '{u8}w{q8}'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_grad(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- if(big!=3) {gr->SubPlot(1,1,0,""); gr->Title("Grad plot");}
- gr->Box(); gr->Grad(a); gr->Dens(a,"{u8}w{q8}");
-}
-</pre><div align="center"><img src="png/grad.png" alt="Sample grad">
-</div>
-<hr>
-<a name="hist-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ifs2d-sample" accesskey="n" rel="next">ifs2d sample</a>, Previous: <a href="#grad-sample" accesskey="p" rel="prev">grad sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-hist"></a>
-<h3 class="section">10.58 Sample ‘<samp>hist</samp>’</h3>
-
-
-<p>Example of <a href="#hist">hist</a> (histogram).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 10000 '2*rnd-1':new y 10000 '2*rnd-1':copy z exp(-6*(x^2+y^2))
-hist xx x z:norm xx 0 1:hist yy y z:norm yy 0 1
-multiplot 3 3 3 2 2 '':ranges -1 1 -1 1 0 1:box:dots x y z 'wyrRk'
-multiplot 3 3 0 2 1 '':ranges -1 1 0 1:box:bars xx
-multiplot 3 3 5 1 2 '':ranges 0 1 -1 1:box:barh yy
-subplot 3 3 2:text 0.5 0.5 'Hist and\n{}MultiPlot\n{}sample' 'a' -3
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_hist(mglGraph *gr)
-{
- mglData x(10000), y(10000), z(10000); gr->Fill(x,"2*rnd-1"); gr->Fill(y,"2*rnd-1"); gr->Fill(z,"exp(-6*(v^2+w^2))",x,y);
- mglData xx=gr->Hist(x,z), yy=gr->Hist(y,z); xx.Norm(0,1); yy.Norm(0,1);
- gr->MultiPlot(3,3,3,2,2,""); gr->SetRanges(-1,1,-1,1,0,1); gr->Box(); gr->Dots(x,y,z,"wyrRk");
- gr->MultiPlot(3,3,0,2,1,""); gr->SetRanges(-1,1,0,1); gr->Box(); gr->Bars(xx);
- gr->MultiPlot(3,3,5,1,2,""); gr->SetRanges(0,1,-1,1); gr->Box(); gr->Barh(yy);
- gr->SubPlot(3,3,2); gr->Puts(mglPoint(0.5,0.5),"Hist and\nMultiPlot\nsample","a",-3);
-}
-</pre><div align="center"><img src="png/hist.png" alt="Sample hist">
-</div>
-<hr>
-<a name="ifs2d-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ifs3d-sample" accesskey="n" rel="next">ifs3d sample</a>, Previous: <a href="#hist-sample" accesskey="p" rel="prev">hist sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ifs2d"></a>
-<h3 class="section">10.59 Sample ‘<samp>ifs2d</samp>’</h3>
-
-
-<p>Function <a href="#ifs2d">ifs2d</a> generate points for fractals using iterated function system in 2d case.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">list A [0.33,0,0,0.33,0,0,0.2] [0.33,0,0,0.33,0.67,0,0.2] [0.33,0,0,0.33,0.33,0.33,0.2]\
- [0.33,0,0,0.33,0,0.67,0.2] [0.33,0,0,0.33,0.67,0.67,0.2]
-ifs2d fx fy A 100000
-subplot 1 1 0 '<_':title 'IFS 2d sample'
-ranges fx fy:axis
-plot fx fy 'r#o ';size 0.05
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_ifs2d(mglGraph *gr)
-{
- mglData A;
- A.SetList(35, 0.33,0.,0.,0.33,0.,0.,0.2, 0.33,0.,0.,0.33,0.67,0.,0.2, 0.33,0.,0.,0.33,0.33,0.33,0.2, 0.33,0.,0.,0.33,0.,0.67,0.2, 0.33,0.,0.,0.33,0.67,0.67,0.2);
- A.Rearrange(7);
- mglData f(mglIFS2d(A,100000));
- gr->SubPlot(1,1,0,"<_");
- if(big!=3) gr->Title("IFS 2d sample");
- gr->SetRanges(f.SubData(0), f.SubData(1));
- gr->Axis(); gr->Plot(f.SubData(0), f.SubData(1),"r#o ","size 0.05");
-}
-</pre><div align="center"><img src="png/ifs2d.png" alt="Sample ifs2d">
-</div>
-<hr>
-<a name="ifs3d-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#indirect-sample" accesskey="n" rel="next">indirect sample</a>, Previous: <a href="#ifs2d-sample" accesskey="p" rel="prev">ifs2d sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ifs3d"></a>
-<h3 class="section">10.60 Sample ‘<samp>ifs3d</samp>’</h3>
-
-
-<p>Function <a href="#ifs3d">ifs3d</a> generate points for fractals using iterated function system in 3d case.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">list A [0,0,0,0,.18,0,0,0,0,0,0,0,.01] [.85,0,0,0,.85,.1,0,-0.1,0.85,0,1.6,0,.85]\
- [.2,-.2,0,.2,.2,0,0,0,0.3,0,0.8,0,.07] [-.2,.2,0,.2,.2,0,0,0,0.3,0,0.8,0,.07]
-ifs3d f A 100000
-title 'IFS 3d sample':rotate 50 60
-ranges f(0) f(1) f(2):axis:box
-dots f(0) f(1) f(2) 'G#o';size 0.05
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_ifs3d(mglGraph *gr)
-{
- mglData A;
- A.SetList(52, 0.,0.,0.,0.,.18,0.,0.,0.,0.,0.,0.,0.,.01, .85,0.,0.,0.,.85,.1,0.,-0.1,0.85,0.,1.6,0.,.85,
- .2,-.2,0.,.2,.2,0.,0.,0.,0.3,0.,0.8,0.,.07, -.2,.2,0.,.2,.2,0.,0.,0.,0.3,0.,0.8,0.,.07);
- A.Rearrange(13);
- mglData f(mglIFS3d(A,100000));
- if(big!=3) gr->Title("IFS 3d sample");
- gr->SetRanges(f.SubData(0), f.SubData(1), f.SubData(2));
- gr->Rotate(50,60); gr->Axis(); gr->Box();
- gr->Dots(f.SubData(0), f.SubData(1), f.SubData(2),"G#o","size 0.05");
-}
-</pre><div align="center"><img src="png/ifs3d.png" alt="Sample ifs3d">
-</div>
-<hr>
-<a name="indirect-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#inplot-sample" accesskey="n" rel="next">inplot sample</a>, Previous: <a href="#ifs3d-sample" accesskey="p" rel="prev">ifs3d sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-indirect"></a>
-<h3 class="section">10.61 Sample ‘<samp>indirect</samp>’</h3>
-
-
-<p>Comparison of <a href="#subdata">subdata</a> vs <a href="#evaluate">evaluate</a>/
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '':title 'SubData vs Evaluate'
-new in 9 'x^3/1.1':plot in 'ko ':box
-new arg 99 '4*x+4'
-evaluate e in arg off:plot e 'b.'; legend 'Evaluate'
-subdata s in arg:plot s 'r.';legend 'SubData'
-legend 2
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_indirect(mglGraph *gr)
-{
- gr->SubPlot(1,1,0,""); gr->Title("SubData vs Evaluate");
- mglData in(9), arg(99), e, s;
- gr->Fill(in,"x^3/1.1"); gr->Fill(arg,"4*x+4");
- gr->Plot(in,"ko "); gr->Box();
- e = in.Evaluate(arg,false); gr->Plot(e,"b.","legend 'Evaluate'");
- s = in.SubData(arg); gr->Plot(s,"r.","legend 'SubData'");
- gr->Legend(2);
-}
-</pre><div align="center"><img src="png/indirect.png" alt="Sample indirect">
-</div>
-<hr>
-<a name="inplot-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#iris-sample" accesskey="n" rel="next">iris sample</a>, Previous: <a href="#indirect-sample" accesskey="p" rel="prev">indirect sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-inplot"></a>
-<h3 class="section">10.62 Sample ‘<samp>inplot</samp>’</h3>
-
-
-<p>Example of <a href="#inplot">inplot</a>, <a href="#multiplot">multiplot</a>, <a href="#columnplot">columnplot</a>, <a href="#gridplot">gridplot</a>, <a href="#shearplot">shearplot</a>, <a href="#stickplot">stickplot</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 3 2 0:title 'StickPlot'
-stickplot 3 0 20 30:box 'r':text 0 0 0 '0' 'r'
-stickplot 3 1 20 30:box 'g':text 0 0 0 '1' 'g'
-stickplot 3 2 20 30:box 'b':text 0 9 0 '2' 'b'
-subplot 3 2 3 '':title 'ColumnPlot'
-columnplot 3 0:box 'r':text 0 0 '0' 'r'
-columnplot 3 1:box 'g':text 0 0 '1' 'g'
-columnplot 3 2:box 'b':text 0 0 '2' 'b'
-subplot 3 2 4 '':title 'GridPlot'
-gridplot 2 2 0:box 'r':text 0 0 '0' 'r'
-gridplot 2 2 1:box 'g':text 0 0 '1' 'g'
-gridplot 2 2 2:box 'b':text 0 0 '2' 'b'
-gridplot 2 2 3:box 'm':text 0 0 '3' 'm'
-subplot 3 2 5 '':title 'InPlot':box
-inplot 0.4 1 0.6 1 on:box 'r'
-multiplot 3 2 1 2 1 '':title 'MultiPlot and ShearPlot':box
-shearplot 3 0 0.2 0.1:box 'r':text 0 0 '0' 'r'
-shearplot 3 1 0.2 0.1:box 'g':text 0 0 '1' 'g'
-shearplot 3 2 0.2 0.1:box 'b':text 0 0 '2' 'b'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_inplot(mglGraph *gr)
-{
- gr->SubPlot(3,2,0); gr->Title("StickPlot");
- gr->StickPlot(3, 0, 20, 30); gr->Box("r"); gr->Puts(mglPoint(0),"0","r");
- gr->StickPlot(3, 1, 20, 30); gr->Box("g"); gr->Puts(mglPoint(0),"1","g");
- gr->StickPlot(3, 2, 20, 30); gr->Box("b"); gr->Puts(mglPoint(0),"2","b");
- gr->SubPlot(3,2,3,""); gr->Title("ColumnPlot");
- gr->ColumnPlot(3, 0); gr->Box("r"); gr->Puts(mglPoint(0),"0","r");
- gr->ColumnPlot(3, 1); gr->Box("g"); gr->Puts(mglPoint(0),"1","g");
- gr->ColumnPlot(3, 2); gr->Box("b"); gr->Puts(mglPoint(0),"2","b");
- gr->SubPlot(3,2,4,""); gr->Title("GridPlot");
- gr->GridPlot(2, 2, 0); gr->Box("r"); gr->Puts(mglPoint(0),"0","r");
- gr->GridPlot(2, 2, 1); gr->Box("g"); gr->Puts(mglPoint(0),"1","g");
- gr->GridPlot(2, 2, 2); gr->Box("b"); gr->Puts(mglPoint(0),"2","b");
- gr->GridPlot(2, 2, 3); gr->Box("m"); gr->Puts(mglPoint(0),"3","m");
- gr->SubPlot(3,2,5,""); gr->Title("InPlot"); gr->Box();
- gr->InPlot(0.4, 1, 0.6, 1, true); gr->Box("r");
- gr->MultiPlot(3,2,1, 2, 1,""); gr->Title("MultiPlot and ShearPlot"); gr->Box();
- gr->ShearPlot(3, 0, 0.2, 0.1); gr->Box("r"); gr->Puts(mglPoint(0),"0","r");
- gr->ShearPlot(3, 1, 0.2, 0.1); gr->Box("g"); gr->Puts(mglPoint(0),"1","g");
- gr->ShearPlot(3, 2, 0.2, 0.1); gr->Box("b"); gr->Puts(mglPoint(0),"2","b");
-}
-</pre><div align="center"><img src="png/inplot.png" alt="Sample inplot">
-</div>
-<hr>
-<a name="iris-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#label-sample" accesskey="n" rel="next">label sample</a>, Previous: <a href="#inplot-sample" accesskey="p" rel="prev">inplot sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-iris"></a>
-<h3 class="section">10.63 Sample ‘<samp>iris</samp>’</h3>
-
-
-<p>Function <a href="#iris">iris</a> draw Iris plot for columns of data array.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">read a 'iris.dat'
-crop a 0 4 'x':rearrange a a.nx 50
-subplot 1 1 0 '':title 'Iris plot'
-iris a 'sepal\n length;sepal\n width;petal\n length;petal\n width' '. ';value -1.5;size -2
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_iris(mglGraph *gr)
-{
- mglData a("iris.dat"); a.Crop(0,4,'x'); a.Rearrange(4,50);
- gr->SubPlot(1,1,0,"");
- if(big!=3) gr->Title("Iris sample");
- gr->Iris(a, "sepal\nlength;sepal\nwidth;petal\nlength;petal\nwidth", ". ", "value -1.5;size -2");
-}
-</pre><div align="center"><img src="png/iris.png" alt="Sample iris">
-</div>
-<hr>
-<a name="label-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#lamerey-sample" accesskey="n" rel="next">lamerey sample</a>, Previous: <a href="#iris-sample" accesskey="p" rel="prev">iris sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-label"></a>
-<h3 class="section">10.64 Sample ‘<samp>label</samp>’</h3>
-
-
-<p>Function <a href="#label">label</a> print text at data points. The string may contain ‘<samp>%x</samp>’, ‘<samp>%y</samp>’, ‘<samp>%z</samp>’ for x-, y-, z-coordinates of points, ‘<samp>%n</samp>’ for point index.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ys 10 '0.2*rnd-0.8*sin(pi*x)'
-subplot 1 1 0 '':title 'Label plot':box:plot ys ' *':label ys 'y=%y'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_label(mglGraph *gr)
-{
- mglData ys(10); ys.Modify("0.8*sin(pi*2*x)+0.2*rnd");
- if(big!=3) { gr->SubPlot(1,1,0,""); gr->Title("Label plot"); }
- gr->Box(); gr->Plot(ys," *"); gr->Label(ys,"y=%y");
-}
-</pre><div align="center"><img src="png/label.png" alt="Sample label">
-</div>
-<hr>
-<a name="lamerey-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#legend-sample" accesskey="n" rel="next">legend sample</a>, Previous: <a href="#label-sample" accesskey="p" rel="prev">label sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-lamerey"></a>
-<h3 class="section">10.65 Sample ‘<samp>lamerey</samp>’</h3>
-
-
-<p>Function <a href="#lamerey">lamerey</a> draw Lamerey diagram.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Lamerey sample'
-axis:xlabel '\i x':ylabel '\bar{\i x} = 2 \i{x}'
-fplot 'x' 'k='
-fplot '2*x' 'b'
-lamerey 0.00097 '2*x' 'rv~';size 2
-lamerey -0.00097 '2*x' 'rv~';size 2
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_lamerey(mglGraph *gr)
-{
- gr->SubPlot(1,1,0,"<_");
- if(big!=3) gr->Title("Lamerey sample");
- gr->Axis(); gr->Label('x',"\\i x"); gr->Label('y',"\\bar{\\i x} = 2 \\i{x}");
- gr->FPlot("x","k="); gr->FPlot("2*x","b");
- gr->Lamerey( 0.00097,"2*x","rv~");
- gr->Lamerey(-0.00097,"2*x","rv~");
-}
-</pre><div align="center"><img src="png/lamerey.png" alt="Sample lamerey">
-</div>
-<hr>
-<a name="legend-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#light-sample" accesskey="n" rel="next">light sample</a>, Previous: <a href="#lamerey-sample" accesskey="p" rel="prev">lamerey sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-legend"></a>
-<h3 class="section">10.66 Sample ‘<samp>legend</samp>’</h3>
-
-
-<p>Example of <a href="#legend">legend</a> styles.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">addlegend 'sin(\pi {x^2})' 'b':addlegend 'sin(\pi x)' 'g*'
-addlegend 'sin(\pi \sqrt{x})' 'rd':addlegend 'jsut text' ' ':addlegend 'no indent for this' ''
-subplot 2 2 0 '':title 'Legend (default)':box:legend
-legend 1 0.5 '^':text 0.49 0.88 'Style "\^"' 'A:L'
-legend 3 'A#':text 0.75 0.65 'Absolute position' 'A'
-subplot 2 2 2 '':title 'coloring':box:legend 0 'r#':legend 1 'Wb#':legend 2 'ygr#'
-subplot 2 2 3 '':title 'manual position':box
-legend 0.5 1:text 0.5 0.5 'at x=0.5, y=1' 'a'
-legend 1 '#-':text 0.75 0.25 'Horizontal legend' 'a'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_legend(mglGraph *gr)
-{
- gr->AddLegend("sin(\\pi {x^2})","b");
- gr->AddLegend("sin(\\pi x)","g*");
- gr->AddLegend("sin(\\pi \\sqrt{x})","rd");
- gr->AddLegend("just text"," ");
- gr->AddLegend("no indent for this","");
- if(big!=3) {gr->SubPlot(2,2,0,""); gr->Title("Legend (default)");}
- gr->Box(); gr->Legend();
- if(big==3) return;
- gr->Legend(1,0.5,"^"); gr->Puts(0.49, 0.88, "Style '\\^'","A:L");
- gr->Legend(3,"A#");
- gr->Puts(mglPoint(0.75,0.65),"Absolute position","A");
- gr->SubPlot(2,2,2,""); gr->Title("coloring"); gr->Box();
- gr->Legend(0,"r#"); gr->Legend(1,"Wb#"); gr->Legend(2,"ygr#");
- gr->SubPlot(2,2,3,""); gr->Title("manual position"); gr->Box();
- gr->Legend(0.5,1);
- gr->Puts(mglPoint(0.5,0.5),"at x=0.5, y=1","a");
- gr->Legend(1,"#-");
- gr->Puts(mglPoint(0.75,0.25),"Horizontal legend","a");
-}
-</pre><div align="center"><img src="png/legend.png" alt="Sample legend">
-</div>
-<hr>
-<a name="light-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#loglog-sample" accesskey="n" rel="next">loglog sample</a>, Previous: <a href="#legend-sample" accesskey="p" rel="prev">legend sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-light"></a>
-<h3 class="section">10.67 Sample ‘<samp>light</samp>’</h3>
-
-
-<p>Example of <a href="#light">light</a> with different types.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">light on:attachlight on
-call 'prepare2d'
-subplot 2 2 0:title 'Default':rotate 50 60:box:surf a
-line -1 -0.7 1.7 -1 -0.7 0.7 'BA'
-
-subplot 2 2 1:title 'Local':rotate 50 60
-light 0 1 0 1 -2 -1 -1
-line 1 0 1 -1 -1 0 'BAO':box:surf a
-
-subplot 2 2 2:title 'no diffuse':rotate 50 60
-diffuse 0
-line 1 0 1 -1 -1 0 'BAO':box:surf a
-
-subplot 2 2 3:title 'diffusive only':rotate 50 60
-diffuse 0.5:light 0 1 0 1 -2 -1 -1 'w' 0
-line 1 0 1 -1 -1 0 'BAO':box:surf a
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_light(mglGraph *gr) // local light sources
-{
- mglData a; mgls_prepare2d(&a);
- gr->Light(true); gr->AttachLight(true);
- if(big==3)
- { gr->Rotate(50,60); gr->Box(); gr->Surf(a); return; }
- gr->SubPlot(2,2,0); gr->Title("Default"); gr->Rotate(50,60);
- gr->Line(mglPoint(-1,-0.7,1.7),mglPoint(-1,-0.7,0.7),"BA"); gr->Box(); gr->Surf(a);
- gr->SubPlot(2,2,1); gr->Title("Local"); gr->Rotate(50,60);
- gr->AddLight(0,mglPoint(1,0,1),mglPoint(-2,-1,-1));
- gr->Line(mglPoint(1,0,1),mglPoint(-1,-1,0),"BAO"); gr->Box(); gr->Surf(a);
- gr->SubPlot(2,2,2); gr->Title("no diffuse"); gr->Rotate(50,60);
- gr->SetDiffuse(0);
- gr->Line(mglPoint(1,0,1),mglPoint(-1,-1,0),"BAO"); gr->Box(); gr->Surf(a);
- gr->SubPlot(2,2,3); gr->Title("diffusive only"); gr->Rotate(50,60);
- gr->SetDiffuse(0.5);
- gr->AddLight(0,mglPoint(1,0,1),mglPoint(-2,-1,-1),'w',0);
- gr->Line(mglPoint(1,0,1),mglPoint(-1,-1,0),"BAO"); gr->Box(); gr->Surf(a);
-}
-</pre><div align="center"><img src="png/light.png" alt="Sample light">
-</div>
-<hr>
-<a name="loglog-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#map-sample" accesskey="n" rel="next">map sample</a>, Previous: <a href="#light-sample" accesskey="p" rel="prev">light sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-loglog"></a>
-<h3 class="section">10.68 Sample ‘<samp>loglog</samp>’</h3>
-
-
-<p>Example of log- and log-log- axis labels.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0 '<_':title 'Semi-log axis':ranges 0.01 100 -1 1:axis 'lg(x)' '' ''
-axis:grid 'xy' 'g':fplot 'sin(1/x)':xlabel 'x' 0:ylabel 'y = sin 1/x' 0
-subplot 2 2 1 '<_':title 'Log-log axis':ranges 0.01 100 0.1 100:axis 'lg(x)' 'lg(y)' ''
-axis:grid '!' 'h=':grid:fplot 'sqrt(1+x^2)'
-xlabel 'x' 0:ylabel 'y = \sqrt{1+x^2}' 0
-subplot 2 2 2 '<_':title 'Minus-log axis':ranges -100 -0.01 -100 -0.1:axis '-lg(-x)' '-lg(-y)' ''
-axis:fplot '-sqrt(1+x^2)':xlabel 'x' 0:ylabel 'y = -\sqrt{1+x^2}' 0
-subplot 2 2 3 '<_':title 'Log-ticks':ranges 0.01 100 0 100:axis 'sqrt(x)' '' ''
-axis:fplot 'x':xlabel 'x' 1:ylabel 'y = x' 0
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_loglog(mglGraph *gr) // log-log axis
-{
- gr->SubPlot(2,2,0,"<_"); gr->Title("Semi-log axis"); gr->SetRanges(0.01,100,-1,1); gr->SetFunc("lg(x)","");
- gr->Axis(); gr->Grid("xy","g"); gr->FPlot("sin(1/x)"); gr->Label('x',"x",0); gr->Label('y', "y = sin 1/x",0);
- gr->SubPlot(2,2,1,"<_"); gr->Title("Log-log axis"); gr->SetRanges(0.01,100,0.1,100); gr->SetFunc("lg(x)","lg(y)");
- gr->Axis(); gr->Grid("!","h="); gr->Grid(); gr->FPlot("sqrt(1+x^2)"); gr->Label('x',"x",0); gr->Label('y', "y = \\sqrt{1+x^2}",0);
- gr->SubPlot(2,2,2,"<_"); gr->Title("Minus-log axis"); gr->SetRanges(-100,-0.01,-100,-0.1); gr->SetFunc("-lg(-x)","-lg(-y)");
- gr->Axis(); gr->FPlot("-sqrt(1+x^2)"); gr->Label('x',"x",0); gr->Label('y', "y = -\\sqrt{1+x^2}",0);
- gr->SubPlot(2,2,3,"<_"); gr->Title("Log-ticks"); gr->SetRanges(0.1,100,0,100); gr->SetFunc("sqrt(x)","");
- gr->Axis(); gr->FPlot("x"); gr->Label('x',"x",1); gr->Label('y', "y = x",0);
-}
-</pre><div align="center"><img src="png/loglog.png" alt="Sample loglog">
-</div>
-<hr>
-<a name="map-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#mark-sample" accesskey="n" rel="next">mark sample</a>, Previous: <a href="#loglog-sample" accesskey="p" rel="prev">loglog sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-map"></a>
-<h3 class="section">10.69 Sample ‘<samp>map</samp>’</h3>
-
-
-<p>Example of <a href="#map">map</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 50 40 'x':new b 50 40 'y':zrange -2 2:text 0 0 '\to'
-subplot 2 1 0:text 0 1.1 '\{x, y\}' '' -2:box:map a b 'brgk'
-subplot 2 1 1:text 0 1.1 '\{\frac{x^3+y^3}{2}, \frac{x-y}{2}\}' '' -2
-box:fill a '(x^3+y^3)/2':fill b '(x-y)/2':map a b 'brgk'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_map(mglGraph *gr) // example of mapping
-{
- mglData a(50, 40), b(50, 40);
- gr->Puts(mglPoint(0, 0), "\\to", ":C", -1.4);
- gr->SetRanges(-1,1,-1,1,-2,2);
-
- gr->SubPlot(2, 1, 0);
- gr->Fill(a,"x"); gr->Fill(b,"y");
- gr->Puts(mglPoint(0, 1.1), "\\{x, y\\}", ":C", -2); gr->Box();
- gr->Map(a, b, "brgk");
-
- gr->SubPlot(2, 1, 1);
- gr->Fill(a,"(x^3+y^3)/2"); gr->Fill(b,"(x-y)/2");
- gr->Puts(mglPoint(0, 1.1), "\\{\\frac{x^3+y^3}{2}, \\frac{x-y}{2}\\}", ":C", -2);
- gr->Box();
- gr->Map(a, b, "brgk");
-}
-</pre><div align="center"><img src="png/map.png" alt="Sample map">
-</div>
-<hr>
-<a name="mark-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#mask-sample" accesskey="n" rel="next">mask sample</a>, Previous: <a href="#map-sample" accesskey="p" rel="prev">map sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-mark"></a>
-<h3 class="section">10.70 Sample ‘<samp>mark</samp>’</h3>
-
-
-<p>Example of <a href="#mark">mark</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 1 1 0 '':title 'Mark plot (default)':box:mark y y1 's'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_mark(mglGraph *gr)
-{
- mglData y,y1; mgls_prepare1d(&y,&y1);
- if(big!=3) { gr->SubPlot(1,1,0,""); gr->Title("Mark plot (default)"); }
- gr->Box(); gr->Mark(y,y1,"s");
-}
-</pre><div align="center"><img src="png/mark.png" alt="Sample mark">
-</div>
-<hr>
-<a name="mask-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#mesh-sample" accesskey="n" rel="next">mesh sample</a>, Previous: <a href="#mark-sample" accesskey="p" rel="prev">mark sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-mask"></a>
-<h3 class="section">10.71 Sample ‘<samp>mask</samp>’</h3>
-
-
-<p>Example of <a href="#mask">mask</a> kinds.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 10 10 'x'
-subplot 5 4 0 '':title '"-" mask':dens a '3-'
-subplot 5 4 1 '':title '"+" mask':dens a '3+'
-subplot 5 4 2 '':title '"=" mask':dens a '3='
-subplot 5 4 3 '':title '";" mask':dens a '3;'
-subplot 5 4 4 '':title '";I" mask':dens a '3;I'
-subplot 5 4 5 '':title '"o" mask':dens a '3o'
-subplot 5 4 6 '':title '"O" mask':dens a '3O'
-subplot 5 4 7 '':title '"s" mask':dens a '3s'
-subplot 5 4 8 '':title '"S" mask':dens a '3S'
-subplot 5 4 9 '':title '";/" mask':dens a '3;/'
-subplot 5 4 10 '':title '"~" mask':dens a '3~'
-subplot 5 4 11 '':title '"<" mask':dens a '3<'
-subplot 5 4 12 '':title '">" mask':dens a '3>'
-subplot 5 4 13 '':title '"j" mask':dens a '3j'
-subplot 5 4 14 '':title '"-;\" mask':dens a '3\;'
-subplot 5 4 15 '':title '"d" mask':dens a '3d'
-subplot 5 4 16 '':title '"D" mask':dens a '3D'
-subplot 5 4 17 '':title '"*" mask':dens a '3*'
-subplot 5 4 18 '':title '"\^" mask':dens a '3^'
-subplot 5 4 19 '':title 'manual mask'
-mask '+' '24242424FF0101FF':dens a '3+'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_mask(mglGraph *gr)
-{
- mglData a(10,10); a.Fill(-1,1);
- gr->SubPlot(5,4,0,""); gr->Title("'-' mask"); gr->Dens(a,"3-");
- gr->SubPlot(5,4,1,""); gr->Title("'+' mask"); gr->Dens(a,"3+");
- gr->SubPlot(5,4,2,""); gr->Title("'=' mask"); gr->Dens(a,"3=");
- gr->SubPlot(5,4,3,""); gr->Title("';' mask"); gr->Dens(a,"3;");
- gr->SubPlot(5,4,4,""); gr->Title("';I' mask"); gr->Dens(a,"3;I");
- gr->SubPlot(5,4,5,""); gr->Title("'o' mask"); gr->Dens(a,"3o");
- gr->SubPlot(5,4,6,""); gr->Title("'O' mask"); gr->Dens(a,"3O");
- gr->SubPlot(5,4,7,""); gr->Title("'s' mask"); gr->Dens(a,"3s");
- gr->SubPlot(5,4,8,""); gr->Title("'S' mask"); gr->Dens(a,"3S");
- gr->SubPlot(5,4,9,""); gr->Title("';/' mask"); gr->Dens(a,"3;/");
- gr->SubPlot(5,4,10,""); gr->Title("'~' mask"); gr->Dens(a,"3~");
- gr->SubPlot(5,4,11,""); gr->Title("'<' mask"); gr->Dens(a,"3<");
- gr->SubPlot(5,4,12,""); gr->Title("'>' mask"); gr->Dens(a,"3>");
- gr->SubPlot(5,4,13,""); gr->Title("'j' mask"); gr->Dens(a,"3j");
- gr->SubPlot(5,4,14,""); gr->Title("';\\\\' mask"); gr->Dens(a,"3;\\");
- gr->SubPlot(5,4,15,""); gr->Title("'d' mask"); gr->Dens(a,"3d");
- gr->SubPlot(5,4,16,""); gr->Title("'D' mask"); gr->Dens(a,"3D");
- gr->SubPlot(5,4,17,""); gr->Title("'*' mask"); gr->Dens(a,"3*");
- gr->SubPlot(5,4,18,""); gr->Title("'\\^' mask"); gr->Dens(a,"3^");
- gr->SubPlot(5,4,19,""); gr->Title("manual mask");
- gr->SetMask('+', "24242424FF0101FF"); gr->Dens(a,"3+");
-}
-</pre><div align="center"><img src="png/mask.png" alt="Sample mask">
-</div>
-<hr>
-<a name="mesh-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#mirror-sample" accesskey="n" rel="next">mirror sample</a>, Previous: <a href="#mask-sample" accesskey="p" rel="prev">mask sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-mesh"></a>
-<h3 class="section">10.72 Sample ‘<samp>mesh</samp>’</h3>
-
-
-<p>Function <a href="#mesh">mesh</a> draw wired surface. You can use <a href="#meshnum">meshnum</a> for changing number of lines to be drawn.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Mesh plot':rotate 50 60:box:mesh a
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_mesh(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- if(big!=3) gr->Title("Mesh plot");
- gr->Rotate(50,60); gr->Box(); gr->Mesh(a);
-}
-</pre><div align="center"><img src="png/mesh.png" alt="Sample mesh">
-</div>
-<hr>
-<a name="mirror-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#molecule-sample" accesskey="n" rel="next">molecule sample</a>, Previous: <a href="#mesh-sample" accesskey="p" rel="prev">mesh sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-mirror"></a>
-<h3 class="section">10.73 Sample ‘<samp>mirror</samp>’</h3>
-
-
-<p>Example of using options.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 31 41 '-pi*x*exp(-(y+1)^2-4*x^2)'
-subplot 2 2 0:title 'Options for coordinates':alpha on:light on:rotate 40 60:box
-surf a 'r';yrange 0 1:surf a 'b';yrange 0 -1
-subplot 2 2 1:title 'Option "meshnum"':rotate 40 60:box
-mesh a 'r'; yrange 0 1:mesh a 'b';yrange 0 -1; meshnum 5
-subplot 2 2 2:title 'Option "alpha"':rotate 40 60:box
-surf a 'r';yrange 0 1; alpha 0.7:surf a 'b';yrange 0 -1; alpha 0.3
-subplot 2 2 3 '<_':title 'Option "legend"'
-fplot 'x^3' 'r'; legend 'y = x^3':fplot 'cos(pi*x)' 'b'; legend 'y = cos \pi x'
-box:axis:legend 2
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_mirror(mglGraph *gr) // flag #
-{
- mglData a(31,41);
- gr->Fill(a,"-pi*x*exp(-(y+1)^2-4*x^2)");
-
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("Options for coordinates"); }
- gr->Alpha(true); gr->Light(true);
- gr->Rotate(40,60); gr->Box();
- gr->Surf(a,"r","yrange 0 1"); gr->Surf(a,"b","yrange 0 -1");
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("Option 'meshnum'");
- gr->Rotate(40,60); gr->Box();
- gr->Mesh(a,"r","yrange 0 1"); gr->Mesh(a,"b","yrange 0 -1; meshnum 5");
- gr->SubPlot(2,2,2); gr->Title("Option 'alpha'");
- gr->Rotate(40,60); gr->Box();
- gr->Surf(a,"r","yrange 0 1; alpha 0.7"); gr->Surf(a,"b","yrange 0 -1; alpha 0.3");
- gr->SubPlot(2,2,3,"<_"); gr->Title("Option 'legend'");
- gr->FPlot("x^3","r","legend 'y = x^3'"); gr->FPlot("cos(pi*x)","b","legend 'y = cos \\pi x'");
- gr->Box(); gr->Axis(); gr->Legend(2,"");
-}
-</pre><div align="center"><img src="png/mirror.png" alt="Sample mirror">
-</div>
-<hr>
-<a name="molecule-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ode-sample" accesskey="n" rel="next">ode sample</a>, Previous: <a href="#mirror-sample" accesskey="p" rel="prev">mirror sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-molecule"></a>
-<h3 class="section">10.74 Sample ‘<samp>molecule</samp>’</h3>
-
-
-<p>Example of drawing molecules.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">alpha on:light on
-subplot 2 2 0 '':title 'Methane, CH_4':rotate 60 120
-sphere 0 0 0 0.25 'k':drop 0 0 0 0 0 1 0.35 'h' 1 2:sphere 0 0 0.7 0.25 'g'
-drop 0 0 0 -0.94 0 -0.33 0.35 'h' 1 2:sphere -0.66 0 -0.23 0.25 'g'
-drop 0 0 0 0.47 0.82 -0.33 0.35 'h' 1 2:sphere 0.33 0.57 -0.23 0.25 'g'
-drop 0 0 0 0.47 -0.82 -0.33 0.35 'h' 1 2:sphere 0.33 -0.57 -0.23 0.25 'g'
-subplot 2 2 1 '':title 'Water, H{_2}O':rotate 60 100
-sphere 0 0 0 0.25 'r':drop 0 0 0 0.3 0.5 0 0.3 'm' 1 2:sphere 0.3 0.5 0 0.25 'g'
-drop 0 0 0 0.3 -0.5 0 0.3 'm' 1 2:sphere 0.3 -0.5 0 0.25 'g'
-subplot 2 2 2 '':title 'Oxygen, O_2':rotate 60 120
-drop 0 0.5 0 0 -0.3 0 0.3 'm' 1 2:sphere 0 0.5 0 0.25 'r'
-drop 0 -0.5 0 0 0.3 0 0.3 'm' 1 2:sphere 0 -0.5 0 0.25 'r'
-subplot 2 2 3 '':title 'Ammonia, NH_3':rotate 60 120
-sphere 0 0 0 0.25 'b':drop 0 0 0 0.33 0.57 0 0.32 'n' 1 2
-sphere 0.33 0.57 0 0.25 'g':drop 0 0 0 0.33 -0.57 0 0.32 'n' 1 2
-sphere 0.33 -0.57 0 0.25 'g':drop 0 0 0 -0.65 0 0 0.32 'n' 1 2
-sphere -0.65 0 0 0.25 'g'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_molecule(mglGraph *gr) // example of moleculas
-{
- gr->VertexColor(false); gr->Compression(false); // per-vertex colors and compression are detrimental to transparency
- gr->DoubleSided(false); // we do not get into atoms, while rendering internal surface has negative impact on trasparency
- gr->Alpha(true); gr->Light(true);
-
- gr->SubPlot(2,2,0,""); gr->Title("Methane, CH_4");
- gr->StartGroup("Methane");
- gr->Rotate(60,120);
- gr->Sphere(mglPoint(0,0,0),0.25,"k");
- gr->Drop(mglPoint(0,0,0),mglPoint(0,0,1),0.35,"h",1,2);
- gr->Sphere(mglPoint(0,0,0.7),0.25,"g");
- gr->Drop(mglPoint(0,0,0),mglPoint(-0.94,0,-0.33),0.35,"h",1,2);
- gr->Sphere(mglPoint(-0.66,0,-0.23),0.25,"g");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.47,0.82,-0.33),0.35,"h",1,2);
- gr->Sphere(mglPoint(0.33,0.57,-0.23),0.25,"g");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.47,-0.82,-0.33),0.35,"h",1,2);
- gr->Sphere(mglPoint(0.33,-0.57,-0.23),0.25,"g");
- gr->EndGroup();
-
- gr->SubPlot(2,2,1,""); gr->Title("Water, H_{2}O");
- gr->StartGroup("Water");
- gr->Rotate(60,100);
- gr->StartGroup("Water_O");
- gr->Sphere(mglPoint(0,0,0),0.25,"r");
- gr->EndGroup();
- gr->StartGroup("Water_Bond_1");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.3,0.5,0),0.3,"m",1,2);
- gr->EndGroup();
- gr->StartGroup("Water_H_1");
- gr->Sphere(mglPoint(0.3,0.5,0),0.25,"g");
- gr->EndGroup();
- gr->StartGroup("Water_Bond_2");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.3,-0.5,0),0.3,"m",1,2);
- gr->EndGroup();
- gr->StartGroup("Water_H_2");
- gr->Sphere(mglPoint(0.3,-0.5,0),0.25,"g");
- gr->EndGroup();
- gr->EndGroup();
-
- gr->SubPlot(2,2,2,""); gr->Title("Oxygen, O_2");
- gr->StartGroup("Oxygen");
- gr->Rotate(60,120);
- gr->Drop(mglPoint(0,0.5,0),mglPoint(0,-0.3,0),0.3,"m",1,2);
- gr->Sphere(mglPoint(0,0.5,0),0.25,"r");
- gr->Drop(mglPoint(0,-0.5,0),mglPoint(0,0.3,0),0.3,"m",1,2);
- gr->Sphere(mglPoint(0,-0.5,0),0.25,"r");
- gr->EndGroup();
-
- gr->SubPlot(2,2,3,""); gr->Title("Ammonia, NH_3");
- gr->StartGroup("Ammonia");
- gr->Rotate(60,120);
- gr->Sphere(mglPoint(0,0,0),0.25,"b");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.33,0.57,0),0.32,"n",1,2);
- gr->Sphere(mglPoint(0.33,0.57,0),0.25,"g");
- gr->Drop(mglPoint(0,0,0),mglPoint(0.33,-0.57,0),0.32,"n",1,2);
- gr->Sphere(mglPoint(0.33,-0.57,0),0.25,"g");
- gr->Drop(mglPoint(0,0,0),mglPoint(-0.65,0,0),0.32,"n",1,2);
- gr->Sphere(mglPoint(-0.65,0,0),0.25,"g");
- gr->EndGroup();
- gr->DoubleSided( true ); // put back
-}
-</pre><div align="center"><img src="png/molecule.png" alt="Sample molecule">
-</div>
-<hr>
-<a name="ode-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ohlc-sample" accesskey="n" rel="next">ohlc sample</a>, Previous: <a href="#molecule-sample" accesskey="p" rel="prev">molecule sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ode"></a>
-<h3 class="section">10.75 Sample ‘<samp>ode</samp>’</h3>
-
-
-<p>Example of phase plain created by <a href="#ode">ode</a> solving, contour lines (<a href="#cont">cont</a>) and <a href="#flow">flow</a> threads.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0 '<_':title 'Cont':box
-axis:xlabel 'x':ylabel '\dot{x}'
-new f 100 100 'y^2+2*x^3-x^2-0.5':cont f
-
-subplot 2 2 1 '<_':title 'Flow':box
-axis:xlabel 'x':ylabel '\dot{x}'
-new fx 100 100 'x-3*x^2'
-new fy 100 100 'y'
-flow fy fx 'v';value 7
-
-subplot 2 2 2 '<_':title 'ODE':box
-axis:xlabel 'x':ylabel '\dot{x}'
-for $x -1 1 0.1
- ode r 'y;x-3*x^2' 'xy' [$x,0]
- plot r(0) r(1)
- ode r '-y;-x+3*x^2' 'xy' [$x,0]
- plot r(0) r(1)
-next
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_ode(mglGraph *gr)
-{
- gr->SubPlot(2,2,0,"<_"); gr->Title("Cont"); gr->Box();
- gr->Axis(); gr->Label('x',"x"); gr->Label('y',"\\dot{x}");
- mglData f(100,100); gr->Fill(f,"y^2+2*x^3-x^2-0.5");
- gr->Cont(f);
- gr->SubPlot(2,2,1,"<_"); gr->Title("Flow"); gr->Box();
- gr->Axis(); gr->Label('x',"x"); gr->Label('y',"\\dot{x}");
- mglData fx(100,100), fy(100,100); gr->Fill(fx,"x-3*x^2"); gr->Fill(fy,"y");
- gr->Flow(fy,fx,"v","value 7");
- gr->SubPlot(2,2,2,"<_"); gr->Title("ODE"); gr->Box();
- gr->Axis(); gr->Label('x',"x"); gr->Label('y',"\\dot{x}");
- for(double x=-1;x<1;x+=0.1)
- {
- mglData in(2), r; in.a[0]=x;
- r = mglODE("y;x-3*x^2","xy",in);
- gr->Plot(r.SubData(0), r.SubData(1));
- r = mglODE("-y;-x+3*x^2","xy",in);
- gr->Plot(r.SubData(0), r.SubData(1));
- }
-}
-</pre><div align="center"><img src="png/ode.png" alt="Sample ode">
-</div>
-<hr>
-<a name="ohlc-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#param1-sample" accesskey="n" rel="next">param1 sample</a>, Previous: <a href="#ode-sample" accesskey="p" rel="prev">ode sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ohlc"></a>
-<h3 class="section">10.76 Sample ‘<samp>ohlc</samp>’</h3>
-
-
-<p>Function <a href="#ohlc">ohlc</a> draw Open-High-Low-Close diagram. This diagram show vertical line for between maximal(high) and minimal(low) values, as well as horizontal lines before/after vertical line for initial(open)/final(close) values of some process.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new o 10 '0.5*sin(pi*x)'
-new c 10 '0.5*sin(pi*(x+2/9))'
-new l 10 '0.3*rnd-0.8'
-new h 10 '0.3*rnd+0.5'
-subplot 1 1 0 '':title 'OHLC plot':box:ohlc o h l c
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_ohlc(mglGraph *gr) // flow threads and density plot
-{
- mglData o(10), h(10), l(10), c(10);
- gr->Fill(o,"0.5*sin(pi*x)"); gr->Fill(c,"0.5*sin(pi*(x+2/9))");
- gr->Fill(l,"0.3*rnd-0.8"); gr->Fill(h,"0.3*rnd+0.5");
- if(big!=3) { gr->SubPlot(1,1,0,""); gr->Title("OHLC plot"); }
- gr->Box(); gr->OHLC(o,h,l,c);
-}
-</pre><div align="center"><img src="png/ohlc.png" alt="Sample ohlc">
-</div>
-<hr>
-<a name="param1-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#param2-sample" accesskey="n" rel="next">param2 sample</a>, Previous: <a href="#ohlc-sample" accesskey="p" rel="prev">ohlc sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-param1"></a>
-<h3 class="section">10.77 Sample ‘<samp>param1</samp>’</h3>
-
-
-<p>Example of parametric plots for 1D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 100 'sin(pi*x)'
-new y 100 'cos(pi*x)'
-new z 100 'sin(2*pi*x)'
-new c 100 'cos(2*pi*x)'
-
-subplot 4 3 0:rotate 40 60:box:plot x y z
-subplot 4 3 1:rotate 40 60:box:area x y z
-subplot 4 3 2:rotate 40 60:box:tens x y z c
-subplot 4 3 3:rotate 40 60:box:bars x y z
-subplot 4 3 4:rotate 40 60:box:stem x y z
-subplot 4 3 5:rotate 40 60:box:textmark x y z c*2 '\alpha'
-subplot 4 3 6:rotate 40 60:box:tube x y z c/10
-subplot 4 3 7:rotate 40 60:box:mark x y z c 's'
-subplot 4 3 8:box:error x y z/10 c/10
-subplot 4 3 9:rotate 40 60:box:step x y z
-subplot 4 3 10:rotate 40 60:box:torus x z 'z';light on
-subplot 4 3 11:rotate 40 60:box:label x y z '%z'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_param1(mglGraph *gr) // 1d parametric plots
-{
- mglData x(100), y(100), z(100), c(100);
- gr->Fill(x,"sin(pi*x)"); gr->Fill(y,"cos(pi*x)");
- gr->Fill(z,"sin(2*pi*x)"); gr->Fill(c,"cos(2*pi*x)");
-
- gr->SubPlot(4,3,0); gr->Rotate(40,60); gr->Box(); gr->Plot(x,y,z);
- gr->SubPlot(4,3,1); gr->Rotate(40,60); gr->Box(); gr->Area(x,y,z);
- gr->SubPlot(4,3,2); gr->Rotate(40,60); gr->Box(); gr->Tens(x,y,z,c);
- gr->SubPlot(4,3,3); gr->Rotate(40,60); gr->Box(); gr->Bars(x,y,z);
- gr->SubPlot(4,3,4); gr->Rotate(40,60); gr->Box(); gr->Stem(x,y,z);
- gr->SubPlot(4,3,5); gr->Rotate(40,60); gr->Box(); gr->TextMark(x,y,z,c*2,"\\alpha");
- gr->SubPlot(4,3,6); gr->Rotate(40,60); gr->Box(); gr->Tube(x,y,z,c/10,"","light on");
- gr->SubPlot(4,3,7); gr->Rotate(40,60); gr->Box(); gr->Mark(x,y,z,c,"s");
- gr->SubPlot(4,3,8); gr->Rotate(40,60); gr->Box(); gr->Error(x,y,z/10,c/10);
- gr->SubPlot(4,3,9); gr->Rotate(40,60); gr->Box(); gr->Step(x,y,z);
- gr->SubPlot(4,3,10);gr->Rotate(40,60); gr->Box(); gr->Torus(x,z,"z","light on");
- gr->SubPlot(4,3,11);gr->Rotate(40,60); gr->Box(); gr->Label(x,y,z,"%z");
-}
-</pre><div align="center"><img src="png/param1.png" alt="Sample param1">
-</div>
-<hr>
-<a name="param2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#param3-sample" accesskey="n" rel="next">param3 sample</a>, Previous: <a href="#param1-sample" accesskey="p" rel="prev">param1 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-param2"></a>
-<h3 class="section">10.78 Sample ‘<samp>param2</samp>’</h3>
-
-
-<p>Example of parametric plots for 2D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 100 100 'sin(pi*(x+y)/2)*cos(pi*y/2)'
-new y 100 100 'cos(pi*(x+y)/2)*cos(pi*y/2)'
-new z 100 100 'sin(pi*y/2)'
-new c 100 100 'cos(pi*x)'
-
-subplot 4 4 0:rotate 40 60:box:surf x y z
-subplot 4 4 1:rotate 40 60:box:surfc x y z c
-subplot 4 4 2:rotate 40 60:box:surfa x y z c;alpha 1
-subplot 4 4 3:rotate 40 60:box:mesh x y z;meshnum 10
-subplot 4 4 4:rotate 40 60:box:tile x y z;meshnum 10
-subplot 4 4 5:rotate 40 60:box:tiles x y z c;meshnum 10
-subplot 4 4 6:rotate 40 60:box:axial x y z;alpha 0.5;light on
-subplot 4 4 7:rotate 40 60:box:cont x y z
-subplot 4 4 8:rotate 40 60:box:contf x y z;light on:contv x y z;light on
-subplot 4 4 9:rotate 40 60:box:belt x y z 'x';meshnum 10;light on
-subplot 4 4 10:rotate 40 60:box:dens x y z;alpha 0.5
-subplot 4 4 11:rotate 40 60:box
-fall x y z 'g';meshnum 10:fall x y z 'rx';meshnum 10
-subplot 4 4 12:rotate 40 60:box:belt x y z '';meshnum 10;light on
-subplot 4 4 13:rotate 40 60:box:boxs x y z '';meshnum 10;light on
-subplot 4 4 14:rotate 40 60:box:boxs x y z '#';meshnum 10;light on
-subplot 4 4 15:rotate 40 60:box:boxs x y z '@';meshnum 10;light on
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_param2(mglGraph *gr) // 2d parametric plots
-{
- mglData x(100,100), y(100,100), z(100,100), c(100,100);
- gr->Fill(x,"sin(pi*(x+y)/2)*cos(pi*y/2)"); gr->Fill(y,"cos(pi*(x+y)/2)*cos(pi*y/2)");
- gr->Fill(z,"sin(pi*y/2)"); gr->Fill(c,"cos(pi*x)");
-
- gr->SubPlot(4,4,0); gr->Rotate(40,60); gr->Box(); gr->Surf(x,y,z);
- gr->SubPlot(4,4,1); gr->Rotate(40,60); gr->Box(); gr->SurfC(x,y,z,c);
- gr->SubPlot(4,4,2); gr->Rotate(40,60); gr->Box(); gr->SurfA(x,y,z,c,"","alpha 1");
- gr->SubPlot(4,4,3); gr->Rotate(40,60); gr->Box(); gr->Mesh(x,y,z,"","meshnum 10");
- gr->SubPlot(4,4,4); gr->Rotate(40,60); gr->Box(); gr->Tile(x,y,z,"","meshnum 10");
- gr->SubPlot(4,4,5); gr->Rotate(40,60); gr->Box(); gr->TileS(x,y,z,c,"","meshnum 10");
- gr->SubPlot(4,4,6); gr->Rotate(40,60); gr->Box(); gr->Axial(x,y,z,"","alpha 0.5;light on");
- gr->SubPlot(4,4,7); gr->Rotate(40,60); gr->Box(); gr->Cont(x,y,z);
- gr->SubPlot(4,4,8); gr->Rotate(40,60); gr->Box(); gr->ContF(x,y,z,"","light on"); gr->ContV(x,y,z,"","light on");
- gr->SubPlot(4,4,9); gr->Rotate(40,60); gr->Box(); gr->Belt(x,y,z,"x","meshnum 10;light on");
- gr->SubPlot(4,4,10);gr->Rotate(40,60); gr->Box(); gr->Dens(x,y,z,"","alpha 0.5");
- gr->SubPlot(4,4,11);gr->Rotate(40,60); gr->Box();
- gr->Fall(x,y,z,"g","meshnum 10"); gr->Fall(x,y,z,"rx","meshnum 10");
- gr->SubPlot(4,4,12); gr->Rotate(40,60); gr->Box(); gr->Belt(x,y,z,"","meshnum 10;light on");
- gr->SubPlot(4,4,13); gr->Rotate(40,60); gr->Box(); gr->Boxs(x,y,z,"","meshnum 10;light on");
- gr->SubPlot(4,4,14); gr->Rotate(40,60); gr->Box(); gr->Boxs(x,y,z,"#","meshnum 10");
- gr->SubPlot(4,4,15); gr->Rotate(40,60); gr->Box(); gr->Boxs(x,y,z,"@","meshnum 10;light on");
-}
-</pre><div align="center"><img src="png/param2.png" alt="Sample param2">
-</div>
-<hr>
-<a name="param3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#paramv-sample" accesskey="n" rel="next">paramv sample</a>, Previous: <a href="#param2-sample" accesskey="p" rel="prev">param2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-param3"></a>
-<h3 class="section">10.79 Sample ‘<samp>param3</samp>’</h3>
-
-
-<p>Example of parametric plots for 3D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 50 50 50 '(x+2)/3*sin(pi*y/2)'
-new y 50 50 50 '(x+2)/3*cos(pi*y/2)'
-new z 50 50 50 'z'
-new c 50 50 50 '-2*(x^2+y^2+z^4-z^2)+0.2'
-new d 50 50 50 '1-2*tanh(2*(x+y)^2)'
-
-alpha on:light on
-subplot 4 3 0:rotate 40 60:box:surf3 x y z c
-subplot 4 3 1:rotate 40 60:box:surf3c x y z c d
-subplot 4 3 2:rotate 40 60:box:surf3a x y z c d
-subplot 4 3 3:rotate 40 60:box:cloud x y z c
-subplot 4 3 4:rotate 40 60:box:cont3 x y z c:cont3 x y z c 'x':cont3 x y z c 'z'
-subplot 4 3 5:rotate 40 60:box:contf3 x y z c:contf3 x y z c 'x':contf3 x y z c 'z'
-subplot 4 3 6:rotate 40 60:box:dens3 x y z c:dens3 x y z c 'x':dens3 x y z c 'z'
-subplot 4 3 7:rotate 40 60:box:dots x y z c;meshnum 15
-subplot 4 3 8:rotate 40 60:box:densx c '' 0:densy c '' 0:densz c '' 0
-subplot 4 3 9:rotate 40 60:box:contx c '' 0:conty c '' 0:contz c '' 0
-subplot 4 3 10:rotate 40 60:box:contfx c '' 0:contfy c '' 0:contfz c '' 0
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_param3(mglGraph *gr) // 3d parametric plots
-{
- mglData x(50,50,50), y(50,50,50), z(50,50,50), c(50,50,50), d(50,50,50);
- gr->Fill(x,"(x+2)/3*sin(pi*y/2)"); gr->Fill(y,"(x+2)/3*cos(pi*y/2)"); gr->Fill(z,"z");
- gr->Fill(c,"-2*(x^2+y^2+z^4-z^2)+0.2"); gr->Fill(d,"1-2*tanh(2*(x+y)^2)");
-
- gr->Light(true); gr->Alpha(true);
- gr->SubPlot(4,3,0); gr->Rotate(40,60); gr->Box(); gr->Surf3(x,y,z,c);
- gr->SubPlot(4,3,1); gr->Rotate(40,60); gr->Box(); gr->Surf3C(x,y,z,c,d);
- gr->SubPlot(4,3,2); gr->Rotate(40,60); gr->Box(); gr->Surf3A(x,y,z,c,d);
- gr->SubPlot(4,3,3); gr->Rotate(40,60); gr->Box(); gr->Cloud(x,y,z,c);
- gr->SubPlot(4,3,4); gr->Rotate(40,60); gr->Box(); gr->Cont3(x,y,z,c); gr->Cont3(x,y,z,c,"x"); gr->Cont3(x,y,z,c,"z");
- gr->SubPlot(4,3,5); gr->Rotate(40,60); gr->Box(); gr->ContF3(x,y,z,c);gr->ContF3(x,y,z,c,"x");gr->ContF3(x,y,z,c,"z");
- gr->SubPlot(4,3,6); gr->Rotate(40,60); gr->Box(); gr->Dens3(x,y,z,c); gr->Dens3(x,y,z,c,"x"); gr->Dens3(x,y,z,c,"z");
- gr->SubPlot(4,3,7); gr->Rotate(40,60); gr->Box(); gr->Dots(x,y,z,c,"","meshnum 15");
- gr->SubPlot(4,3,8); gr->Rotate(40,60); gr->Box(); gr->DensX(c,"",0); gr->DensY(c,"",0); gr->DensZ(c,"",0);
- gr->SubPlot(4,3,9); gr->Rotate(40,60); gr->Box(); gr->ContX(c,"",0); gr->ContY(c,"",0); gr->ContZ(c,"",0);
- gr->SubPlot(4,3,10);gr->Rotate(40,60); gr->Box(); gr->ContFX(c,"",0); gr->ContFY(c,"",0); gr->ContFZ(c,"",0);
-}
-</pre><div align="center"><img src="png/param3.png" alt="Sample param3">
-</div>
-<hr>
-<a name="paramv-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#parser-sample" accesskey="n" rel="next">parser sample</a>, Previous: <a href="#param3-sample" accesskey="p" rel="prev">param3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-paramv"></a>
-<h3 class="section">10.80 Sample ‘<samp>paramv</samp>’</h3>
-
-
-<p>Example of parametric plots for vector fields.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 20 20 20 '(x+2)/3*sin(pi*y/2)'
-new y 20 20 20 '(x+2)/3*cos(pi*y/2)'
-new z 20 20 20 'z+x'
-new ex 20 20 20 'x'
-new ey 20 20 20 'x^2+y'
-new ez 20 20 20 'y^2+z'
-
-new x1 50 50 '(x+2)/3*sin(pi*y/2)'
-new y1 50 50 '(x+2)/3*cos(pi*y/2)'
-new e1 50 50 'x'
-new e2 50 50 'x^2+y'
-
-subplot 3 3 0:rotate 40 60:box:vect x1 y1 e1 e2
-subplot 3 3 1:rotate 40 60:box:flow x1 y1 e1 e2
-subplot 3 3 2:rotate 40 60:box:pipe x1 y1 e1 e2
-subplot 3 3 3:rotate 40 60:box:dew x1 y1 e1 e2
-subplot 3 3 4:rotate 40 60:box:vect x y z ex ey ez
-subplot 3 3 5:rotate 40 60:box
-vect3 x y z ex ey ez:vect3 x y z ex ey ez 'x':vect3 x y z ex ey ez 'z'
-grid3 x y z z '{r9}':grid3 x y z z '{g9}x':grid3 x y z z '{b9}z'
-subplot 3 3 6:rotate 40 60:box:flow x y z ex ey ez
-subplot 3 3 7:rotate 40 60:box:pipe x y z ex ey ez
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_paramv(mglGraph *gr) // parametric plots for vector field
-{
- mglData x(20,20,20), y(20,20,20), z(20,20,20), ex(20,20,20), ey(20,20,20), ez(20,20,20);
- gr->Fill(x,"(x+2)/3*sin(pi*y/2)"); gr->Fill(y,"(x+2)/3*cos(pi*y/2)"); gr->Fill(z,"x+z");
- gr->Fill(ex,"x"); gr->Fill(ey,"x^2+y"); gr->Fill(ez,"y^2+z");
- mglData x1(20,20), y1(20,20), e1(20,20), e2(20,20);
- gr->Fill(x1,"(x+2)/3*sin(pi*y/2)"); gr->Fill(y1,"(x+2)/3*cos(pi*y/2)");
- gr->Fill(e1,"x"); gr->Fill(e2,"x^2+y");
-
- gr->SubPlot(3,3,0); gr->Rotate(40,60); gr->Box(); gr->Vect(x1,y1,e1,e2);
- gr->SubPlot(3,3,1); gr->Rotate(40,60); gr->Box(); gr->Flow(x1,y1,e1,e2);
- gr->SubPlot(3,3,2); gr->Rotate(40,60); gr->Box(); gr->Pipe(x1,y1,e1,e2);
- gr->SubPlot(3,3,3); gr->Rotate(40,60); gr->Box(); gr->Dew(x1,y1,e1,e2);
- gr->SubPlot(3,3,4); gr->Rotate(40,60); gr->Box(); gr->Vect(x,y,z,ex,ey,ez);
- gr->SubPlot(3,3,5); gr->Rotate(40,60); gr->Box();
- gr->Vect3(x,y,z,ex,ey,ez); gr->Vect3(x,y,z,ex,ey,ez,"x"); gr->Vect3(x,y,z,ex,ey,ez,"z");
- gr->Grid3(x,y,z,z,"{r9}"); gr->Grid3(x,y,z,z,"{g9}x"); gr->Grid3(x,y,z,z,"{b9}z");
- gr->SubPlot(3,3,6); gr->Rotate(40,60); gr->Box(); gr->Flow(x,y,z,ex,ey,ez);
- gr->SubPlot(3,3,7); gr->Rotate(40,60); gr->Box(); gr->Pipe(x,y,z,ex,ey,ez);
-}
-</pre><div align="center"><img src="png/paramv.png" alt="Sample paramv">
-</div>
-<hr>
-<a name="parser-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#pde-sample" accesskey="n" rel="next">pde sample</a>, Previous: <a href="#paramv-sample" accesskey="p" rel="prev">paramv sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-parser"></a>
-<h3 class="section">10.81 Sample ‘<samp>parser</samp>’</h3>
-
-
-<p>Basic MGL script.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">title 'MGL parser sample'
-# call function
-call 'sample'
-
-# ordinary for-loop
-for $0 -1 1 0.1
-if $0<0:line 0 0 1 $0 'r':else:line 0 0 1 $0 'g':endif
-next
-
-# if-elseif-else
-for $i -1 1 0.5
-if $i<0
-text 1.1 $i '$i' 'b'
-elseif $i>0
-text 1.1 $i '$i' 'r'
-else
-text 1.1 $i '$i'
-endif
-next
-
-# ordinary do-while
-do
-defnum $i $i-0.2
-line 0 0 $i 1 'b'
-while $i>0
-
-# do-next-break
-do
-defnum $i $i-0.2
-if $i<-1 then break
-line 0 0 $i 1 'm'
-next
-
-# for-while-continue
-for $i -5 10
-text $i/5 1.1 'a'+($i+5)
-if $i<0
-text $i/5-0.06 1.1 '--' 'b'
-elseif mod($i,2)=0
-text $i/5-0.06 1.1 '~' 'r'
-else
-# NOTE: 'continue' bypass the 'while'!
-continue
-endif
-# NOTE: 'while' limit the actual number of iterations
-while $i<5
-
-# nested loops
-for $i 0 1 0.1
-for $j 0 1 0.1
-ball $i $j
-if $j>0.5 then continue
-ball $i $j 'b+'
-next
-next
-
-func 'sample'
-new dat 100 'sin(2*pi*(i/99+1))'
-plot dat;xrange -1 0
-box:axis
-xlabel 'x':ylabel 'y'
-return
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_parser(mglGraph *gr) // example of MGL parsing
-{ // NOTE: MGL version show much more variants of loops and conditions.
- gr->Title("MGL parser sample");
- double a[100]; // let a_i = sin(4*pi*x), x=0...1
- for(int i=0;i<100;i++)a[i]=sin(2*M_PI*i/99);
- mglParse *parser = new mglParse;
- // Add MGL variable and set yours data to it.
- mglData *d = dynamic_cast<mglData*>(parser->AddVar("dat"));
- if(d) d->Set(a,100);
- parser->Execute(gr, "plot dat; xrange -1 0\nbox\naxis");
- // You may break script at any line do something
- // and continue after that.
- parser->Execute(gr, "xlabel 'x'\nylabel 'y'\nbox");
- // Also you may use cycles or conditions in script.
- parser->Execute(gr, "for $0 -1 1 0.1\nif $0<0\n"
- "line 0 0 1 $0 'r':else:line 0 0 1 $0 'g'\n"
- "endif\nnext");
- // You may use for or do-while loops as C/C++ one
- double i=1;
- do {
- char buf[64]; sprintf(buf,"line 0 0 %g 1 'b'",i);
- parser->Execute(gr, buf); i=i-0.2;
- } while(i>0);
- // or as MGL one.
- parser->Execute(gr, "for $i -1 1 0.5\n"
- "if $i<0\ntext 1.1 $i '$i' 'b'\n"
- "elseif $i>0\ntext 1.1 $i '$i' 'r'\n"
- "else\ntext 1.1 $i '$i'\nendif\nnext\n");
- // There are 'break' and 'continue' commands in MGL too.
- // NOTE: 'next' act as "while(1)" in do-while loops.
- parser->Execute(gr, "do\ndefnum $i $i-0.2\n"
- "if $i<-1 then break\nline 0 0 $i 1 'm'\nnext\n");
- // One issue with 'continue' -- it bypass 'while' checking
- parser->Execute(gr, "for $i -5 10\ntext $i/5 1.1 'a'+($i+5)\nif $i<0\n"
- "text $i/5-0.06 1.1 '--' 'b'\n"
- "elseif mod($i,2)=0\ntext $i/5-0.06 1.1 '~' 'r'\n"
- "else\ncontinue\nendif\n"
- // NOTE: 'while' limit the actual number of iterations in for-loop.
- "while $i<5\n");
- // Finally, MGL support nested loops too.
- parser->Execute(gr, "for $i 0 1 0.1\nfor $j 0 1 0.1\nball $i $j\n"
- "if $j>0.5 then continue\nball $i $j 'b+'\nnext\nnext\n");
- // Clean up memory.
- delete parser;
-}
-</pre><div align="center"><img src="png/parser.png" alt="Sample parser">
-</div>
-<hr>
-<a name="pde-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#pendelta-sample" accesskey="n" rel="next">pendelta sample</a>, Previous: <a href="#parser-sample" accesskey="p" rel="prev">parser sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-pde"></a>
-<h3 class="section">10.82 Sample ‘<samp>pde</samp>’</h3>
-
-
-<p>Example of <a href="#pde">pde</a> solver.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new re 128 'exp(-48*(x+0.7)^2)':new im 128
-pde a 'p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)' re im 0.01 30
-transpose a
-subplot 1 1 0 '<_':title 'PDE solver'
-axis:xlabel '\i x':ylabel '\i z'
-crange 0 1:dens a 'wyrRk'
-fplot '-x' 'k|'
-text 0 0.95 'Equation: ik_0\partial_zu + \Delta u + x\cdot u + i \frac{x+z}{2}\cdot u = 0\n{}absorption: (x+z)/2 for x+z>0'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_pde(mglGraph *gr) // PDE sample
-{
- mglData a,re(128),im(128);
- gr->Fill(re,"exp(-48*(x+0.7)^2)");
- a = gr->PDE("p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)", re, im, 0.01, 30);
- a.Transpose("yxz");
- if(big!=3) {gr->SubPlot(1,1,0,"<_"); gr->Title("PDE solver"); }
- gr->SetRange('c',0,1); gr->Dens(a,"wyrRk");
- gr->Axis(); gr->Label('x', "\\i x"); gr->Label('y', "\\i z");
- gr->FPlot("-x", "k|");
- gr->Puts(mglPoint(0, 0.95), "Equation: ik_0\\partial_zu + \\Delta u + x\\cdot u + i \\frac{x+z}{2}\\cdot u = 0\nabsorption: (x+z)/2 for x+z>0");
-}
-</pre><div align="center"><img src="png/pde.png" alt="Sample pde">
-</div>
-<hr>
-<a name="pendelta-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#pipe-sample" accesskey="n" rel="next">pipe sample</a>, Previous: <a href="#pde-sample" accesskey="p" rel="prev">pde sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-pendelta"></a>
-<h3 class="section">10.83 Sample ‘<samp>pendelta</samp>’</h3>
-
-
-<p>Example of <a href="#pendelta">pendelta</a> for lines and glyphs smoothing.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 6
-list a 0.25 0.5 1 2 4
-for $0 0 4
-pendelta a($0)
-define $1 0.5*$0-1
-line -1 $1 1 $1 'r'
-text 0 $1 'delta=',a($0)
-next
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_pendelta(mglGraph *gr)
-{
- double a[5]={0.25,0.5,1,2,4};
- gr->SetQuality(6);
- char buf[64];
- for(int i=0;i<5;i++)
- {
- gr->SetPenDelta(a[i]);
- gr->Line(mglPoint(-1,0.5*i-1), mglPoint(1,0.5*i-1),"r");
- sprintf(buf,"delta=%g",a[i]);
- gr->Puts(mglPoint(0,0.5*i-1),buf);
- }
-}
-</pre><div align="center"><img src="png/pendelta.png" alt="Sample pendelta">
-</div>
-<hr>
-<a name="pipe-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#plot-sample" accesskey="n" rel="next">plot sample</a>, Previous: <a href="#pendelta-sample" accesskey="p" rel="prev">pendelta sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-pipe"></a>
-<h3 class="section">10.84 Sample ‘<samp>pipe</samp>’</h3>
-
-
-<p>Function <a href="#pipe">pipe</a> is similar to <a href="#flow">flow</a> but draw pipes (tubes) which radius is proportional to the amplitude of vector field. The color scheme is used for coloring (see <a href="#Color-scheme">Color scheme</a>). At this warm color corresponds to normal flow (like attractor), cold one corresponds to inverse flow (like source).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2v'
-call 'prepare3v'
-subplot 2 2 0 '':title 'Pipe plot (default)':light on:box:pipe a b
-subplot 2 2 1 '':title '"i" style':box:pipe a b 'i'
-subplot 2 2 2 '':title 'from edges only':box:pipe a b '#'
-subplot 2 2 3:title '3d variant':rotate 50 60:box:pipe ex ey ez '' 0.1
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_pipe(mglGraph *gr)
-{
- mglData a,b; mgls_prepare2v(&a,&b);
- if(big!=3) {gr->SubPlot(2,2,0,""); gr->Title("Pipe plot (default)");}
- gr->Light(true); gr->Box(); gr->Pipe(a,b);
- if(big==3) return;
- gr->SubPlot(2,2,1,""); gr->Title("'i' style"); gr->Box(); gr->Pipe(a,b,"i");
- gr->SubPlot(2,2,2,""); gr->Title("'\\#' style"); gr->Box(); gr->Pipe(a,b,"#");
- mglData ex,ey,ez; mgls_prepare3v(&ex,&ey,&ez);
- gr->SubPlot(2,2,3); gr->Title("3d variant"); gr->Rotate(50,60);
- gr->Box(); gr->Pipe(ex,ey,ez,"",0.1);
-}
-</pre><div align="center"><img src="png/pipe.png" alt="Sample pipe">
-</div>
-<hr>
-<a name="plot-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#pmap-sample" accesskey="n" rel="next">pmap sample</a>, Previous: <a href="#pipe-sample" accesskey="p" rel="prev">pipe sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-plot"></a>
-<h3 class="section">10.85 Sample ‘<samp>plot</samp>’</h3>
-
-
-<p>Function <a href="#plot">plot</a> is most standard way to visualize 1D data array. By default, <code>Plot</code> use colors from palette. However, you can specify manual color/palette, and even set to use new color for each points by using ‘<samp>!</samp>’ style. Another feature is ‘<samp> </samp>’ style which draw only markers without line between points.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 2 2 0 '':title 'Plot plot (default)':box:plot y
-subplot 2 2 2 '':title ''!' style; 'rgb' palette':box:plot y 'o!rgb'
-subplot 2 2 3 '':title 'just markers':box:plot y ' +'
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 2 2 1:title '3d variant':rotate 50 60:box:plot xc yc z 'rs'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_plot(mglGraph *gr)
-{
- mglData y; mgls_prepare1d(&y); gr->SetOrigin(0,0,0);
- if(big!=3) { gr->SubPlot(2,2,0,""); gr->Title("Plot plot (default)"); }
- gr->Box(); gr->Plot(y);
- if(big==3) return;
- gr->SubPlot(2,2,2,""); gr->Title("'!' style; 'rgb' palette"); gr->Box(); gr->Plot(y,"o!rgb");
- gr->SubPlot(2,2,3,""); gr->Title("just markers"); gr->Box(); gr->Plot(y," +");
- gr->SubPlot(2,2,1); gr->Title("3d variant"); gr->Rotate(50,60); gr->Box();
- mglData yc(30), xc(30), z(30); z.Modify("2*x-1");
- yc.Modify("sin(pi*(2*x-1))"); xc.Modify("cos(pi*2*x-pi)");
- gr->Plot(xc,yc,z,"rs");
-}
-</pre><div align="center"><img src="png/plot.png" alt="Sample plot">
-</div>
-<hr>
-<a name="pmap-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#primitives-sample" accesskey="n" rel="next">primitives sample</a>, Previous: <a href="#plot-sample" accesskey="p" rel="prev">plot sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-pmap"></a>
-<h3 class="section">10.86 Sample ‘<samp>pmap</samp>’</h3>
-
-
-<p>Function <a href="#pmap">pmap</a> draw Poincare map – show intersections of the curve and the surface.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_^':title 'Poincare map sample'
-ode r 'cos(y)+sin(z);cos(z)+sin(x);cos(x)+sin(y)' 'xyz' [0.1,0,0] 0.1 100
-rotate 40 60:copy x r(0):copy y r(1):copy z r(2)
-ranges x y z
-axis:plot x y z 'b'
-xlabel '\i x' 0:ylabel '\i y' 0:zlabel '\i z'
-pmap x y z z 'b#o'
-fsurf '0'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_pmap(mglGraph *gr)
-{
- gr->SubPlot(1,1,0,"<_^");
- if(big!=3) gr->Title("Poincare map sample");
- mglData ini(3); ini[0]=0.1;
- mglData r(mglODE("cos(y)+sin(z);cos(z)+sin(x);cos(x)+sin(y)","xyz",ini,0.1,100));
- mglData x(r.SubData(0)),y(r.SubData(1)), z(r.SubData(2));
- gr->Rotate(40,60); gr->SetRanges(x,y,z);
- gr->Axis(); gr->FSurf("0"); gr->Plot(x,y,z,"b");
- gr->Label('x',"\\i x",0); gr->Label('y',"\\i y",0); gr->Label('z',"\\i z",0);
- gr->Pmap(x,y,z,z, "b#o");
-}
-</pre><div align="center"><img src="png/pmap.png" alt="Sample pmap">
-</div>
-<hr>
-<a name="primitives-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#projection-sample" accesskey="n" rel="next">projection sample</a>, Previous: <a href="#pmap-sample" accesskey="p" rel="prev">pmap sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-primitives"></a>
-<h3 class="section">10.87 Sample ‘<samp>primitives</samp>’</h3>
-
-
-<p>Example of primitives: <a href="#line">line</a>, <a href="#curve">curve</a>, <a href="#rhomb">rhomb</a>, <a href="#ellipse">ellipse</a>, <a href="#face">face</a>, <a href="#sphere">sphere</a>, <a href="#drop">drop</a>, <a href="#cone">cone</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0 '':title 'Line, Curve, Rhomb, Ellipse' '' -1.5
-line -1 -1 -0.5 1 'qAI'
-curve -0.6 -1 1 1 0 1 1 1 'rA'
-ball 0 -0.5 '*':ball 1 -0.1 '*'
-rhomb 0 0.4 1 0.9 0.2 'b#'
-rhomb 0 0 1 0.4 0.2 'cg@'
-ellipse 0 -0.5 1 -0.1 0.2 'u#'
-ellipse 0 -1 1 -0.6 0.2 'm@'
-
-subplot 2 3 1 '':title 'Arc, Polygon, Symbol';size -1.2
-arc -0.6 0 -0.6 0.3 180 '2kA':ball -0.6 0
-polygon 0 0 0 0.4 6 'r'
-new x 50 'cos(3*pi*x)':new y 50 'sin(pi*x)'
-addsymbol 'a' x y
-symbol 0.7 0 'a'
-
-light on
-subplot 2 3 3 '<^>' 0 -0.2:title 'Face[xyz]';size -1.5:rotate 50 60:box
-facex 1 0 -1 1 1 'r':facey -1 -1 -1 1 1 'g':facez 1 -1 -1 -1 1 'b'
-face -1 -1 1 -1 1 1 1 -1 0 1 1 1 'bmgr'
-
-subplot 2 3 5 '':title 'Cone';size -1.5
-cone -0.7 -0.3 0 -0.7 0.7 0.5 0.2 0.1 'b':text -0.7 -0.7 'no edges\n(default)';size -1.5
-cone 0 -0.3 0 0 0.7 0.5 0.2 0.1 'g@':text 0 -0.7 'with edges\n("\@" style)';size -1.5
-cone 0.7 -0.3 0 0.7 0.7 0.5 0.2 0 'Ggb':text 0.7 -0.7 '"arrow" with\n{}gradient';size -1.5
-subplot 2 2 2 '':title 'Sphere and Drop'
-line -0.9 0 1 0.9 0 1
-text -0.9 0.4 'sh=0':drop -0.9 0 0 1 0.5 'r' 0:ball -0.9 0 1 'k'
-text -0.3 0.6 'sh=0.33':drop -0.3 0 0 1 0.5 'r' 0.33:ball -0.3 0 1 'k'
-text 0.3 0.8 'sh=0.67':drop 0.3 0 0 1 0.5 'r' 0.67:ball 0.3 0 1 'k'
-text 0.9 1. 'sh=1':drop 0.9 0 0 1 0.5 'r' 1:ball 0.9 0 1 'k'
-
-text -0.9 -1.1 'asp=0.33':drop -0.9 -0.7 0 1 0.5 'b' 0 0.33
-text -0.3 -1.1 'asp=0.67':drop -0.3 -0.7 0 1 0.5 'b' 0 0.67
-text 0.3 -1.1 'asp=1':drop 0.3 -0.7 0 1 0.5 'b' 0 1
-text 0.9 -1.1 'asp=1.5':drop 0.9 -0.7 0 1 0.5 'b' 0 1.5
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_primitives(mglGraph *gr) // flag #
-{
- gr->SubPlot(2,2,0,""); gr->Title("Line, Curve, Rhomb, Ellipse","",-1.5);
- gr->Line(mglPoint(-1,-1),mglPoint(-0.5,1),"qAI");
- gr->Curve(mglPoint(-0.6,-1),mglPoint(1,1),mglPoint(0,1),mglPoint(1,1),"rA");
- gr->Rhomb(mglPoint(0,0.4),mglPoint(1,0.9),0.2,"b#");
- gr->Rhomb(mglPoint(0,0),mglPoint(1,0.4),0.2,"cg@");
- gr->Ellipse(mglPoint(0,-0.5),mglPoint(1,-0.1),0.2,"u#");
- gr->Ellipse(mglPoint(0,-1),mglPoint(1,-0.6),0.2,"m@");
- gr->Mark(mglPoint(0,-0.5),"*"); gr->Mark(mglPoint(1,-0.1),"*");
-
- gr->SubPlot(2,3,1,""); gr->Title("Arc, Polygon, Symbol","", -1.2*2);
- gr->Arc(mglPoint(-0.6,0), mglPoint(-0.6,0.3), 180, "2kA"); gr->Ball(-0.6,0);
- gr->Polygon(mglPoint(), mglPoint(0,0.4), 6, "r");
- mglData x(50), y(50); gr->Fill(x,"cos(3*pi*x)"); gr->Fill(y,"sin(pi*x)");
- gr->DefineSymbol('a',x,y); gr->Symbol(mglPoint(0.7),'a');
-
- gr->Light(true);
- gr->SubPlot(2,3,3,"<^>",0,-0.2); gr->Title("Face[xyz]", "", -1.5*2);
- gr->Rotate(50,60); gr->Box();
- gr->FaceX(mglPoint(1,0,-1),1,1,"r");
- gr->FaceY(mglPoint(-1,-1,-1),1,1,"g");
- gr->FaceZ(mglPoint(1,-1,-1),-1,1,"b");
- gr->Face(mglPoint(-1,-1,1),mglPoint(-1,1,1),mglPoint(1,-1,0),mglPoint(1,1,1),"bmgr");
-
- gr->SubPlot(2,3,5,""); gr->Title("Cone", "", -1.5*2);
- gr->Cone(mglPoint(-0.7,-0.3),mglPoint(-0.7,0.7,0.5),0.2,0.1,"b");
- gr->Puts(mglPoint(-0.7,-0.7),"no edges\n(default)","", -1.5);
- gr->Cone(mglPoint(0,-0.3),mglPoint(0,0.7,0.5),0.2,0.1,"g@");
- gr->Puts(mglPoint(0,-0.7),"with edges\n('\\@' style)","", -1.5);
- gr->Cone(mglPoint(0.7,-0.3),mglPoint(0.7,0.7,0.5),0.2,0,"ry");
- gr->Puts(mglPoint(0.7,-0.7),"'arrow' with\ngradient","", -1.5);
-
- gr->SubPlot(2,2,2,""); gr->Title("Sphere and Drop"); gr->Alpha(false);
- gr->Puts(mglPoint(-0.9,0.4),"sh=0"); gr->Ball(mglPoint(-0.9,0,1),'k');
- gr->Drop(mglPoint(-0.9,0),mglPoint(0,1),0.5,"r",0);
- gr->Puts(mglPoint(-0.3,0.6),"sh=0.33"); gr->Ball(mglPoint(-0.3,0,1),'k');
- gr->Drop(mglPoint(-0.3,0),mglPoint(0,1),0.5,"r",0.33);
- gr->Puts(mglPoint(0.3,0.8),"sh=0.67"); gr->Ball(mglPoint(0.3,0,1),'k');
- gr->Drop(mglPoint(0.3,0),mglPoint(0,1),0.5,"r",0.67);
- gr->Puts(mglPoint(0.9,1),"sh=1"); gr->Ball(mglPoint(0.9,0,1),'k');
- gr->Drop(mglPoint(0.9,0),mglPoint(0,1),0.5,"r",1);
- gr->Line(mglPoint(-0.9,0,1),mglPoint(0.9,0,1),"b");
-
- gr->Puts(mglPoint(-0.9,-1.1),"asp=0.33");
- gr->Drop(mglPoint(-0.9,-0.7),mglPoint(0,1),0.5,"b",0,0.33);
- gr->Puts(mglPoint(-0.3,-1.1),"asp=0.67");
- gr->Drop(mglPoint(-0.3,-0.7),mglPoint(0,1),0.5,"b",0,0.67);
- gr->Puts(mglPoint(0.3,-1.1),"asp=1");
- gr->Drop(mglPoint(0.3,-0.7),mglPoint(0,1),0.5,"b",0,1);
- gr->Puts(mglPoint(0.9,-1.1),"asp=1.5");
- gr->Drop(mglPoint(0.9,-0.7),mglPoint(0,1),0.5,"b",0,1.5);
-}
-</pre><div align="center"><img src="png/primitives.png" alt="Sample primitives">
-</div>
-<hr>
-<a name="projection-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#projection5-sample" accesskey="n" rel="next">projection5 sample</a>, Previous: <a href="#primitives-sample" accesskey="p" rel="prev">primitives sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-projection"></a>
-<h3 class="section">10.88 Sample ‘<samp>projection</samp>’</h3>
-
-
-<p>Example of plot projection (<a href="#ternary">ternary</a>=4).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">ranges 0 1 0 1 0 1
-new x 50 '0.25*(1+cos(2*pi*x))'
-new y 50 '0.25*(1+sin(2*pi*x))'
-new z 50 'x'
-new a 20 30 '30*x*y*(1-x-y)^2*(x+y<1)'
-new rx 10 'rnd':new ry 10:fill ry '(1-v)*rnd' rx
-light on
-
-title 'Projection sample':ternary 4:rotate 50 60
-box:axis:grid
-plot x y z 'r2':surf a '#'
-xlabel 'X':ylabel 'Y':zlabel 'Z'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_projection(mglGraph *gr) // flag #
-{
- gr->SetRanges(0,1,0,1,0,1);
- mglData x(50),y(50),z(50),rx(10),ry(10), a(20,30);
- a.Modify("30*x*y*(1-x-y)^2*(x+y<1)");
- x.Modify("0.25*(1+cos(2*pi*x))");
- y.Modify("0.25*(1+sin(2*pi*x))");
- rx.Modify("rnd"); ry.Modify("(1-v)*rnd",rx);
- z.Modify("x");
-
- if(big!=3) gr->Title("Projection sample");
- gr->Ternary(4);
- gr->Rotate(50,60); gr->Light(true);
- gr->Plot(x,y,z,"r2"); gr->Surf(a,"#");
- gr->Axis(); gr->Grid(); gr->Box();
- gr->Label('x',"X",1); gr->Label('y',"Y",1); gr->Label('z',"Z",1);
-}
-</pre><div align="center"><img src="png/projection.png" alt="Sample projection">
-</div>
-<hr>
-<a name="projection5-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#pulse-sample" accesskey="n" rel="next">pulse sample</a>, Previous: <a href="#projection-sample" accesskey="p" rel="prev">projection sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-projection5"></a>
-<h3 class="section">10.89 Sample ‘<samp>projection5</samp>’</h3>
-
-
-<p>Example of plot projection in ternary coordinates (<a href="#ternary">ternary</a>=5).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">ranges 0 1 0 1 0 1
-new x 50 '0.25*(1+cos(2*pi*x))'
-new y 50 '0.25*(1+sin(2*pi*x))'
-new z 50 'x'
-new a 20 30 '30*x*y*(1-x-y)^2*(x+y<1)'
-new rx 10 'rnd':new ry 10:fill ry '(1-v)*rnd' rx
-light on
-
-title 'Projection sample (ternary)':ternary 5:rotate 50 60
-box:axis:grid
-plot x y z 'r2':surf a '#'
-xlabel 'X':ylabel 'Y':zlabel 'Z'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_projection5(mglGraph *gr) // flag #
-{
- gr->SetRanges(0,1,0,1,0,1);
- mglData x(50),y(50),z(50),rx(10),ry(10), a(20,30);
- a.Modify("30*x*y*(1-x-y)^2*(x+y<1)");
- x.Modify("0.25*(1+cos(2*pi*x))");
- y.Modify("0.25*(1+sin(2*pi*x))");
- rx.Modify("rnd"); ry.Modify("(1-v)*rnd",rx);
- z.Modify("x");
-
- if(big!=3) gr->Title("Projection sample (ternary)");
- gr->Ternary(5);
- gr->Rotate(50,60); gr->Light(true);
- gr->Plot(x,y,z,"r2"); gr->Surf(a,"#");
- gr->Axis(); gr->Grid(); gr->Box();
- gr->Label('x',"X",1); gr->Label('y',"Y",1); gr->Label('z',"Z",1);
-}
-</pre><div align="center"><img src="png/projection5.png" alt="Sample projection5">
-</div>
-<hr>
-<a name="pulse-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#qo2d-sample" accesskey="n" rel="next">qo2d sample</a>, Previous: <a href="#projection5-sample" accesskey="p" rel="prev">projection5 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-pulse"></a>
-<h3 class="section">10.90 Sample ‘<samp>pulse</samp>’</h3>
-
-
-<p>Example of <a href="#pulse">pulse</a> parameter determining.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Pulse sample'
-new a 100 'exp(-6*x^2)':ranges 0 a.nx-1 0 1
-axis:plot a
-
-pulse b a 'x'
-
-define m a.max
-
-line b(1) 0 b(1) m 'r='
-line b(1)-b(3)/2 0 b(1)-b(3)/2 m 'm|'
-line b(1)+b(3)/2 0 b(1)+b(3)/2 m 'm|'
-line 0 0.5*m a.nx-1 0.5*m 'h'
-new x 100 'x'
-plot b(0)*(1-((x-b(1))/b(2))^2) 'g'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_pulse(mglGraph *gr)
-{
- gr->SubPlot(1,1,0,"<_");
- if(big!=3) gr->Title("Pulse sample");
- mglData a(100); gr->Fill(a,"exp(-6*x^2)");
- gr->SetRanges(0, a.nx-1, 0, 1);
- gr->Axis(); gr->Plot(a);
- mglData b(a.Pulse('x'));
- double m = b[0];
- gr->Line(mglPoint(b[1],0), mglPoint(b[1],m),"r=");
- gr->Line(mglPoint(b[1]-b[3]/2,0), mglPoint(b[1]-b[3]/2,m),"m|");
- gr->Line(mglPoint(b[1]+b[3]/2,0), mglPoint(b[1]+b[3]/2,m),"m|");
- gr->Line(mglPoint(0,m/2), mglPoint(a.nx-1,m/2),"h");
- char func[128]; sprintf(func,"%g*(1-((x-%g)/%g)^2)",b[0],b[1],b[2]);
- gr->FPlot(func,"g");
-}
-</pre><div align="center"><img src="png/pulse.png" alt="Sample pulse">
-</div>
-<hr>
-<a name="qo2d-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality0-sample" accesskey="n" rel="next">quality0 sample</a>, Previous: <a href="#pulse-sample" accesskey="p" rel="prev">pulse sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-qo2d"></a>
-<h3 class="section">10.91 Sample ‘<samp>qo2d</samp>’</h3>
-
-
-<p>Example of PDE solving by quasioptical approach <a href="#qo2d">qo2d</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">define $1 'p^2+q^2-x-1+i*0.5*(y+x)*(y>-x)'
-subplot 1 1 0 '<_':title 'Beam and ray tracing'
-ray r $1 -0.7 -1 0 0 0.5 0 0.02 2:plot r(0) r(1) 'k'
-axis:xlabel '\i x':ylabel '\i z'
-new re 128 'exp(-48*x^2)':new im 128
-new xx 1:new yy 1
-qo2d a $1 re im r 1 30 xx yy
-crange 0 1:dens xx yy a 'wyrRk':fplot '-x' 'k|'
-text 0 0.85 'absorption: (x+y)/2 for x+y>0'
-text 0.7 -0.05 'central ray'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_qo2d(mglGraph *gr)
-{
- mglData r, xx, yy, a, im(128), re(128);
- const char *ham = "p^2+q^2-x-1+i*0.5*(y+x)*(y>-x)";
- r = mglRay(ham, mglPoint(-0.7, -1), mglPoint(0, 0.5), 0.02, 2);
- if(big!=3) {gr->SubPlot(1,1,0,"<_"); gr->Title("Beam and ray tracing");}
- gr->Plot(r.SubData(0), r.SubData(1), "k");
- gr->Axis(); gr->Label('x', "\\i x"); gr->Label('y', "\\i y");
- // now start beam tracing
- gr->Fill(re,"exp(-48*x^2)");
- a = mglQO2d(ham, re, im, r, xx, yy, 1, 30);
- gr->SetRange('c',0, 1);
- gr->Dens(xx, yy, a, "wyrRk");
- gr->FPlot("-x", "k|");
- gr->Puts(mglPoint(0, 0.85), "absorption: (x+y)/2 for x+y>0");
- gr->Puts(mglPoint(0.7, -0.05), "central ray");
-}
-</pre><div align="center"><img src="png/qo2d.png" alt="Sample qo2d">
-</div>
-<hr>
-<a name="quality0-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality1-sample" accesskey="n" rel="next">quality1 sample</a>, Previous: <a href="#qo2d-sample" accesskey="p" rel="prev">qo2d sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality0"></a>
-<h3 class="section">10.92 Sample ‘<samp>quality0</samp>’</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=0.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 0
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_quality0(mglGraph *gr) // test file export
-{
- gr->SetQuality(0); all_prims(gr);
-}
-</pre><div align="center"><img src="png/quality0.png" alt="Sample quality0">
-</div>
-<hr>
-<a name="quality1-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality2-sample" accesskey="n" rel="next">quality2 sample</a>, Previous: <a href="#quality0-sample" accesskey="p" rel="prev">quality0 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality1"></a>
-<h3 class="section">10.93 Sample ‘<samp>quality1</samp>’</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=1.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 1
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_quality1(mglGraph *gr) // test file export
-{
- gr->SetQuality(1); all_prims(gr);
-}
-</pre><div align="center"><img src="png/quality1.png" alt="Sample quality1">
-</div>
-<hr>
-<a name="quality2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality4-sample" accesskey="n" rel="next">quality4 sample</a>, Previous: <a href="#quality1-sample" accesskey="p" rel="prev">quality1 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality2"></a>
-<h3 class="section">10.94 Sample ‘<samp>quality2</samp>’</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=2.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 2
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_quality2(mglGraph *gr) // test file export
-{
- gr->SetQuality(2); all_prims(gr);
-}
-</pre><div align="center"><img src="png/quality2.png" alt="Sample quality2">
-</div>
-<hr>
-<a name="quality4-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality5-sample" accesskey="n" rel="next">quality5 sample</a>, Previous: <a href="#quality2-sample" accesskey="p" rel="prev">quality2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality4"></a>
-<h3 class="section">10.95 Sample ‘<samp>quality4</samp>’</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=4.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 4
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_quality4(mglGraph *gr) // test file export
-{
- gr->SetQuality(4); all_prims(gr);
-}
-</pre><div align="center"><img src="png/quality4.png" alt="Sample quality4">
-</div>
-<hr>
-<a name="quality5-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality6-sample" accesskey="n" rel="next">quality6 sample</a>, Previous: <a href="#quality4-sample" accesskey="p" rel="prev">quality4 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality5"></a>
-<h3 class="section">10.96 Sample ‘<samp>quality5</samp>’</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=5.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 5
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_quality5(mglGraph *gr) // test file export
-{
- gr->SetQuality(5); all_prims(gr);
-}
-</pre><div align="center"><img src="png/quality5.png" alt="Sample quality5">
-</div>
-<hr>
-<a name="quality6-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality8-sample" accesskey="n" rel="next">quality8 sample</a>, Previous: <a href="#quality5-sample" accesskey="p" rel="prev">quality5 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality6"></a>
-<h3 class="section">10.97 Sample ‘<samp>quality6</samp>’</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=6.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 6
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_quality6(mglGraph *gr) // test file export
-{
- gr->SetQuality(6); all_prims(gr);
-}
-</pre><div align="center"><img src="png/quality6.png" alt="Sample quality6">
-</div>
-<hr>
-<a name="quality8-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#radar-sample" accesskey="n" rel="next">radar sample</a>, Previous: <a href="#quality6-sample" accesskey="p" rel="prev">quality6 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality8"></a>
-<h3 class="section">10.98 Sample ‘<samp>quality8</samp>’</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=8.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 8
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_quality8(mglGraph *gr) // test file export
-{
- gr->SetQuality(8); all_prims(gr);
-}
-</pre><div align="center"><img src="png/quality8.png" alt="Sample quality8">
-</div>
-<hr>
-<a name="radar-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#refill-sample" accesskey="n" rel="next">refill sample</a>, Previous: <a href="#quality8-sample" accesskey="p" rel="prev">quality8 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-radar"></a>
-<h3 class="section">10.99 Sample ‘<samp>radar</samp>’</h3>
-
-
-<p>The <a href="#radar">radar</a> plot is variant of <a href="#plot">plot</a>, which make plot in polar coordinates and draw radial rays in point directions. If you just need a plot in polar coordinates then I recommend to use <a href="#Curvilinear-coordinates">Curvilinear coordinates</a> or <a href="#plot">plot</a> in parametric form with <code>x=r*cos(fi); y=r*sin(fi);</code>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new yr 10 3 '0.4*sin(pi*(x+1.5+y/2)+0.1*rnd)'
-subplot 1 1 0 '':title 'Radar plot (with grid, "\#")':radar yr '#'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_radar(mglGraph *gr)
-{
- mglData yr(10,3); yr.Modify("0.4*sin(pi*(2*x+y))+0.1*rnd");
- if(big!=3) { gr->SubPlot(1,1,0,""); gr->Title("Radar plot (with grid, '\\#')"); }
- gr->Radar(yr,"#");
-}
-</pre><div align="center"><img src="png/radar.png" alt="Sample radar">
-</div>
-<hr>
-<a name="refill-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#region-sample" accesskey="n" rel="next">region sample</a>, Previous: <a href="#radar-sample" accesskey="p" rel="prev">radar sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-refill"></a>
-<h3 class="section">10.100 Sample ‘<samp>refill</samp>’</h3>
-
-
-<p>Example of <a href="#refill">refill</a> and <a href="#gspline">gspline</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 10 '0.5+rnd':cumsum x 'x':norm x -1 1
-copy y sin(pi*x)/1.5
-subplot 2 2 0 '<_':title 'Refill sample'
-box:axis:plot x y 'o ':fplot 'sin(pi*x)/1.5' 'B:'
-new r 100:refill r x y:plot r 'r'
-
-subplot 2 2 1 '<_':title 'Global spline'
-box:axis:plot x y 'o ':fplot 'sin(pi*x)/1.5' 'B:'
-new r 100:gspline r x y:plot r 'r'
-
-new y 10 '0.5+rnd':cumsum y 'x':norm y -1 1
-copy xx x:extend xx 10
-copy yy y:extend yy 10:transpose yy
-copy z sin(pi*xx*yy)/1.5
-alpha on:light on
-subplot 2 2 2:title '2d regular':rotate 40 60
-box:axis:mesh xx yy z 'k'
-new rr 100 100:refill rr x y z:surf rr
-
-new xx 10 10 '(x+1)/2*cos(y*pi/2-1)':new yy 10 10 '(x+1)/2*sin(y*pi/2-1)'
-copy z sin(pi*xx*yy)/1.5
-subplot 2 2 3:title '2d non-regular':rotate 40 60
-box:axis:plot xx yy z 'ko '
-new rr 100 100:refill rr xx yy z:surf rr
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_refill(mglGraph *gr)
-{
- mglData x(10), y(10), r(100);
- x.Modify("0.5+rnd"); x.CumSum("x"); x.Norm(-1,1);
- y.Modify("sin(pi*v)/1.5",x);
- if(big!=3) { gr->SubPlot(2,2,0,"<_"); gr->Title("Refill sample"); }
- gr->Axis(); gr->Box(); gr->Plot(x,y,"o ");
- gr->Refill(r,x,y); // or you can use r.Refill(x,y,-1,1);
- gr->Plot(r,"r"); gr->FPlot("sin(pi*x)/1.5","B:");
- if(big==3) return;
- gr->SubPlot(2,2,1,"<_"); gr->Title("Global spline");
- gr->Axis(); gr->Box(); gr->Plot(x,y,"o ");
- r.RefillGS(x,y,-1,1); gr->Plot(r,"r");
- gr->FPlot("sin(pi*x)/1.5","B:");
-
- gr->Alpha(true); gr->Light(true);
- mglData z(10,10), xx(10,10), yy(10,10), rr(100,100);
- y.Modify("0.5+rnd"); y.CumSum("x"); y.Norm(-1,1);
- for(int i=0;i<10;i++) for(int j=0;j<10;j++)
- z.a[i+10*j] = sin(M_PI*x.a[i]*y.a[j])/1.5;
- gr->SubPlot(2,2,2); gr->Title("2d regular"); gr->Rotate(40,60);
- gr->Axis(); gr->Box(); gr->Mesh(x,y,z,"k");
- gr->Refill(rr,x,y,z); gr->Surf(rr);
-
- gr->Fill(xx,"(x+1)/2*cos(y*pi/2-1)");
- gr->Fill(yy,"(x+1)/2*sin(y*pi/2-1)");
- for(int i=0;i<10*10;i++)
- z.a[i] = sin(M_PI*xx.a[i]*yy.a[i])/1.5;
- gr->SubPlot(2,2,3); gr->Title("2d non-regular"); gr->Rotate(40,60);
- gr->Axis(); gr->Box(); gr->Plot(xx,yy,z,"ko ");
- gr->Refill(rr,xx,yy,z); gr->Surf(rr);
-}
-</pre><div align="center"><img src="png/refill.png" alt="Sample refill">
-</div>
-<hr>
-<a name="region-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#scanfile-sample" accesskey="n" rel="next">scanfile sample</a>, Previous: <a href="#refill-sample" accesskey="p" rel="prev">refill sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-region"></a>
-<h3 class="section">10.101 Sample ‘<samp>region</samp>’</h3>
-
-
-<p>Function <a href="#region">region</a> fill the area between 2 curves. It support gradient filling if 2 colors per curve is specified. Also it can fill only the region y1<y<y2 if style ‘<samp>i</samp>’ is used.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-copy y1 y(:,1):copy y2 y(:,2)
-subplot 2 2 0 '':title 'Region plot (default)':box:region y1 y2:plot y1 'k2':plot y2 'k2'
-subplot 2 2 1 '':title '2 colors':box:region y1 y2 'yr':plot y1 'k2':plot y2 'k2'
-subplot 2 2 2 '':title '"i" style':box:region y1 y2 'ir':plot y1 'k2':plot y2 'k2'
-subplot 2 2 3 '^_':title '3d variant':rotate 40 60:box
-new x1 100 'sin(pi*x)':new y1 100 'cos(pi*x)':new z 100 'x'
-new x2 100 'sin(pi*x+pi/3)':new y2 100 'cos(pi*x+pi/3)'
-plot x1 y1 z 'r2':plot x2 y2 z 'b2'
-region x1 y1 z x2 y2 z 'cmy!'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_region(mglGraph *gr)
-{
- mglData y; mgls_prepare1d(&y);
- mglData y1 = y.SubData(-1,1), y2 = y.SubData(-1,2); gr->SetOrigin(0,0,0);
- if(big!=3) { gr->SubPlot(2,2,0,""); gr->Title("Region plot (default)"); }
- gr->Box(); gr->Region(y1,y2); gr->Plot(y1,"k2"); gr->Plot(y2,"k2");
- if(big==3) return;
- gr->SubPlot(2,2,1,""); gr->Title("2 colors"); gr->Box(); gr->Region(y1,y2,"yr"); gr->Plot(y1,"k2"); gr->Plot(y2,"k2");
- gr->SubPlot(2,2,2,""); gr->Title("'i' style"); gr->Box(); gr->Region(y1,y2,"ir"); gr->Plot(y1,"k2"); gr->Plot(y2,"k2");
- gr->SubPlot(2,2,3,"^_"); gr->Title("3d variant"); gr->Rotate(40,60); gr->Box();
- gr->Fill(y1,"cos(pi*x)"); gr->Fill(y2,"cos(pi*x+pi/3)");
- mglData x1(y1.nx), x2(y1.nx), z(y1.nx);
- gr->Fill(x1,"sin(pi*x)"); gr->Fill(x2,"sin(pi*x+pi/3)"); gr->Fill(z,"x");
- gr->Plot(x1,y1,z,"r2"); gr->Plot(x2,y2,z,"b2");
- gr->Region(x1,y1,z,x2,y2,z,"cmy!");
-}
-</pre><div align="center"><img src="png/region.png" alt="Sample region">
-</div>
-<hr>
-<a name="scanfile-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#schemes-sample" accesskey="n" rel="next">schemes sample</a>, Previous: <a href="#region-sample" accesskey="p" rel="prev">region sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-scanfile"></a>
-<h3 class="section">10.102 Sample ‘<samp>scanfile</samp>’</h3>
-
-
-<p>Example of <a href="#scanfile">scanfile</a> for reading ’named’ data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Save and scanfile sample'
-list a 1 -1 0
-save 'This is test: 0 -> ',a(0),' q' 'test.txt' 'w'
-save 'This is test: 1 -> ',a(1),' q' 'test.txt'
-save 'This is test: 2 -> ',a(2),' q' 'test.txt'
-
-scanfile a 'test.txt' 'This is test: %g -> %g'
-ranges a(0) a(1):axis:plot a(0) a(1) 'o'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_scanfile(mglGraph *gr)
-{
- gr->SubPlot(1,1,0,"<_");
- if(big!=3) gr->Title("Save and scanfile sample");
- FILE *fp=fopen("test.txt","w");
- fprintf(fp,"This is test: 0 -> 1 q\n");
- fprintf(fp,"This is test: 1 -> -1 q\n");
- fprintf(fp,"This is test: 2 -> 0 q\n");
- fclose(fp);
-
- mglData a;
- a.ScanFile("test.txt","This is test: %g -> %g");
- gr->SetRanges(a.SubData(0), a.SubData(1));
- gr->Axis(); gr->Plot(a.SubData(0),a.SubData(1),"o");
-}
-</pre><div align="center"><img src="png/scanfile.png" alt="Sample scanfile">
-</div>
-<hr>
-<a name="schemes-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#section-sample" accesskey="n" rel="next">section sample</a>, Previous: <a href="#scanfile-sample" accesskey="p" rel="prev">scanfile sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-schemes"></a>
-<h3 class="section">10.103 Sample ‘<samp>schemes</samp>’</h3>
-
-
-<p>Example of popular color schemes.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 100 100 'x':new y 100 100 'y'
-call 'sch' 0 'kw'
-call 'sch' 1 '%gbrw'
-call 'sch' 2 'kHCcw'
-call 'sch' 3 'kBbcw'
-call 'sch' 4 'kRryw'
-call 'sch' 5 'kGgew'
-call 'sch' 6 'BbwrR'
-call 'sch' 7 'BbwgG'
-call 'sch' 8 'GgwmM'
-call 'sch' 9 'UuwqR'
-call 'sch' 10 'QqwcC'
-call 'sch' 11 'CcwyY'
-call 'sch' 12 'bcwyr'
-call 'sch' 13 'bwr'
-call 'sch' 14 'wUrqy'
-call 'sch' 15 'UbcyqR'
-call 'sch' 16 'BbcyrR'
-call 'sch' 17 'bgr'
-call 'sch' 18 'BbcyrR|'
-call 'sch' 19 'b{g,0.3}r'
-stop
-func 'sch' 2
-subplot 2 10 $1 '<>_^' 0.2 0:surfa x y $2
-text 0.07+0.5*mod($1,2) 0.92-0.1*int($1/2) $2 'A'
-return
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_schemes(mglGraph *gr) // Color table
-{
- mglData a(256,2), b(256,2); a.Fill(-1,1); b.Fill(-1,1,'y');
- gr->SubPlot(2,10,0,NULL,0.2); gr->Dens(a,"kw"); gr->Puts(0.07, 0.92, "kw", "A");
- gr->SubPlot(2,10,1,NULL,0.2); gr->SurfA(a,b,"%gbrw"); gr->Puts(0.57, 0.92, "%gbrw", "A");
- gr->SubPlot(2,10,2,NULL,0.2); gr->Dens(a,"kHCcw"); gr->Puts(0.07, 0.82, "kHCcw", "A");
- gr->SubPlot(2,10,3,NULL,0.2); gr->Dens(a,"kBbcw"); gr->Puts(0.57, 0.82, "kBbcw", "A");
- gr->SubPlot(2,10,4,NULL,0.2); gr->Dens(a,"kRryw"); gr->Puts(0.07, 0.72, "kRryw", "A");
- gr->SubPlot(2,10,5,NULL,0.2); gr->Dens(a,"kGgew"); gr->Puts(0.57, 0.72, "kGgew", "A");
- gr->SubPlot(2,10,6,NULL,0.2); gr->Dens(a,"BbwrR"); gr->Puts(0.07, 0.62, "BbwrR", "A");
- gr->SubPlot(2,10,7,NULL,0.2); gr->Dens(a,"BbwgG"); gr->Puts(0.57, 0.62, "BbwgG", "A");
- gr->SubPlot(2,10,8,NULL,0.2); gr->Dens(a,"GgwmM"); gr->Puts(0.07, 0.52, "GgwmM", "A");
- gr->SubPlot(2,10,9,NULL,0.2); gr->Dens(a,"UuwqR"); gr->Puts(0.57, 0.52, "UuwqR", "A");
- gr->SubPlot(2,10,10,NULL,0.2); gr->Dens(a,"QqwcC"); gr->Puts(0.07, 0.42, "QqwcC", "A");
- gr->SubPlot(2,10,11,NULL,0.2); gr->Dens(a,"CcwyY"); gr->Puts(0.57, 0.42, "CcwyY", "A");
- gr->SubPlot(2,10,12,NULL,0.2); gr->Dens(a,"bcwyr"); gr->Puts(0.07, 0.32, "bcwyr", "A");
- gr->SubPlot(2,10,13,NULL,0.2); gr->Dens(a,"bwr"); gr->Puts(0.57, 0.32, "bwr", "A");
- gr->SubPlot(2,10,14,NULL,0.2); gr->Dens(a,"wUrqy"); gr->Puts(0.07, 0.22, "wUrqy", "A");
- gr->SubPlot(2,10,15,NULL,0.2); gr->Dens(a,"UbcyqR"); gr->Puts(0.57, 0.22, "UbcyqR", "A");
- gr->SubPlot(2,10,16,NULL,0.2); gr->Dens(a,"BbcyrR"); gr->Puts(0.07, 0.12, "BbcyrR", "A");
- gr->SubPlot(2,10,17,NULL,0.2); gr->Dens(a,"bgr"); gr->Puts(0.57, 0.12, "bgr", "A");
- gr->SubPlot(2,10,18,NULL,0.2); gr->Dens(a,"BbcyrR|"); gr->Puts(0.07, 0.02, "BbcyrR|", "A");
- gr->SubPlot(2,10,19,NULL,0.2); gr->Dens(a,"b{g,0.3}r"); gr->Puts(0.57, 0.02, "b\\{g,0.3\\}r", "A");
-}
-</pre><div align="center"><img src="png/schemes.png" alt="Sample schemes">
-</div>
-<hr>
-<a name="section-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#several_005flight-sample" accesskey="n" rel="next">several_light sample</a>, Previous: <a href="#schemes-sample" accesskey="p" rel="prev">schemes sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-section"></a>
-<h3 class="section">10.104 Sample ‘<samp>section</samp>’</h3>
-
-
-<p>Example of <a href="#section">section</a> to separate data and <a href="#join">join</a> it back.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Section&Join sample'
-axis:box:line -1 0 1 0 'h:'
-# first lets demonstrate 'join'
-new aa 11 'x^2':new a1 3 '-x':new a2 15 'x^3'
-join aa a1:join aa a2
-# add x-coordinate
-new xx aa.nx 'x':join aa xx
-plot aa(:,1) aa(:,0) '2y'
-# now select 1-st (id=0) section between zeros
-section b1 aa 0 'x' 0
-plot b1(:,1) b1(:,0) 'bo'
-# next, select 3-d (id=2) section between zeros
-section b3 aa 2 'x' 0
-plot b3(:,1) b3(:,0) 'gs'
-# finally, select 2-nd (id=-2) section from the end
-section b4 aa -2 'x' 0
-plot b4(:,1) b4(:,0) 'r#o'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_section(mglGraph *gr)
-{
- gr->SubPlot(1,1,0,"<_");
- if(big!=3) gr->Title("Section&Join sample");
- gr->Axis(); gr->Box(); gr->Line(mglPoint(-1,0),mglPoint(1,0),"h:");
- // first lets demonstrate 'join'
- mglData aa(11), a1(3), a2(15);
- gr->Fill(aa,"x^2"); gr->Fill(a1,"-x"); gr->Fill(a2,"x^3");
- aa.Join(a1); aa.Join(a2);
- // add x-coordinate
- mglData xx(aa.nx); gr->Fill(xx,"x"); aa.Join(xx);
- gr->Plot(aa.SubData(-1,1), aa.SubData(-1,0), "2y");
- // now select 1-st (id=0) section between zeros
- mglData b1(aa.Section(0,'x',0));
- gr->Plot(b1.SubData(-1,1), b1.SubData(-1,0), "bo");
- // next, select 3-d (id=2) section between zeros
- mglData b2(aa.Section(2,'x',0));
- gr->Plot(b2.SubData(-1,1), b2.SubData(-1,0), "gs");
- // finally, select 2-nd (id=-2) section from the end
- mglData b3(aa.Section(-2,'x',0));
- gr->Plot(b3.SubData(-1,1), b3.SubData(-1,0), "r#o");
-}
-</pre><div align="center"><img src="png/section.png" alt="Sample section">
-</div>
-<hr>
-<a name="several_005flight-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#solve-sample" accesskey="n" rel="next">solve sample</a>, Previous: <a href="#section-sample" accesskey="p" rel="prev">section sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-several_005flight"></a>
-<h3 class="section">10.105 Sample ‘<samp>several_light</samp>’</h3>
-
-
-<p>Example of using several <a href="#light">light</a> sources.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Several light sources':rotate 50 60:light on
-light 1 0 1 0 'c':light 2 1 0 0 'y':light 3 0 -1 0 'm'
-box:surf a 'h'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_several_light(mglGraph *gr) // several light sources
-{
- mglData a; mgls_prepare2d(&a);
- if(big!=3) gr->Title("Several light sources");
- gr->Rotate(50,60); gr->Light(true); gr->AddLight(1,mglPoint(0,1,0),'c');
- gr->AddLight(2,mglPoint(1,0,0),'y'); gr->AddLight(3,mglPoint(0,-1,0),'m');
- gr->Box(); gr->Surf(a,"h");
-}
-</pre><div align="center"><img src="png/several_light.png" alt="Sample several_light">
-</div>
-<hr>
-<a name="solve-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#stem-sample" accesskey="n" rel="next">stem sample</a>, Previous: <a href="#several_005flight-sample" accesskey="p" rel="prev">several_light sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-solve"></a>
-<h3 class="section">10.106 Sample ‘<samp>solve</samp>’</h3>
-
-
-<p>Example of <a href="#solve">solve</a> for root finding.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">zrange 0 1
-new x 20 30 '(x+2)/3*cos(pi*y)'
-new y 20 30 '(x+2)/3*sin(pi*y)'
-new z 20 30 'exp(-6*x^2-2*sin(pi*y)^2)'
-
-subplot 2 1 0:title 'Cartesian space':rotate 30 -40
-axis 'xyzU':box
-xlabel 'x':ylabel 'y'
-origin 1 1:grid 'xy'
-mesh x y z
-
-# section along 'x' direction
-solve u x 0.5 'x'
-var v u.nx 0 1
-evaluate yy y u v
-evaluate xx x u v
-evaluate zz z u v
-plot xx yy zz 'k2o'
-
-# 1st section along 'y' direction
-solve u1 x -0.5 'y'
-var v1 u1.nx 0 1
-evaluate yy y v1 u1
-evaluate xx x v1 u1
-evaluate zz z v1 u1
-plot xx yy zz 'b2^'
-
-# 2nd section along 'y' direction
-solve u2 x -0.5 'y' u1
-evaluate yy y v1 u2
-evaluate xx x v1 u2
-evaluate zz z v1 u2
-plot xx yy zz 'r2v'
-
-subplot 2 1 1:title 'Accompanied space'
-ranges 0 1 0 1:origin 0 0
-axis:box:xlabel 'i':ylabel 'j':grid2 z 'h'
-
-plot u v 'k2o':line 0.4 0.5 0.8 0.5 'kA'
-plot v1 u1 'b2^':line 0.5 0.15 0.5 0.3 'bA'
-plot v1 u2 'r2v':line 0.5 0.7 0.5 0.85 'rA'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_solve(mglGraph *gr) // solve and evaluate
-{
- gr->SetRange('z',0,1);
- mglData x(20,30), y(20,30), z(20,30), xx,yy,zz;
- gr->Fill(x,"(x+2)/3*cos(pi*y)");
- gr->Fill(y,"(x+2)/3*sin(pi*y)");
- gr->Fill(z,"exp(-6*x^2-2*sin(pi*y)^2)");
-
- gr->SubPlot(2,1,0); gr->Title("Cartesian space"); gr->Rotate(30,-40);
- gr->Axis("xyzU"); gr->Box(); gr->Label('x',"x"); gr->Label('y',"y");
- gr->SetOrigin(1,1); gr->Grid("xy");
- gr->Mesh(x,y,z);
-
- // section along 'x' direction
- mglData u = x.Solve(0.5,'x');
- mglData v(u.nx); v.Fill(0,1);
- xx = x.Evaluate(u,v); yy = y.Evaluate(u,v); zz = z.Evaluate(u,v);
- gr->Plot(xx,yy,zz,"k2o");
-
- // 1st section along 'y' direction
- mglData u1 = x.Solve(-0.5,'y');
- mglData v1(u1.nx); v1.Fill(0,1);
- xx = x.Evaluate(v1,u1); yy = y.Evaluate(v1,u1); zz = z.Evaluate(v1,u1);
- gr->Plot(xx,yy,zz,"b2^");
-
- // 2nd section along 'y' direction
- mglData u2 = x.Solve(-0.5,'y',u1);
- xx = x.Evaluate(v1,u2); yy = y.Evaluate(v1,u2); zz = z.Evaluate(v1,u2);
- gr->Plot(xx,yy,zz,"r2v");
-
- gr->SubPlot(2,1,1); gr->Title("Accompanied space");
- gr->SetRanges(0,1,0,1); gr->SetOrigin(0,0);
- gr->Axis(); gr->Box(); gr->Label('x',"i"); gr->Label('y',"j");
- gr->Grid(z,"h");
-
- gr->Plot(u,v,"k2o"); gr->Line(mglPoint(0.4,0.5),mglPoint(0.8,0.5),"kA");
- gr->Plot(v1,u1,"b2^"); gr->Line(mglPoint(0.5,0.15),mglPoint(0.5,0.3),"bA");
- gr->Plot(v1,u2,"r2v"); gr->Line(mglPoint(0.5,0.7),mglPoint(0.5,0.85),"rA");
-}
-</pre><div align="center"><img src="png/solve.png" alt="Sample solve">
-</div>
-<hr>
-<a name="stem-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#step-sample" accesskey="n" rel="next">step sample</a>, Previous: <a href="#solve-sample" accesskey="p" rel="prev">solve sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-stem"></a>
-<h3 class="section">10.107 Sample ‘<samp>stem</samp>’</h3>
-
-
-<p>Function <a href="#stem">stem</a> draw vertical bars. It is most attractive if markers are drawn too.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-origin 0 0 0:subplot 2 2 0 '':title 'Stem plot (default)':box:stem y
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 2 2 1:title '3d variant':rotate 50 60:box:stem xc yc z 'rx'
-subplot 2 2 2 '':title '"!" style':box:stem y 'o!rgb'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_stem(mglGraph *gr)
-{
- mglData y; mgls_prepare1d(&y); gr->SetOrigin(0,0,0);
- mglData yc(30), xc(30), z(30); z.Modify("2*x-1");
- yc.Modify("sin(pi*(2*x-1))"); xc.Modify("cos(pi*2*x-pi)");
- if(big!=3) { gr->SubPlot(2,2,0,""); gr->Title("Stem plot (default)"); }
- gr->Box(); gr->Stem(y);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("3d variant"); gr->Rotate(50,60);
- gr->Box(); gr->Stem(xc,yc,z,"rx");
- gr->SubPlot(2,2,2,""); gr->Title("'!' style"); gr->Box(); gr->Stem(y,"o!rgb");
-}
-</pre><div align="center"><img src="png/stem.png" alt="Sample stem">
-</div>
-<hr>
-<a name="step-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#stereo-sample" accesskey="n" rel="next">stereo sample</a>, Previous: <a href="#stem-sample" accesskey="p" rel="prev">stem sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-step"></a>
-<h3 class="section">10.108 Sample ‘<samp>step</samp>’</h3>
-
-
-<p>Function <a href="#step">step</a> plot data as stairs. At this stairs can be centered if sizes are differ by 1.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-origin 0 0 0:subplot 2 2 0 '':title 'Step plot (default)':box:step y
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 2 2 1:title '3d variant':rotate 50 60:box:step xc yc z 'r'
-subplot 2 2 2 '':title '"!" style':box:step y 's!rgb'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_step(mglGraph *gr)
-{
- mglData y; mgls_prepare1d(&y); gr->SetOrigin(0,0,0);
- mglData yc(30), xc(30), z(30); z.Modify("2*x-1");
- yc.Modify("sin(pi*(2*x-1))"); xc.Modify("cos(pi*2*x-pi)");
- if(big!=3) { gr->SubPlot(2,2,0,""); gr->Title("Step plot (default)"); }
- gr->Box(); gr->Step(y);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("3d variant"); gr->Rotate(50,60);
- gr->Box(); gr->Step(xc,yc,z,"r");
- gr->SubPlot(2,2,2,""); gr->Title("'!' style"); gr->Box(); gr->Step(y,"s!rgb");
-}
-</pre><div align="center"><img src="png/step.png" alt="Sample step">
-</div>
-<hr>
-<a name="stereo-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#stfa-sample" accesskey="n" rel="next">stfa sample</a>, Previous: <a href="#step-sample" accesskey="p" rel="prev">step sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-stereo"></a>
-<h3 class="section">10.109 Sample ‘<samp>stereo</samp>’</h3>
-
-
-<p>Example of stereo image of <a href="#surf">surf</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-light on
-subplot 2 1 0:rotate 50 60+1:box:surf a
-subplot 2 1 1:rotate 50 60-1:box:surf a
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_stereo(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- gr->Light(true);
- gr->SubPlot(2,1,0); gr->Rotate(50,60+1);
- gr->Box(); gr->Surf(a);
- gr->SubPlot(2,1,1); gr->Rotate(50,60-1);
- gr->Box(); gr->Surf(a);
-}
-</pre><div align="center"><img src="png/stereo.png" alt="Sample stereo">
-</div>
-<hr>
-<a name="stfa-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#style-sample" accesskey="n" rel="next">style sample</a>, Previous: <a href="#stereo-sample" accesskey="p" rel="prev">stereo sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-stfa"></a>
-<h3 class="section">10.110 Sample ‘<samp>stfa</samp>’</h3>
-
-
-<p>Example of <a href="#stfa">stfa</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 2000:new b 2000
-fill a 'cos(50*pi*x)*(x<-.5)+cos(100*pi*x)*(x<0)*(x>-.5)+\
-cos(200*pi*x)*(x<.5)*(x>0)+cos(400*pi*x)*(x>.5)'
-subplot 1 2 0 '<_':title 'Initial signal':plot a:axis:xlabel '\i t'
-subplot 1 2 1 '<_':title 'STFA plot':stfa a b 64:axis:ylabel '\omega' 0:xlabel '\i t'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_stfa(mglGraph *gr) // STFA sample
-{
- mglData a(2000), b(2000);
- gr->Fill(a,"cos(50*pi*x)*(x<-.5)+cos(100*pi*x)*(x<0)*(x>-.5)+\
- cos(200*pi*x)*(x<.5)*(x>0)+cos(400*pi*x)*(x>.5)");
- gr->SubPlot(1, 2, 0,"<_"); gr->Title("Initial signal");
- gr->Plot(a);
- gr->Axis();
- gr->Label('x', "\\i t");
-
- gr->SubPlot(1, 2, 1,"<_"); gr->Title("STFA plot");
- gr->STFA(a, b, 64);
- gr->Axis();
- gr->Label('x', "\\i t");
- gr->Label('y', "\\omega", 0);
-}
-</pre><div align="center"><img src="png/stfa.png" alt="Sample stfa">
-</div>
-<hr>
-<a name="style-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surf-sample" accesskey="n" rel="next">surf sample</a>, Previous: <a href="#stfa-sample" accesskey="p" rel="prev">stfa sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-style"></a>
-<h3 class="section">10.111 Sample ‘<samp>style</samp>’</h3>
-
-
-<p>Example of colors and styles for plots.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_style(mglGraph *gr) // pen styles
-{
- gr->SubPlot(2,2,0);
- double d,x1,x2,x0,y=1.1, y1=1.15;
- d=0.3, x0=0.2, x1=0.5, x2=0.6;
- gr->Line(mglPoint(x0,y1-0*d),mglPoint(x1,y1-0*d),"k-"); gr->Puts(mglPoint(x2,y-0*d),"Solid '-'",":rL");
- gr->Line(mglPoint(x0,y1-1*d),mglPoint(x1,y1-1*d),"k|"); gr->Puts(mglPoint(x2,y-1*d),"Long Dash '|'",":rL");
- gr->Line(mglPoint(x0,y1-2*d),mglPoint(x1,y1-2*d),"k;"); gr->Puts(mglPoint(x2,y-2*d),"Dash ';'",":rL");
- gr->Line(mglPoint(x0,y1-3*d),mglPoint(x1,y1-3*d),"k="); gr->Puts(mglPoint(x2,y-3*d),"Small dash '='",":rL");
- gr->Line(mglPoint(x0,y1-4*d),mglPoint(x1,y1-4*d),"kj"); gr->Puts(mglPoint(x2,y-4*d),"Dash-dot 'j'",":rL");
- gr->Line(mglPoint(x0,y1-5*d),mglPoint(x1,y1-5*d),"ki"); gr->Puts(mglPoint(x2,y-5*d),"Small dash-dot 'i'",":rL");
- gr->Line(mglPoint(x0,y1-6*d),mglPoint(x1,y1-6*d),"k:"); gr->Puts(mglPoint(x2,y-6*d),"Dots ':'",":rL");
- gr->Line(mglPoint(x0,y1-7*d),mglPoint(x1,y1-7*d),"k "); gr->Puts(mglPoint(x2,y-7*d),"None ' '",":rL");
- gr->Line(mglPoint(x0,y1-8*d),mglPoint(x1,y1-8*d),"k{df090}"); gr->Puts(mglPoint(x2,y-8*d),"Manual '{df090}'",":rL");
-
- d=0.25; x1=-1; x0=-0.8; y = -0.05;
- gr->Mark(mglPoint(x1,5*d),"k."); gr->Puts(mglPoint(x0,y+5*d),"'.'",":rL");
- gr->Mark(mglPoint(x1,4*d),"k+"); gr->Puts(mglPoint(x0,y+4*d),"'+'",":rL");
- gr->Mark(mglPoint(x1,3*d),"kx"); gr->Puts(mglPoint(x0,y+3*d),"'x'",":rL");
- gr->Mark(mglPoint(x1,2*d),"k*"); gr->Puts(mglPoint(x0,y+2*d),"'*'",":rL");
- gr->Mark(mglPoint(x1,d),"ks"); gr->Puts(mglPoint(x0,y+d),"'s'",":rL");
- gr->Mark(mglPoint(x1,0),"kd"); gr->Puts(mglPoint(x0,y),"'d'",":rL");
- gr->Mark(mglPoint(x1,-d,0),"ko"); gr->Puts(mglPoint(x0,y-d),"'o'",":rL");
- gr->Mark(mglPoint(x1,-2*d,0),"k^"); gr->Puts(mglPoint(x0,y-2*d),"'\\^'",":rL");
- gr->Mark(mglPoint(x1,-3*d,0),"kv"); gr->Puts(mglPoint(x0,y-3*d),"'v'",":rL");
- gr->Mark(mglPoint(x1,-4*d,0),"k<"); gr->Puts(mglPoint(x0,y-4*d),"'<'",":rL");
- gr->Mark(mglPoint(x1,-5*d,0),"k>"); gr->Puts(mglPoint(x0,y-5*d),"'>'",":rL");
-
- d=0.25; x1=-0.5; x0=-0.3; y = -0.05;
- gr->Mark(mglPoint(x1,5*d),"k#."); gr->Puts(mglPoint(x0,y+5*d),"'\\#.'",":rL");
- gr->Mark(mglPoint(x1,4*d),"k#+"); gr->Puts(mglPoint(x0,y+4*d),"'\\#+'",":rL");
- gr->Mark(mglPoint(x1,3*d),"k#x"); gr->Puts(mglPoint(x0,y+3*d),"'\\#x'",":rL");
- gr->Mark(mglPoint(x1,2*d),"k#*"); gr->Puts(mglPoint(x0,y+2*d),"'\\#*'",":rL");
- gr->Mark(mglPoint(x1,d),"k#s"); gr->Puts(mglPoint(x0,y+d),"'\\#s'",":rL");
- gr->Mark(mglPoint(x1,0),"k#d"); gr->Puts(mglPoint(x0,y),"'\\#d'",":rL");
- gr->Mark(mglPoint(x1,-d,0),"k#o"); gr->Puts(mglPoint(x0,y-d),"'\\#o'",":rL");
- gr->Mark(mglPoint(x1,-2*d,0),"k#^"); gr->Puts(mglPoint(x0,y-2*d),"'\\#\\^'",":rL");
- gr->Mark(mglPoint(x1,-3*d,0),"k#v"); gr->Puts(mglPoint(x0,y-3*d),"'\\#v'",":rL");
- gr->Mark(mglPoint(x1,-4*d,0),"k#<"); gr->Puts(mglPoint(x0,y-4*d),"'\\#<'",":rL");
- gr->Mark(mglPoint(x1,-5*d,0),"k#>"); gr->Puts(mglPoint(x0,y-5*d),"'\\#>'",":rL");
-
- gr->SubPlot(2,2,1);
- double a=0.1,b=0.4,c=0.5;
- gr->Line(mglPoint(a,1),mglPoint(b,1),"k-A"); gr->Puts(mglPoint(c,1),"Style 'A' or 'A\\_'",":rL");
- gr->Line(mglPoint(a,0.8),mglPoint(b,0.8),"k-V"); gr->Puts(mglPoint(c,0.8),"Style 'V' or 'V\\_'",":rL");
- gr->Line(mglPoint(a,0.6),mglPoint(b,0.6),"k-K"); gr->Puts(mglPoint(c,0.6),"Style 'K' or 'K\\_'",":rL");
- gr->Line(mglPoint(a,0.4),mglPoint(b,0.4),"k-I"); gr->Puts(mglPoint(c,0.4),"Style 'I' or 'I\\_'",":rL");
- gr->Line(mglPoint(a,0.2),mglPoint(b,0.2),"k-D"); gr->Puts(mglPoint(c,0.2),"Style 'D' or 'D\\_'",":rL");
- gr->Line(mglPoint(a,0),mglPoint(b,0),"k-S"); gr->Puts(mglPoint(c,0),"Style 'S' or 'S\\_'",":rL");
- gr->Line(mglPoint(a,-0.2),mglPoint(b,-0.2),"k-O"); gr->Puts(mglPoint(c,-0.2),"Style 'O' or 'O\\_'",":rL");
- gr->Line(mglPoint(a,-0.4),mglPoint(b,-0.4),"k-T"); gr->Puts(mglPoint(c,-0.4),"Style 'T' or 'T\\_'",":rL");
- gr->Line(mglPoint(a,-0.6),mglPoint(b,-0.6),"k-X"); gr->Puts(mglPoint(c,-0.6),"Style 'X' or 'X\\_'",":rL");
- gr->Line(mglPoint(a,-0.8),mglPoint(b,-0.8),"k-_"); gr->Puts(mglPoint(c,-0.8),"Style '\\_' or none",":rL");
- gr->Line(mglPoint(a,-1),mglPoint(b,-1),"k-AS"); gr->Puts(mglPoint(c,-1),"Style 'AS'",":rL");
- gr->Line(mglPoint(a,-1.2),mglPoint(b,-1.2),"k-_A"); gr->Puts(mglPoint(c,-1.2),"Style '\\_A'",":rL");
-
- a=-1; b=-0.7; c=-0.6;
- gr->Line(mglPoint(a,1),mglPoint(b,1),"kAA"); gr->Puts(mglPoint(c,1),"Style 'AA'",":rL");
- gr->Line(mglPoint(a,0.8),mglPoint(b,0.8),"kVV"); gr->Puts(mglPoint(c,0.8),"Style 'VV'",":rL");
- gr->Line(mglPoint(a,0.6),mglPoint(b,0.6),"kKK"); gr->Puts(mglPoint(c,0.6),"Style 'KK'",":rL");
- gr->Line(mglPoint(a,0.4),mglPoint(b,0.4),"kII"); gr->Puts(mglPoint(c,0.4),"Style 'II'",":rL");
- gr->Line(mglPoint(a,0.2),mglPoint(b,0.2),"kDD"); gr->Puts(mglPoint(c,0.2),"Style 'DD'",":rL");
- gr->Line(mglPoint(a,0),mglPoint(b,0),"kSS"); gr->Puts(mglPoint(c,0),"Style 'SS'",":rL");
- gr->Line(mglPoint(a,-0.2),mglPoint(b,-0.2),"kOO"); gr->Puts(mglPoint(c,-0.2),"Style 'OO'",":rL");
- gr->Line(mglPoint(a,-0.4),mglPoint(b,-0.4),"kTT"); gr->Puts(mglPoint(c,-0.4),"Style 'TT'",":rL");
- gr->Line(mglPoint(a,-0.6),mglPoint(b,-0.6),"kXX"); gr->Puts(mglPoint(c,-0.6),"Style 'XX'",":rL");
- gr->Line(mglPoint(a,-0.8),mglPoint(b,-0.8),"k-__"); gr->Puts(mglPoint(c,-0.8),"Style '\\_\\_'",":rL");
- gr->Line(mglPoint(a,-1),mglPoint(b,-1),"k-VA"); gr->Puts(mglPoint(c,-1),"Style 'VA'",":rL");
- gr->Line(mglPoint(a,-1.2),mglPoint(b,-1.2),"k-AV"); gr->Puts(mglPoint(c,-1.2),"Style 'AV'",":rL");
-
- gr->SubPlot(2,2,2);
- //#LENUQ
- gr->FaceZ(mglPoint(-1, -1), 0.4, 0.3, "L#"); gr->Puts(mglPoint(-0.8,-0.9), "L", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,-1), 0.4, 0.3, "E#"); gr->Puts(mglPoint(-0.4,-0.9), "E", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,-1), 0.4, 0.3, "N#"); gr->Puts(mglPoint(0, -0.9), "N", "w:C", -1.4);
- gr->FaceZ(mglPoint(0.2, -1), 0.4, 0.3, "U#"); gr->Puts(mglPoint(0.4,-0.9), "U", "w:C", -1.4);
- gr->FaceZ(mglPoint(0.6, -1), 0.4, 0.3, "Q#"); gr->Puts(mglPoint(0.8,-0.9), "Q", "w:C", -1.4);
- //#lenuq
- gr->FaceZ(mglPoint(-1, -0.7), 0.4, 0.3, "l#"); gr->Puts(mglPoint(-0.8,-0.6), "l", "k:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,-0.7), 0.4, 0.3, "e#"); gr->Puts(mglPoint(-0.4,-0.6), "e", "k:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,-0.7), 0.4, 0.3, "n#"); gr->Puts(mglPoint(0, -0.6), "n", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.2, -0.7), 0.4, 0.3, "u#"); gr->Puts(mglPoint(0.4,-0.6), "u", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.6, -0.7), 0.4, 0.3, "q#"); gr->Puts(mglPoint(0.8,-0.6), "q", "k:C", -1.4);
- //#CMYkP
- gr->FaceZ(mglPoint(-1, -0.4), 0.4, 0.3, "C#"); gr->Puts(mglPoint(-0.8,-0.3), "C", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,-0.4), 0.4, 0.3, "M#"); gr->Puts(mglPoint(-0.4,-0.3), "M", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,-0.4), 0.4, 0.3, "Y#"); gr->Puts(mglPoint(0, -0.3), "Y", "w:C", -1.4);
- gr->FaceZ(mglPoint(0.2, -0.4), 0.4, 0.3, "k#"); gr->Puts(mglPoint(0.4,-0.3), "k", "w:C", -1.4);
- gr->FaceZ(mglPoint(0.6, -0.4), 0.4, 0.3, "P#"); gr->Puts(mglPoint(0.8,-0.3), "P", "w:C", -1.4);
- //#cmywp
- gr->FaceZ(mglPoint(-1, -0.1), 0.4, 0.3, "c#"); gr->Puts(mglPoint(-0.8, 0), "c", "k:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,-0.1), 0.4, 0.3, "m#"); gr->Puts(mglPoint(-0.4, 0), "m", "k:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,-0.1), 0.4, 0.3, "y#"); gr->Puts(mglPoint(0, 0), "y", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.2, -0.1), 0.4, 0.3, "w#"); gr->Puts(mglPoint(0.4, 0), "w", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.6, -0.1), 0.4, 0.3, "p#"); gr->Puts(mglPoint(0.8, 0), "p", "k:C", -1.4);
- //#BGRHW
- gr->FaceZ(mglPoint(-1, 0.2), 0.4, 0.3, "B#"); gr->Puts(mglPoint(-0.8, 0.3), "B", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,0.2), 0.4, 0.3, "G#"); gr->Puts(mglPoint(-0.4, 0.3), "G", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,0.2), 0.4, 0.3, "R#"); gr->Puts(mglPoint(0, 0.3), "R", "w:C", -1.4);
- gr->FaceZ(mglPoint(0.2, 0.2), 0.4, 0.3, "H#"); gr->Puts(mglPoint(0.4, 0.3), "H", "w:C", -1.4);
- gr->FaceZ(mglPoint(0.6, 0.2), 0.4, 0.3, "W#"); gr->Puts(mglPoint(0.8, 0.3), "W", "w:C", -1.4);
- //#bgrhw
- gr->FaceZ(mglPoint(-1, 0.5), 0.4, 0.3, "b#"); gr->Puts(mglPoint(-0.8, 0.6), "b", "k:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,0.5), 0.4, 0.3, "g#"); gr->Puts(mglPoint(-0.4, 0.6), "g", "k:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,0.5), 0.4, 0.3, "r#"); gr->Puts(mglPoint(0, 0.6), "r", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.2, 0.5), 0.4, 0.3, "h#"); gr->Puts(mglPoint(0.4, 0.6), "h", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.6, 0.5), 0.4, 0.3, "w#"); gr->Puts(mglPoint(0.8, 0.6), "w", "k:C", -1.4);
- //#brighted
- gr->FaceZ(mglPoint(-1, 0.8), 0.4, 0.3, "{r1}#"); gr->Puts(mglPoint(-0.8, 0.9), "\\{r1\\}", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,0.8), 0.4, 0.3, "{r3}#"); gr->Puts(mglPoint(-0.4, 0.9), "\\{r3\\}", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,0.8), 0.4, 0.3, "{r5}#"); gr->Puts(mglPoint(0, 0.9), "\\{r5\\}", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.2, 0.8), 0.4, 0.3, "{r7}#"); gr->Puts(mglPoint(0.4, 0.9), "\\{r7\\}", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.6, 0.8), 0.4, 0.3, "{r9}#"); gr->Puts(mglPoint(0.8, 0.9), "\\{r9\\}", "k:C", -1.4);
- // HEX
- gr->FaceZ(mglPoint(-1, -1.3), 1, 0.3, "{xff9966}#"); gr->Puts(mglPoint(-0.5,-1.2), "\\{xff9966\\}", "k:C", -1.4);
- gr->FaceZ(mglPoint(0, -1.3), 1, 0.3, "{x83CAFF}#"); gr->Puts(mglPoint( 0.5,-1.2), "\\{x83CAFF\\}", "k:C", -1.4);
-
- gr->SubPlot(2,2,3);
- char stl[3]="r1", txt[4]="'1'";
- for(int i=0;i<10;i++)
- {
- txt[1]=stl[1]='0'+i;
- gr->Line(mglPoint(-1,0.2*i-1),mglPoint(1,0.2*i-1),stl);
- gr->Puts(mglPoint(1.05,0.2*i-1),txt,":L");
- }
-}
-</pre><div align="center"><img src="png/style.png" alt="Sample style">
-</div>
-<hr>
-<a name="surf-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surf3-sample" accesskey="n" rel="next">surf3 sample</a>, Previous: <a href="#style-sample" accesskey="p" rel="prev">style sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surf"></a>
-<h3 class="section">10.112 Sample ‘<samp>surf</samp>’</h3>
-
-
-<p>Function <a href="#surf">surf</a> is most standard way to visualize 2D data array. <code>Surf</code> use color scheme for coloring (see <a href="#Color-scheme">Color scheme</a>). You can use ‘<samp>#</samp>’ style for drawing black meshes on the surface.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-subplot 2 2 0:title 'Surf plot (default)':rotate 50 60:light on:box:surf a
-subplot 2 2 1:title '"\#" style; meshnum 10':rotate 50 60:box:surf a '#'; meshnum 10
-subplot 2 2 2:title '"." style':rotate 50 60:box:surf a '.'
-new x 50 40 '0.8*sin(pi*x)*sin(pi*(y+1)/2)'
-new y 50 40 '0.8*cos(pi*x)*sin(pi*(y+1)/2)'
-new z 50 40 '0.8*cos(pi*(y+1)/2)'
-subplot 2 2 3:title 'parametric form':rotate 50 60:box:surf x y z 'BbwrR'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_surf3(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("Surf3 plot (default)"); }
- gr->Rotate(50,60); gr->Light(true); gr->Alpha(true);
- gr->Box(); gr->Surf3(c);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("'\\#' style");
- gr->Rotate(50,60); gr->Box(); gr->Surf3(c,"#");
- gr->SubPlot(2,2,2); gr->Title("'.' style");
- gr->Rotate(50,60); gr->Box(); gr->Surf3(c,".");
-}
-</pre><div align="center"><img src="png/surf.png" alt="Sample surf">
-</div>
-<hr>
-<a name="surf3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surf3a-sample" accesskey="n" rel="next">surf3a sample</a>, Previous: <a href="#surf-sample" accesskey="p" rel="prev">surf sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surf3"></a>
-<h3 class="section">10.113 Sample ‘<samp>surf3</samp>’</h3>
-
-
-<p>Function <a href="#surf3">surf3</a> is one of most suitable (for my opinion) functions to visualize 3D data. It draw the isosurface(s) – surface(s) of constant amplitude (3D analogue of contour lines). You can draw wired isosurfaces if specify ‘<samp>#</samp>’ style.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-light on:alpha on
-subplot 2 2 0:title 'Surf3 plot (default)'
-rotate 50 60:box:surf3 c
-subplot 2 2 1:title '"\#" style'
-rotate 50 60:box:surf3 c '#'
-subplot 2 2 2:title '"." style'
-rotate 50 60:box:surf3 c '.'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_surf3(mglGraph *gr)
-{
- mglData c; mgls_prepare3d(&c);
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("Surf3 plot (default)"); }
- gr->Rotate(50,60); gr->Light(true); gr->Alpha(true);
- gr->Box(); gr->Surf3(c);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("'\\#' style");
- gr->Rotate(50,60); gr->Box(); gr->Surf3(c,"#");
- gr->SubPlot(2,2,2); gr->Title("'.' style");
- gr->Rotate(50,60); gr->Box(); gr->Surf3(c,".");
-}
-</pre><div align="center"><img src="png/surf3.png" alt="Sample surf3">
-</div>
-<hr>
-<a name="surf3a-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surf3c-sample" accesskey="n" rel="next">surf3c sample</a>, Previous: <a href="#surf3-sample" accesskey="p" rel="prev">surf3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surf3a"></a>
-<h3 class="section">10.114 Sample ‘<samp>surf3a</samp>’</h3>
-
-
-<p>Function <a href="#surf3c">surf3c</a> is similar to <a href="#surf3">surf3</a> but its transparency is determined by another data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Surf3A plot':rotate 50 60:light on:alpha on:box:surf3a c d
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_surf3a(mglGraph *gr)
-{
- mglData c,d; mgls_prepare3d(&c,&d);
- if(big!=3) gr->Title("Surf3A plot");
- gr->Rotate(50,60); gr->Light(true); gr->Alpha(true);
- gr->Box(); gr->Surf3A(c,d);
-}
-</pre><div align="center"><img src="png/surf3a.png" alt="Sample surf3a">
-</div>
-<hr>
-<a name="surf3c-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surf3ca-sample" accesskey="n" rel="next">surf3ca sample</a>, Previous: <a href="#surf3a-sample" accesskey="p" rel="prev">surf3a sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surf3c"></a>
-<h3 class="section">10.115 Sample ‘<samp>surf3c</samp>’</h3>
-
-
-<p>Function <a href="#surf3c">surf3c</a> is similar to <a href="#surf3">surf3</a> but its coloring is determined by another data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Surf3C plot':rotate 50 60:light on:alpha on:box:surf3c c d
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_surf3c(mglGraph *gr)
-{
- mglData c,d; mgls_prepare3d(&c,&d);
- if(big!=3) gr->Title("Surf3C plot");
- gr->Rotate(50,60); gr->Light(true); gr->Alpha(true);
- gr->Box(); gr->Surf3C(c,d);
-}
-</pre><div align="center"><img src="png/surf3c.png" alt="Sample surf3c">
-</div>
-<hr>
-<a name="surf3ca-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surfa-sample" accesskey="n" rel="next">surfa sample</a>, Previous: <a href="#surf3c-sample" accesskey="p" rel="prev">surf3c sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surf3ca"></a>
-<h3 class="section">10.116 Sample ‘<samp>surf3ca</samp>’</h3>
-
-
-<p>Function <a href="#surf3c">surf3c</a> is similar to <a href="#surf3">surf3</a> but its coloring and transparency is determined by another data arrays.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Surf3CA plot':rotate 50 60:light on:alpha on:box:surf3ca c d c
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_surf3ca(mglGraph *gr)
-{
- mglData c,d; mgls_prepare3d(&c,&d);
- if(big!=3) gr->Title("Surf3CA plot");
- gr->Rotate(50,60); gr->Light(true); gr->Alpha(true);
- gr->Box(); gr->Surf3CA(c,d,c);
-}
-</pre><div align="center"><img src="png/surf3ca.png" alt="Sample surf3ca">
-</div>
-<hr>
-<a name="surfa-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surfc-sample" accesskey="n" rel="next">surfc sample</a>, Previous: <a href="#surf3ca-sample" accesskey="p" rel="prev">surf3ca sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surfa"></a>
-<h3 class="section">10.117 Sample ‘<samp>surfa</samp>’</h3>
-
-
-<p>Function <a href="#surfa">surfa</a> is similar to <a href="#surf">surf</a> but its transparency is determined by another data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'SurfA plot':rotate 50 60:light on:alpha on:box:surfa a b
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_surfa(mglGraph *gr)
-{
- mglData a,b; mgls_prepare2d(&a,&b);
- if(big!=3) gr->Title("SurfA plot");
- gr->Rotate(50,60); gr->Alpha(true); gr->Light(true); gr->Box();
- gr->SurfA(a,b);
-}
-</pre><div align="center"><img src="png/surfa.png" alt="Sample surfa">
-</div>
-<hr>
-<a name="surfc-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surfca-sample" accesskey="n" rel="next">surfca sample</a>, Previous: <a href="#surfa-sample" accesskey="p" rel="prev">surfa sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surfc"></a>
-<h3 class="section">10.118 Sample ‘<samp>surfc</samp>’</h3>
-
-
-<p>Function <a href="#surfc">surfc</a> is similar to <a href="#surf">surf</a> but its coloring is determined by another data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'SurfC plot':rotate 50 60:light on:box:surfc a b
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_surfc(mglGraph *gr)
-{
- mglData a,b; mgls_prepare2d(&a,&b);
- if(big!=3) gr->Title("SurfC plot");
- gr->Rotate(50,60); gr->Light(true); gr->Box(); gr->SurfC(a,b);
-}
-</pre><div align="center"><img src="png/surfc.png" alt="Sample surfc">
-</div>
-<hr>
-<a name="surfca-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#table-sample" accesskey="n" rel="next">table sample</a>, Previous: <a href="#surfc-sample" accesskey="p" rel="prev">surfc sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surfca"></a>
-<h3 class="section">10.119 Sample ‘<samp>surfca</samp>’</h3>
-
-
-<p>Function <a href="#surfca">surfca</a> is similar to <a href="#surf">surf</a> but its coloring and transparency is determined by another data arrays.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'SurfCA plot':rotate 50 60:light on:alpha on:box:surfca a b a
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_surfca(mglGraph *gr)
-{
- mglData a,b; mgls_prepare2d(&a,&b);
- if(big!=3) gr->Title("SurfCA plot");
- gr->Rotate(50,60); gr->Alpha(true); gr->Light(true); gr->Box();
- gr->SurfCA(a,b,a);
-}
-</pre><div align="center"><img src="png/surfca.png" alt="Sample surfca">
-</div>
-<hr>
-<a name="table-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#tape-sample" accesskey="n" rel="next">tape sample</a>, Previous: <a href="#surfca-sample" accesskey="p" rel="prev">surfca sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-table"></a>
-<h3 class="section">10.120 Sample ‘<samp>table</samp>’</h3>
-
-
-<p>Function <a href="#table">table</a> draw table with data values.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ys 10 3 '0.8*sin(pi*(x+y/4+1.25))+0.2*rnd'
-subplot 2 2 0:title 'Table sample':box
-table ys 'y_1\n{}y_2\n{}y_3'
-
-subplot 2 2 1:title 'no borders, colored'
-table ys 'y_1\n{}y_2\n{}y_3' 'r|'
-
-subplot 2 2 2:title 'no font decrease'
-table ys 'y_1\n{}y_2\n{}y_3' '#'
-
-subplot 2 2 3:title 'manual width and position':box
-table 0.5 0.95 ys 'y_1\n{}y_2\n{}y_3' '#';value 0.7
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_table(mglGraph *gr)
-{
- mglData ys(10,3); ys.Modify("0.8*sin(pi*(2*x+y/2))+0.2*rnd");
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("Table plot"); }
- gr->Table(ys,"y_1\ny_2\ny_3"); gr->Box();
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("no borders, colored");
- gr->Table(ys,"y_1\ny_2\ny_3","r|");
- gr->SubPlot(2,2,2); gr->Title("no font decrease");
- gr->Table(ys,"y_1\ny_2\ny_3","#");
- gr->SubPlot(2,2,3); gr->Title("manual width, position");
- gr->Table(0.5, 0.95, ys,"y_1\ny_2\ny_3","#", "value 0.7"); gr->Box();
-}
-</pre><div align="center"><img src="png/table.png" alt="Sample table">
-</div>
-<hr>
-<a name="tape-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#tens-sample" accesskey="n" rel="next">tens sample</a>, Previous: <a href="#table-sample" accesskey="p" rel="prev">table sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-tape"></a>
-<h3 class="section">10.121 Sample ‘<samp>tape</samp>’</h3>
-
-
-<p>Function <a href="#tape">tape</a> draw tapes which rotate around the curve as transverse orts of accompanied coordinates.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-new yc 50 'sin(pi*x)':new xc 50 'cos(pi*x)':new z 50 'x'
-subplot 2 2 0 '':title 'Tape plot (default)':box:tape y:plot y 'k'
-subplot 2 2 1:title '3d variant, 2 colors':rotate 50 60:light on
-box:plot xc yc z 'k':tape xc yc z 'rg'
-subplot 2 2 2:title '3d variant, x only':rotate 50 60
-box:plot xc yc z 'k':tape xc yc z 'xr':tape xc yc z 'xr#'
-subplot 2 2 3:title '3d variant, z only':rotate 50 60
-box:plot xc yc z 'k':tape xc yc z 'zg':tape xc yc z 'zg#'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_tape(mglGraph *gr)
-{
- mglData y; mgls_prepare1d(&y);
- mglData xc(50), yc(50), z(50);
- yc.Modify("sin(pi*(2*x-1))");
- xc.Modify("cos(pi*2*x-pi)"); z.Fill(-1,1);
- if(big!=3) { gr->SubPlot(2,2,0,""); gr->Title("Tape plot (default)"); }
- gr->Box(); gr->Tape(y); gr->Plot(y,"k");
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("3d variant, 2 colors"); gr->Rotate(50,60); gr->Light(true);
- gr->Box(); gr->Plot(xc,yc,z,"k"); gr->Tape(xc,yc,z,"rg");
- gr->SubPlot(2,2,2); gr->Title("3d variant, x only"); gr->Rotate(50,60);
- gr->Box(); gr->Plot(xc,yc,z,"k"); gr->Tape(xc,yc,z,"xr"); gr->Tape(xc,yc,z,"xr#");
- gr->SubPlot(2,2,3); gr->Title("3d variant, z only"); gr->Rotate(50,60);
- gr->Box(); gr->Plot(xc,yc,z,"k"); gr->Tape(xc,yc,z,"zg"); gr->Tape(xc,yc,z,"zg#");
-}
-</pre><div align="center"><img src="png/tape.png" alt="Sample tape">
-</div>
-<hr>
-<a name="tens-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ternary-sample" accesskey="n" rel="next">ternary sample</a>, Previous: <a href="#tape-sample" accesskey="p" rel="prev">tape sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-tens"></a>
-<h3 class="section">10.122 Sample ‘<samp>tens</samp>’</h3>
-
-
-<p>Function <a href="#tens">tens</a> is variant of <a href="#plot">plot</a> with smooth coloring along the curves. At this, color is determined as for surfaces (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 2 2 0 '':title 'Tens plot (default)':box:tens y(:,0) y(:,1)
-subplot 2 2 2 '':title '" " style':box:tens y(:,0) y(:,1) 'o '
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 2 2 1:title '3d variant':rotate 50 60:box:tens xc yc z z 's'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_tens(mglGraph *gr)
-{
- mglData y; mgls_prepare1d(&y); gr->SetOrigin(0,0,0);
- if(big!=3) { gr->SubPlot(2,2,0,""); gr->Title("Tens plot (default)"); }
- gr->Box(); gr->Tens(y.SubData(-1,0), y.SubData(-1,1));
- if(big==3) return;
- gr->SubPlot(2,2,2,""); gr->Title("' ' style"); gr->Box(); gr->Tens(y.SubData(-1,0), y.SubData(-1,1),"o ");
- gr->SubPlot(2,2,1); gr->Title("3d variant"); gr->Rotate(50,60); gr->Box();
- mglData yc(30), xc(30), z(30); z.Modify("2*x-1");
- yc.Modify("sin(pi*(2*x-1))"); xc.Modify("cos(pi*2*x-pi)");
- gr->Tens(xc,yc,z,z,"s");
-}
-</pre><div align="center"><img src="png/tens.png" alt="Sample tens">
-</div>
-<hr>
-<a name="ternary-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#text-sample" accesskey="n" rel="next">text sample</a>, Previous: <a href="#tens-sample" accesskey="p" rel="prev">tens sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ternary"></a>
-<h3 class="section">10.123 Sample ‘<samp>ternary</samp>’</h3>
-
-
-<p>Example of <a href="#ternary">ternary</a> coordinates.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">ranges 0 1 0 1 0 1
-new x 50 '0.25*(1+cos(2*pi*x))'
-new y 50 '0.25*(1+sin(2*pi*x))'
-new z 50 'x'
-new a 20 30 '30*x*y*(1-x-y)^2*(x+y<1)'
-new rx 10 'rnd':new ry 10:fill ry '(1-v)*rnd' rx
-light on
-
-subplot 2 2 0:title 'Ordinary axis 3D':rotate 50 60
-box:axis:grid
-plot x y z 'r2':surf a '#'
-xlabel 'B':ylabel 'C':zlabel 'Z'
-
-subplot 2 2 1:title 'Ternary axis (x+y+t=1)':ternary 1
-box:axis:grid 'xyz' 'B;'
-plot x y 'r2':plot rx ry 'q^ ':cont a:line 0.5 0 0 0.75 'g2'
-xlabel 'B':ylabel 'C':tlabel 'A'
-
-subplot 2 2 2:title 'Quaternary axis 3D':rotate 50 60:ternary 2
-box:axis:grid 'xyz' 'B;'
-plot x y z 'r2':surf a '#'
-xlabel 'B':ylabel 'C':tlabel 'A':zlabel 'D'
-
-subplot 2 2 3:title 'Ternary axis 3D':rotate 50 60:ternary 1
-box:axis:grid 'xyz' 'B;'
-plot x y z 'r2':surf a '#'
-xlabel 'B':ylabel 'C':tlabel 'A':zlabel 'Z'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_ternary(mglGraph *gr) // flag #
-{
- gr->SetRanges(0,1,0,1,0,1);
- mglData x(50),y(50),z(50),rx(10),ry(10), a(20,30);
- a.Modify("30*x*y*(1-x-y)^2*(x+y<1)");
- x.Modify("0.25*(1+cos(2*pi*x))");
- y.Modify("0.25*(1+sin(2*pi*x))");
- rx.Modify("rnd"); ry.Modify("(1-v)*rnd",rx);
- z.Modify("x");
-
- gr->SubPlot(2,2,0); gr->Title("Ordinary axis 3D");
- gr->Rotate(50,60); gr->Light(true);
- gr->Plot(x,y,z,"r2"); gr->Surf(a,"BbcyrR#");
- gr->Axis(); gr->Grid(); gr->Box();
- gr->Label('x',"B",1); gr->Label('y',"C",1); gr->Label('z',"Z",1);
-
- gr->SubPlot(2,2,1); gr->Title("Ternary axis (x+y+t=1)");
- gr->Ternary(1);
- gr->Plot(x,y,"r2"); gr->Plot(rx,ry,"q^ "); gr->Cont(a);
- gr->Line(mglPoint(0.5,0), mglPoint(0,0.75), "g2");
- gr->Axis(); gr->Grid("xyz","B;");
- gr->Label('x',"B"); gr->Label('y',"C"); gr->Label('t',"A");
-
- gr->SubPlot(2,2,2); gr->Title("Quaternary axis 3D");
- gr->Rotate(50,60); gr->Light(true);
- gr->Ternary(2);
- gr->Plot(x,y,z,"r2"); gr->Surf(a,"BbcyrR#");
- gr->Axis(); gr->Grid(); gr->Box();
- gr->Label('t',"A",1); gr->Label('x',"B",1);
- gr->Label('y',"C",1); gr->Label('z',"D",1);
-
- gr->SubPlot(2,2,3); gr->Title("Ternary axis 3D");
- gr->Rotate(50,60); gr->Light(true);
- gr->Ternary(1);
- gr->Plot(x,y,z,"r2"); gr->Surf(a,"BbcyrR#");
- gr->Axis(); gr->Grid(); gr->Box();
- gr->Label('t',"A",1); gr->Label('x',"B",1);
- gr->Label('y',"C",1); gr->Label('z',"Z",1);
-}
-</pre><div align="center"><img src="png/ternary.png" alt="Sample ternary">
-</div>
-<hr>
-<a name="text-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#text2-sample" accesskey="n" rel="next">text2 sample</a>, Previous: <a href="#ternary-sample" accesskey="p" rel="prev">ternary sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-text"></a>
-<h3 class="section">10.124 Sample ‘<samp>text</samp>’</h3>
-
-
-<p>Example of <a href="#text">text</a> possibilities.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 2 2 0 ''
-text 0 1 'Text can be in ASCII and in Unicode'
-text 0 0.6 'It can be \wire{wire}, \big{big} or #r{colored}'
-text 0 0.2 'One can change style in string: \b{bold}, \i{italic, \b{both}}'
-text 0 -0.2 'Easy to \a{overline} or \u{underline}'
-text 0 -0.6 'Easy to change indexes ^{up} _{down} @{center}'
-text 0 -1 'It parse TeX: \int \alpha \cdot \
-\sqrt3{sin(\pi x)^2 + \gamma_{i_k}} dx'
-subplot 2 2 1 ''
- text 0 0.5 '\sqrt{\frac{\alpha^{\gamma^2}+\overset 1{\big\infty}}{\sqrt3{2+b}}}' '@' -2
-text 0 -0.1 'More text position: \frac{a}{b}, \dfrac{a}{b}, [\stack{a}{bbb}], [\stackl{a}{bbb}], [\stackr{a}{bbb}], \sup{a}{sup}, \sub{a}{sub}'text 0 -0.5 'Text can be printed\n{}on several lines'
-text 0 -0.9 'or with color gradient' 'BbcyrR'
-subplot 2 2 2 '':box:plot y(:,0)
-text y 'This is very very long string drawn along a curve' 'k'
-text y 'Another string drawn above a curve' 'Tr'
-subplot 2 2 3 '':line -1 -1 1 -1 'rA':text 0 -1 1 -1 'Horizontal'
-line -1 -1 1 1 'rA':text 0 0 1 1 'At angle' '@'
-line -1 -1 -1 1 'rA':text -1 0 -1 1 'Vertical'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_text(mglGraph *gr) // text drawing
-{
- if(big!=3) gr->SubPlot(2,2,0,"");
- gr->Putsw(mglPoint(0,1),L"Text can be in ASCII and in Unicode");
- gr->Puts(mglPoint(0,0.6),"It can be \\wire{wire}, \\big{big} or #r{colored}");
- gr->Puts(mglPoint(0,0.2),"One can change style in string: "
- "\\b{bold}, \\i{italic, \\b{both}}");
- gr->Puts(mglPoint(0,-0.2),"Easy to \\a{overline} or "
- "\\u{underline}");
- gr->Puts(mglPoint(0,-0.6),"Easy to change indexes ^{up} _{down} @{center}");
- gr->Puts(mglPoint(0,-1),"It parse TeX: \\int \\alpha \\cdot "
- "\\sqrt3{sin(\\pi x)^2 + \\gamma_{i_k}} dx");
- if(big==3) return;
-
- gr->SubPlot(2,2,1,"");
- gr->Puts(mglPoint(0,0.5), "\\sqrt{\\frac{\\alpha^{\\gamma^2}+\\overset 1{\\big\\infty}}{\\sqrt3{2+b}}}", "@", -2);
- gr->Puts(mglPoint(0,-0.1),"More text position: \\frac{a}{b}, \\dfrac{a}{b}, [\\stack{a}{bbb}], [\\stackl{a}{bbb}], [\\stackr{a}{bbb}], \\sup{a}{sup}, \\sub{a}{sub}");
- gr->Puts(mglPoint(0,-0.5),"Text can be printed\non several lines");
- gr->Puts(mglPoint(0,-0.9),"or with col\bor gradient","BbcyrR");
-
- gr->SubPlot(2,2,2,"");
- mglData y; mgls_prepare1d(&y);
- gr->Box(); gr->Plot(y.SubData(-1,0));
- gr->Text(y,"This is very very long string drawn along a curve","k");
- gr->Text(y,"Another string drawn under a curve","Tr");
-
- gr->SubPlot(2,2,3,"");
- gr->Line(mglPoint(-1,-1),mglPoint(1,-1),"rA"); gr->Puts(mglPoint(0,-1),mglPoint(1,-1),"Horizontal");
- gr->Line(mglPoint(-1,-1),mglPoint(1,1),"rA"); gr->Puts(mglPoint(0,0),mglPoint(1,1),"At angle","@");
- gr->Line(mglPoint(-1,-1),mglPoint(-1,1),"rA"); gr->Puts(mglPoint(-1,0),mglPoint(-1,1),"Vertical");
-}
-</pre><div align="center"><img src="png/text.png" alt="Sample text">
-</div>
-<hr>
-<a name="text2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#textmark-sample" accesskey="n" rel="next">textmark sample</a>, Previous: <a href="#text-sample" accesskey="p" rel="prev">text sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-text2"></a>
-<h3 class="section">10.125 Sample ‘<samp>text2</samp>’</h3>
-
-
-<p>Example of <a href="#text">text</a> along curve.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 1 3 0 '':box:plot y(:,0)
-text y 'This is very very long string drawn along a curve' 'k'
-text y 'Another string drawn under a curve' 'Tr'
-subplot 1 3 1 '':box:plot y(:,0)
-text y 'This is very very long string drawn along a curve' 'k:C'
-text y 'Another string drawn under a curve' 'Tr:C'
-subplot 1 3 2 '':box:plot y(:,0)
-text y 'This is very very long string drawn along a curve' 'k:R'
-text y 'Another string drawn under a curve' 'Tr:R'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_text2(mglGraph *gr) // text drawing
-{
- mglData y; mgls_prepare1d(&y);
- if(big!=3) gr->SubPlot(1,3,0,"");
- gr->Box(); gr->Plot(y.SubData(-1,0));
- gr->Text(y,"This is very very long string drawn along a curve","k");
- gr->Text(y,"Another string drawn under a curve","Tr");
- if(big==3) return;
-
- gr->SubPlot(1,3,1,"");
- gr->Box(); gr->Plot(y.SubData(-1,0));
- gr->Text(y,"This is very very long string drawn along a curve","k:C");
- gr->Text(y,"Another string drawn under a curve","Tr:C");
-
- gr->SubPlot(1,3,2,"");
- gr->Box(); gr->Plot(y.SubData(-1,0));
- gr->Text(y,"This is very very long string drawn along a curve","k:R");
- gr->Text(y,"Another string drawn under a curve","Tr:R");
-}
-</pre><div align="center"><img src="png/text2.png" alt="Sample text2">
-</div>
-<hr>
-<a name="textmark-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ticks-sample" accesskey="n" rel="next">ticks sample</a>, Previous: <a href="#text2-sample" accesskey="p" rel="prev">text2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-textmark"></a>
-<h3 class="section">10.126 Sample ‘<samp>textmark</samp>’</h3>
-
-
-<p>Function <a href="#textmark">textmark</a> is similar to <a href="#mark">mark</a> but draw text instead of markers.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 1 1 0 '':title 'TextMark plot (default)':box:textmark y y1 '\gamma' 'r'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_textmark(mglGraph *gr)
-{
- mglData y,y1; mgls_prepare1d(&y,&y1);
- if(big!=3) { gr->SubPlot(1,1,0,""); gr->Title("TextMark plot (default)"); }
- gr->Box(); gr->TextMark(y,y1,"\\gamma","r");
-}
-</pre><div align="center"><img src="png/textmark.png" alt="Sample textmark">
-</div>
-<hr>
-<a name="ticks-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#tile-sample" accesskey="n" rel="next">tile sample</a>, Previous: <a href="#textmark-sample" accesskey="p" rel="prev">textmark sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ticks"></a>
-<h3 class="section">10.127 Sample ‘<samp>ticks</samp>’</h3>
-
-
-<p>Example of <a href="#axis">axis</a> ticks.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 3 3 0:title 'Usual axis with ":" style'
-axis ':'
-
-subplot 3 3 1:title 'Too big/small range'
-ranges -1000 1000 0 0.001:axis
-
-subplot 3 3 2:title 'LaTeX-like labels'
-axis 'F!'
-
-subplot 3 3 3:title 'Too narrow range'
-ranges 100 100.1 10 10.01:axis
-
-subplot 3 3 4:title 'No tuning, manual "+"'
-axis '+!'
-# for version <2.3 you can use
-#tuneticks off:axis
-
-subplot 3 3 5:title 'Template for ticks'
-xtick 'xxx:%g':ytick 'y:%g'
-axis
-
-xtick '':ytick '' # switch it off for other plots
-
-subplot 3 3 6:title 'No tuning, higher precision'
-axis '!4'
-
-subplot 3 3 7:title 'Manual ticks'
-ranges -pi pi 0 2
-xtick pi 3 '\pi'
-xtick 0.886 'x^*' on # note this will disable subticks drawing
-# or you can use
-#xtick -pi '\pi' -pi/2 '-\pi/2' 0 '0' 0.886 'x^*' pi/2 '\pi/2' pi 'pi'
-list v 0 0.5 1 2:ytick v '0
-0.5
-1
-2'
-axis:grid:fplot '2*cos(x^2)^2' 'r2'
-
-subplot 3 3 8:title 'Time ticks'
-xrange 0 3e5:ticktime 'x':axis
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_ticks(mglGraph *gr)
-{
- gr->SubPlot(3,3,0); gr->Title("Usual axis with ':' style"); gr->Axis(":");
- gr->SubPlot(3,3,1); gr->Title("Too big/small range");
- gr->SetRanges(-1000,1000,0,0.001); gr->Axis();
- gr->SubPlot(3,3,2); gr->Title("LaTeX-like labels");
- gr->Axis("F!");
- gr->SubPlot(3,3,3); gr->Title("Too narrow range");
- gr->SetRanges(100,100.1,10,10.01); gr->Axis();
- gr->SubPlot(3,3,4); gr->Title("No tuning, manual '+'");
- // for version<2.3 you need first call gr->SetTuneTicks(0);
- gr->Axis("+!");
- gr->SubPlot(3,3,5); gr->Title("Template for ticks");
- gr->SetTickTempl('x',"xxx:%g"); gr->SetTickTempl('y',"y:%g");
- gr->Axis();
- // now switch it off for other plots
- gr->SetTickTempl('x',""); gr->SetTickTempl('y',"");
- gr->SubPlot(3,3,6); gr->Title("No tuning, higher precision");
- gr->Axis("!4");
- gr->SubPlot(3,3,7); gr->Title("Manual ticks"); gr->SetRanges(-M_PI,M_PI, 0, 2);
- gr->SetTicks('x',M_PI,0,0,"\\pi"); gr->AddTick('x',0.886,"x^*");
- // alternatively you can use following lines
- double val[]={0, 0.5, 1, 2};
- gr->SetTicksVal('y', mglData(4,val), "0\n0.5\n1\n2");
- gr->Axis(); gr->Grid(); gr->FPlot("2*cos(x^2)^2", "r2");
- gr->SubPlot(3,3,8); gr->Title("Time ticks"); gr->SetRange('x',0,3e5);
- gr->SetTicksTime('x',0); gr->Axis();
-}
-</pre><div align="center"><img src="png/ticks.png" alt="Sample ticks">
-</div>
-<hr>
-<a name="tile-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#tiles-sample" accesskey="n" rel="next">tiles sample</a>, Previous: <a href="#ticks-sample" accesskey="p" rel="prev">ticks sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-tile"></a>
-<h3 class="section">10.128 Sample ‘<samp>tile</samp>’</h3>
-
-
-<p>Function <a href="#tile">tile</a> draw surface by tiles.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Tile plot':rotate 50 60:box:tile a
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_tile(mglGraph *gr)
-{
- mglData a; mgls_prepare2d(&a);
- if(big!=3) gr->Title("Tile plot");
- gr->Rotate(40,60); gr->Box(); gr->Tile(a);
-}
-</pre><div align="center"><img src="png/tile.png" alt="Sample tile">
-</div>
-<hr>
-<a name="tiles-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#torus-sample" accesskey="n" rel="next">torus sample</a>, Previous: <a href="#tile-sample" accesskey="p" rel="prev">tile sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-tiles"></a>
-<h3 class="section">10.129 Sample ‘<samp>tiles</samp>’</h3>
-
-
-<p>Function <a href="#tiles">tiles</a> is similar to <a href="#tile">tile</a> but tile sizes is determined by another data. This allows one to simulate transparency of the plot.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-subplot 1 1 0 '':title 'Tiles plot':box:tiles a b
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_tiles(mglGraph *gr)
-{
- mglData a,b; mgls_prepare2d(&a,&b);
- if(big!=3) {gr->SubPlot(1,1,0,""); gr->Title("TileS plot");}
- gr->Box(); gr->TileS(a,b);
-}
-</pre><div align="center"><img src="png/tiles.png" alt="Sample tiles">
-</div>
-<hr>
-<a name="torus-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#traj-sample" accesskey="n" rel="next">traj sample</a>, Previous: <a href="#tiles-sample" accesskey="p" rel="prev">tiles sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-torus"></a>
-<h3 class="section">10.130 Sample ‘<samp>torus</samp>’</h3>
-
-
-<p>Function <a href="#torus">torus</a> draw surface of the curve rotation.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 2 2 0:title 'Torus plot (default)':light on:rotate 50 60:box:torus y1 y2
-subplot 2 2 1:title '"x" style':light on:rotate 50 60:box:torus y1 y2 'x'
-subplot 2 2 2:title '"z" style':light on:rotate 50 60:box:torus y1 y2 'z'
-subplot 2 2 3:title '"\#" style':light on:rotate 50 60:box:torus y1 y2 '#'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_torus(mglGraph *gr)
-{
- mglData y1,y2; mgls_prepare1d(0,&y1,&y2);
- if(big!=3) { gr->SubPlot(2,2,0); gr->Title("Torus plot (default)"); }
- gr->Light(true); gr->Rotate(50,60); gr->Box(); gr->Torus(y1,y2);
- if(big==3) return;
- gr->SubPlot(2,2,1); gr->Title("'x' style"); gr->Rotate(50,60); gr->Box(); gr->Torus(y1,y2,"x");
- gr->SubPlot(2,2,2); gr->Title("'z' style"); gr->Rotate(50,60); gr->Box(); gr->Torus(y1,y2,"z");
- gr->SubPlot(2,2,3); gr->Title("'\\#' style"); gr->Rotate(50,60); gr->Box(); gr->Torus(y1,y2,"#");
-}
-</pre><div align="center"><img src="png/torus.png" alt="Sample torus">
-</div>
-<hr>
-<a name="traj-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#triangulation-sample" accesskey="n" rel="next">triangulation sample</a>, Previous: <a href="#torus-sample" accesskey="p" rel="prev">torus sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-traj"></a>
-<h3 class="section">10.131 Sample ‘<samp>traj</samp>’</h3>
-
-
-<p>Function <a href="#traj">traj</a> is 1D analogue of <a href="#vect">vect</a>. It draw vectors from specified points.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 1 1 0 '':title 'Traj plot':box:plot x1 y:traj x1 y y1 y2
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_traj(mglGraph *gr)
-{
- mglData x,y,y1,y2; mgls_prepare1d(&y,&y1,&y2,&x);
- if(big!=3) {gr->SubPlot(1,1,0,""); gr->Title("Traj plot");}
- gr->Box(); gr->Plot(x,y); gr->Traj(x,y,y1,y2);
-}
-</pre><div align="center"><img src="png/traj.png" alt="Sample traj">
-</div>
-<hr>
-<a name="triangulation-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#triplot-sample" accesskey="n" rel="next">triplot sample</a>, Previous: <a href="#traj-sample" accesskey="p" rel="prev">traj sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-triangulation"></a>
-<h3 class="section">10.132 Sample ‘<samp>triangulation</samp>’</h3>
-
-
-<p>Example of use <a href="#triangulate">triangulate</a> for arbitrary placed points.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 100 '2*rnd-1':new y 100 '2*rnd-1':copy z x^2-y^2
-new g 30 30:triangulate d x y
-title 'Triangulation'
-rotate 50 60:box:light on
-triplot d x y z:triplot d x y z '#k'
-datagrid g x y z:mesh g 'm'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_triangulation(mglGraph *gr) // surface triangulation
-{
- mglData x(100), y(100), z(100);
- gr->Fill(x,"2*rnd-1"); gr->Fill(y,"2*rnd-1"); gr->Fill(z,"v^2-w^2",x,y);
- mglData d = mglTriangulation(x,y), g(30,30);
-
- if(big!=3) gr->Title("Triangulation");
- gr->Rotate(40,60); gr->Box(); gr->Light(true);
- gr->TriPlot(d,x,y,z); gr->TriPlot(d,x,y,z,"#k");
-
- gr->DataGrid(g,x,y,z); gr->Mesh(g,"m");
-}
-</pre><div align="center"><img src="png/triangulation.png" alt="Sample triangulation">
-</div>
-<hr>
-<a name="triplot-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#tube-sample" accesskey="n" rel="next">tube sample</a>, Previous: <a href="#triangulation-sample" accesskey="p" rel="prev">triangulation sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-triplot"></a>
-<h3 class="section">10.133 Sample ‘<samp>triplot</samp>’</h3>
-
-
-<p>Functions <a href="#triplot">triplot</a> and <a href="#quadplot">quadplot</a> draw set of triangles (or quadrangles, correspondingly) for irregular data arrays. Note, that you have to provide not only vertexes, but also the indexes of triangles or quadrangles. I.e. perform triangulation by some other library. See also <a href="#triangulate">triangulate</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">list q 0 1 2 3 | 4 5 6 7 | 0 2 4 6 | 1 3 5 7 | 0 4 1 5 | 2 6 3 7
-list xq -1 1 -1 1 -1 1 -1 1
-list yq -1 -1 1 1 -1 -1 1 1
-list zq -1 -1 -1 -1 1 1 1 1
-light on
-subplot 2 2 0:title 'QuadPlot sample':rotate 50 60
-quadplot q xq yq zq 'yr'
-quadplot q xq yq zq '#k'
-subplot 2 2 2:title 'QuadPlot coloring':rotate 50 60
-quadplot q xq yq zq yq 'yr'
-quadplot q xq yq zq '#k'
-list t 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0
-list yt -1 -1 1 0
-list zt -1 -1 -1 1
-subplot 2 2 1:title 'TriPlot sample':rotate 50 60
-triplot t xt yt zt 'b'
-triplot t xt yt zt '#k'
-subplot 2 2 3:title 'TriPlot coloring':rotate 50 60
-triplot t xt yt zt yt 'cb'
-triplot t xt yt zt '#k'
-tricont t xt yt zt 'B'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_triplot(mglGraph *gr)
-{
- double q[] = {0,1,2,3, 4,5,6,7, 0,2,4,6, 1,3,5,7, 0,4,1,5, 2,6,3,7};
- double xc[] = {-1,1,-1,1,-1,1,-1,1}, yc[] = {-1,-1,1,1,-1,-1,1,1}, zc[] = {-1,-1,-1,-1,1,1,1,1};
- mglData qq(6,4,q), xx(8,xc), yy(8,yc), zz(8,zc);
- gr->Light(true); //gr->Alpha(true);
- gr->SubPlot(2,2,0); gr->Title("QuadPlot sample"); gr->Rotate(50,60);
- gr->QuadPlot(qq,xx,yy,zz,"yr");
- gr->QuadPlot(qq,xx,yy,zz,"k#");
- gr->SubPlot(2,2,2); gr->Title("QuadPlot coloring"); gr->Rotate(50,60);
- gr->QuadPlot(qq,xx,yy,zz,yy,"yr");
- gr->QuadPlot(qq,xx,yy,zz,"k#");
-
- double t[] = {0,1,2, 0,1,3, 0,2,3, 1,2,3};
- double xt[] = {-1,1,0,0}, yt[] = {-1,-1,1,0}, zt[] = {-1,-1,-1,1};
- mglData tt(4,3,t), uu(4,xt), vv(4,yt), ww(4,zt);
- gr->SubPlot(2,2,1); gr->Title("TriPlot sample"); gr->Rotate(50,60);
- gr->TriPlot(tt,uu,vv,ww,"b");
- gr->TriPlot(tt,uu,vv,ww,"k#");
- gr->SubPlot(2,2,3); gr->Title("TriPlot coloring"); gr->Rotate(50,60);
- gr->TriPlot(tt,uu,vv,ww,vv,"cb");
- gr->TriPlot(tt,uu,vv,ww,"k#");
- gr->TriCont(tt,uu,vv,ww,"B");
-}
-</pre><div align="center"><img src="png/triplot.png" alt="Sample triplot">
-</div>
-<hr>
-<a name="tube-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#type0-sample" accesskey="n" rel="next">type0 sample</a>, Previous: <a href="#triplot-sample" accesskey="p" rel="prev">triplot sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-tube"></a>
-<h3 class="section">10.134 Sample ‘<samp>tube</samp>’</h3>
-
-
-<p>Function <a href="#tube">tube</a> draw tube with variable radius.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-light on
-new yc 50 'sin(pi*x)':new xc 50 'cos(pi*x)':new z 50 'x':divto y1 20
-subplot 2 2 0 '':title 'Tube plot (default)':box:tube y 0.05
-subplot 2 2 1 '':title 'variable radius':box:tube y y1
-subplot 2 2 2 '':title '"\#" style':box:tube y 0.05 '#'
-subplot 2 2 3:title '3d variant':rotate 50 60:box:tube xc yc z y2 'r'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_tube(mglGraph *gr)
-{
- mglData y,y1,y2; mgls_prepare1d(&y,&y1,&y2); y1/=20;
- if(big!=3) { gr->SubPlot(2,2,0,""); gr->Title("Tube plot (default)"); }
- gr->Light(true); gr->Box(); gr->Tube(y,0.05);
- if(big==3) return;
- gr->SubPlot(2,2,1,""); gr->Title("variable radius"); gr->Box(); gr->Tube(y,y1);
- gr->SubPlot(2,2,2,""); gr->Title("'\\#' style"); gr->Box(); gr->Tube(y,0.05,"#");
- mglData yc(50), xc(50), z(50); z.Modify("2*x-1");
- yc.Modify("sin(pi*(2*x-1))"); xc.Modify("cos(pi*2*x-pi)");
- gr->SubPlot(2,2,3); gr->Title("3d variant"); gr->Rotate(50,60); gr->Box(); gr->Tube(xc,yc,z,y2,"r");
-}
-</pre><div align="center"><img src="png/tube.png" alt="Sample tube">
-</div>
-<hr>
-<a name="type0-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#type1-sample" accesskey="n" rel="next">type1 sample</a>, Previous: <a href="#tube-sample" accesskey="p" rel="prev">tube sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-type0"></a>
-<h3 class="section">10.135 Sample ‘<samp>type0</samp>’</h3>
-
-
-<p>Example of ordinary transparency (<a href="#transptype">transptype</a>=0).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-alpha on:light on:transptype 0:clf
-subplot 2 2 0:rotate 50 60:surf a:box
-subplot 2 2 1:rotate 50 60:dens a:box
-subplot 2 2 2:rotate 50 60:cont a:box
-subplot 2 2 3:rotate 50 60:axial a:box
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_type0(mglGraph *gr) // TranspType = 0
-{
- gr->Alpha(true); gr->Light(true);
- mglData a; mgls_prepare2d(&a);
- gr->SetTranspType(0); gr->Clf();
- gr->SubPlot(2,2,0); gr->Rotate(50,60); gr->Surf(a); gr->Box();
- gr->SubPlot(2,2,1); gr->Rotate(50,60); gr->Dens(a); gr->Box();
- gr->SubPlot(2,2,2); gr->Rotate(50,60); gr->Cont(a); gr->Box();
- gr->SubPlot(2,2,3); gr->Rotate(50,60); gr->Axial(a); gr->Box();
-}
-</pre><div align="center"><img src="png/type0.png" alt="Sample type0">
-</div>
-<hr>
-<a name="type1-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#type2-sample" accesskey="n" rel="next">type2 sample</a>, Previous: <a href="#type0-sample" accesskey="p" rel="prev">type0 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-type1"></a>
-<h3 class="section">10.136 Sample ‘<samp>type1</samp>’</h3>
-
-
-<p>Example of glass-like transparency (<a href="#transptype">transptype</a>=1).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-alpha on:light on:transptype 1:clf
-subplot 2 2 0:rotate 50 60:surf a:box
-subplot 2 2 1:rotate 50 60:dens a:box
-subplot 2 2 2:rotate 50 60:cont a:box
-subplot 2 2 3:rotate 50 60:axial a:box
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_type1(mglGraph *gr) // TranspType = 1
-{
- gr->Alpha(true); gr->Light(true);
- mglData a; mgls_prepare2d(&a);
- gr->SetTranspType(1); gr->Clf();
- gr->SubPlot(2,2,0); gr->Rotate(50,60); gr->Surf(a); gr->Box();
- gr->SubPlot(2,2,1); gr->Rotate(50,60); gr->Dens(a); gr->Box();
- gr->SubPlot(2,2,2); gr->Rotate(50,60); gr->Cont(a); gr->Box();
- gr->SubPlot(2,2,3); gr->Rotate(50,60); gr->Axial(a); gr->Box();
-}
-</pre><div align="center"><img src="png/type1.png" alt="Sample type1">
-</div>
-<hr>
-<a name="type2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#vect-sample" accesskey="n" rel="next">vect sample</a>, Previous: <a href="#type1-sample" accesskey="p" rel="prev">type1 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-type2"></a>
-<h3 class="section">10.137 Sample ‘<samp>type2</samp>’</h3>
-
-
-<p>Example of lamp-like transparency (<a href="#transptype">transptype</a>=2).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-alpha on:light on:transptype 2:clf
-subplot 2 2 0:rotate 50 60:surf a:box
-subplot 2 2 1:rotate 50 60:dens a:box
-subplot 2 2 2:rotate 50 60:cont a:box
-subplot 2 2 3:rotate 50 60:axial a:box
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_type2(mglGraph *gr) // TranspType = 2
-{
- gr->Alpha(true); gr->Light(true);
- mglData a; mgls_prepare2d(&a);
- gr->SetTranspType(2); gr->Clf();
- gr->SubPlot(2,2,0); gr->Rotate(50,60); gr->Surf(a); gr->Box();
- gr->SubPlot(2,2,1); gr->Rotate(50,60); gr->Dens(a); gr->Box();
- gr->SubPlot(2,2,2); gr->Rotate(50,60); gr->Cont(a); gr->Box();
- gr->SubPlot(2,2,3); gr->Rotate(50,60); gr->Axial(a); gr->Box();
-}
-</pre><div align="center"><img src="png/type2.png" alt="Sample type2">
-</div>
-<hr>
-<a name="vect-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#vect3-sample" accesskey="n" rel="next">vect3 sample</a>, Previous: <a href="#type2-sample" accesskey="p" rel="prev">type2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-vect"></a>
-<h3 class="section">10.138 Sample ‘<samp>vect</samp>’</h3>
-
-
-<p>Function <a href="#vect">vect</a> is most standard way to visualize vector fields – it draw a lot of arrows or hachures for each data cell. It have a lot of options which can be seen on the figure (and in the sample code), and use color scheme for coloring (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2v'
-call 'prepare3v'
-subplot 3 2 0 '':title 'Vect plot (default)':box:vect a b
-subplot 3 2 1 '':title '"." style; "=" style':box:vect a b '.='
-subplot 3 2 2 '':title '"f" style':box:vect a b 'f'
-subplot 3 2 3 '':title '">" style':box:vect a b '>'
-subplot 3 2 4 '':title '"<" style':box:vect a b '<'
-subplot 3 2 5:title '3d variant':rotate 50 60:box:vect ex ey ez
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_vect3(mglGraph *gr)
-{
- mglData ex,ey,ez; mgls_prepare3v(&ex,&ey,&ez);
- if(big!=3) { gr->SubPlot(2,1,0); gr->Title("Vect3 sample"); }
- gr->Rotate(50,60); gr->SetOrigin(0,0,0); gr->Axis("_xyz"); gr->Box();
- gr->Vect3(ex,ey,ez,"x"); gr->Vect3(ex,ey,ez); gr->Vect3(ex,ey,ez,"z");
- if(big==3) return;
- gr->SubPlot(2,1,1); gr->Title("'f' style");
- gr->Rotate(50,60); gr->SetOrigin(0,0,0); gr->Axis("_xyz"); gr->Box();
- gr->Vect3(ex,ey,ez,"fx"); gr->Vect3(ex,ey,ez,"f"); gr->Vect3(ex,ey,ez,"fz");
- gr->Grid3(ex,"Wx"); gr->Grid3(ex,"W"); gr->Grid3(ex,"Wz");
-}
-</pre><div align="center"><img src="png/vect.png" alt="Sample vect">
-</div>
-<hr>
-<a name="vect3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#venn-sample" accesskey="n" rel="next">venn sample</a>, Previous: <a href="#vect-sample" accesskey="p" rel="prev">vect sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-vect3"></a>
-<h3 class="section">10.139 Sample ‘<samp>vect3</samp>’</h3>
-
-
-<p>Function <a href="#vect3">vect3</a> draw ordinary vector field plot but at slices of 3D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3v'
-subplot 2 1 0:title 'Vect3 sample':rotate 50 60
-origin 0 0 0:box:axis '_xyz'
-vect3 ex ey ez 'x':vect3 ex ey ez:vect3 ex ey ez 'z'
-subplot 2 1 1:title '"f" style':rotate 50 60
-origin 0 0 0:box:axis '_xyz'
-vect3 ex ey ez 'fx':vect3 ex ey ez 'f':vect3 ex ey ez 'fz'
-grid3 ex 'Wx':grid3 ex 'W':grid3 ex 'Wz'
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_vect3(mglGraph *gr)
-{
- mglData ex,ey,ez; mgls_prepare3v(&ex,&ey,&ez);
- if(big!=3) { gr->SubPlot(2,1,0); gr->Title("Vect3 sample"); }
- gr->Rotate(50,60); gr->SetOrigin(0,0,0); gr->Axis("_xyz"); gr->Box();
- gr->Vect3(ex,ey,ez,"x"); gr->Vect3(ex,ey,ez); gr->Vect3(ex,ey,ez,"z");
- if(big==3) return;
- gr->SubPlot(2,1,1); gr->Title("'f' style");
- gr->Rotate(50,60); gr->SetOrigin(0,0,0); gr->Axis("_xyz"); gr->Box();
- gr->Vect3(ex,ey,ez,"fx"); gr->Vect3(ex,ey,ez,"f"); gr->Vect3(ex,ey,ez,"fz");
- gr->Grid3(ex,"Wx"); gr->Grid3(ex,"W"); gr->Grid3(ex,"Wz");
-}
-</pre><div align="center"><img src="png/vect3.png" alt="Sample vect3">
-</div>
-<hr>
-<a name="venn-sample"></a>
-<div class="header">
-<p>
-Previous: <a href="#vect3-sample" accesskey="p" rel="prev">vect3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-_0027venn_0027"></a>
-<h3 class="section">10.140 Sample ’venn’</h3>
-
-
-<p>Example of venn-like diagram.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">list x -0.3 0 0.3:list y 0.3 -0.3 0.3:list e 0.7 0.7 0.7
-subplot 1 1 0:title 'Venn-like diagram'
-transptype 1:alpha on:error x y e e '!rgb@#o';alpha 0.1
-</pre>
-<p><strong>C++ code:</strong>
-</p><pre class="verbatim">void smgl_venn(mglGraph *gr)
-{
- double xx[3]={-0.3,0,0.3}, yy[3]={0.3,-0.3,0.3}, ee[3]={0.7,0.7,0.7};
- mglData x(3,xx), y(3,yy), e(3,ee);
- gr->SubPlot(1,1,0); gr->Title("Venn-like diagram");
- gr->SetTranspType(1); gr->Alpha(true); gr->Error(x,y,e,e,"!rgb@#o","alpha 0.1");
-}
-</pre><div align="center"><img src="png/venn.png" alt="Sample venn">
-</div>
-
-<hr>
-<a name="Symbols-and-hot_002dkeys"></a>
-<div class="header">
-<p>
-Next: <a href="#File-formats" accesskey="n" rel="next">File formats</a>, Previous: <a href="#All-samples" accesskey="p" rel="prev">All samples</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Symbols-and-hot_002dkeys-1"></a>
-<h2 class="appendix">Appendix A Symbols and hot-keys</h2>
-
-
-<p>This appendix contain the full list of symbols (characters) used by MathGL for setting up plot. Also it contain sections for full list of hot-keys supported by mglview tool and by UDAV program.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Symbols-for-styles" accesskey="1">Symbols for styles</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Hot_002dkeys-for-mglview" accesskey="2">Hot-keys for mglview</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Hot_002dkeys-for-UDAV" accesskey="3">Hot-keys for UDAV</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Symbols-for-styles"></a>
-<div class="header">
-<p>
-Next: <a href="#Hot_002dkeys-for-mglview" accesskey="n" rel="next">Hot-keys for mglview</a>, Up: <a href="#Symbols-and-hot_002dkeys" accesskey="u" rel="up">Symbols and hot-keys</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Symbols-for-styles-1"></a>
-<h3 class="section">A.1 Symbols for styles</h3>
-
-
-<p>Below is full list of all characters (symbols) which MathGL use for setting up the plot.
-</p>
-<dl compact="compact">
-<dt>‘<samp>space ' '</samp>’</dt>
-<dd><p>empty line style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>empty color in <a href="#chart">chart</a>.
-</p>
-</dd>
-<dt>‘<samp>!</samp>’</dt>
-<dd><p>set to use new color from palette for each point (not for each curve, as default) in <a href="#g_t1D-plotting">1D plotting</a>;
-</p>
-<p>set to disable ticks tuning in <a href="#axis">axis</a> and <a href="#colorbar">colorbar</a>;
-</p>
-<p>set to draw <a href="#grid">grid</a> lines at subticks coordinates too;
-</p>
-<p>define complex variable/expression in MGL script if placed at beginning.
-</p>
-</dd>
-<dt>‘<samp>#</samp>’</dt>
-<dd><p>set to use solid marks (see <a href="#Line-styles">Line styles</a>) or solid <a href="#error">error</a> boxes;
-</p>
-<p>set to draw wired plot for <a href="#axial">axial</a>, <a href="#surf3">surf3</a>, <a href="#surf3a">surf3a</a>, <a href="#surf3c">surf3c</a>, <a href="#triplot">triplot</a>, <a href="#quadplot">quadplot</a>, <a href="#area">area</a>, <a href="#region">region</a>, <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#tube">tube</a>, <a href="#tape">tape</a>, <a href="#cone">cone</a>, <a href="#boxs">boxs</a> and draw boundary only for <a href="#circle">circle</a>, <a href="#ellipse">ellipse</a>, <a href="#rhomb">rhomb</a>;
-</p>
-<p>set to draw also mesh lines for <a href="#surf">surf</a>, <a href="#surfc">surfc</a>, <a href="#surfa">surfa</a>, <a href="#dens">dens</a>, <a href="#densx">densx</a>, <a href="#densy">densy</a>, <a href="#densz">densz</a>, <a href="#dens3">dens3</a>, or boundary for <a href="#chart">chart</a>, <a href="#facex">facex</a>, <a href="#facey">facey</a>, <a href="#facez">facez</a>, <a href="#rect">rect</a>;
-</p>
-<p>set to draw boundary and box for <a href="#legend">legend</a>, <a href="#title">title</a>, or grid lines for <a href="#table">table</a>;
-</p>
-<p>set to draw grid for <a href="#radar">radar</a>;
-</p>
-<p>set to start flow threads and pipes from edges only for <a href="#flow">flow</a>, <a href="#pipe">pipe</a>;
-</p>
-<p>set to use whole are for axis range in <a href="#subplot">subplot</a>, <a href="#inplot">inplot</a>;
-</p>
-<p>change text color inside a string (see <a href="#Font-styles">Font styles</a>);
-</p>
-<p>start comment in <a href="#MGL-scripts">MGL scripts</a> or in <a href="#Command-options">Command options</a>.
-</p>
-</dd>
-<dt>‘<samp>$</samp>’</dt>
-<dd><p>denote parameter of <a href="#MGL-scripts">MGL scripts</a>.
-</p>
-</dd>
-<dt>‘<samp>%</samp>’</dt>
-<dd><p>set color scheme along 2 coordinates <a href="#Color-scheme">Color scheme</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>&</samp>’</dt>
-<dd>
-<p>set to pass long integer number in tick template <a href="#xtick">xtick</a>, <a href="#ytick">ytick</a>, <a href="#ztick">ztick</a>, <a href="#ctick">ctick</a>;
-</p>
-<p>specifier of drawing user-defined symbols as mark (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>’</samp>’</dt>
-<dd><p>denote string in <a href="#MGL-scripts">MGL scripts</a> or in <a href="#Command-options">Command options</a>.
-</p>
-</dd>
-<dt>‘<samp>*</samp>’</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>set to start flow threads from 2d array inside data (see <a href="#flow">flow</a>);
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>+</samp>’</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>set to print ‘<samp>+</samp>’ for positive numbers in <a href="#axis">axis</a>, <a href="#label">label</a>, <a href="#table">table</a>;
-</p>
-<p>operation of increasing last character value in MGL strings;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>,</samp>’</dt>
-<dd><p>separator for color positions (see <a href="#Color-styles">Color styles</a>) or items in a list
-</p>
-<p>concatenation of MGL string with another string or numerical value.
-</p>
-</dd>
-<dt>‘<samp>-</samp>’</dt>
-<dd><p>solid line style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>place entries horizontally in <a href="#legend">legend</a>;
-</p>
-<p>set to use usual ‘<samp>-</samp>’ for negative numbers in <a href="#axis">axis</a>, <a href="#label">label</a>, <a href="#table">table</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>.</samp>’</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>set to draw hachures instead of arrows for <a href="#vect">vect</a>, <a href="#vect3">vect3</a>;
-</p>
-<p>set to use dots instead of faces for <a href="#cloud">cloud</a>, <a href="#torus">torus</a>, <a href="#axial">axial</a>, <a href="#surf3">surf3</a>, <a href="#surf3a">surf3a</a>, <a href="#surf3c">surf3c</a>, <a href="#surf">surf</a>, <a href="#surfa">surfa</a>, <a href="#surfc">surfc</a>, <a href="#dens">dens</a>, <a href="#map">map</a>;
-</p>
-<p>delimiter of fractional parts for numbers.
-</p>
-</dd>
-<dt>‘<samp>/</samp>’</dt>
-<dd><p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>:</samp>’</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>stop color scheme parsing (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>range operation in <a href="#MGL-scripts">MGL scripts</a>;
-</p>
-<p>style for <a href="#axis">axis</a>;
-</p>
-<p>separator of commands in <a href="#MGL-scripts">MGL scripts</a>.
-</p>
-</dd>
-<dt>‘<samp>;</samp>’</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>start of an option in <a href="#MGL-scripts">MGL scripts</a> or in <a href="#Command-options">Command options</a>;
-</p>
-<p>separator of equations in <a href="#ode">ode</a>;
-</p>
-<p>separator of labels in <a href="#iris">iris</a>.
-</p>
-</dd>
-<dt>‘<samp><</samp>’</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>style of <a href="#subplot">subplot</a> and <a href="#inplot">inplot</a>;
-</p>
-<p>set position of <a href="#colorbar">colorbar</a>;
-</p>
-<p>style of <a href="#vect">vect</a>, <a href="#vect3">vect3</a>;
-</p>
-<p>align left in <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#boxplot">boxplot</a>, <a href="#cones">cones</a>, <a href="#candle">candle</a>, <a href="#ohlc">ohlc</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-
-</dd>
-<dt>‘<samp>></samp>’</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>style of <a href="#subplot">subplot</a> and <a href="#inplot">inplot</a>;
-</p>
-<p>set position of <a href="#colorbar">colorbar</a>;
-</p>
-<p>style of <a href="#vect">vect</a>, <a href="#vect3">vect3</a>;
-</p>
-<p>align right in <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#boxplot">boxplot</a>, <a href="#cones">cones</a>, <a href="#candle">candle</a>, <a href="#ohlc">ohlc</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>=</samp>’</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>set to use equidistant columns for <a href="#table">table</a>;
-</p>
-<p>set to use color gradient for <a href="#vect">vect</a>, <a href="#vect3">vect3</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>@</samp>’</dt>
-<dd><p>set to draw box around text for <a href="#text">text</a> and similar functions;
-</p>
-<p>set to draw boundary and fill it for <a href="#circle">circle</a>, <a href="#ellipse">ellipse</a>, <a href="#rhomb">rhomb</a>;
-</p>
-<p>set to fill faces for <a href="#box">box</a>;
-</p>
-<p>set to draw large semitransparent mark instead of error box for <a href="#error">error</a>;
-</p>
-<p>set to draw edges for <a href="#cone">cone</a>;
-</p>
-<p>set to draw filled boxes for <a href="#boxs">boxs</a>;
-</p>
-<p>reduce text size inside a string (see <a href="#Font-styles">Font styles</a>);
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>^</samp>’</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>style of <a href="#subplot">subplot</a> and <a href="#inplot">inplot</a>;
-</p>
-<p>set position of <a href="#colorbar">colorbar</a>;
-</p>
-<p>set outer position for <a href="#legend">legend</a>;
-</p>
-<p>inverse default position for <a href="#axis">axis</a>;
-</p>
-<p>switch to upper index inside a string (see <a href="#Font-styles">Font styles</a>);
-</p>
-<p>align center in <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#boxplot">boxplot</a>, <a href="#cones">cones</a>, <a href="#candle">candle</a>, <a href="#ohlc">ohlc</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>_</samp>’</dt>
-<dd><p>empty arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>disable drawing of tick labels for <a href="#axis">axis</a>;
-</p>
-<p>style of <a href="#subplot">subplot</a> and <a href="#inplot">inplot</a>;
-</p>
-<p>set position of <a href="#colorbar">colorbar</a>;
-</p>
-<p>set to draw contours at bottom for <a href="#cont">cont</a>, <a href="#contf">contf</a>, <a href="#contd">contd</a>, <a href="#contv">contv</a>, <a href="#tricont">tricont</a>;
-</p>
-<p>switch to lower index inside a string (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>‘<samp>[]</samp>’</dt>
-<dd><p>contain symbols excluded from color scheme parsing (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>operation of getting n-th character from MGL string.
-</p>
-</dd>
-<dt>‘<samp>{}</samp>’</dt>
-<dd><p>contain extended specification of color (see <a href="#Color-styles">Color styles</a>), dashing (see <a href="#Line-styles">Line styles</a>) or mask (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>denote special operation in <a href="#MGL-scripts">MGL scripts</a>;
-</p>
-<p>denote ’meta-symbol’ for LaTeX like string parsing (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>‘<samp>|</samp>’</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>set to use sharp color scheme (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>set to limit width by subplot width for <a href="#table">table</a>;
-</p>
-<p>delimiter in <a href="#list">list</a> command;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>‘<samp>\</samp>’</dt>
-<dd><p>string continuation symbol on next line for <a href="#MGL-scripts">MGL scripts</a>.
-</p>
-</dd>
-<dt>‘<samp>~</samp>’</dt>
-<dd><p>disable drawing of tick labels for <a href="#axis">axis</a> and <a href="#colorbar">colorbar</a>;
-</p>
-<p>disable first segment in <a href="#lamerey">lamerey</a>;
-</p>
-<p>reduce number of segments in <a href="#plot">plot</a> and <a href="#tens">tens</a>;
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-</dd>
-<dt>‘<samp>0,1,2,3,4,5,6,7,8,9</samp>’</dt>
-<dd><p>line width (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>brightness of a color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>precision of numbers in <a href="#axis">axis</a>, <a href="#label">label</a>, <a href="#table">table</a>;
-</p>
-<p>kind of smoothing (for digits 1,3,5) in <a href="#smooth">smooth</a>;
-</p>
-<p>digits for a value.
-</p>
-</dd>
-<dt>‘<samp>4,6,8</samp>’</dt>
-<dd><p>set to draw square, hex- or octo-pyramids instead of cones in <a href="#cone">cone</a>, <a href="#cones">cones</a>.
-</p>
-</dd>
-<dt>‘<samp>A,B,C,D,E,F,a,b,c,d,e,f</samp>’</dt>
-<dd><p>can be hex-digit for color specification if placed inside {} (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>A</samp>’</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>set to use absolute position in whole picture for <a href="#text">text</a>, <a href="#colorbar">colorbar</a>, <a href="#legend">legend</a>.
-</p>
-</dd>
-<dt>‘<samp>a</samp>’</dt>
-<dd><p>set to use absolute position in subplot for <a href="#text">text</a>;
-</p>
-<p>style of <a href="#plot">plot</a>, <a href="#radar">radar</a>, <a href="#tens">tens</a>, <a href="#area">area</a>, <a href="#region">region</a> to draw segments between points outside of axis range;
-</p>
-<p>style of <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#cones">cones</a>.
-</p>
-</dd>
-<dt>‘<samp>B</samp>’</dt>
-<dd><p>dark blue color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>b</samp>’</dt>
-<dd><p>blue color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>bold font face if placed after ‘<samp>:</samp>’ (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>‘<samp>C</samp>’</dt>
-<dd><p>dark cyan color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>align text to center if placed after ‘<samp>:</samp>’ (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>‘<samp>c</samp>’</dt>
-<dd><p>cyan color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>name of color axis;
-</p>
-<p>cosine transform for <a href="#transform">transform</a>.
-</p>
-</dd>
-<dt>‘<samp>D</samp>’</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-</dd>
-<dt>‘<samp>d</samp>’</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>start hex-dash description if placed inside {} (see <a href="#Line-styles">Line styles</a>).
-</p>
-</dd>
-<dt>‘<samp>E</samp>’</dt>
-<dd><p>dark green-yellow color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>e</samp>’</dt>
-<dd><p>green-yellow color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>F</samp>’</dt>
-<dd>
-<p>set fixed bar widths in <a href="#bars">bars</a>, <a href="#barh">barh</a>;
-</p>
-<p>set LaTeX-like format for numbers in <a href="#axis">axis</a>, <a href="#label">label</a>, <a href="#table">table</a>.
-</p>
-</dd>
-<dt>‘<samp>f</samp>’</dt>
-<dd><p>style of <a href="#bars">bars</a>, <a href="#barh">barh</a>;
-</p>
-<p>style of <a href="#vect">vect</a>, <a href="#vect3">vect3</a>;
-</p>
-<p>set fixed format for numbers in <a href="#axis">axis</a>, <a href="#label">label</a>, <a href="#table">table</a>;
-</p>
-<p>Fourier transform for <a href="#transform">transform</a>.
-</p>
-</dd>
-<dt>‘<samp>G</samp>’</dt>
-<dd><p>dark green color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>g</samp>’</dt>
-<dd><p>green color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>H</samp>’</dt>
-<dd><p>dark gray color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>h</samp>’</dt>
-<dd><p>gray color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>Hankel transform for <a href="#transform">transform</a>.
-</p>
-</dd>
-<dt>‘<samp>I</samp>’</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>set <a href="#colorbar">colorbar</a> position near boundary.
-</p>
-</dd>
-<dt>‘<samp>i</samp>’</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>italic font face if placed after ‘<samp>:</samp>’ (see <a href="#Font-styles">Font styles</a>).
-</p>
-<p>set to use inverse values for <a href="#cloud">cloud</a>, <a href="#pipe">pipe</a>, <a href="#dew">dew</a>;
-</p>
-<p>set to fill only area with y1<y<y2 for <a href="#region">region</a>;
-</p>
-<p>inverse Fourier transform for <a href="#transform">transform</a>, <a href="#transforma">transforma</a>, <a href="#fourier">fourier</a>.
-</p>
-</dd>
-<dt>‘<samp>j</samp>’</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-</dd>
-<dt>‘<samp>K</samp>’</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>).
-</p>
-</dd>
-<dt>‘<samp>k</samp>’</dt>
-<dd><p>black color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>L</samp>’</dt>
-<dd><p>dark green-blue color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>align text to left if placed after ‘<samp>:</samp>’ (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>‘<samp>l</samp>’</dt>
-<dd><p>green-blue color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>M</samp>’</dt>
-<dd><p>dark magenta color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>m</samp>’</dt>
-<dd><p>magenta color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>N</samp>’</dt>
-<dd><p>dark sky-blue color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>n</samp>’</dt>
-<dd><p>sky-blue color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>O</samp>’</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-</dd>
-<dt>‘<samp>o</samp>’</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>over-line text if placed after ‘<samp>:</samp>’ (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>‘<samp>P</samp>’</dt>
-<dd><p>dark purple color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>p</samp>’</dt>
-<dd><p>purple color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>Q</samp>’</dt>
-<dd><p>dark orange or brown color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>q</samp>’</dt>
-<dd><p>orange color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>R</samp>’</dt>
-<dd><p>dark red color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>align text to right if placed after ‘<samp>:</samp>’ (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>‘<samp>r</samp>’</dt>
-<dd><p>red color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>S</samp>’</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-</dd>
-<dt>‘<samp>s</samp>’</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>start hex-mask description if placed inside {} (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>sine transform for <a href="#transform">transform</a>.
-</p>
-</dd>
-<dt>‘<samp>t</samp>’</dt>
-<dd><p>draw tubes instead of cones in <a href="#cone">cone</a>, <a href="#cones">cones</a>;
-</p>
-</dd>
-<dt>‘<samp>T</samp>’</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>place text under the curve for <a href="#text">text</a>, <a href="#cont">cont</a>, <a href="#cont3">cont3</a>.
-</p>
-</dd>
-<dt>‘<samp>t</samp>’</dt>
-<dd><p>set to draw text labels for <a href="#cont">cont</a>, <a href="#cont3">cont3</a>;
-</p>
-<p>name of t-axis (one of ternary axis);
-</p>
-<p>variable in <a href="#Textual-formulas">Textual formulas</a>, which usually is varied in range [0,1].
-</p>
-</dd>
-<dt>‘<samp>U</samp>’</dt>
-<dd><p>dark blue-violet color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>disable rotation of tick labels for <a href="#axis">axis</a>.
-</p>
-</dd>
-<dt>‘<samp>u</samp>’</dt>
-<dd><p>blue-violet color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>under-line text if placed after ‘<samp>:</samp>’ (see <a href="#Font-styles">Font styles</a>);
-</p>
-<p>name of u-axis (one of ternary axis);
-</p>
-<p>variable in <a href="#Textual-formulas">Textual formulas</a>, which usually denote array itself.
-</p>
-</dd>
-<dt>‘<samp>V</samp>’</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>place text centering on vertical direction for <a href="#text">text</a>.
-</p>
-</dd>
-<dt>‘<samp>v</samp>’</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>set to draw vectors on flow threads for <a href="#flow">flow</a> and on segments for <a href="#lamerey">lamerey</a>.
-</p>
-</dd>
-<dt>‘<samp>W</samp>’</dt>
-<dd><p>bright gray color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>w</samp>’</dt>
-<dd><p>white color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>wired text if placed after ‘<samp>:</samp>’ (see <a href="#Font-styles">Font styles</a>);
-</p>
-<p>name of w-axis (one of ternary axis);
-</p>
-</dd>
-<dt>‘<samp>X</samp>’</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>).
-</p>
-</dd>
-<dt>‘<samp>x</samp>’</dt>
-<dd>
-<p>name of x-axis or x-direction or 1st dimension of a data array;
-</p>
-<p>start hex-color description if placed inside {} (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>tiles orientation perpendicular to x-axis in <a href="#tile">tile</a>, <a href="#tiles">tiles</a>;
-</p>
-<p>style of <a href="#tape">tape</a>.
-</p>
-</dd>
-<dt>‘<samp>Y</samp>’</dt>
-<dd><p>dark yellow or gold color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>‘<samp>y</samp>’</dt>
-<dd><p>yellow color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>name of y-axis or y-direction or 2nd dimension of a data array;
-</p>
-<p>tiles orientation perpendicular to y-axis in <a href="#tile">tile</a>, <a href="#tiles">tiles</a>.
-</p>
-</dd>
-<dt>‘<samp>z</samp>’</dt>
-<dd>
-<p>name of z-axis or z-direction or 3d dimension of a data array;
-</p>
-<p>style of <a href="#tape">tape</a>.
-</p>
-</dd>
-</dl>
-
-
-
-<hr>
-<a name="Hot_002dkeys-for-mglview"></a>
-<div class="header">
-<p>
-Next: <a href="#Hot_002dkeys-for-UDAV" accesskey="n" rel="next">Hot-keys for UDAV</a>, Previous: <a href="#Symbols-for-styles" accesskey="p" rel="prev">Symbols for styles</a>, Up: <a href="#Symbols-and-hot_002dkeys" accesskey="u" rel="up">Symbols and hot-keys</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Hot_002dkeys-for-mglview-1"></a>
-<h3 class="section">A.2 Hot-keys for mglview</h3>
-
-
-<table>
-<thead><tr><th width="30%">Key</th><th width="70%">Description</th></tr></thead>
-<tr><td width="30%"><tt class="key">Ctrl-P</tt></td><td width="70%">Open printer dialog and print graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-W</tt></td><td width="70%">Close window.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-T</tt></td><td width="70%">Switch on/off transparency for the graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-L</tt></td><td width="70%">Switch on/off additional lightning for the graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Space</tt></td><td width="70%">Restore default graphics rotation, zoom and perspective.</td></tr>
-<tr><td width="30%"><tt class="key">F5</tt></td><td width="70%">Execute script and redraw graphics.</td></tr>
-<tr><td width="30%"><tt class="key">F6</tt></td><td width="70%">Change canvas size to fill whole region.</td></tr>
-<tr><td width="30%"><tt class="key">F7</tt></td><td width="70%">Stop drawing and script execution.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-F5</tt></td><td width="70%">Run slideshow. If no parameter specified then the dialog with slideshow options will appear.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Comma</tt>, <tt class="key">Ctrl-Period</tt></td><td width="70%">Show next/previous slide. If no parameter specified then the dialog with slideshow options will appear.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-G</tt></td><td width="70%">Copy graphics to clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-P</tt></td><td width="70%">Export as semitransparent PNG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-F</tt></td><td width="70%">Export as solid PNG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-J</tt></td><td width="70%">Export as JPEG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-E</tt></td><td width="70%">Export as vector EPS.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-S</tt></td><td width="70%">Export as vector SVG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-L</tt></td><td width="70%">Export as LaTeX/Tikz image.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-M</tt></td><td width="70%">Export as MGLD.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-D</tt></td><td width="70%">Export as PRC/PDF.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-O</tt></td><td width="70%">Export as OBJ.</td></tr>
-</table>
-
-
-<hr>
-<a name="Hot_002dkeys-for-UDAV"></a>
-<div class="header">
-<p>
-Previous: <a href="#Hot_002dkeys-for-mglview" accesskey="p" rel="prev">Hot-keys for mglview</a>, Up: <a href="#Symbols-and-hot_002dkeys" accesskey="u" rel="up">Symbols and hot-keys</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Hot_002dkeys-for-UDAV-1"></a>
-<h3 class="section">A.3 Hot-keys for UDAV</h3>
-
-
-<table>
-<thead><tr><th width="30%">Key</th><th width="70%">Description</th></tr></thead>
-<tr><td width="30%"><tt class="key">Ctrl-N</tt></td><td width="70%">Create new window with empty script. Note, all scripts share variables. So, second window can be used to see some additional information of existed variables.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-O</tt></td><td width="70%">Open and execute/show script or data from file. You may switch off automatic exection in UDAV properties</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-S</tt></td><td width="70%">Save script to a file.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-P</tt></td><td width="70%">Open printer dialog and print graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Z</tt></td><td width="70%">Undo changes in script editor.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-Z</tt></td><td width="70%">Redo changes in script editor.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-X</tt></td><td width="70%">Cut selected text into clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-C</tt></td><td width="70%">Copy selected text into clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-V</tt></td><td width="70%">Paste selected text from clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-A</tt></td><td width="70%">Select all text in editor.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-F</tt></td><td width="70%">Show dialog for text finding.</td></tr>
-<tr><td width="30%"><tt class="key">F3</tt></td><td width="70%">Find next occurrence of the text.</td></tr>
-<tr><td width="30%"><tt class="key">Win-C</tt> or <tt class="key">Meta-C</tt></td><td width="70%">Show dialog for new command and put it into the script.</td></tr>
-<tr><td width="30%"><tt class="key">Win-F</tt> or <tt class="key">Meta-F</tt></td><td width="70%">Insert last fitted formula with found coefficients.</td></tr>
-<tr><td width="30%"><tt class="key">Win-S</tt> or <tt class="key">Meta-S</tt></td><td width="70%">Show dialog for styles and put it into the script. Styles define the plot view (color scheme, marks, dashing and so on).</td></tr>
-<tr><td width="30%"><tt class="key">Win-O</tt> or <tt class="key">Meta-O</tt></td><td width="70%">Show dialog for options and put it into the script. Options are used for additional setup the plot.</td></tr>
-<tr><td width="30%"><tt class="key">Win-N</tt> or <tt class="key">Meta-N</tt></td><td width="70%">Replace selected expression by its numerical value.</td></tr>
-<tr><td width="30%"><tt class="key">Win-P</tt> or <tt class="key">Meta-P</tt></td><td width="70%">Select file and insert its file name into the script.</td></tr>
-<tr><td width="30%"><tt class="key">Win-G</tt> or <tt class="key">Meta-G</tt></td><td width="70%">Show dialog for plot setup and put resulting code into the script. This dialog setup axis, labels, lighting and other general things.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-O</tt></td><td width="70%">Load data from file. Data will be deleted only at exit but UDAV will not ask to save it.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-S</tt></td><td width="70%">Save data to a file.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-C</tt></td><td width="70%">Copy range of numbers to clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-V</tt></td><td width="70%">Paste range of numbers from clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-N</tt></td><td width="70%">Recreate the data with new sizes and fill it by zeros.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-R</tt></td><td width="70%">Resize (interpolate) the data to specified sizes.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-T</tt></td><td width="70%">Transform data along dimension(s).</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-M</tt></td><td width="70%">Make another data.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-H</tt></td><td width="70%">Find histogram of data.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-T</tt></td><td width="70%">Switch on/off transparency for the graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-L</tt></td><td width="70%">Switch on/off additional lightning for the graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-G</tt></td><td width="70%">Switch on/off grid of absolute coordinates.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Space</tt></td><td width="70%">Restore default graphics rotation, zoom and perspective.</td></tr>
-<tr><td width="30%"><tt class="key">F5</tt></td><td width="70%">Execute script and redraw graphics.</td></tr>
-<tr><td width="30%"><tt class="key">F6</tt></td><td width="70%">Change canvas size to fill whole region.</td></tr>
-<tr><td width="30%"><tt class="key">F7</tt></td><td width="70%">Stop script execution and drawing.</td></tr>
-<tr><td width="30%"><tt class="key">F8</tt></td><td width="70%">Show/hide tool window with list of hidden plots.</td></tr>
-<tr><td width="30%"><tt class="key">F9</tt></td><td width="70%">Restore status for ’once’ command and reload data.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-F5</tt></td><td width="70%">Run slideshow. If no parameter specified then the dialog with slideshow options will appear.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Comma</tt>, <tt class="key">Ctrl-Period</tt></td><td width="70%">Show next/previous slide. If no parameter specified then the dialog with slideshow options will appear.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-W</tt></td><td width="70%">Open dialog with slideshow options.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-G</tt></td><td width="70%">Copy graphics to clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">F1</tt></td><td width="70%">Show help on MGL commands</td></tr>
-<tr><td width="30%"><tt class="key">F2</tt></td><td width="70%">Show/hide tool window with messages and information.</td></tr>
-<tr><td width="30%"><tt class="key">F4</tt></td><td width="70%">Show/hide calculator which evaluate and help to type textual formulas. Textual formulas may contain data variables too.</td></tr>
-<tr><td width="30%"><tt class="key">Meta-Shift-Up</tt>, <tt class="key">Meta-Shift-Down</tt></td><td width="70%">Change view angle <em>\theta</em>.</td></tr>
-<tr><td width="30%"><tt class="key">Meta-Shift-Left</tt>, <tt class="key">Meta-Shift-Right</tt></td><td width="70%">Change view angle <em>\phi</em>.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-Minus</tt>, <tt class="key">Alt-Equal</tt></td><td width="70%">Zoom in/out whole image.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-Up</tt>, <tt class="key">Alt-Down</tt>, <tt class="key">Alt-Right</tt>, <tt class="key">Alt-Left</tt></td><td width="70%">Shift whole image.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-P</tt></td><td width="70%">Export as semitransparent PNG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-F</tt></td><td width="70%">Export as solid PNG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-J</tt></td><td width="70%">Export as JPEG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-E</tt></td><td width="70%">Export as vector EPS.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-S</tt></td><td width="70%">Export as vector SVG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-L</tt></td><td width="70%">Export as LaTeX/Tikz image.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-M</tt></td><td width="70%">Export as MGLD.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-D</tt></td><td width="70%">Export as PRC/PDF.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-O</tt></td><td width="70%">Export as OBJ.</td></tr>
-</table>
-
-
-
-<hr>
-<a name="File-formats"></a>
-<div class="header">
-<p>
-Next: <a href="#Plotting-time" accesskey="n" rel="next">Plotting time</a>, Previous: <a href="#Symbols-and-hot_002dkeys" accesskey="p" rel="prev">Symbols and hot-keys</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="File-formats-1"></a>
-<h2 class="appendix">Appendix B File formats</h2>
-
-
-<p>This appendix contain description of file formats used by MathGL.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Font-files" accesskey="1">Font files</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#MGLD-format" accesskey="2">MGLD format</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#JSON-format" accesskey="3">JSON format</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#IFS-format" accesskey="4">IFS format</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Font-files"></a>
-<div class="header">
-<p>
-Next: <a href="#MGLD-format" accesskey="n" rel="next">MGLD format</a>, Up: <a href="#File-formats" accesskey="u" rel="up">File formats</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Font-files-1"></a>
-<h3 class="section">B.1 Font files</h3>
-
-
-<p>Starting from v.1.6 the MathGL library uses new font files. The font is defined in 4 files with suffixes ‘<samp>*.vfm</samp>’, ‘<samp>*_b.vfm</samp>’, ‘<samp>*_i.vfm</samp>’, ‘<samp>*_bi.vfm</samp>’. These files are text files containing the data for roman font, bold font, italic font and bold italic font. The files (or some symbols in the files) for bold, italic or bold italic fonts can be absent. In this case the roman glyph will be used for them. By analogy, if the bold italic font is absent but the bold font is present then bold glyph will be used for bold italic. You may create these font files by yourself from *.ttf, *.otf files with the help of program <code>font_tools</code>. This program can be found at MathGL home site.
-</p>
-<p>The format of font files (*.vfm – vector font for MathGL) is the following.
-</p><ol>
-<li> First string contains human readable comment and is always ignored.
-</li><li> Second string contains 3 numbers, delimited by space or tabulation. The order of numbers is the following: <var>numg</var> – the number of glyphs in the file (integer), <var>fact</var> – the factor for glyph sizing (mreal), <var>size</var> – the size of buffer for glyph description (integer).
-</li><li> After it <var>numg</var>-th strings with glyphs description are placed. Each string contains 6 positive numbers, delimited by space of tabulation. The order of numbers is the following: Unicode glyph ID, glyph width, number of lines in glyph, position of lines coordinates in the buffer (length is 2*number of lines), number of triangles in glyph, position of triangles coordinates in the buffer (length is 6*number of triangles).
-</li><li> The end of file contains the buffer with point coordinates at lines or triangles vertexes. The size of buffer (the number of integer) is <var>size</var>.
-</li></ol>
-
-<p>Each font file can be compressed by gzip.
-</p>
-<p>Note: the closing contour line is done automatically (so the last segment may be absent). For starting new contour use a point with coordinates <code>{0x3fff, 0x3fff}</code>.
-</p>
-
-
-<hr>
-<a name="MGLD-format"></a>
-<div class="header">
-<p>
-Next: <a href="#JSON-format" accesskey="n" rel="next">JSON format</a>, Previous: <a href="#Font-files" accesskey="p" rel="prev">Font files</a>, Up: <a href="#File-formats" accesskey="u" rel="up">File formats</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="MGLD-format-1"></a>
-<h3 class="section">B.2 MGLD format</h3>
-
-
-<p>MGLD is textual file, which contain all required information for drawing 3D image, i.e. it contain vertexes with colors and normales, primitives with all properties, textures, and glyph descriptions. MGLD file can be imported or viewed separately, without parsing data files itself.
-</p>
-<p>MGLD file start from string
-</p><pre class="verbatim">MGLD npnts nprim ntxtr nglfs # optional description
-</pre><p>which contain signature ‘<samp>MGLD</samp>’ and number of points <var>npnts</var>, number of primitives <var>nprim</var>, number of textures <var>ntxtr</var>, number of glyph descriptions <var>nglfs</var>, and optional description. Empty strings and string with ‘<samp>#</samp>’ are ignored.
-</p>
-<p>Next, file contain <var>npnts</var> strings with points coordinates and colors. The format of each string is
-</p><pre class="verbatim">x y z c t ta u v w r g b a
-</pre><p>Here <var>x</var>, <var>y</var>, <var>z</var> are coordinates, <var>c</var>, <var>t</var> are color indexes in texture, <var>ta</var> is normalized <var>t</var> according to current alpha setting, <var>u</var>, <var>v</var>, <var>w</var> are coordinates of normal vector (can be <code>NAN</code> if disabled), <var>r</var>, <var>g</var>, <var>b</var>, <var>a</var> are RGBA color values.
-</p>
-<p>Next, file contain <var>nprim</var> strings with properties of primitives. The format of each string is
-</p><pre class="verbatim">type n1 n2 n3 n4 id s w p
-</pre><p>Here <var>type</var> is kind of primitive (0 - mark, 1 - line, 2 - triangle, 3 - quadrangle, 4 - glyph), <var>n1</var>...<var>n4</var> is index of point for vertexes, <var>id</var> is primitive identification number, <var>s</var> and <var>w</var> are size and width if applicable, <var>p</var> is scaling factor for glyphs.
-</p>
-<p>Next, file contain <var>ntxtr</var> strings with descriptions of textures. The format of each string is
-</p><pre class="verbatim">smooth alpha colors
-</pre><p>Here <var>smooth</var> set to enable smoothing between colors, <var>alpha</var> set to use half-transparent texture, <var>colors</var> contain color scheme itself as it described in <a href="#Color-scheme">Color scheme</a>.
-</p>
-<p>Finally, file contain <var>nglfs</var> entries with description of each glyph used in the figure. The format of entries are
-</p><pre class="verbatim">nT nL
-xA yA xB yB xC yC ...
-xP yP ...
-</pre><p>Here nT is the number of triangles; nL is the number of line vertexes; xA, yA, xB, yB, xC, yC are coordinates of triangles; and xP, yP, xQ, yQ are coordinates of lines. Line coordinate xP=0x3fff, yP=0x3fff denote line breaking.
-</p>
-
-<hr>
-<a name="JSON-format"></a>
-<div class="header">
-<p>
-Next: <a href="#IFS-format" accesskey="n" rel="next">IFS format</a>, Previous: <a href="#MGLD-format" accesskey="p" rel="prev">MGLD format</a>, Up: <a href="#File-formats" accesskey="u" rel="up">File formats</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="JSON-format-1"></a>
-<h3 class="section">B.3 JSON format</h3>
-
-
-<p>MathGL can save points and primitives of 3D object. It contain a set of variables listed below.
-</p>
-<dl compact="compact">
-<dt>‘<samp>width</samp>’</dt>
-<dd><p>width of the image;
-</p></dd>
-<dt>‘<samp>height</samp>’</dt>
-<dd><p>height of the image
-</p></dd>
-<dt>‘<samp>depth</samp>’</dt>
-<dd><p>depth of the image, usually =sqrt(width*height);
-</p>
-</dd>
-<dt>‘<samp>npnts</samp>’</dt>
-<dd><p>number of points (vertexes);
-</p></dd>
-<dt>‘<samp>pnts</samp>’</dt>
-<dd><p>array of coordinates of points (vertexes), each element is array in form [x, y, z];
-</p>
-</dd>
-<dt>‘<samp>nprim</samp>’</dt>
-<dd><p>number of primitives;
-</p></dd>
-<dt>‘<samp>prim</samp>’</dt>
-<dd><p>array of primitives, each element is array in form [type, n1, n2, n3, n4, id, s, w, p, z, color].
-</p>
-<p>Here <var>type</var> is kind of primitive (0 - mark, 1 - line, 2 - triangle, 3 - quadrangle, 4 - glyph), <var>n1</var>...<var>n4</var> is index of point for vertexes and <var>n2</var> can be index of glyph coordinate, <var>s</var> and <var>w</var> are size and width if applicable, <var>z</var> is average z-coordinate, <var>id</var> is primitive identification number, <var>p</var> is scaling factor for glyphs.
-</p>
-</dd>
-<dt>‘<samp>ncoor</samp>’</dt>
-<dd><p>number of glyph positions
-</p></dd>
-<dt>‘<samp>coor</samp>’</dt>
-<dd><p>array of glyph positions, each element is array in form [dx,dy]
-</p>
-</dd>
-<dt>‘<samp>nglfs</samp>’</dt>
-<dd><p>number of glyph descriptions
-</p></dd>
-<dt>‘<samp>glfs</samp>’</dt>
-<dd><p>array of glyph descriptions, each element is array in form <code>[nL, [xP0, yP0, xP1, yP1 ...]]</code>. Here <code>nL</code> is the number of line vertexes; and <code>xP, yP, xQ, yQ</code> are coordinates of lines. Line coordinate xP=0x3fff, yP=0x3fff denote line breaking.
-</p>
-</dd>
-</dl>
-
-
-<hr>
-<a name="IFS-format"></a>
-<div class="header">
-<p>
-Previous: <a href="#JSON-format" accesskey="p" rel="prev">JSON format</a>, Up: <a href="#File-formats" accesskey="u" rel="up">File formats</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="IFS-format-1"></a>
-<h3 class="section">B.4 IFS format</h3>
-
-
-<p>MathGL can read IFS fractal parameters (see <a href="#ifsfile">ifsfile</a>) from a IFS file. Let remind IFS file format. File may contain several records. Each record contain the name of fractal (‘<samp>binary</samp>’ in the example below) and the body of fractal, which is enclosed in curly braces {}. Symbol ‘<samp>;</samp>’ start the comment. If the name of fractal contain ‘<samp>(3D)</samp>’ or ‘<samp>(3d)</samp>’ then the 3d IFS fractal is specified. The sample below contain two fractals: ‘<samp>binary</samp>’ – usual 2d fractal, and ‘<samp>3dfern (3D)</samp>’ – 3d fractal.
-</p>
-<pre class="verbatim"> binary
- { ; comment allowed here
- ; and here
- .5 .0 .0 .5 -2.563477 -0.000003 .333333 ; also comment allowed here
- .5 .0 .0 .5 2.436544 -0.000003 .333333
- .0 -.5 .5 .0 4.873085 7.563492 .333333
- }
-
- 3dfern (3D) {
- .00 .00 0 .0 .18 .0 0 0.0 0.00 0 0.0 0 .01
- .85 .00 0 .0 .85 .1 0 -0.1 0.85 0 1.6 0 .85
- .20 -.20 0 .2 .20 .0 0 0.0 0.30 0 0.8 0 .07
- -.20 .20 0 .2 .20 .0 0 0.0 0.30 0 0.8 0 .07
- }
-</pre>
-
-<hr>
-<a name="Plotting-time"></a>
-<div class="header">
-<p>
-Next: <a href="#TeX_002dlike-symbols" accesskey="n" rel="next">TeX-like symbols</a>, Previous: <a href="#File-formats" accesskey="p" rel="prev">File formats</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Vremya-otrisovki"></a>
-<h2 class="appendix">Appendix C Время отрисовки</h2>
-
-<p>В таблице показаны времена создания графика для всех примеров из файла <a href="http://sourceforge.net/p/mathgl/code/HEAD/tree/mathgl-2x/examples/samples.cpp">examples/samples.cpp</a>. Тест выполнен на моем ноутбуке (i5-2430M) с 64-bit Debian.
-</p>
-<p>Несколько слов о скорости. Во-первых, прямое рисование в память (Quality=4,5,6) быстрее буферизованного (Quality=0,1,2), но иногда результат некоректен (см. <a href="#cloud">cloud</a>) и пропадает возможность экспорта в векторные и 3d форматы (например, EPS, SVG, PDF, ...). Во-вторых, обычно картинка худшего качества рисуется быстрее, т.е. Quality=1 быстрее Quality=2, и Quality=0 быстрее Quality=1. Однако, если график содержит множество граней (например <a href="#cloud">cloud</a>, <a href="#surf3">surf3</a>, <a href="#pipe">pipe</a>, <a href="#dew">dew</a>), то Quality=0 может быть достаточно медленным, особенно для маленьких картинок. Наконец, картинки меньшего размера рисуются быстрее.
-</p>
-<p>Результаты для изображения размером 800*600 (по умолчанию).
-</p><table>
-<thead><tr><th width="16%">Name</th><th width="12%">q=0</th><th width="12%">q=1</th><th width="12%">q=2</th><th width="12%">q=4</th><th width="12%">q=5</th><th width="12%">q=6</th><th width="12%">q=8</th></tr></thead>
-<tr><td width="16%">3wave</td><td width="12%">0.0322</td><td width="12%">0.0627</td><td width="12%">0.0721</td><td width="12%">0.0425</td><td width="12%">0.11</td><td width="12%">0.136</td><td width="12%">0.0271</td></tr>
-<tr><td width="16%">alpha</td><td width="12%">0.0892</td><td width="12%">0.108</td><td width="12%">0.113</td><td width="12%">0.0473</td><td width="12%">0.124</td><td width="12%">0.145</td><td width="12%">0.0297</td></tr>
-<tr><td width="16%">apde</td><td width="12%">48.2</td><td width="12%">47.4</td><td width="12%">47.6</td><td width="12%">47.4</td><td width="12%">47.8</td><td width="12%">48.4</td><td width="12%">47.9</td></tr>
-<tr><td width="16%">area</td><td width="12%">0.0376</td><td width="12%">0.0728</td><td width="12%">0.0752</td><td width="12%">0.033</td><td width="12%">0.141</td><td width="12%">0.165</td><td width="12%">0.0186</td></tr>
-<tr><td width="16%">aspect</td><td width="12%">0.0442</td><td width="12%">0.0572</td><td width="12%">0.0551</td><td width="12%">0.031</td><td width="12%">0.0999</td><td width="12%">0.103</td><td width="12%">0.0146</td></tr>
-<tr><td width="16%">axial</td><td width="12%">0.639</td><td width="12%">0.917</td><td width="12%">0.926</td><td width="12%">0.195</td><td width="12%">0.525</td><td width="12%">0.552</td><td width="12%">0.119</td></tr>
-<tr><td width="16%">axis</td><td width="12%">0.0683</td><td width="12%">0.107</td><td width="12%">0.108</td><td width="12%">0.0466</td><td width="12%">0.196</td><td width="12%">0.202</td><td width="12%">0.0169</td></tr>
-<tr><td width="16%">barh</td><td width="12%">0.0285</td><td width="12%">0.0547</td><td width="12%">0.0603</td><td width="12%">0.0292</td><td width="12%">0.101</td><td width="12%">0.115</td><td width="12%">0.0114</td></tr>
-<tr><td width="16%">bars</td><td width="12%">0.0414</td><td width="12%">0.0703</td><td width="12%">0.0843</td><td width="12%">0.1</td><td width="12%">0.185</td><td width="12%">0.184</td><td width="12%">0.0295</td></tr>
-<tr><td width="16%">belt</td><td width="12%">0.0286</td><td width="12%">0.0532</td><td width="12%">0.0577</td><td width="12%">0.0384</td><td width="12%">0.0735</td><td width="12%">0.1</td><td width="12%">0.0131</td></tr>
-<tr><td width="16%">bifurcation</td><td width="12%">0.589</td><td width="12%">0.635</td><td width="12%">0.609</td><td width="12%">0.531</td><td width="12%">0.572</td><td width="12%">0.579</td><td width="12%">0.512</td></tr>
-<tr><td width="16%">box</td><td width="12%">0.0682</td><td width="12%">0.0805</td><td width="12%">0.0828</td><td width="12%">0.0314</td><td width="12%">0.124</td><td width="12%">0.121</td><td width="12%">0.0169</td></tr>
-<tr><td width="16%">boxplot</td><td width="12%">0.0102</td><td width="12%">0.0317</td><td width="12%">0.0347</td><td width="12%">0.02</td><td width="12%">0.0499</td><td width="12%">0.0554</td><td width="12%">0.0167</td></tr>
-<tr><td width="16%">boxs</td><td width="12%">0.239</td><td width="12%">0.363</td><td width="12%">0.4</td><td width="12%">0.0798</td><td width="12%">0.216</td><td width="12%">0.234</td><td width="12%">0.0721</td></tr>
-<tr><td width="16%">candle</td><td width="12%">0.0286</td><td width="12%">0.0549</td><td width="12%">0.053</td><td width="12%">0.0263</td><td width="12%">0.0483</td><td width="12%">0.0564</td><td width="12%">0.0109</td></tr>
-<tr><td width="16%">chart</td><td width="12%">0.416</td><td width="12%">0.613</td><td width="12%">0.707</td><td width="12%">0.26</td><td width="12%">1.07</td><td width="12%">1.59</td><td width="12%">0.191</td></tr>
-<tr><td width="16%">cloud</td><td width="12%">0.0312</td><td width="12%">4.15</td><td width="12%">4.11</td><td width="12%">0.0306</td><td width="12%">0.715</td><td width="12%">0.924</td><td width="12%">0.0168</td></tr>
-<tr><td width="16%">colorbar</td><td width="12%">0.108</td><td width="12%">0.172</td><td width="12%">0.177</td><td width="12%">0.0787</td><td width="12%">0.258</td><td width="12%">0.266</td><td width="12%">0.0452</td></tr>
-<tr><td width="16%">combined</td><td width="12%">0.36</td><td width="12%">0.336</td><td width="12%">0.332</td><td width="12%">0.198</td><td width="12%">0.316</td><td width="12%">0.33</td><td width="12%">0.196</td></tr>
-<tr><td width="16%">cones</td><td width="12%">0.145</td><td width="12%">0.139</td><td width="12%">0.14</td><td width="12%">0.0937</td><td width="12%">0.248</td><td width="12%">0.276</td><td width="12%">0.0363</td></tr>
-<tr><td width="16%">cont</td><td width="12%">0.0987</td><td width="12%">0.141</td><td width="12%">0.141</td><td width="12%">0.0585</td><td width="12%">0.207</td><td width="12%">0.194</td><td width="12%">0.0455</td></tr>
-<tr><td width="16%">cont3</td><td width="12%">0.0323</td><td width="12%">0.058</td><td width="12%">0.0587</td><td width="12%">0.0304</td><td width="12%">0.0726</td><td width="12%">0.0837</td><td width="12%">0.0162</td></tr>
-<tr><td width="16%">cont_xyz</td><td width="12%">0.0417</td><td width="12%">0.0585</td><td width="12%">0.0612</td><td width="12%">0.0417</td><td width="12%">0.0833</td><td width="12%">0.0845</td><td width="12%">0.0294</td></tr>
-<tr><td width="16%">contd</td><td width="12%">0.191</td><td width="12%">0.245</td><td width="12%">0.236</td><td width="12%">0.104</td><td width="12%">0.189</td><td width="12%">0.201</td><td width="12%">0.0902</td></tr>
-<tr><td width="16%">contf</td><td width="12%">0.162</td><td width="12%">0.179</td><td width="12%">0.182</td><td width="12%">0.0789</td><td width="12%">0.166</td><td width="12%">0.177</td><td width="12%">0.067</td></tr>
-<tr><td width="16%">contf3</td><td width="12%">0.123</td><td width="12%">0.12</td><td width="12%">0.134</td><td width="12%">0.065</td><td width="12%">0.123</td><td width="12%">0.155</td><td width="12%">0.0538</td></tr>
-<tr><td width="16%">contf_xyz</td><td width="12%">0.0751</td><td width="12%">0.0922</td><td width="12%">0.111</td><td width="12%">0.0756</td><td width="12%">0.0879</td><td width="12%">0.0956</td><td width="12%">0.0462</td></tr>
-<tr><td width="16%">contv</td><td width="12%">0.0947</td><td width="12%">0.123</td><td width="12%">0.136</td><td width="12%">0.0757</td><td width="12%">0.163</td><td width="12%">0.18</td><td width="12%">0.0469</td></tr>
-<tr><td width="16%">correl</td><td width="12%">0.0339</td><td width="12%">0.0629</td><td width="12%">0.0599</td><td width="12%">0.0288</td><td width="12%">0.115</td><td width="12%">0.138</td><td width="12%">0.0165</td></tr>
-<tr><td width="16%">curvcoor</td><td width="12%">0.112</td><td width="12%">0.164</td><td width="12%">0.171</td><td width="12%">0.0864</td><td width="12%">0.296</td><td width="12%">0.298</td><td width="12%">0.0739</td></tr>
-<tr><td width="16%">cut</td><td width="12%">0.695</td><td width="12%">0.465</td><td width="12%">0.484</td><td width="12%">0.303</td><td width="12%">0.385</td><td width="12%">0.371</td><td width="12%">0.316</td></tr>
-<tr><td width="16%">dat_diff</td><td width="12%">0.0457</td><td width="12%">0.079</td><td width="12%">0.0825</td><td width="12%">0.0346</td><td width="12%">0.136</td><td width="12%">0.158</td><td width="12%">0.0186</td></tr>
-<tr><td width="16%">dat_extra</td><td width="12%">0.175</td><td width="12%">0.181</td><td width="12%">0.173</td><td width="12%">0.0877</td><td width="12%">0.163</td><td width="12%">0.173</td><td width="12%">0.0463</td></tr>
-<tr><td width="16%">data1</td><td width="12%">2.39</td><td width="12%">1.76</td><td width="12%">1.75</td><td width="12%">1.33</td><td width="12%">1.38</td><td width="12%">1.37</td><td width="12%">1.4</td></tr>
-<tr><td width="16%">data2</td><td width="12%">1.42</td><td width="12%">1.26</td><td width="12%">1.28</td><td width="12%">1.17</td><td width="12%">1.24</td><td width="12%">1.29</td><td width="12%">1.14</td></tr>
-<tr><td width="16%">dens</td><td width="12%">0.0867</td><td width="12%">0.122</td><td width="12%">0.131</td><td width="12%">0.0615</td><td width="12%">0.145</td><td width="12%">0.168</td><td width="12%">0.032</td></tr>
-<tr><td width="16%">dens3</td><td width="12%">0.0722</td><td width="12%">0.0769</td><td width="12%">0.0937</td><td width="12%">0.0437</td><td width="12%">0.0947</td><td width="12%">0.151</td><td width="12%">0.0797</td></tr>
-<tr><td width="16%">dens_xyz</td><td width="12%">0.0599</td><td width="12%">0.0875</td><td width="12%">0.0961</td><td width="12%">0.0463</td><td width="12%">0.089</td><td width="12%">0.0897</td><td width="12%">0.0315</td></tr>
-<tr><td width="16%">detect</td><td width="12%">0.133</td><td width="12%">0.151</td><td width="12%">0.176</td><td width="12%">0.0861</td><td width="12%">0.116</td><td width="12%">0.138</td><td width="12%">0.0721</td></tr>
-<tr><td width="16%">dew</td><td width="12%">1.48</td><td width="12%">1.07</td><td width="12%">0.971</td><td width="12%">0.473</td><td width="12%">0.537</td><td width="12%">0.416</td><td width="12%">0.195</td></tr>
-<tr><td width="16%">diffract</td><td width="12%">0.0878</td><td width="12%">0.127</td><td width="12%">0.139</td><td width="12%">0.0607</td><td width="12%">0.219</td><td width="12%">0.237</td><td width="12%">0.0274</td></tr>
-<tr><td width="16%">dilate</td><td width="12%">0.0778</td><td width="12%">0.128</td><td width="12%">0.138</td><td width="12%">0.0592</td><td width="12%">0.242</td><td width="12%">0.232</td><td width="12%">0.0298</td></tr>
-<tr><td width="16%">dots</td><td width="12%">0.0685</td><td width="12%">0.1</td><td width="12%">0.101</td><td width="12%">0.0694</td><td width="12%">0.134</td><td width="12%">0.129</td><td width="12%">0.0261</td></tr>
-<tr><td width="16%">earth</td><td width="12%">0.0147</td><td width="12%">0.033</td><td width="12%">0.0218</td><td width="12%">0.0168</td><td width="12%">0.0168</td><td width="12%">0.0191</td><td width="12%">0.00177</td></tr>
-<tr><td width="16%">error</td><td width="12%">0.0312</td><td width="12%">0.0707</td><td width="12%">0.0709</td><td width="12%">0.0288</td><td width="12%">0.135</td><td width="12%">0.137</td><td width="12%">0.016</td></tr>
-<tr><td width="16%">error2</td><td width="12%">0.0581</td><td width="12%">0.0964</td><td width="12%">0.0958</td><td width="12%">0.0595</td><td width="12%">0.173</td><td width="12%">0.187</td><td width="12%">0.0444</td></tr>
-<tr><td width="16%">export</td><td width="12%">0.116</td><td width="12%">0.158</td><td width="12%">0.167</td><td width="12%">0.0799</td><td width="12%">0.132</td><td width="12%">0.133</td><td width="12%">0.0685</td></tr>
-<tr><td width="16%">fall</td><td width="12%">0.035</td><td width="12%">0.051</td><td width="12%">0.0577</td><td width="12%">0.018</td><td width="12%">0.0585</td><td width="12%">0.0709</td><td width="12%">0.0142</td></tr>
-<tr><td width="16%">fexport</td><td width="12%">1.52</td><td width="12%">1.76</td><td width="12%">1.78</td><td width="12%">0.278</td><td width="12%">0.604</td><td width="12%">0.606</td><td width="12%">1.35</td></tr>
-<tr><td width="16%">fit</td><td width="12%">0.0371</td><td width="12%">0.0653</td><td width="12%">0.0666</td><td width="12%">0.0277</td><td width="12%">0.081</td><td width="12%">0.0837</td><td width="12%">0.014</td></tr>
-<tr><td width="16%">flame2d</td><td width="12%">5.37</td><td width="12%">5.54</td><td width="12%">5.5</td><td width="12%">3.04</td><td width="12%">3.21</td><td width="12%">3.09</td><td width="12%">1.13</td></tr>
-<tr><td width="16%">flow</td><td width="12%">0.368</td><td width="12%">0.451</td><td width="12%">0.444</td><td width="12%">0.36</td><td width="12%">0.5</td><td width="12%">0.48</td><td width="12%">0.352</td></tr>
-<tr><td width="16%">fog</td><td width="12%">0.0406</td><td width="12%">0.0645</td><td width="12%">0.0688</td><td width="12%">0.0379</td><td width="12%">0.0793</td><td width="12%">0.0894</td><td width="12%">0.0156</td></tr>
-<tr><td width="16%">fonts</td><td width="12%">0.0477</td><td width="12%">0.0926</td><td width="12%">0.112</td><td width="12%">0.0347</td><td width="12%">0.0518</td><td width="12%">0.0519</td><td width="12%">0.0413</td></tr>
-<tr><td width="16%">grad</td><td width="12%">0.0607</td><td width="12%">0.104</td><td width="12%">0.129</td><td width="12%">0.0715</td><td width="12%">0.103</td><td width="12%">0.12</td><td width="12%">0.0633</td></tr>
-<tr><td width="16%">hist</td><td width="12%">0.125</td><td width="12%">0.148</td><td width="12%">0.159</td><td width="12%">0.0919</td><td width="12%">0.116</td><td width="12%">0.129</td><td width="12%">0.0372</td></tr>
-<tr><td width="16%">ifs2d</td><td width="12%">0.594</td><td width="12%">0.623</td><td width="12%">0.62</td><td width="12%">0.315</td><td width="12%">0.349</td><td width="12%">0.33</td><td width="12%">0.109</td></tr>
-<tr><td width="16%">ifs3d</td><td width="12%">0.787</td><td width="12%">0.777</td><td width="12%">0.784</td><td width="12%">0.294</td><td width="12%">0.353</td><td width="12%">0.366</td><td width="12%">0.117</td></tr>
-<tr><td width="16%">indirect</td><td width="12%">0.0286</td><td width="12%">0.0517</td><td width="12%">0.0543</td><td width="12%">0.031</td><td width="12%">0.0612</td><td width="12%">0.104</td><td width="12%">0.0144</td></tr>
-<tr><td width="16%">inplot</td><td width="12%">0.0687</td><td width="12%">0.0979</td><td width="12%">0.0993</td><td width="12%">0.0622</td><td width="12%">0.181</td><td width="12%">0.195</td><td width="12%">0.0444</td></tr>
-<tr><td width="16%">iris</td><td width="12%">0.00846</td><td width="12%">0.025</td><td width="12%">0.0198</td><td width="12%">0.00349</td><td width="12%">0.0172</td><td width="12%">0.0182</td><td width="12%">0.0018</td></tr>
-<tr><td width="16%">label</td><td width="12%">0.0285</td><td width="12%">0.045</td><td width="12%">0.058</td><td width="12%">0.0267</td><td width="12%">0.0525</td><td width="12%">0.0618</td><td width="12%">0.014</td></tr>
-<tr><td width="16%">lamerey</td><td width="12%">0.0305</td><td width="12%">0.0372</td><td width="12%">0.0455</td><td width="12%">0.019</td><td width="12%">0.0604</td><td width="12%">0.0633</td><td width="12%">0.0024</td></tr>
-<tr><td width="16%">legend</td><td width="12%">0.0764</td><td width="12%">0.202</td><td width="12%">0.207</td><td width="12%">0.0455</td><td width="12%">0.138</td><td width="12%">0.148</td><td width="12%">0.0162</td></tr>
-<tr><td width="16%">light</td><td width="12%">0.0903</td><td width="12%">0.129</td><td width="12%">0.122</td><td width="12%">0.0573</td><td width="12%">0.132</td><td width="12%">0.144</td><td width="12%">0.021</td></tr>
-<tr><td width="16%">loglog</td><td width="12%">0.103</td><td width="12%">0.168</td><td width="12%">0.16</td><td width="12%">0.0806</td><td width="12%">0.228</td><td width="12%">0.235</td><td width="12%">0.0802</td></tr>
-<tr><td width="16%">map</td><td width="12%">0.0303</td><td width="12%">0.0653</td><td width="12%">0.0721</td><td width="12%">0.0337</td><td width="12%">0.0821</td><td width="12%">0.0866</td><td width="12%">0.015</td></tr>
-<tr><td width="16%">mark</td><td width="12%">0.0191</td><td width="12%">0.0324</td><td width="12%">0.0368</td><td width="12%">0.0261</td><td width="12%">0.0533</td><td width="12%">0.045</td><td width="12%">0.0072</td></tr>
-<tr><td width="16%">mask</td><td width="12%">0.0442</td><td width="12%">0.0964</td><td width="12%">0.101</td><td width="12%">0.0343</td><td width="12%">0.205</td><td width="12%">0.211</td><td width="12%">0.0115</td></tr>
-<tr><td width="16%">mesh</td><td width="12%">0.034</td><td width="12%">0.0774</td><td width="12%">0.0682</td><td width="12%">0.0192</td><td width="12%">0.0765</td><td width="12%">0.0742</td><td width="12%">0.0145</td></tr>
-<tr><td width="16%">mirror</td><td width="12%">0.092</td><td width="12%">0.128</td><td width="12%">0.142</td><td width="12%">0.0607</td><td width="12%">0.174</td><td width="12%">0.176</td><td width="12%">0.0312</td></tr>
-<tr><td width="16%">molecule</td><td width="12%">0.0827</td><td width="12%">0.0842</td><td width="12%">0.0859</td><td width="12%">0.0443</td><td width="12%">0.0997</td><td width="12%">0.146</td><td width="12%">0.0115</td></tr>
-<tr><td width="16%">ode</td><td width="12%">0.149</td><td width="12%">0.202</td><td width="12%">0.202</td><td width="12%">0.147</td><td width="12%">0.282</td><td width="12%">0.316</td><td width="12%">0.133</td></tr>
-<tr><td width="16%">ohlc</td><td width="12%">0.0059</td><td width="12%">0.0278</td><td width="12%">0.0271</td><td width="12%">0.0152</td><td width="12%">0.0517</td><td width="12%">0.045</td><td width="12%">0.0152</td></tr>
-<tr><td width="16%">param1</td><td width="12%">0.161</td><td width="12%">0.252</td><td width="12%">0.26</td><td width="12%">0.0941</td><td width="12%">0.301</td><td width="12%">0.341</td><td width="12%">0.0466</td></tr>
-<tr><td width="16%">param2</td><td width="12%">0.535</td><td width="12%">0.58</td><td width="12%">0.539</td><td width="12%">0.26</td><td width="12%">0.452</td><td width="12%">0.475</td><td width="12%">0.189</td></tr>
-<tr><td width="16%">param3</td><td width="12%">1.75</td><td width="12%">2.37</td><td width="12%">2.32</td><td width="12%">0.677</td><td width="12%">0.899</td><td width="12%">0.907</td><td width="12%">0.758</td></tr>
-<tr><td width="16%">paramv</td><td width="12%">1.21</td><td width="12%">1.39</td><td width="12%">1.36</td><td width="12%">0.788</td><td width="12%">0.974</td><td width="12%">0.968</td><td width="12%">0.69</td></tr>
-<tr><td width="16%">parser</td><td width="12%">0.0346</td><td width="12%">0.0582</td><td width="12%">0.0687</td><td width="12%">0.0317</td><td width="12%">0.108</td><td width="12%">0.11</td><td width="12%">0.0275</td></tr>
-<tr><td width="16%">pde</td><td width="12%">0.329</td><td width="12%">0.358</td><td width="12%">0.373</td><td width="12%">0.272</td><td width="12%">0.311</td><td width="12%">0.364</td><td width="12%">0.264</td></tr>
-<tr><td width="16%">pendelta</td><td width="12%">0.0653</td><td width="12%">0.0525</td><td width="12%">0.0648</td><td width="12%">0.0517</td><td width="12%">0.0531</td><td width="12%">0.0522</td><td width="12%">0.0653</td></tr>
-<tr><td width="16%">pipe</td><td width="12%">0.598</td><td width="12%">0.737</td><td width="12%">0.738</td><td width="12%">0.382</td><td width="12%">0.493</td><td width="12%">0.505</td><td width="12%">0.34</td></tr>
-<tr><td width="16%">plot</td><td width="12%">0.0397</td><td width="12%">0.0642</td><td width="12%">0.114</td><td width="12%">0.0444</td><td width="12%">0.123</td><td width="12%">0.118</td><td width="12%">0.0194</td></tr>
-<tr><td width="16%">pmap</td><td width="12%">0.0913</td><td width="12%">0.115</td><td width="12%">0.125</td><td width="12%">0.0572</td><td width="12%">0.0999</td><td width="12%">0.113</td><td width="12%">0.0469</td></tr>
-<tr><td width="16%">primitives</td><td width="12%">0.0581</td><td width="12%">0.108</td><td width="12%">0.128</td><td width="12%">0.0649</td><td width="12%">0.181</td><td width="12%">0.21</td><td width="12%">0.00928</td></tr>
-<tr><td width="16%">projection</td><td width="12%">0.13</td><td width="12%">0.264</td><td width="12%">0.286</td><td width="12%">0.0704</td><td width="12%">0.351</td><td width="12%">0.349</td><td width="12%">0.0683</td></tr>
-<tr><td width="16%">projection5</td><td width="12%">0.117</td><td width="12%">0.207</td><td width="12%">0.215</td><td width="12%">0.0717</td><td width="12%">0.3</td><td width="12%">0.312</td><td width="12%">0.0437</td></tr>
-<tr><td width="16%">pulse</td><td width="12%">0.0273</td><td width="12%">0.0395</td><td width="12%">0.0413</td><td width="12%">0.0183</td><td width="12%">0.0576</td><td width="12%">0.0635</td><td width="12%">0.0023</td></tr>
-<tr><td width="16%">qo2d</td><td width="12%">0.218</td><td width="12%">0.246</td><td width="12%">0.274</td><td width="12%">0.198</td><td width="12%">0.243</td><td width="12%">0.255</td><td width="12%">0.177</td></tr>
-<tr><td width="16%">quality0</td><td width="12%">0.0859</td><td width="12%">0.0902</td><td width="12%">0.087</td><td width="12%">0.0808</td><td width="12%">0.0808</td><td width="12%">0.0823</td><td width="12%">0.0796</td></tr>
-<tr><td width="16%">quality1</td><td width="12%">0.189</td><td width="12%">0.166</td><td width="12%">0.171</td><td width="12%">0.175</td><td width="12%">0.17</td><td width="12%">0.173</td><td width="12%">0.166</td></tr>
-<tr><td width="16%">quality2</td><td width="12%">0.183</td><td width="12%">0.183</td><td width="12%">0.175</td><td width="12%">0.172</td><td width="12%">0.171</td><td width="12%">0.183</td><td width="12%">0.184</td></tr>
-<tr><td width="16%">quality4</td><td width="12%">0.082</td><td width="12%">0.0713</td><td width="12%">0.0728</td><td width="12%">0.0636</td><td width="12%">0.0843</td><td width="12%">0.0651</td><td width="12%">0.0592</td></tr>
-<tr><td width="16%">quality5</td><td width="12%">0.366</td><td width="12%">0.359</td><td width="12%">0.363</td><td width="12%">0.366</td><td width="12%">0.354</td><td width="12%">0.356</td><td width="12%">0.357</td></tr>
-<tr><td width="16%">quality6</td><td width="12%">0.373</td><td width="12%">0.367</td><td width="12%">0.365</td><td width="12%">0.366</td><td width="12%">0.368</td><td width="12%">0.383</td><td width="12%">0.366</td></tr>
-<tr><td width="16%">quality8</td><td width="12%">0.0193</td><td width="12%">0.019</td><td width="12%">0.0289</td><td width="12%">0.0298</td><td width="12%">0.0165</td><td width="12%">0.0244</td><td width="12%">0.0229</td></tr>
-<tr><td width="16%">radar</td><td width="12%">0.0193</td><td width="12%">0.0369</td><td width="12%">0.0545</td><td width="12%">0.0158</td><td width="12%">0.0525</td><td width="12%">0.0532</td><td width="12%">0.0115</td></tr>
-<tr><td width="16%">refill</td><td width="12%">0.153</td><td width="12%">0.168</td><td width="12%">0.166</td><td width="12%">0.0746</td><td width="12%">0.239</td><td width="12%">0.258</td><td width="12%">0.0467</td></tr>
-<tr><td width="16%">region</td><td width="12%">0.0396</td><td width="12%">0.0723</td><td width="12%">0.0859</td><td width="12%">0.0342</td><td width="12%">0.133</td><td width="12%">0.159</td><td width="12%">0.017</td></tr>
-<tr><td width="16%">scanfile</td><td width="12%">0.0315</td><td width="12%">0.036</td><td width="12%">0.0497</td><td width="12%">0.0169</td><td width="12%">0.0486</td><td width="12%">0.053</td><td width="12%">0.014</td></tr>
-<tr><td width="16%">schemes</td><td width="12%">0.0703</td><td width="12%">0.114</td><td width="12%">0.117</td><td width="12%">0.062</td><td width="12%">0.204</td><td width="12%">0.21</td><td width="12%">0.019</td></tr>
-<tr><td width="16%">section</td><td width="12%">0.0294</td><td width="12%">0.0483</td><td width="12%">0.054</td><td width="12%">0.0221</td><td width="12%">0.0804</td><td width="12%">0.0821</td><td width="12%">0.00568</td></tr>
-<tr><td width="16%">several_light</td><td width="12%">0.0441</td><td width="12%">0.0541</td><td width="12%">0.0701</td><td width="12%">0.0299</td><td width="12%">0.0602</td><td width="12%">0.0815</td><td width="12%">0.0117</td></tr>
-<tr><td width="16%">solve</td><td width="12%">0.0461</td><td width="12%">0.109</td><td width="12%">0.105</td><td width="12%">0.0462</td><td width="12%">0.18</td><td width="12%">0.191</td><td width="12%">0.0184</td></tr>
-<tr><td width="16%">stem</td><td width="12%">0.0418</td><td width="12%">0.0599</td><td width="12%">0.0591</td><td width="12%">0.0308</td><td width="12%">0.126</td><td width="12%">0.139</td><td width="12%">0.015</td></tr>
-<tr><td width="16%">step</td><td width="12%">0.0399</td><td width="12%">0.0614</td><td width="12%">0.0554</td><td width="12%">0.0315</td><td width="12%">0.0958</td><td width="12%">0.113</td><td width="12%">0.0145</td></tr>
-<tr><td width="16%">stereo</td><td width="12%">0.0569</td><td width="12%">0.0652</td><td width="12%">0.0811</td><td width="12%">0.031</td><td width="12%">0.0807</td><td width="12%">0.093</td><td width="12%">0.0163</td></tr>
-<tr><td width="16%">stfa</td><td width="12%">0.0425</td><td width="12%">0.117</td><td width="12%">0.111</td><td width="12%">0.0416</td><td width="12%">0.115</td><td width="12%">0.121</td><td width="12%">0.0157</td></tr>
-<tr><td width="16%">style</td><td width="12%">0.0892</td><td width="12%">0.197</td><td width="12%">0.204</td><td width="12%">0.0596</td><td width="12%">0.349</td><td width="12%">0.369</td><td width="12%">0.0158</td></tr>
-<tr><td width="16%">surf</td><td width="12%">0.109</td><td width="12%">0.133</td><td width="12%">0.157</td><td width="12%">0.0657</td><td width="12%">0.16</td><td width="12%">0.158</td><td width="12%">0.0315</td></tr>
-<tr><td width="16%">surf3</td><td width="12%">1.79</td><td width="12%">2.6</td><td width="12%">2.57</td><td width="12%">0.949</td><td width="12%">2.36</td><td width="12%">2.44</td><td width="12%">0.625</td></tr>
-<tr><td width="16%">surf3a</td><td width="12%">0.431</td><td width="12%">0.281</td><td width="12%">0.297</td><td width="12%">0.176</td><td width="12%">0.235</td><td width="12%">0.252</td><td width="12%">0.178</td></tr>
-<tr><td width="16%">surf3c</td><td width="12%">0.423</td><td width="12%">0.285</td><td width="12%">0.301</td><td width="12%">0.175</td><td width="12%">0.202</td><td width="12%">0.265</td><td width="12%">0.177</td></tr>
-<tr><td width="16%">surf3ca</td><td width="12%">0.428</td><td width="12%">0.303</td><td width="12%">0.31</td><td width="12%">0.176</td><td width="12%">0.203</td><td width="12%">0.265</td><td width="12%">0.19</td></tr>
-<tr><td width="16%">surfa</td><td width="12%">0.0409</td><td width="12%">0.0577</td><td width="12%">0.0714</td><td width="12%">0.0265</td><td width="12%">0.062</td><td width="12%">0.0725</td><td width="12%">0.0154</td></tr>
-<tr><td width="16%">surfc</td><td width="12%">0.0422</td><td width="12%">0.0453</td><td width="12%">0.058</td><td width="12%">0.0282</td><td width="12%">0.0628</td><td width="12%">0.0749</td><td width="12%">0.0161</td></tr>
-<tr><td width="16%">surfca</td><td width="12%">0.0416</td><td width="12%">0.0598</td><td width="12%">0.058</td><td width="12%">0.0254</td><td width="12%">0.0541</td><td width="12%">0.0671</td><td width="12%">0.015</td></tr>
-<tr><td width="16%">table</td><td width="12%">0.103</td><td width="12%">0.213</td><td width="12%">0.214</td><td width="12%">0.0484</td><td width="12%">0.112</td><td width="12%">0.117</td><td width="12%">0.0156</td></tr>
-<tr><td width="16%">tape</td><td width="12%">0.0409</td><td width="12%">0.0784</td><td width="12%">0.0836</td><td width="12%">0.0347</td><td width="12%">0.124</td><td width="12%">0.138</td><td width="12%">0.0164</td></tr>
-<tr><td width="16%">tens</td><td width="12%">0.0329</td><td width="12%">0.0485</td><td width="12%">0.0441</td><td width="12%">0.0279</td><td width="12%">0.0805</td><td width="12%">0.0757</td><td width="12%">0.00561</td></tr>
-<tr><td width="16%">ternary</td><td width="12%">0.104</td><td width="12%">0.218</td><td width="12%">0.214</td><td width="12%">0.0634</td><td width="12%">0.393</td><td width="12%">0.425</td><td width="12%">0.0352</td></tr>
-<tr><td width="16%">text</td><td width="12%">0.0827</td><td width="12%">0.156</td><td width="12%">0.15</td><td width="12%">0.0261</td><td width="12%">0.114</td><td width="12%">0.127</td><td width="12%">0.015</td></tr>
-<tr><td width="16%">text2</td><td width="12%">0.0719</td><td width="12%">0.12</td><td width="12%">0.131</td><td width="12%">0.115</td><td width="12%">0.129</td><td width="12%">0.137</td><td width="12%">0.016</td></tr>
-<tr><td width="16%">textmark</td><td width="12%">0.0403</td><td width="12%">0.0749</td><td width="12%">0.0788</td><td width="12%">0.0223</td><td width="12%">0.0607</td><td width="12%">0.0653</td><td width="12%">0.014</td></tr>
-<tr><td width="16%">ticks</td><td width="12%">0.0868</td><td width="12%">0.193</td><td width="12%">0.195</td><td width="12%">0.0611</td><td width="12%">0.259</td><td width="12%">0.249</td><td width="12%">0.0275</td></tr>
-<tr><td width="16%">tile</td><td width="12%">0.0349</td><td width="12%">0.0444</td><td width="12%">0.0597</td><td width="12%">0.0308</td><td width="12%">0.0546</td><td width="12%">0.0547</td><td width="12%">0.0111</td></tr>
-<tr><td width="16%">tiles</td><td width="12%">0.0393</td><td width="12%">0.0585</td><td width="12%">0.0534</td><td width="12%">0.0205</td><td width="12%">0.0648</td><td width="12%">0.0597</td><td width="12%">0.0174</td></tr>
-<tr><td width="16%">torus</td><td width="12%">0.114</td><td width="12%">0.197</td><td width="12%">0.193</td><td width="12%">0.0713</td><td width="12%">0.394</td><td width="12%">0.457</td><td width="12%">0.0306</td></tr>
-<tr><td width="16%">traj</td><td width="12%">0.0251</td><td width="12%">0.0413</td><td width="12%">0.043</td><td width="12%">0.0178</td><td width="12%">0.0628</td><td width="12%">0.0968</td><td width="12%">0.0129</td></tr>
-<tr><td width="16%">triangulation</td><td width="12%">0.0328</td><td width="12%">0.0659</td><td width="12%">0.0792</td><td width="12%">0.0319</td><td width="12%">0.0966</td><td width="12%">0.0888</td><td width="12%">0.0155</td></tr>
-<tr><td width="16%">triplot</td><td width="12%">0.0302</td><td width="12%">0.0705</td><td width="12%">0.102</td><td width="12%">0.0198</td><td width="12%">0.0973</td><td width="12%">0.127</td><td width="12%">0.0143</td></tr>
-<tr><td width="16%">tube</td><td width="12%">0.077</td><td width="12%">0.143</td><td width="12%">0.192</td><td width="12%">0.0593</td><td width="12%">0.191</td><td width="12%">0.21</td><td width="12%">0.0197</td></tr>
-<tr><td width="16%">type0</td><td width="12%">0.177</td><td width="12%">0.172</td><td width="12%">0.198</td><td width="12%">0.0673</td><td width="12%">0.141</td><td width="12%">0.2</td><td width="12%">0.0576</td></tr>
-<tr><td width="16%">type1</td><td width="12%">0.174</td><td width="12%">0.173</td><td width="12%">0.2</td><td width="12%">0.0648</td><td width="12%">0.153</td><td width="12%">0.17</td><td width="12%">0.0571</td></tr>
-<tr><td width="16%">type2</td><td width="12%">0.188</td><td width="12%">0.198</td><td width="12%">0.197</td><td width="12%">0.0773</td><td width="12%">0.186</td><td width="12%">0.193</td><td width="12%">0.0647</td></tr>
-<tr><td width="16%">vect</td><td width="12%">0.129</td><td width="12%">0.336</td><td width="12%">0.194</td><td width="12%">0.0608</td><td width="12%">0.174</td><td width="12%">0.177</td><td width="12%">0.043</td></tr>
-<tr><td width="16%">vect3</td><td width="12%">0.0317</td><td width="12%">0.0781</td><td width="12%">0.0869</td><td width="12%">0.0366</td><td width="12%">0.155</td><td width="12%">0.159</td><td width="12%">0.0174</td></tr>
-<tr><td width="16%">venn</td><td width="12%">0.0153</td><td width="12%">0.0503</td><td width="12%">0.0787</td><td width="12%">0.0115</td><td width="12%">0.0665</td><td width="12%">0.075</td><td width="12%">0.00249</td></tr>
-</table>
-
-<p>Результаты для изображения размером 1920*1440 (для печати)
-</p><table>
-<thead><tr><th width="16%">Name</th><th width="12%">q=0</th><th width="12%">q=1</th><th width="12%">q=2</th><th width="12%">q=4</th><th width="12%">q=5</th><th width="12%">q=6</th><th width="12%">q=8</th></tr></thead>
-<tr><td width="16%">3wave</td><td width="12%">0.0763</td><td width="12%">0.134</td><td width="12%">0.157</td><td width="12%">0.0764</td><td width="12%">0.198</td><td width="12%">0.207</td><td width="12%">0.0598</td></tr>
-<tr><td width="16%">alpha</td><td width="12%">0.111</td><td width="12%">0.176</td><td width="12%">0.254</td><td width="12%">0.104</td><td width="12%">0.244</td><td width="12%">0.272</td><td width="12%">0.0591</td></tr>
-<tr><td width="16%">apde</td><td width="12%">48</td><td width="12%">47.6</td><td width="12%">47.5</td><td width="12%">47.1</td><td width="12%">47.2</td><td width="12%">47.7</td><td width="12%">47</td></tr>
-<tr><td width="16%">area</td><td width="12%">0.0783</td><td width="12%">0.169</td><td width="12%">0.245</td><td width="12%">0.107</td><td width="12%">0.277</td><td width="12%">0.335</td><td width="12%">0.0408</td></tr>
-<tr><td width="16%">aspect</td><td width="12%">0.0622</td><td width="12%">0.105</td><td width="12%">0.129</td><td width="12%">0.0638</td><td width="12%">0.185</td><td width="12%">0.234</td><td width="12%">0.0478</td></tr>
-<tr><td width="16%">axial</td><td width="12%">0.681</td><td width="12%">1.38</td><td width="12%">1.61</td><td width="12%">0.297</td><td width="12%">0.878</td><td width="12%">1.12</td><td width="12%">0.141</td></tr>
-<tr><td width="16%">axis</td><td width="12%">0.0863</td><td width="12%">0.153</td><td width="12%">0.17</td><td width="12%">0.0773</td><td width="12%">0.274</td><td width="12%">0.297</td><td width="12%">0.0479</td></tr>
-<tr><td width="16%">barh</td><td width="12%">0.0631</td><td width="12%">0.118</td><td width="12%">0.134</td><td width="12%">0.0661</td><td width="12%">0.218</td><td width="12%">0.259</td><td width="12%">0.049</td></tr>
-<tr><td width="16%">bars</td><td width="12%">0.0654</td><td width="12%">0.126</td><td width="12%">0.153</td><td width="12%">0.0803</td><td width="12%">0.28</td><td width="12%">0.318</td><td width="12%">0.0479</td></tr>
-<tr><td width="16%">belt</td><td width="12%">0.0624</td><td width="12%">0.11</td><td width="12%">0.133</td><td width="12%">0.0614</td><td width="12%">0.228</td><td width="12%">0.354</td><td width="12%">0.0454</td></tr>
-<tr><td width="16%">bifurcation</td><td width="12%">0.604</td><td width="12%">0.696</td><td width="12%">0.758</td><td width="12%">0.602</td><td width="12%">0.656</td><td width="12%">0.692</td><td width="12%">0.572</td></tr>
-<tr><td width="16%">box</td><td width="12%">0.081</td><td width="12%">0.152</td><td width="12%">0.211</td><td width="12%">0.0754</td><td width="12%">0.204</td><td width="12%">0.238</td><td width="12%">0.0516</td></tr>
-<tr><td width="16%">boxplot</td><td width="12%">0.0458</td><td width="12%">0.072</td><td width="12%">0.108</td><td width="12%">0.0493</td><td width="12%">0.106</td><td width="12%">0.12</td><td width="12%">0.0329</td></tr>
-<tr><td width="16%">boxs</td><td width="12%">0.276</td><td width="12%">0.623</td><td width="12%">0.823</td><td width="12%">0.131</td><td width="12%">0.387</td><td width="12%">0.52</td><td width="12%">0.0935</td></tr>
-<tr><td width="16%">candle</td><td width="12%">0.0566</td><td width="12%">0.1</td><td width="12%">0.113</td><td width="12%">0.059</td><td width="12%">0.126</td><td width="12%">0.154</td><td width="12%">0.0435</td></tr>
-<tr><td width="16%">chart</td><td width="12%">0.46</td><td width="12%">1.08</td><td width="12%">1.78</td><td width="12%">0.377</td><td width="12%">2.57</td><td width="12%">3.84</td><td width="12%">0.19</td></tr>
-<tr><td width="16%">cloud</td><td width="12%">0.0618</td><td width="12%">5.78</td><td width="12%">6.76</td><td width="12%">0.061</td><td width="12%">1.49</td><td width="12%">2.72</td><td width="12%">0.0441</td></tr>
-<tr><td width="16%">colorbar</td><td width="12%">0.144</td><td width="12%">0.259</td><td width="12%">0.297</td><td width="12%">0.142</td><td width="12%">0.383</td><td width="12%">0.455</td><td width="12%">0.075</td></tr>
-<tr><td width="16%">combined</td><td width="12%">0.429</td><td width="12%">0.457</td><td width="12%">0.556</td><td width="12%">0.286</td><td width="12%">0.474</td><td width="12%">0.564</td><td width="12%">0.245</td></tr>
-<tr><td width="16%">cones</td><td width="12%">0.17</td><td width="12%">0.226</td><td width="12%">0.272</td><td width="12%">0.157</td><td width="12%">0.521</td><td width="12%">0.667</td><td width="12%">0.0624</td></tr>
-<tr><td width="16%">cont</td><td width="12%">0.0989</td><td width="12%">0.193</td><td width="12%">0.235</td><td width="12%">0.0952</td><td width="12%">0.285</td><td width="12%">0.304</td><td width="12%">0.0637</td></tr>
-<tr><td width="16%">cont3</td><td width="12%">0.0645</td><td width="12%">0.11</td><td width="12%">0.122</td><td width="12%">0.0629</td><td width="12%">0.13</td><td width="12%">0.152</td><td width="12%">0.0479</td></tr>
-<tr><td width="16%">cont_xyz</td><td width="12%">0.0676</td><td width="12%">0.105</td><td width="12%">0.129</td><td width="12%">0.0628</td><td width="12%">0.134</td><td width="12%">0.148</td><td width="12%">0.0523</td></tr>
-<tr><td width="16%">contd</td><td width="12%">0.237</td><td width="12%">0.307</td><td width="12%">0.368</td><td width="12%">0.151</td><td width="12%">0.294</td><td width="12%">0.346</td><td width="12%">0.106</td></tr>
-<tr><td width="16%">contf</td><td width="12%">0.193</td><td width="12%">0.262</td><td width="12%">0.305</td><td width="12%">0.136</td><td width="12%">0.274</td><td width="12%">0.322</td><td width="12%">0.0921</td></tr>
-<tr><td width="16%">contf3</td><td width="12%">0.169</td><td width="12%">0.206</td><td width="12%">0.3</td><td width="12%">0.117</td><td width="12%">0.232</td><td width="12%">0.353</td><td width="12%">0.0796</td></tr>
-<tr><td width="16%">contf_xyz</td><td width="12%">0.118</td><td width="12%">0.18</td><td width="12%">0.206</td><td width="12%">0.103</td><td width="12%">0.177</td><td width="12%">0.231</td><td width="12%">0.0661</td></tr>
-<tr><td width="16%">contv</td><td width="12%">0.131</td><td width="12%">0.226</td><td width="12%">0.259</td><td width="12%">0.114</td><td width="12%">0.282</td><td width="12%">0.334</td><td width="12%">0.0753</td></tr>
-<tr><td width="16%">correl</td><td width="12%">0.0578</td><td width="12%">0.108</td><td width="12%">0.115</td><td width="12%">0.0616</td><td width="12%">0.193</td><td width="12%">0.216</td><td width="12%">0.0463</td></tr>
-<tr><td width="16%">curvcoor</td><td width="12%">0.125</td><td width="12%">0.203</td><td width="12%">0.219</td><td width="12%">0.12</td><td width="12%">0.454</td><td width="12%">0.504</td><td width="12%">0.0933</td></tr>
-<tr><td width="16%">cut</td><td width="12%">0.768</td><td width="12%">0.661</td><td width="12%">0.73</td><td width="12%">0.43</td><td width="12%">0.53</td><td width="12%">0.669</td><td width="12%">0.431</td></tr>
-<tr><td width="16%">dat_diff</td><td width="12%">0.0922</td><td width="12%">0.151</td><td width="12%">0.193</td><td width="12%">0.092</td><td width="12%">0.235</td><td width="12%">0.274</td><td width="12%">0.0439</td></tr>
-<tr><td width="16%">dat_extra</td><td width="12%">0.202</td><td width="12%">0.236</td><td width="12%">0.263</td><td width="12%">0.132</td><td width="12%">0.254</td><td width="12%">0.292</td><td width="12%">0.0747</td></tr>
-<tr><td width="16%">data1</td><td width="12%">2.62</td><td width="12%">2.07</td><td width="12%">2.14</td><td width="12%">1.43</td><td width="12%">1.69</td><td width="12%">1.83</td><td width="12%">1.56</td></tr>
-<tr><td width="16%">data2</td><td width="12%">1.51</td><td width="12%">1.41</td><td width="12%">1.49</td><td width="12%">1.22</td><td width="12%">1.43</td><td width="12%">1.44</td><td width="12%">1.24</td></tr>
-<tr><td width="16%">dens</td><td width="12%">0.115</td><td width="12%">0.236</td><td width="12%">0.32</td><td width="12%">0.134</td><td width="12%">0.271</td><td width="12%">0.327</td><td width="12%">0.0746</td></tr>
-<tr><td width="16%">dens3</td><td width="12%">0.101</td><td width="12%">0.154</td><td width="12%">0.214</td><td width="12%">0.0981</td><td width="12%">0.173</td><td width="12%">0.244</td><td width="12%">0.0429</td></tr>
-<tr><td width="16%">dens_xyz</td><td width="12%">0.102</td><td width="12%">0.179</td><td width="12%">0.242</td><td width="12%">0.119</td><td width="12%">0.164</td><td width="12%">0.22</td><td width="12%">0.0495</td></tr>
-<tr><td width="16%">detect</td><td width="12%">0.17</td><td width="12%">0.283</td><td width="12%">0.357</td><td width="12%">0.129</td><td width="12%">0.217</td><td width="12%">0.293</td><td width="12%">0.0927</td></tr>
-<tr><td width="16%">dew</td><td width="12%">1.63</td><td width="12%">1.1</td><td width="12%">1.19</td><td width="12%">0.557</td><td width="12%">0.797</td><td width="12%">0.881</td><td width="12%">0.288</td></tr>
-<tr><td width="16%">diffract</td><td width="12%">0.0961</td><td width="12%">0.253</td><td width="12%">0.346</td><td width="12%">0.114</td><td width="12%">0.382</td><td width="12%">0.43</td><td width="12%">0.0508</td></tr>
-<tr><td width="16%">dilate</td><td width="12%">0.098</td><td width="12%">0.231</td><td width="12%">0.259</td><td width="12%">0.101</td><td width="12%">0.347</td><td width="12%">0.404</td><td width="12%">0.0539</td></tr>
-<tr><td width="16%">dots</td><td width="12%">0.0986</td><td width="12%">0.139</td><td width="12%">0.167</td><td width="12%">0.106</td><td width="12%">0.24</td><td width="12%">0.221</td><td width="12%">0.223</td></tr>
-<tr><td width="16%">earth</td><td width="12%">0.0455</td><td width="12%">0.0532</td><td width="12%">0.0659</td><td width="12%">0.0448</td><td width="12%">0.0404</td><td width="12%">0.0592</td><td width="12%">0.0294</td></tr>
-<tr><td width="16%">error</td><td width="12%">0.0764</td><td width="12%">0.128</td><td width="12%">0.134</td><td width="12%">0.0758</td><td width="12%">0.203</td><td width="12%">0.227</td><td width="12%">0.076</td></tr>
-<tr><td width="16%">error2</td><td width="12%">0.0739</td><td width="12%">0.166</td><td width="12%">0.188</td><td width="12%">0.0934</td><td width="12%">0.374</td><td width="12%">0.416</td><td width="12%">0.0608</td></tr>
-<tr><td width="16%">export</td><td width="12%">0.177</td><td width="12%">0.273</td><td width="12%">0.382</td><td width="12%">0.131</td><td width="12%">0.244</td><td width="12%">0.312</td><td width="12%">0.0968</td></tr>
-<tr><td width="16%">fall</td><td width="12%">0.0481</td><td width="12%">0.127</td><td width="12%">0.114</td><td width="12%">0.051</td><td width="12%">0.115</td><td width="12%">0.125</td><td width="12%">0.0442</td></tr>
-<tr><td width="16%">fexport</td><td width="12%">2.33</td><td width="12%">2.69</td><td width="12%">2.81</td><td width="12%">1.12</td><td width="12%">1.43</td><td width="12%">1.52</td><td width="12%">2.19</td></tr>
-<tr><td width="16%">fit</td><td width="12%">0.072</td><td width="12%">0.112</td><td width="12%">0.121</td><td width="12%">0.0657</td><td width="12%">0.154</td><td width="12%">0.166</td><td width="12%">0.0442</td></tr>
-<tr><td width="16%">flame2d</td><td width="12%">6.16</td><td width="12%">6.34</td><td width="12%">6.31</td><td width="12%">3.71</td><td width="12%">3.91</td><td width="12%">3.75</td><td width="12%">1.26</td></tr>
-<tr><td width="16%">flow</td><td width="12%">0.43</td><td width="12%">0.529</td><td width="12%">0.557</td><td width="12%">0.403</td><td width="12%">0.582</td><td width="12%">0.599</td><td width="12%">0.372</td></tr>
-<tr><td width="16%">fog</td><td width="12%">0.0651</td><td width="12%">0.146</td><td width="12%">0.209</td><td width="12%">0.07</td><td width="12%">0.172</td><td width="12%">0.242</td><td width="12%">0.0466</td></tr>
-<tr><td width="16%">fonts</td><td width="12%">0.0842</td><td width="12%">0.13</td><td width="12%">0.135</td><td width="12%">0.0669</td><td width="12%">0.0969</td><td width="12%">0.0965</td><td width="12%">0.0696</td></tr>
-<tr><td width="16%">grad</td><td width="12%">0.111</td><td width="12%">0.223</td><td width="12%">0.318</td><td width="12%">0.133</td><td width="12%">0.216</td><td width="12%">0.284</td><td width="12%">0.0783</td></tr>
-<tr><td width="16%">hist</td><td width="12%">0.185</td><td width="12%">0.227</td><td width="12%">0.25</td><td width="12%">0.136</td><td width="12%">0.234</td><td width="12%">0.253</td><td width="12%">0.0632</td></tr>
-<tr><td width="16%">ifs2d</td><td width="12%">0.7</td><td width="12%">0.777</td><td width="12%">0.762</td><td width="12%">0.396</td><td width="12%">0.457</td><td width="12%">0.443</td><td width="12%">0.133</td></tr>
-<tr><td width="16%">ifs3d</td><td width="12%">0.827</td><td width="12%">0.835</td><td width="12%">0.893</td><td width="12%">0.369</td><td width="12%">0.45</td><td width="12%">0.484</td><td width="12%">0.127</td></tr>
-<tr><td width="16%">indirect</td><td width="12%">0.0579</td><td width="12%">0.0904</td><td width="12%">0.116</td><td width="12%">0.0599</td><td width="12%">0.128</td><td width="12%">0.152</td><td width="12%">0.0316</td></tr>
-<tr><td width="16%">inplot</td><td width="12%">0.0931</td><td width="12%">0.151</td><td width="12%">0.19</td><td width="12%">0.107</td><td width="12%">0.32</td><td width="12%">0.329</td><td width="12%">0.0601</td></tr>
-<tr><td width="16%">iris</td><td width="12%">0.0446</td><td width="12%">0.0544</td><td width="12%">0.0751</td><td width="12%">0.0468</td><td width="12%">0.0457</td><td width="12%">0.0578</td><td width="12%">0.0371</td></tr>
-<tr><td width="16%">label</td><td width="12%">0.0484</td><td width="12%">0.0879</td><td width="12%">0.105</td><td width="12%">0.0601</td><td width="12%">0.112</td><td width="12%">0.164</td><td width="12%">0.078</td></tr>
-<tr><td width="16%">lamerey</td><td width="12%">0.0723</td><td width="12%">0.0728</td><td width="12%">0.0978</td><td width="12%">0.0611</td><td width="12%">0.104</td><td width="12%">0.154</td><td width="12%">0.0522</td></tr>
-<tr><td width="16%">legend</td><td width="12%">0.123</td><td width="12%">0.282</td><td width="12%">0.3</td><td width="12%">0.0796</td><td width="12%">0.232</td><td width="12%">0.311</td><td width="12%">0.041</td></tr>
-<tr><td width="16%">light</td><td width="12%">0.12</td><td width="12%">0.186</td><td width="12%">0.448</td><td width="12%">0.104</td><td width="12%">0.22</td><td width="12%">0.417</td><td width="12%">0.0528</td></tr>
-<tr><td width="16%">loglog</td><td width="12%">0.136</td><td width="12%">0.252</td><td width="12%">0.252</td><td width="12%">0.125</td><td width="12%">0.405</td><td width="12%">0.481</td><td width="12%">0.0956</td></tr>
-<tr><td width="16%">map</td><td width="12%">0.0768</td><td width="12%">0.157</td><td width="12%">0.195</td><td width="12%">0.0734</td><td width="12%">0.168</td><td width="12%">0.232</td><td width="12%">0.0471</td></tr>
-<tr><td width="16%">mark</td><td width="12%">0.0659</td><td width="12%">0.0909</td><td width="12%">0.0881</td><td width="12%">0.0718</td><td width="12%">0.239</td><td width="12%">0.151</td><td width="12%">0.0372</td></tr>
-<tr><td width="16%">mask</td><td width="12%">0.0878</td><td width="12%">0.207</td><td width="12%">0.326</td><td width="12%">0.0944</td><td width="12%">0.279</td><td width="12%">0.347</td><td width="12%">0.0511</td></tr>
-<tr><td width="16%">mesh</td><td width="12%">0.0719</td><td width="12%">0.131</td><td width="12%">0.163</td><td width="12%">0.0683</td><td width="12%">0.147</td><td width="12%">0.181</td><td width="12%">0.0418</td></tr>
-<tr><td width="16%">mirror</td><td width="12%">0.135</td><td width="12%">0.217</td><td width="12%">0.259</td><td width="12%">0.105</td><td width="12%">0.296</td><td width="12%">0.308</td><td width="12%">0.0548</td></tr>
-<tr><td width="16%">molecule</td><td width="12%">0.0979</td><td width="12%">0.146</td><td width="12%">0.237</td><td width="12%">0.0953</td><td width="12%">0.241</td><td width="12%">0.361</td><td width="12%">0.044</td></tr>
-<tr><td width="16%">ode</td><td width="12%">0.193</td><td width="12%">0.28</td><td width="12%">0.29</td><td width="12%">0.191</td><td width="12%">0.419</td><td width="12%">0.436</td><td width="12%">0.163</td></tr>
-<tr><td width="16%">ohlc</td><td width="12%">0.0482</td><td width="12%">0.071</td><td width="12%">0.0936</td><td width="12%">0.0574</td><td width="12%">0.109</td><td width="12%">0.121</td><td width="12%">0.0447</td></tr>
-<tr><td width="16%">param1</td><td width="12%">0.186</td><td width="12%">0.348</td><td width="12%">0.424</td><td width="12%">0.15</td><td width="12%">0.545</td><td width="12%">0.845</td><td width="12%">0.0861</td></tr>
-<tr><td width="16%">param2</td><td width="12%">0.57</td><td width="12%">0.732</td><td width="12%">0.806</td><td width="12%">0.313</td><td width="12%">0.698</td><td width="12%">0.827</td><td width="12%">0.23</td></tr>
-<tr><td width="16%">param3</td><td width="12%">1.91</td><td width="12%">2.56</td><td width="12%">2.93</td><td width="12%">0.767</td><td width="12%">1.17</td><td width="12%">1.58</td><td width="12%">0.844</td></tr>
-<tr><td width="16%">paramv</td><td width="12%">1.29</td><td width="12%">1.55</td><td width="12%">1.5</td><td width="12%">0.816</td><td width="12%">1.12</td><td width="12%">1.11</td><td width="12%">0.718</td></tr>
-<tr><td width="16%">parser</td><td width="12%">0.0631</td><td width="12%">0.112</td><td width="12%">0.14</td><td width="12%">0.0643</td><td width="12%">0.209</td><td width="12%">0.232</td><td width="12%">0.0467</td></tr>
-<tr><td width="16%">pde</td><td width="12%">0.37</td><td width="12%">0.511</td><td width="12%">0.554</td><td width="12%">0.318</td><td width="12%">0.429</td><td width="12%">0.455</td><td width="12%">0.284</td></tr>
-<tr><td width="16%">pendelta</td><td width="12%">0.108</td><td width="12%">0.115</td><td width="12%">0.102</td><td width="12%">0.108</td><td width="12%">0.115</td><td width="12%">0.104</td><td width="12%">0.105</td></tr>
-<tr><td width="16%">pipe</td><td width="12%">0.661</td><td width="12%">0.922</td><td width="12%">1.04</td><td width="12%">0.414</td><td width="12%">0.669</td><td width="12%">0.828</td><td width="12%">0.36</td></tr>
-<tr><td width="16%">plot</td><td width="12%">0.0961</td><td width="12%">0.116</td><td width="12%">0.142</td><td width="12%">0.0932</td><td width="12%">0.22</td><td width="12%">0.237</td><td width="12%">0.0457</td></tr>
-<tr><td width="16%">pmap</td><td width="12%">0.137</td><td width="12%">0.184</td><td width="12%">0.216</td><td width="12%">0.0994</td><td width="12%">0.165</td><td width="12%">0.21</td><td width="12%">0.0737</td></tr>
-<tr><td width="16%">primitives</td><td width="12%">0.0978</td><td width="12%">0.191</td><td width="12%">0.289</td><td width="12%">0.0971</td><td width="12%">0.304</td><td width="12%">0.353</td><td width="12%">0.0386</td></tr>
-<tr><td width="16%">projection</td><td width="12%">0.166</td><td width="12%">0.403</td><td width="12%">0.484</td><td width="12%">0.124</td><td width="12%">0.578</td><td width="12%">0.626</td><td width="12%">0.078</td></tr>
-<tr><td width="16%">projection5</td><td width="12%">0.149</td><td width="12%">0.323</td><td width="12%">0.36</td><td width="12%">0.117</td><td width="12%">0.496</td><td width="12%">0.546</td><td width="12%">0.0722</td></tr>
-<tr><td width="16%">pulse</td><td width="12%">0.0488</td><td width="12%">0.0751</td><td width="12%">0.0911</td><td width="12%">0.0503</td><td width="12%">0.112</td><td width="12%">0.13</td><td width="12%">0.0347</td></tr>
-<tr><td width="16%">qo2d</td><td width="12%">0.252</td><td width="12%">0.389</td><td width="12%">0.455</td><td width="12%">0.244</td><td width="12%">0.354</td><td width="12%">0.414</td><td width="12%">0.208</td></tr>
-<tr><td width="16%">quality0</td><td width="12%">0.112</td><td width="12%">0.112</td><td width="12%">0.119</td><td width="12%">0.119</td><td width="12%">0.11</td><td width="12%">0.123</td><td width="12%">0.114</td></tr>
-<tr><td width="16%">quality1</td><td width="12%">0.239</td><td width="12%">0.254</td><td width="12%">0.24</td><td width="12%">0.24</td><td width="12%">0.252</td><td width="12%">0.26</td><td width="12%">0.232</td></tr>
-<tr><td width="16%">quality2</td><td width="12%">0.276</td><td width="12%">0.273</td><td width="12%">0.272</td><td width="12%">0.277</td><td width="12%">0.275</td><td width="12%">0.274</td><td width="12%">0.278</td></tr>
-<tr><td width="16%">quality4</td><td width="12%">0.107</td><td width="12%">0.104</td><td width="12%">0.103</td><td width="12%">0.104</td><td width="12%">0.104</td><td width="12%">0.112</td><td width="12%">0.107</td></tr>
-<tr><td width="16%">quality5</td><td width="12%">0.455</td><td width="12%">0.448</td><td width="12%">0.46</td><td width="12%">0.466</td><td width="12%">0.45</td><td width="12%">0.45</td><td width="12%">0.456</td></tr>
-<tr><td width="16%">quality6</td><td width="12%">0.489</td><td width="12%">0.478</td><td width="12%">0.48</td><td width="12%">0.489</td><td width="12%">0.48</td><td width="12%">0.479</td><td width="12%">0.492</td></tr>
-<tr><td width="16%">quality8</td><td width="12%">0.0575</td><td width="12%">0.0467</td><td width="12%">0.0453</td><td width="12%">0.0439</td><td width="12%">0.047</td><td width="12%">0.0462</td><td width="12%">0.0486</td></tr>
-<tr><td width="16%">radar</td><td width="12%">0.058</td><td width="12%">0.0675</td><td width="12%">0.0872</td><td width="12%">0.07</td><td width="12%">0.0969</td><td width="12%">0.123</td><td width="12%">0.0284</td></tr>
-<tr><td width="16%">refill</td><td width="12%">0.186</td><td width="12%">0.232</td><td width="12%">0.278</td><td width="12%">0.129</td><td width="12%">0.356</td><td width="12%">0.389</td><td width="12%">0.07</td></tr>
-<tr><td width="16%">region</td><td width="12%">0.0706</td><td width="12%">0.166</td><td width="12%">0.21</td><td width="12%">0.0803</td><td width="12%">0.274</td><td width="12%">0.3</td><td width="12%">0.0442</td></tr>
-<tr><td width="16%">scanfile</td><td width="12%">0.0563</td><td width="12%">0.0769</td><td width="12%">0.0884</td><td width="12%">0.0469</td><td width="12%">0.0891</td><td width="12%">0.106</td><td width="12%">0.0341</td></tr>
-<tr><td width="16%">schemes</td><td width="12%">0.121</td><td width="12%">0.227</td><td width="12%">0.283</td><td width="12%">0.189</td><td width="12%">0.284</td><td width="12%">0.338</td><td width="12%">0.0454</td></tr>
-<tr><td width="16%">section</td><td width="12%">0.0593</td><td width="12%">0.0948</td><td width="12%">0.0974</td><td width="12%">0.0622</td><td width="12%">0.159</td><td width="12%">0.175</td><td width="12%">0.0417</td></tr>
-<tr><td width="16%">several_light</td><td width="12%">0.076</td><td width="12%">0.109</td><td width="12%">0.244</td><td width="12%">0.0697</td><td width="12%">0.123</td><td width="12%">0.246</td><td width="12%">0.0442</td></tr>
-<tr><td width="16%">solve</td><td width="12%">0.0925</td><td width="12%">0.188</td><td width="12%">0.195</td><td width="12%">0.108</td><td width="12%">0.344</td><td width="12%">0.334</td><td width="12%">0.0485</td></tr>
-<tr><td width="16%">stem</td><td width="12%">0.0633</td><td width="12%">0.129</td><td width="12%">0.145</td><td width="12%">0.0827</td><td width="12%">0.203</td><td width="12%">0.212</td><td width="12%">0.0407</td></tr>
-<tr><td width="16%">step</td><td width="12%">0.0632</td><td width="12%">0.102</td><td width="12%">0.114</td><td width="12%">0.112</td><td width="12%">0.183</td><td width="12%">0.194</td><td width="12%">0.0447</td></tr>
-<tr><td width="16%">stereo</td><td width="12%">0.0901</td><td width="12%">0.126</td><td width="12%">0.206</td><td width="12%">0.0807</td><td width="12%">0.151</td><td width="12%">0.237</td><td width="12%">0.0441</td></tr>
-<tr><td width="16%">stfa</td><td width="12%">0.0925</td><td width="12%">0.245</td><td width="12%">0.291</td><td width="12%">0.0801</td><td width="12%">0.214</td><td width="12%">0.299</td><td width="12%">0.0438</td></tr>
-<tr><td width="16%">style</td><td width="12%">0.114</td><td width="12%">0.271</td><td width="12%">0.321</td><td width="12%">0.102</td><td width="12%">0.44</td><td width="12%">0.468</td><td width="12%">0.0451</td></tr>
-<tr><td width="16%">surf</td><td width="12%">0.149</td><td width="12%">0.241</td><td width="12%">0.303</td><td width="12%">0.12</td><td width="12%">0.24</td><td width="12%">0.319</td><td width="12%">0.0498</td></tr>
-<tr><td width="16%">surf3</td><td width="12%">2.01</td><td width="12%">3.41</td><td width="12%">3.44</td><td width="12%">1.41</td><td width="12%">3.34</td><td width="12%">3.33</td><td width="12%">0.667</td></tr>
-<tr><td width="16%">surf3a</td><td width="12%">0.514</td><td width="12%">0.397</td><td width="12%">0.537</td><td width="12%">0.24</td><td width="12%">0.397</td><td width="12%">0.74</td><td width="12%">0.205</td></tr>
-<tr><td width="16%">surf3c</td><td width="12%">0.482</td><td width="12%">0.4</td><td width="12%">0.533</td><td width="12%">0.235</td><td width="12%">0.423</td><td width="12%">0.728</td><td width="12%">0.208</td></tr>
-<tr><td width="16%">surf3ca</td><td width="12%">0.494</td><td width="12%">0.401</td><td width="12%">0.536</td><td width="12%">0.26</td><td width="12%">0.402</td><td width="12%">0.709</td><td width="12%">0.243</td></tr>
-<tr><td width="16%">surfa</td><td width="12%">0.0643</td><td width="12%">0.105</td><td width="12%">0.181</td><td width="12%">0.0572</td><td width="12%">0.122</td><td width="12%">0.192</td><td width="12%">0.0456</td></tr>
-<tr><td width="16%">surfc</td><td width="12%">0.0644</td><td width="12%">0.111</td><td width="12%">0.184</td><td width="12%">0.0609</td><td width="12%">0.128</td><td width="12%">0.199</td><td width="12%">0.0399</td></tr>
-<tr><td width="16%">surfca</td><td width="12%">0.0645</td><td width="12%">0.106</td><td width="12%">0.181</td><td width="12%">0.0696</td><td width="12%">0.128</td><td width="12%">0.201</td><td width="12%">0.044</td></tr>
-<tr><td width="16%">table</td><td width="12%">0.128</td><td width="12%">0.263</td><td width="12%">0.29</td><td width="12%">0.0813</td><td width="12%">0.176</td><td width="12%">0.197</td><td width="12%">0.0481</td></tr>
-<tr><td width="16%">tape</td><td width="12%">0.0779</td><td width="12%">0.143</td><td width="12%">0.167</td><td width="12%">0.0788</td><td width="12%">0.224</td><td width="12%">0.242</td><td width="12%">0.0463</td></tr>
-<tr><td width="16%">tens</td><td width="12%">0.0605</td><td width="12%">0.0956</td><td width="12%">0.0935</td><td width="12%">0.0699</td><td width="12%">0.146</td><td width="12%">0.162</td><td width="12%">0.046</td></tr>
-<tr><td width="16%">ternary</td><td width="12%">0.13</td><td width="12%">0.334</td><td width="12%">0.357</td><td width="12%">0.116</td><td width="12%">0.589</td><td width="12%">0.65</td><td width="12%">0.061</td></tr>
-<tr><td width="16%">text</td><td width="12%">0.11</td><td width="12%">0.214</td><td width="12%">0.225</td><td width="12%">0.0678</td><td width="12%">0.172</td><td width="12%">0.19</td><td width="12%">0.0438</td></tr>
-<tr><td width="16%">text2</td><td width="12%">0.0809</td><td width="12%">0.175</td><td width="12%">0.189</td><td width="12%">0.0797</td><td width="12%">0.22</td><td width="12%">0.235</td><td width="12%">0.0425</td></tr>
-<tr><td width="16%">textmark</td><td width="12%">0.0742</td><td width="12%">0.129</td><td width="12%">0.14</td><td width="12%">0.0574</td><td width="12%">0.126</td><td width="12%">0.143</td><td width="12%">0.0438</td></tr>
-<tr><td width="16%">ticks</td><td width="12%">0.126</td><td width="12%">0.252</td><td width="12%">0.274</td><td width="12%">0.111</td><td width="12%">0.329</td><td width="12%">0.359</td><td width="12%">0.0488</td></tr>
-<tr><td width="16%">tile</td><td width="12%">0.062</td><td width="12%">0.091</td><td width="12%">0.135</td><td width="12%">0.0605</td><td width="12%">0.11</td><td width="12%">0.156</td><td width="12%">0.0613</td></tr>
-<tr><td width="16%">tiles</td><td width="12%">0.06</td><td width="12%">0.119</td><td width="12%">0.158</td><td width="12%">0.0604</td><td width="12%">0.129</td><td width="12%">0.163</td><td width="12%">0.0466</td></tr>
-<tr><td width="16%">torus</td><td width="12%">0.148</td><td width="12%">0.277</td><td width="12%">0.391</td><td width="12%">0.121</td><td width="12%">0.817</td><td width="12%">1.19</td><td width="12%">0.0653</td></tr>
-<tr><td width="16%">traj</td><td width="12%">0.0476</td><td width="12%">0.0899</td><td width="12%">0.108</td><td width="12%">0.0559</td><td width="12%">0.153</td><td width="12%">0.162</td><td width="12%">0.0336</td></tr>
-<tr><td width="16%">triangulation</td><td width="12%">0.0622</td><td width="12%">0.159</td><td width="12%">0.218</td><td width="12%">0.0667</td><td width="12%">0.173</td><td width="12%">0.244</td><td width="12%">0.0451</td></tr>
-<tr><td width="16%">triplot</td><td width="12%">0.0494</td><td width="12%">0.181</td><td width="12%">0.371</td><td width="12%">0.0608</td><td width="12%">0.181</td><td width="12%">0.32</td><td width="12%">0.0308</td></tr>
-<tr><td width="16%">tube</td><td width="12%">0.108</td><td width="12%">0.286</td><td width="12%">0.373</td><td width="12%">0.104</td><td width="12%">0.311</td><td width="12%">0.379</td><td width="12%">0.0493</td></tr>
-<tr><td width="16%">type0</td><td width="12%">0.238</td><td width="12%">0.326</td><td width="12%">0.5</td><td width="12%">0.144</td><td width="12%">0.314</td><td width="12%">0.479</td><td width="12%">0.108</td></tr>
-<tr><td width="16%">type1</td><td width="12%">0.237</td><td width="12%">0.34</td><td width="12%">0.531</td><td width="12%">0.137</td><td width="12%">0.317</td><td width="12%">0.5</td><td width="12%">0.102</td></tr>
-<tr><td width="16%">type2</td><td width="12%">0.243</td><td width="12%">0.335</td><td width="12%">0.509</td><td width="12%">0.148</td><td width="12%">0.317</td><td width="12%">0.484</td><td width="12%">0.115</td></tr>
-<tr><td width="16%">vect</td><td width="12%">0.11</td><td width="12%">0.248</td><td width="12%">0.328</td><td width="12%">0.127</td><td width="12%">0.354</td><td width="12%">0.325</td><td width="12%">0.0732</td></tr>
-<tr><td width="16%">vect3</td><td width="12%">0.0692</td><td width="12%">0.153</td><td width="12%">0.173</td><td width="12%">0.0884</td><td width="12%">0.526</td><td width="12%">0.366</td><td width="12%">0.0356</td></tr>
-<tr><td width="16%">venn</td><td width="12%">0.0494</td><td width="12%">0.194</td><td width="12%">0.289</td><td width="12%">0.0664</td><td width="12%">0.158</td><td width="12%">0.236</td><td width="12%">0.044</td></tr>
-</table>
-
-<hr>
-<a name="TeX_002dlike-symbols"></a>
-<div class="header">
-<p>
-Next: <a href="#Copying-This-Manual" accesskey="n" rel="next">Copying This Manual</a>, Previous: <a href="#Plotting-time" accesskey="p" rel="prev">Plotting time</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Simvoly-TeX"></a>
-<h2 class="appendix">Appendix D Символы TeX</h2>
-
-
-<p>The full list of TeX-like commands recognizable by MathGL is shown below. If command is not recognized then it will be printed as is by ommitting ‘<samp>\</samp>’ symbol. For example, ‘<samp>\#</samp>’ produce “#”, ‘<samp>\\</samp>’ produce “\”, ‘<samp>\qq</samp>’ produce “qq”.
-</p>
-<p><strong>Change case</strong>: _, ^, @.
-</p>
-<p><strong>Text style</strong>: \big, \b, \textbf, \i, \textit, \bi, \r, \textrm, \a, \overline, \u, \underline, \w, \wire, #, \color[wkrgbcymhRGBCYMHWlenupqLENUPQ]
-</p>
-<p><strong>Roots</strong>: \sqrt, \sqrt3, \sqrt4
-</p>
-<p><strong>Fractions</strong>: \frac, \dfrac, \stack, \overset, \underset, \stackr, \stackl
-</p>
-<p><strong>Accents</strong>: \hat, \tilde, \dot, \ddot, \dddot, \ddddot, \acute, \check, \grave, \vec, \bar, \breve
-</p>
-<p><strong>Special symbols</strong>:
-</p>
-<p>\# (#), \% (%), \& (&), \^ (^).
-</p>
-<p>\AA (Å), \AE (Æ), \APLboxquestion (⍰), \APLboxupcaret (⍓), \APLnotbackslash (⍀), \APLnotslash (⌿), \Alpha (Α), \And (&), \Angstrom (Å), \Barv (⫧), \BbbC (ℂ), \BbbGamma (ℾ), \BbbH (ℍ), \BbbN (ℕ), \BbbP (ℙ), \BbbPi (ℿ), \BbbQ (ℚ), \BbbR (ℝ), \BbbZ (ℤ), \Bbbgamma (ℽ), \Bbbpi (ℼ), \Bbbsum (⅀), \Beta (Β), \Bumpeq (≎), \Cap (⋒), \Chi (Χ), \Colon (∷), \Coloneq (⩴), \Cup (⋓), \DDownarrow (⟱), \DH (Ð), \DJ (Đ), \DashV (⫥), \DashVDash (⟚), \Dashv (⫤), \Ddownarrow (⤋), \Delta (Δ), \Digamma (Ϝ), \Doteq (≑), \Downarrow (⇓), \Epsilon (Ε), \Equiv (≣), \Eta (Η), \Eulerconst (ℇ), \Exclam (‼), \Finv (Ⅎ), \Game (⅁), \Gamma (Γ), \Gt (⪢), \Hermaphrodite (⚥), \Im (ℑ), \Iota (Ι), \Kappa (Κ), \Koppa (Ϟ), \L (Ł), \LLeftarrow (⭅), \Lambda (Λ), \Lbrbrak (⟬), \Ldsh (↲), \Leftarrow (⇐), \Leftrightarrow (⇔), \Lleftarrow (⇚), \Longleftarrow (⟸), \Longleftrightarrow (⟺), \Longmapsfrom (⟽), \Longmapsto (⟾), \Longrightarrow (⟹), \Lparengtr (⦕), \Lsh (↰), \Lt (⪡), \Lvzigzag (⧚), \Mapsfrom (⤆), \Mapsto (⤇), \Mu (Μ), \NG (Ŋ), \Nearrow (⇗), \Not (⫬), \Nu (Ν), \Nwarrow (⇖), \O (Ø), \OE (Œ), \Ohorn (Ơ), \Omega (Ω), \Omicron (Ο), \Otimes (⨷), \P (¶), \Phi (Φ), \Pi (Π), \Planckconst (ℎ), \Prec (⪻), \PropertyLine (⅊), \Psi (Ψ), \QED (∎), \Question (⁇), \RRightarrow (⭆), \Rbrbrak (⟭), \Rdsh (↳), \Re (ℜ), \Rho (Ρ), \Rightarrow (⇒), \Rparenless (⦖), \Rrightarrow (⇛), \Rsh (↱), \Rvzigzag (⧛), \S (§), \Sc (⪼), \Searrow (⇘), \Sigma (Σ), \Sqcap (⩎), \Sqcup (⩏), \Stigma (Ϛ), \Subset (⋐), \Supset (⋑), \Swarrow (⇙), \TH (Þ), \Tau (Τ), \Theta (Θ), \UUparrow (⟰), \Uhorn (Ư), \Uparrow (⇑), \Updownarrow (⇕), \Uuparrow (⤊), \VDash (⊫), \Vbar (⫫), \Vdash (⊩), \Vee (⩔), \Vert (‖), \Vvdash (⊪), \Vvert (⦀), \Wedge (⩓), \XBox (☒), \Xi (Ξ), \Yup (⅄), \Zbar (Ƶ), \Zeta (Ζ).
-</p>
-<p>\aa (å), \ac (∾), \accurrent (⏦), \acidfree (♾), \acwcirclearrow (⥀), \acwgapcirclearrow (⟲), \acwleftarcarrow (⤹), \acwopencirclearrow (↺), \acwoverarcarrow (⤺), \acwundercurvearrow (⤻), \adots (⋰), \ae (æ), \aleph (ℵ), \alpha (α), \amalg (⨿), \angdnr (⦟), \angle (∠), \angles (⦞), \angleubar (⦤), \approx (≈), \approxeq (≊), \approxeqq (⩰), \approxident (≋), \arceq (≘), \aries (♈), \assert (⊦), \ast (∗), \asteq (⩮), \astrosun (☉), \asymp (≍), \awint (⨑).
-</p>
-<p>\bNot (⫭), \backcong (≌), \backdprime (‶), \backepsilon (϶), \backprime (‵), \backsim (∽), \backsimeq (⋍), \backslash (\), \backtrprime (‷), \bagmember (⋿), \barV (⫪), \barcap (⩃), \barcup (⩂), \bardownharpoonleft (⥡), \bardownharpoonright (⥝), \barleftarrow (⇤), \barleftarrowrightarrowbar (↹), \barleftharpoondown (⥖), \barleftharpoonup (⥒), \barovernorthwestarrow (↸), \barrightarrowdiamond (⤠), \barrightharpoondown (⥟), \barrightharpoonup (⥛), \baruparrow (⤒), \barupharpoonleft (⥘), \barupharpoonright (⥔), \barvee (⊽), \barwedge (⊼), \bbrktbrk (⎶), \bdHrule (═), \bdVrule (║), \bdbVbH (╬), \bdbVbh (╫), \bdbVlH (╣), \bdbVlh (╢), \bdbVrH (╠), \bdbVrh (╟), \bdbvbH (╪), \bdbvbh (┼), \bdbvlH (╡), \bdbvlh (┤), \bdbvrH (╞), \bdbvrh (├), \bddVbH (╦), \bddVbh (╥), \bddVlH (╗), \bddVlh (╖), \bddVrH (╔), \bddVrh (╓), \bddvbH (╤), \bddvbh (┬), \bddvlH (╕), \bddvlh (┐), \bddvrH (╒), \bddvrh (┌), \bdhrule (─), \bdnesw (╱), \bdnwse (╲), \bdquadhdash (┈), \bdquadvdash (┊), \bdtriplevdash (┆), \bduVbH (╩), \bduVbh (╨), \bduVlH (╝), \bduVlh (╜), \bduVrH (╚), \bduVrh (╙), \bduvbH (╧), \bduvbh (┴), \bduvlH (╛), \bduvlh (┘), \bduvrH (╘), \bduvrh (└), \bdvrule (│), \because (∵), \benzenr (⏣), \beta (β), \beth (ℶ), \between (≬), \bigblacktriangledown (▼), \bigblacktriangleup (▲), \bigbot (⟘), \bigcap (⋂), \bigcup (⋃), \bigslopedvee (⩗), \bigslopedwedge (⩘), \bigstar (★), \bigtop (⟙), \bigtriangledown (▽), \bigtriangleup (△), \bigvee (⋁), \bigwedge (⋀), \bigwhitestar (☆), \blackcircledownarrow (⧭), \blackcircledrightdot (⚈), \blackcircledsanseight (➑), \blackcircledsansfive (➎), \blackcircledsansfour (➍), \blackcircledsansnine (➒), \blackcircledsansone (➊), \blackcircledsansseven (➐), \blackcircledsanssix (➏), \blackcircledsansten (➓), \blackcircledsansthree (➌), \blackcircledsanstwo (➋), \blackcircledtwodots (⚉), \blackcircleulquadwhite (◕), \blackdiamonddownarrow (⧪), \blackhourglass (⧗), \blackinwhitediamond (◈), \blackinwhitesquare (▣), \blacklefthalfcircle (◖), \blackpointerleft (◄), \blackpointerright (►), \blackrighthalfcircle (◗), \blacksmiley (☻), \blacktriangle (▴), \blacktriangledown (▾), \blacktriangleleft (◀), \blacktriangleright (▶), \blkhorzoval (⬬), \blkvertoval (⬮), \blockfull (█), \blockhalfshaded (▒), \blocklefthalf (▌), \blocklowhalf (▄), \blockqtrshaded (░), \blockrighthalf (▐), \blockthreeqtrshaded (▓), \blockuphalf (▀), \bot (⊥), \botsemicircle (◡), \bowtie (⋈), \box (◻), \boxast (⧆), \boxbar (◫), \boxbox (⧈), \boxbslash (⧅), \boxcircle (⧇), \boxdiag (⧄), \boxdot (⊡), \boxminus (⊟), \boxonbox (⧉), \boxplus (⊞), \boxtimes (⊠), \bsimilarleftarrow (⭁), \bsimilarrightarrow (⭇), \bsolhsub (⟈), \btimes (⨲), \bullet (∙), \bullseye (◎), \bumpeq (≏), \bumpeqq (⪮).
-</p>
-<p>\calB (ℬ), \calE (ℰ), \calF (ℱ), \calH (ℋ), \calM (ℳ), \calR (ℛ), \cap (∩), \capdot (⩀), \capwedge (⩄), \caretinsert (‸), \carreturn (⏎), \carriagereturn (↵), \ccwundercurvearrow (⤿), \cdot (⋅), \cdotp (·), \cdots (⋯), \cdprime (ʺ), \checkmark (✓), \chi (χ), \cirE (⧃), \cirbot (⟟), \circ (∘), \circeq (≗), \circfint (⨐), \circlebottomhalfblack (◒), \circledA (Ⓐ), \circledB (Ⓑ), \circledC (Ⓒ), \circledD (Ⓓ), \circledE (Ⓔ), \circledF (Ⓕ), \circledG (Ⓖ), \circledH (Ⓗ), \circledI (Ⓘ), \circledJ (Ⓙ), \circledK (Ⓚ), \circledL (Ⓛ), \circledM (Ⓜ), \circledN (Ⓝ), \circledO (Ⓞ), \circledP (Ⓟ), \circledQ (Ⓠ), \circledR (Ⓡ), \circledS (Ⓢ), \circledT (Ⓣ), \circledU (Ⓤ), \circledV (Ⓥ), \circledW (Ⓦ), \circledX (Ⓧ), \circledY (Ⓨ), \circledZ (Ⓩ), \circleda (ⓐ), \circledast (⊛), \circledb (ⓑ), \circledbullet (⦿), \circledc (ⓒ), \circledcirc (⊚), \circledd (ⓓ), \circleddash (⊝), \circlede (ⓔ), \circledeight (⑧), \circledequal (⊜), \circledf (ⓕ), \circledfive (⑤), \circledfour (④), \circledg (ⓖ), \circledh (ⓗ), \circledi (ⓘ), \circledj (ⓙ), \circledk (ⓚ), \circledl (ⓛ), \circledm (ⓜ), \circledn (ⓝ), \circlednine (⑨), \circledo (ⓞ), \circledone (①), \circledownarrow (⧬), \circledp (ⓟ), \circledparallel (⦷), \circledq (ⓠ), \circledr (ⓡ), \circledrightdot (⚆), \circleds (ⓢ), \circledsanseight (➇), \circledsansfive (➄), \circledsansfour (➃), \circledsansnine (➈), \circledsansone (➀), \circledsansseven (➆), \circledsanssix (➅), \circledsansten (➉), \circledsansthree (➂), \circledsanstwo (➁), \circledseven (⑦), \circledsix (⑥), \circledstar (✪), \circledt (ⓣ), \circledthree (③), \circledtwo (②), \circledtwodots (⚇), \circledu (ⓤ), \circledv (ⓥ), \circledvert (⦶), \circledw (ⓦ), \circledwhitebullet (⦾), \circledx (ⓧ), \circledy (ⓨ), \circledz (ⓩ), \circledzero (⓪), \circlehbar (⦵), \circlelefthalfblack (◐), \circlellquad (◵), \circlelrquad (◶), \circleonleftarrow (⬰), \circleonrightarrow (⇴), \circlerighthalfblack (◑), \circletophalfblack (◓), \circleulquad (◴), \circleurquad (◷), \circleurquadblack (◔), \circlevertfill (◍), \cirmid (⫯), \cirscir (⧂), \clangle (〈), \closedvarcap (⩍), \closedvarcup (⩌), \closedvarcupsmashprod (⩐), \closure (⁐), \cloverleaf (⌘), \clubsuit (♣), \colon (:), \colon (∶), \coloneq (≔), \commaminus (⨩), \complement (∁), \concavediamond (⟡), \concavediamondtickleft (⟢), \concavediamondtickright (⟣), \cong (≅), \congdot (⩭), \conictaper (⌲), \conjunction (☌), \coprod (∐), \cprime (ʹ), \crangle (〉), \csub (⫏), \csube (⫑), \csup (⫐), \csupe (⫒), \cuberoot (∛), \cup (∪), \cupdot (⊍), \cupleftarrow (⊌), \cupvee (⩅), \curlyeqprec (⋞), \curlyeqsucc (⋟), \curlyvee (⋎), \curlywedge (⋏), \curvearrowleft (↶), \curvearrowleftplus (⤽), \curvearrowright (↷), \curvearrowrightminus (⤼), \cwcirclearrow (⥁), \cwgapcirclearrow (⟳), \cwopencirclearrow (↻), \cwrightarcarrow (⤸), \cwundercurvearrow (⤾), \cylcty (⌭).
-</p>
-<p>\dag (†), \dagger (†), \daleth (ℸ), \danger (☡), \dashV (⫣), \dashVdash (⟛), \dashcolon (∹), \dashleftharpoondown (⥫), \dashrightharpoondown (⥭), \dashv (⊣), \dbkarow (⤏), \ddag (‡), \ddagger (‡), \ddots (⋱), \ddotseq (⩷), \delta (δ), \dh (ð), \diameter (⌀), \diamond (◇), \diamondbotblack (⬙), \diamondcdot (⟐), \diamondleftarrow (⤝), \diamondleftarrowbar (⤟), \diamondleftblack (⬖), \diamondrightblack (⬗), \diamondsuit (♢), \diamondtopblack (⬘), \dicei (⚀), \diceii (⚁), \diceiii (⚂), \diceiv (⚃), \dicev (⚄), \dicevi (⚅), \digamma (ϝ), \dingasterisk (✽), \dircurrent (⎓), \disin (⋲), \div (÷), \divideontimes (⋇), \dj (đ), \dlcrop (⌍), \doteq (≐), \dotequiv (⩧), \dotminus (∸), \dotplus (∔), \dots (…), \dotsim (⩪), \dotsminusdots (∺), \dottedcircle (◌), \dottedsquare (⬚), \dottimes (⨰), \doublebarvee (⩢), \doublebarwedge (⩞), \doubleplus (⧺), \downarrow (↓), \downarrowbar (⤓), \downarrowbarred (⤈), \downdasharrow (⇣), \downdownarrows (⇊), \downfishtail (⥿), \downharpoonleft (⇃), \downharpoonleftbar (⥙), \downharpoonright (⇂), \downharpoonrightbar (⥕), \downharpoonsleftright (⥥), \downrightcurvedarrow (⤵), \downtriangleleftblack (⧨), \downtrianglerightblack (⧩), \downuparrows (⇵), \downupharpoonsleftright (⥯), \downwhitearrow (⇩), \downzigzagarrow (↯), \dprime (″), \draftingarrow (➛), \drbkarow (⤐), \drcrop (⌌), \dsol (⧶), \dsub (⩤), \dualmap (⧟).
-</p>
-<p>\earth (♁), \egsdot (⪘), \eighthnote (♪), \elinters (⏧), \ell (ℓ), \elsdot (⪗), \emdash (—), \emptyset (∅), \emptysetoarr (⦳), \emptysetoarrl (⦴), \emptysetobar (⦱), \emptysetocirc (⦲), \endash (–), \enleadertwodots (‥), \envelope (✉), \eparsl (⧣), \epsilon (ϵ), \eqcirc (≖), \eqcolon (≕), \eqdef (≝), \eqdot (⩦), \eqeq (⩵), \eqeqeq (⩶), \eqgtr (⋝), \eqless (⋜), \eqqgtr (⪚), \eqqless (⪙), \eqqplus (⩱), \eqqsim (⩳), \eqqslantgtr (⪜), \eqqslantless (⪛), \eqsim (≂), \eqslantgtr (⪖), \eqslantless (⪕), \equalleftarrow (⭀), \equalparallel (⋕), \equalrightarrow (⥱), \equiv (≡), \equivDD (⩸), \equivVert (⩨), \equivVvert (⩩), \eqvparsl (⧥), \errbarblackcircle (⧳), \errbarblackdiamond (⧱), \errbarblacksquare (⧯), \errbarcircle (⧲), \errbardiamond (⧰), \errbarsquare (⧮), \eta (η), \euro (€), \exists (∃).
-</p>
-<p>\fallingdotseq (≒), \fbowtie (⧓), \fcmp (⨾), \fdiagovnearrow (⤯), \fdiagovrdiag (⤬), \female (♀), \figdash (‒), \fint (⨏), \fisheye (◉), \flat (♭), \fltns (⏥), \forall (∀), \forks (⫝̸), \forksnot (⫝), \forkv (⫙), \fourthroot (∜), \fourvdots (⦙), \fracfiveeighths (⅝), \fracfivesixths (⅚), \fracfourfifths (⅘), \fraconeeighth (⅛), \fraconefifth (⅕), \fraconesixth (⅙), \fraconethird (⅓), \fracseveneights (⅞), \fracslash (⁄), \fracthreeeighths (⅜), \fracthreefifths (⅗), \fractwofifths (⅖), \fractwothirds (⅔), \frakC (ℭ), \frakH (ℌ), \frakZ (ℨ), \frown (⌢), \frownie (☹), \fullouterjoin (⟗).
-</p>
-<p>\gamma (γ), \ge (≥), \geq (≥), \geqq (≧), \geqslant (⩾), \gescc (⪩), \gesdot (⪀), \gesdoto (⪂), \gesdotol (⪄), \gesles (⪔), \gets (←), \gg (≫), \ggg (⋙), \gggnest (⫸), \gimel (ℷ), \glE (⪒), \gla (⪥), \gleichstark (⧦), \glj (⪤), \gnapprox (⪊), \gneq (⪈), \gneqq (≩), \gnsim (⋧), \greater (>), \gsime (⪎), \gsiml (⪐), \gtcc (⪧), \gtcir (⩺), \gtlpar (⦠), \gtquest (⩼), \gtrapprox (⪆), \gtrarr (⥸), \gtrdot (⋗), \gtreqless (⋛), \gtreqqless (⪌), \gtrless (≷), \gtrsim (≳), \guillemotleft («), \guillemotright (»), \guilsinglleft (‹), \guilsinglright (›).
-</p>
-<p>\harrowextender (⎯), \hatapprox (⩯), \hbar (ℏ), \heartsuit (♡), \hermitmatrix (⊹), \hexagon (⎔), \hexagonblack (⬣), \hiraganano (の), \hknearrow (⤤), \hknwarrow (⤣), \hksearow (⤥), \hkswarow (⤦), \hookleftarrow (↩), \hookrightarrow (↪), \horizbar (―), \hourglass (⧖), \house (⌂), \hrectangle (▭), \hrectangleblack (▬), \hslash (ℏ), \hyphenbullet (⁃), \hzigzag (〰).
-</p>
-<p>\iiiint (⨌), \iiint (∭), \iinfin (⧜), \iint (∬), \imageof (⊷), \in (∈), \incare (℅), \increment (∆), \infty (∞), \int (∫), \intBar (⨎), \intbar (⨍), \intbottom (⌡), \intcap (⨙), \intclockwise (∱), \intcup (⨚), \intercal (⊺), \interleave (⫴), \intextender (⎮), \intlharhk (⨗), \intprod (⨼), \intprodr (⨽), \inttop (⌠), \intx (⨘), \inversebullet (◘), \inversewhitecircle (◙), \invnot (⌐), \invwhitelowerhalfcircle (◛), \invwhiteupperhalfcircle (◚), \iota (ι), \ipasupgamma (ˠ), \ipasupl (ˡ), \ipasuprerglotstpp (ˤ), \ipasups (ˢ), \ipasupx (ˣ), \ipaunaspirated (˭), \ipavoicing (ˬ), \isinE (⋹), \isindot (⋵), \isinobar (⋷), \isins (⋴), \isinvb (⋸), \itBbbD (ⅅ), \itBbbd (ⅆ), \itBbbe (ⅇ), \itBbbi (ⅈ), \itBbbj (ⅉ).
-</p>
-<p>\jupiter (♃), \kappa (κ), \kernelcontraction (∻), \koppa (ϟ).
-</p>
-<p>\l (ł), \lAngle (⟪), \lBrace (⦃), \lBrack (⟦), \lParen (⦅), \lambda (λ), \lambdabar (ƛ), \langle (⟨), \langledot (⦑), \laplac (⧠), \lasp (ʽ), \lat (⪫), \late (⪭), \lbag (⟅), \lblkbrbrak (⦗), \lbrace ({), \lbracelend (⎩), \lbracemid (⎨), \lbraceuend (⎧), \lbrack ([), \lbrackextender (⎢), \lbracklend (⎣), \lbracklltick (⦏), \lbrackubar (⦋), \lbrackuend (⎡), \lbrackultick (⦍), \lbrbrak (❲), \lceil (⌈), \lcurvyangle (⧼), \ldasharrhead (⇠), \le (≤), \leadsto (↝), \leftarrow (←), \leftarrowapprox (⭊), \leftarrowbackapprox (⭂), \leftarrowbsimilar (⭋), \leftarrowless (⥷), \leftarrowonoplus (⬲), \leftarrowplus (⥆), \leftarrowshortrightarrow (⥃), \leftarrowsimilar (⥳), \leftarrowsubset (⥺), \leftarrowtail (↢), \leftarrowtriangle (⇽), \leftarrowx (⬾), \leftbkarrow (⤌), \leftcurvedarrow (⬿), \leftdasharrow (⇠), \leftdasharrowhead (⇡), \leftdbkarrow (⤎), \leftdbltail (⤛), \leftdotarrow (⬸), \leftdowncurvedarrow (⤶), \leftfishtail (⥼), \leftharpoondown (↽), \leftharpoondownbar (⥞), \leftharpoonsupdown (⥢), \leftharpoonup (↼), \leftharpoonupbar (⥚), \leftharpoonupdash (⥪), \leftleftarrows (⇇), \leftmoon (☾), \leftouterjoin (⟕), \leftrightarrow (↔), \leftrightarrowcircle (⥈), \leftrightarrows (⇆), \leftrightarrowtriangle (⇿), \leftrightharpoondowndown (⥐), \leftrightharpoondownup (⥋), \leftrightharpoons (⇋), \leftrightharpoonsdown (⥧), \leftrightharpoonsup (⥦), \leftrightharpoonupdown (⥊), \leftrightharpoonupup (⥎), \leftrightsquigarrow (↭), \leftsquigarrow (↜), \leftsquigarrow (⇜), \lefttail (⤙), \leftthreearrows (⬱), \leftthreetimes (⋋), \leftwhitearrow (⇦), \leq (≤), \leqq (≦), \leqqslant (⫹), \leqqslant (⫺), \leqslant (⩽), \lescc (⪨), \lesdot (⩿), \lesdoto (⪁), \lesdotor (⪃), \lesges (⪓), \less (<), \lessapprox (⪅), \lessdot (⋖), \lesseqgtr (⋚), \lesseqqgtr (⪋), \lessgtr (≶), \lesssim (≲), \lfbowtie (⧑), \lfloor (⌊), \lftimes (⧔), \lgE (⪑), \lgblkcircle (⬤), \lgblksquare (⬛), \lgwhtcircle (◯), \lgwhtsquare (⬜), \lhd (⊲), \linefeed (↴), \ll (≪), \llangle (⦉), \llarc (◟), \llblacktriangle (◣), \llcorner (⌞), \lll (⋘), \lllnest (⫷), \llparenthesis (⦇), \lltriangle (◺), \lmoustache (⎰), \lnapprox (⪉), \lneq (⪇), \lneqq (≨), \lnsim (⋦), \longdashv (⟞), \longdivision (⟌), \longleftarrow (⟵), \longleftrightarrow (⟷), \longleftsquigarrow (⬳), \longmapsfrom (⟻), \longmapsto (⟼), \longrightarrow (⟶), \longrightsquigarrow (⟿), \looparrowleft (↫), \looparrowright (↬), \lowint (⨜), \lozenge (◊), \lozengeminus (⟠), \lparenextender (⎜), \lparenlend (⎝), \lparenless (⦓), \lparenuend (⎛), \lq (‘), \lrarc (◞), \lrblacktriangle (◢), \lrcorner (⌟), \lrtriangle (◿), \lrtriangleeq (⧡), \lsime (⪍), \lsimg (⪏), \lsqhook (⫍), \ltcc (⪦), \ltcir (⩹), \ltimes (⋉), \ltlarr (⥶), \ltquest (⩻), \ltrivb (⧏), \lvboxline (⎸), \lvzigzag (⧘).
-</p>
-<p>\male (♂), \maltese (✠), \mapsdown (↧), \mapsfrom (↤), \mapsto (↦), \mapsup (↥), \mdblkdiamond (⬥), \mdblklozenge (⬧), \mdblkrcl (⚫), \mdblksquare (◼), \mdlgblkcircle (●), \mdlgblkdiamond (◆), \mdlgblklozenge (⧫), \mdlgblksquare (■), \mdlgwhtcircle (○), \mdlgwhtdiamond (◇), \mdlgwhtsquare (□), \mdsmblkcircle (⦁), \mdsmblksquare (◾), \mdsmwhtcircl (⚬), \mdsmwhtsquare (◽), \mdwhtcircl (⚪), \mdwhtdiamond (⬦), \mdwhtlozenge (⬨), \mdwhtsquare (◻), \measangledltosw (⦯), \measangledrtose (⦮), \measangleldtosw (⦫), \measanglelutonw (⦩), \measanglerdtose (⦪), \measanglerutone (⦨), \measangleultonw (⦭), \measangleurtone (⦬), \measeq (≞), \measuredangle (∡), \measuredangleleft (⦛), \measuredrightangle (⊾), \medblackstar (⭑), \medmathspace ( ), \medwhitestar (⭐), \mercury (☿), \mho (℧), \mid (∣), \midbarvee (⩝), \midbarwedge (⩜), \midcir (⫰), \minus (−), \minusdot (⨪), \minusfdots (⨫), \minusrdots (⨬), \mlcp (⫛), \models (⊧), \mp (∓), \mu (μ), \multimap (⊸), \multimapinv (⟜).
-</p>
-<p>\nHdownarrow (⇟), \nHuparrow (⇞), \nLeftarrow (⇍), \nLeftrightarrow (⇎), \nRightarrow (⇏), \nVDash (⊯), \nVdash (⊮), \nVleftarrow (⇺), \nVleftarrowtail (⬺), \nVleftrightarrow (⇼), \nVrightarrow (⇻), \nVrightarrowtail (⤕), \nVtwoheadleftarrow (⬵), \nVtwoheadleftarrowtail (⬽), \nVtwoheadrightarrow (⤁), \nVtwoheadrightarrowtail (⤘), \nabla (∇), \napprox (≉), \nasymp (≭), \natural (♮), \ncong (≇), \ne (≠), \nearrow (↗), \neg (¬), \neovnwarrow (⤱), \neovsearrow (⤮), \neptune (♆), \neq (≠), \nequiv (≢), \neswarrow (⤢), \neuter (⚲), \nexists (∄), \ng (ŋ), \ngeq (≱), \ngtr (≯), \ngtrless (≹), \ngtrsim (≵), \nhVvert (⫵), \nhpar (⫲), \ni (∋), \niobar (⋾), \nis (⋼), \nisd (⋺), \nleftarrow (↚), \nleftrightarrow (↮), \nleq (≰), \nless (≮), \nlessgtr (≸), \nlesssim (≴), \nmid (∤), \nni (∌), \nobreakhyphen (‑), \notin (∉), \nparallel (∦), \npolint (⨔), \nprec (⊀), \npreccurlyeq (⋠), \nrightarrow (↛), \nsim (≁), \nsime (≄), \nsqsubseteq (⋢), \nsqsupseteq (⋣), \nsubset (⊄), \nsubseteq (⊈), \nsucc (⊁), \nsucccurlyeq (⋡), \nsupset (⊅), \nsupseteq (⊉), \ntriangleleft (⋪), \ntrianglelefteq (⋬), \ntriangleright (⋫), \ntrianglerighteq (⋭), \nu (ν), \nvDash (⊭), \nvLeftarrow (⤂), \nvLeftrightarrow (⤄), \nvRightarrow (⤃), \nvdash (⊬), \nvinfty (⧞), \nvleftarrow (⇷), \nvleftarrowtail (⬹), \nvleftrightarrow (⇹), \nvrightarrow (⇸), \nvrightarrowtail (⤔), \nvtwoheadleftarrow (⬴), \nvtwoheadleftarrowtail (⬼), \nvtwoheadrightarrow (⤀), \nvtwoheadrightarrowtail (⤗), \nwarrow (↖), \nwovnearrow (⤲), \nwsearrow (⤡).
-</p>
-<p>\o (ø), \obar (⌽), \obot (⦺), \obrbrak (⏠), \obslash (⦸), \odiv (⨸), \odot (⊙), \odotslashdot (⦼), \oe (œ), \ogreaterthan (⧁), \ohorn (ơ), \oiiint (∰), \oiint (∯), \oint (∮), \ointctrclockwise (∳), \olcross (⦻), \oldKoppa (Ϙ), \oldkoppa (ϙ), \olessthan (⧀), \omega (ω), \omicron (ο), \ominus (⊖), \operp (⦹), \oplus (⊕), \opluslhrim (⨭), \oplusrhrim (⨮), \origof (⊶), \oslash (⊘), \otimes (⊗), \otimeshat (⨶), \otimeslhrim (⨴), \otimesrhrim (⨵), \overbrace (⏞), \overbracket (⎴), \overline (‾), \overparen (⏜), \owns (∋).
-</p>
-<p>\parallel (∥), \parallelogram (▱), \parallelogramblack (▰), \parsim (⫳), \partial (∂), \partialmeetcontraction (⪣), \pentagon (⬠), \pentagonblack (⬟), \perp (⟂), \perps (⫡), \phi (ϕ), \phone (☎), \pi (π), \pitchfork (⋔), \plusdot (⨥), \pluseqq (⩲), \plushat (⨣), \plussim (⨦), \plussubtwo (⨧), \plustrif (⨨), \pluto (♇), \pm (±), \pointnt (⨕), \postalmark (〒), \prec (≺), \precapprox (⪷), \preccurlyeq (≼), \preceq (⪯), \preceqq (⪳), \precnapprox (⪹), \precneq (⪱), \precneqq (⪵), \precnsim (⋨), \precsim (≾), \prime (′), \prod (∏), \profalar (⌮), \profline (⌒), \profsurf (⌓), \propto (∝), \prurel (⊰), \psi (ψ), \pullback (⟓), \pushout (⟔).
-</p>
-<p>\qprime (⁗), \quarternote (♩), \questeq (≟), \quotdblbase („), \quotdblright (‟), \quotsinglbase (‚), \quotsinglright (‛).
-</p>
-<p>\rAngle (⟫), \rBrace (⦄), \rBrack (⟧), \rParen (⦆), \rangle (⟩), \rangledot (⦒), \rangledownzigzagarrow (⍼), \rasp (ʼ), \rbag (⟆), \rblkbrbrak (⦘), \rbrace (}), \rbracelend (⎭), \rbracemid (⎬), \rbraceuend (⎫), \rbrack (]), \rbrackextender (⎥), \rbracklend (⎦), \rbracklrtick (⦎), \rbrackubar (⦌), \rbrackuend (⎤), \rbrackurtick (⦐), \rbrbrak (❳), \rceil (⌉), \rcurvyangle (⧽), \rdiagovfdiag (⤫), \rdiagovsearrow (⤰), \recorder (⌕), \revangle (⦣), \revangleubar (⦥), \revemptyset (⦰), \revnmid (⫮), \rfbowtie (⧒), \rfloor (⌋), \rftimes (⧕), \rhd (⊳), \rho (ρ), \righarrowbsimilar (⭌), \rightangle (∟), \rightanglemdot (⦝), \rightanglesqr (⦜), \rightarrow (→), \rightarrowapprox (⥵), \rightarrowbackapprox (⭈), \rightarrowbar (⇥), \rightarrowdiamond (⤞), \rightarrowgtr (⭃), \rightarrowonoplus (⟴), \rightarrowplus (⥅), \rightarrowshortleftarrow (⥂), \rightarrowsimilar (⥴), \rightarrowsupset (⭄), \rightarrowtail (↣), \rightarrowtriangle (⇾), \rightarrowx (⥇), \rightbkarrow (⤍), \rightcurvedarrow (⤳), \rightdasharrow (⇢), \rightdbltail (⤜), \rightdotarrow (⤑), \rightdowncurvedarrow (⤷), \rightfishtail (⥽), \rightharpoondown (⇁), \rightharpoondownbar (⥗), \rightharpoonsupdown (⥤), \rightharpoonup (⇀), \rightharpoonupbar (⥓), \rightharpoonupdash (⥬), \rightimply (⥰), \rightleftarrows (⇄), \rightleftharpoons (⇌), \rightleftharpoonsdown (⥩), \rightleftharpoonsup (⥨), \rightmoon (☽), \rightouterjoin (⟖), \rightpentagon (⭔), \rightpentagonblack (⭓), \rightrightarrows (⇉), \rightsquigarrow (↝), \rightsquigarrow (⇝), \righttail (⤚), \rightthreearrows (⇶), \rightthreetimes (⋌), \rightwhitearrow (⇨), \ringplus (⨢), \risingdotseq (≓), \rmoustache (⎱), \rparenextender (⎟), \rparengtr (⦔), \rparenlend (⎠), \rparenuend (⎞), \rppolint (⨒), \rq (’), \rrangle (⦊), \rrparenthesis (⦈), \rsolbar (⧷), \rsqhook (⫎), \rsub (⩥), \rtimes (⋊), \rtriltri (⧎), \ruledelayed (⧴), \rvboxline (⎹), \rvzigzag (⧙).
-</p>
-<p>\sampi (ϡ), \sansLmirrored (⅃), \sansLturned (⅂), \saturn (♄), \scissors (✂), \scpolint (⨓), \scrB (ℬ), \scrE (ℰ), \scrF (ℱ), \scrH (ℋ), \scrI (ℐ), \scrL (ℒ), \scrM (ℳ), \scrR (ℛ), \scre (ℯ), \scrg (ℊ), \scro (ℴ), \scurel (⊱), \searrow (↘), \seovnearrow (⤭), \setminus (∖), \setminus (⧵), \sharp (♯), \shortdowntack (⫟), \shortleftarrow (←), \shortlefttack (⫞), \shortrightarrow (→), \shortrightarrowleftarrow (⥄), \shortuptack (⫠), \shuffle (⧢), \sigma (σ), \silon (υ), \silon (ϒ), \sim (∼), \simeq (≃), \simgE (⪠), \simgtr (⪞), \similarleftarrow (⭉), \similarrightarrow (⥲), \simlE (⪟), \simless (⪝), \simminussim (⩬), \simneqq (≆), \simplus (⨤), \simrdots (⩫), \sinewave (∿), \slash (∕), \smallblacktriangleleft (◂), \smallblacktriangleright (▸), \smalldiamond (⋄), \smallin (∊), \smallint (∫), \smallni (∍), \smallsetminus (∖), \smalltriangleleft (◃), \smalltriangleright (▹), \smashtimes (⨳), \smblkdiamond (⬩), \smblklozenge (⬪), \smblksquare (▪), \smeparsl (⧤), \smile (⌣), \smiley (☺), \smt (⪪), \smte (⪬), \smwhitestar (⭒), \smwhtcircle (◦), \smwhtlozenge (⬫), \smwhtsquare (▫), \spadesuit (♠), \sphericalangle (∢), \sphericalangleup (⦡), \sqcap (⊓), \sqcup (⊔), \sqint (⨖), \sqlozenge (⌑), \sqrt (√), \sqrt3 (∛), \sqrt4 (∜), \sqrtbottom (⎷), \sqsubset (⊏), \sqsubseteq (⊑), \sqsubsetneq (⋤), \sqsupset (⊐), \sqsupseteq (⊒), \sqsupsetneq (⋥), \squarecrossfill (▩), \squaregrayfill (▩), \squarehfill (▤), \squarehvfill (▦), \squareleftblack (◧), \squareleftblack (◨), \squarellblack (⬕), \squarellquad (◱), \squarelrblack (◪), \squarelrquad (◲), \squareneswfill (▨), \squarenwsefill (▧), \squareulblack (◩), \squareulquad (◰), \squareurblack (⬔), \squareurquad (◳), \squarevfill (▥), \squoval (▢), \ss (ß), \star (⋆), \stareq (≛), \sterling (£), \stigma (ϛ), \strns (⏤), \subedot (⫃), \submult (⫁), \subrarr (⥹), \subset (⊂), \subsetapprox (⫉), \subsetcirc (⟃), \subsetdot (⪽), \subseteq (⊆), \subseteqq (⫅), \subsetneq (⊊), \subsetneqq (⫋), \subsetplus (⪿), \subsim (⫇), \subsub (⫕), \subsup (⫓), \succ (≻), \succapprox (⪸), \succcurlyeq (≽), \succeq (⪰), \succeqq (⪴), \succnapprox (⪺), \succneq (⪲), \succneqq (⪶), \succnsim (⋩), \succsim (≿), \sum (∑), \sumbottom (⎳), \sumint (⨋), \sumtop (⎲), \sun (☼), \supdsub (⫘), \supedot (⫄), \suphsol (⟉), \suphsub (⫗), \suplarr (⥻), \supmult (⫂), \supn (ⁿ), \supset (⊃), \supsetapprox (⫊), \supsetcirc (⟄), \supsetdot (⪾), \supseteq (⊇), \supseteqq (⫆), \supsetneq (⊋), \supsetneqq (⫌), \supsetplus (⫀), \supsim (⫈), \supsub (⫔), \supsup (⫖), \surd (√), \swarrow (↙).
-</p>
-<p>\talloblong (⫾), \target (⌖), \tau (τ), \taurus (♉), \testhookx (ᶍ), \textAsterisks (⁑), \textacute (ˊ), \textadvanced (˖), \textain (ʿ), \textasciiacute (´), \textasciicircum (^), \textasciidieresis (¨), \textasciigrave (‘), \textasciimacron (¯), \textasciitilde (~), \textasterisklow (⁎), \textbackdprime (‶), \textbackprime (‵), \textbacktrprime (‷), \textbardotlessj (ɟ), \textbardotlessjvar (ʄ), \textbarglotstop (ʡ), \textbari (ɨ), \textbarl (ƚ), \textbaro (ɵ), \textbarrevglotstop (ʢ), \textbaru (ʉ), \textbeltl (ɬ), \textbenttailyogh (ƺ), \textbreve (˘), \textbrokenbar (¦), \textbullet (•), \textbullseye (ʘ), \textcent (¢), \textcircledP (℗), \textcloseepsilon (ʚ), \textcloseomega (ɷ), \textcloserevepsilon (ɞ), \textcopyright (©), \textcrb (ƀ), \textcrh (ħ), \textcrinvglotstop (ƾ), \textcrlambda (ƛ), \textcrtwo (ƻ), \textctc (ɕ), \textctd (ȡ), \textctesh (ʆ), \textctj (ʝ), \textctl (ȴ), \textctn (ȵ), \textctt (ȶ), \textctyogh (ʓ), \textctz (ʑ), \textcurrency (¤), \textdctzlig (ʥ), \textdegree (°), \textdiscount (⁒), \textdollar ($), \textdotaccent (˙), \textdotlessj (ȷ), \textdoubleacute (˝), \textdoublebarpipe (ǂ), \textdoublepipe (ǁ), \textdprime (″), \textdptr (˅), \textdyoghlig (ʤ), \textdzlig (ʣ), \textepsilon (ɛ), \textesh (ʃ), \textestimated (℮), \textexclam (ǃ), \textexclamdown (¡), \textfishhookr (ɾ), \textflorin (ƒ), \textfranc (₣), \textgamma (ɣ), \textglotstop (ʔ), \textgrave (ˋ), \texthalflength (ˑ), \texthamza (ʾ), \texthen (ꜧ), \textheng (ꜧ), \texthooks (ᶊ), \texthookz (ᶎ), \texthtb (ɓ), \texthtc (ƈ), \texthtd (ɗ), \texthtg (ɠ), \texthth (ɦ), \texththeng (ɧ), \texthtk (ƙ), \texthtp (ƥ), \texthtq (ʠ), \texthtscg (ʛ), \texthtt (ƭ), \texthvlig (ƕ), \texthyphen (‐), \textinvglotstop (ʖ), \textinvscr (ʁ), \textiota (ɩ), \textlengthmark (ː), \textlhalfring (˓), \textlhookd (ᶁ), \textlhookk (ᶄ), \textlhookl (ᶅ), \textlhookt (ƫ), \textlhti (ɿ), \textlira (₤), \textlonglegr (ɼ), \textlongy (ʮ), \textlongy (ʯ), \textlooptoprevesh (ƪ), \textlowacute (ˏ), \textlowered (˕), \textlowgrave (ˎ), \textlowmacron (ˍ), \textlptr (˂), \textltailm (ɱ), \textltailn (ɲ), \textltilde (ɫ), \textlyoghlig (ɮ), \textmacron (ˉ), \textmu (µ), \textnumero (№), \textogonek (˛), \textohm (Ω), \textonehalf (½), \textonequarter (¼), \textonesuperior (¹), \textopeno (ɔ), \textordfeminine (ª), \textordmasculine (º), \textovercross (˟), \textoz (℥), \textpertenthousand (‱), \textperthousand (‰), \textpesetas (₧), \textphi (ɸ), \textpipe (ǀ), \textprime (′), \textprimstress (ˈ), \textqprime (⁗), \textquestiondown (¿), \textquotedbl ("), \textquotedblleft (“), \textquotedblright (”), \textraised (˔), \textraiseglotstop (ˀ), \textraiserevglotstop (ˁ), \textramshorns (ɤ), \textrecipe (℞), \textreferencemark (※), \textregistered (®), \textretracted (˗), \textreve (ɘ), \textrevepsilon (ɜ), \textrevglotstop (ʕ), \textrhalfring (˒), \textrhookrevepsilon (ɝ), \textrhookschwa (ɚ), \textrhoticity (˞), \textringaccent (˚), \textrptr (˃), \textrtaild (ɖ), \textrtaill (ɭ), \textrtailn (ɳ), \textrtailr (ɽ), \textrtails (ʂ), \textrtailt (ʈ), \textrtailz (ʐ), \textsca (ᴀ), \textscb (ʙ), \textsce (ᴇ), \textscg (ɢ), \textsch (ʜ), \textschwa (ə), \textsci (ɪ), \textscl (ʟ), \textscn (ɴ), \textscoelig (ɶ), \textscr (ʀ), \textscripta (ɑ), \textscriptg (ɡ), \textscriptv (ʋ), \textscu (ᴜ), \textscy (ʏ), \textsecstress (ˌ), \textsemicolonreversed (⁏), \textsilon (Υ), \textsmalltilde (˜), \textstretchcvar (ʗ), \textsubw (w), \textsuph (ʰ), \textsuphth (ʱ), \textsupinvscr (ʶ), \textsupj (ʲ), \textsupr (ʳ), \textsupturnr (ʴ), \textsupturnrrtail (ʵ), \textsupw (ʷ), \textsupy (ʸ), \texttctctlig (ʧ), \texttctctlig (ʨ), \textthreequarters (¾), \textthreesuperior (³), \texttrademark (™), \texttrprime (‴), \texttslig (ʦ), \textturna (ɐ), \textturncomma (ʻ), \textturnh (ɥ), \textturnk (ʞ), \textturnlonglegr (ɺ), \textturnm (ɯ), \textturnmrleg (ɰ), \textturnr (ɹ), \textturnrrtail (ɻ), \textturnscripta (ɒ), \textturnt (ʇ), \textturnv (ʌ), \textturnw (ʍ), \textturny (ʎ), \texttwosuperior (²), \textupsilon (ʊ), \textuptr (˄), \textvibyi (ʅ), \textvisiblespace (␣), \textyogh (ʒ), \th (þ), \therefore (∴), \thermod (⧧), \theta (θ), \thickapprox (≈), \thicksim (∼), \threedangle (⟀), \threedotcolon (⫶), \tieconcat (⁀), \tieinfty (⧝), \times (×), \timesbar (⨱), \tminus (⧿), \to (→), \toea (⤨), \tona (⤧), \tonebarextrahigh (˥), \tonebarextralow (˩), \tonebarhigh (˦), \tonebarlow (˨), \tonebarmid (˧), \top (⊤), \topbot (⌶), \topcir (⫱), \topfork (⫚), \topsemicircle (◠), \tosa (⤩), \towa (⤪), \tplus (⧾), \trapezium (⏢), \trianglecdot (◬), \triangledown (▿), \triangleexclam (⚠), \triangleleft (◁), \triangleleftblack (◭), \trianglelefteq (⊴), \triangleminus (⨺), \triangleodot (⧊), \triangleplus (⨹), \triangleq (≜), \triangleright (▷), \trianglerightblack (◮), \trianglerighteq (⊵), \triangles (⧌), \triangleserifs (⧍), \triangletimes (⨻), \triangleubar (⧋), \tripleplus (⧻), \trprime (‴), \turnangle (⦢), \turnediota (℩), \turnednot (⌙), \twocaps (⩋), \twocups (⩊), \twoheaddownarrow (↡), \twoheadleftarrow (↞), \twoheadleftarrowtail (⬻), \twoheadleftdbkarrow (⬷), \twoheadmapsfrom (⬶), \twoheadmapsto (⤅), \twoheadrightarrow (↠), \twoheadrightarrowtail (⤖), \twoheaduparrow (↟), \twoheaduparrowcircle (⥉), \twolowline (‗), \twonotes (♫), \typecolon (⦂).
-</p>
-<p>\ubrbrak (⏡), \uhorn (ư), \ularc (◜), \ulblacktriangle (◤), \ulcorner (⌜), \ulcrop (⌏), \ultriangle (◸), \uminus (⩁), \underbrace (⏟), \underbracket (⎵), \underparen (⏝), \unlhd (⊴), \unrhd (⊵), \upand (⅋), \uparrow (↑), \uparrowbarred (⤉), \uparrowoncircle (⦽), \updasharrow (⇢), \updownarrow (↕), \updownarrowbar (↨), \updownarrows (⇅), \updownharpoonleftleft (⥑), \updownharpoonleftright (⥍), \updownharpoonrightleft (⥌), \updownharpoonrightright (⥏), \updownharpoonsleftright (⥮), \upfishtail (⥾), \upharpoonleft (↿), \upharpoonleftbar (⥠), \upharpoonright (↾), \upharpoonrightbar (⥜), \upharpoonsleftright (⥣), \upin (⟒), \upint (⨛), \uplus (⊎), \uprightcurvearrow (⤴), \upuparrows (⇈), \upwhitearrow (⇧), \urarc (◝), \urblacktriangle (◥), \urcorner (⌝), \urcrop (⌎), \urtriangle (◹).
-</p>
-<p>\v (ˇ), \vBar (⫨), \vBarv (⫩), \vDash (⊨), \vDdash (⫢), \varTheta (ϴ), \varVdash (⫦), \varbarwedge (⌅), \varbeta (ϐ), \varclubsuit (♧), \vardiamondsuit (♦), \vardoublebarwedge (⌆), \varepsilon (ε), \varheartsuit (♥), \varhexagon (⬡), \varhexagonblack (⬢), \varhexagonlrbonds (⌬), \varin (∈), \varisinobar (⋶), \varisins (⋳), \varkappa (ϰ), \varlrtriangle (⊿), \varni (∋), \varniobar (⋽), \varnis (⋻), \varnothing (∅), \varointclockwise (∲), \varphi (φ), \varpi (ϖ), \varpropto (∝), \varrho (ϱ), \varrowextender (⏐), \varsigma (ς), \varspadesuit (♤), \varstar (✶), \vartheta (ϑ), \vartriangle (▵), \vartriangleleft (⊲), \vartriangleright (⊳), \varveebar (⩡), \vbraceextender (⎪), \vbrtri (⧐), \vdash (⊢), \vdots (⋮), \vectimes (⨯), \vee (∨), \veebar (⊻), \veedot (⟇), \veedoublebar (⩣), \veeeq (≚), \veemidvert (⩛), \veeodot (⩒), \veeonvee (⩖), \veeonwedge (⩙), \vert (|), \viewdata (⌗), \vlongdash (⟝), \vrectangle (▯), \vrectangleblack (▮), \vysmlblksquare (⬝), \vysmlwhtsquare (⬞), \vzigzag (⦚).
-</p>
-<p>\watchicon (⌚), \wedge (∧), \wedgebar (⩟), \wedgedot (⟑), \wedgedoublebar (⩠), \wedgemidvert (⩚), \wedgeodot (⩑), \wedgeonwedge (⩕), \wedgeq (≙), \whitearrowupfrombar (⇪), \whiteinwhitetriangle (⟁), \whitepointerleft (◅), \whitepointerright (▻), \whitesquaretickleft (⟤), \whitesquaretickright (⟥), \whthorzoval (⬭), \whtvertoval (⬯), \wideangledown (⦦), \wideangleup (⦧), \wp (℘), \wr (≀).
-</p>
-<p>\xbsol (⧹), \xi (ξ), \xsol (⧸), \yen (¥), \zeta (ζ), \zpipe (⨠),
-</p>
-<p>IF ANYBODY WILL CHECK WHETHER ALL NAMES CORRESPOND TO RIGHT TEX SYMBOLS I SHALL APPRECIATE IT GREATLY.
-</p>
-<hr>
-<a name="Copying-This-Manual"></a>
-<div class="header">
-<p>
-Next: <a href="#Index" accesskey="n" rel="next">Index</a>, Previous: <a href="#TeX_002dlike-symbols" accesskey="p" rel="prev">TeX-like symbols</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="GNU-Free-Documentation-License"></a>
-<h2 class="appendix">Appendix E GNU Free Documentation License</h2>
-<div align="center">Version 1.2, November 2002
-</div>
-
-<div class="display">
-<pre class="display">Copyright © 2000,2001,2002 Free Software Foundation, Inc.
-51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-</pre></div>
-
-<ol start="0">
-<li> PREAMBLE
-
-<p>The purpose of this License is to make a manual, textbook, or other
-functional and useful document <em>free</em> in the sense of freedom: to
-assure everyone the effective freedom to copy and redistribute it,
-with or without modifying it, either commercially or noncommercially.
-Secondarily, this License preserves for the author and publisher a way
-to get credit for their work, while not being considered responsible
-for modifications made by others.
-</p>
-<p>This License is a kind of “copyleft”, which means that derivative
-works of the document must themselves be free in the same sense. It
-complements the GNU General Public License, which is a copyleft
-license designed for free software.
-</p>
-<p>We have designed this License in order to use it for manuals for free
-software, because free software needs free documentation: a free
-program should come with manuals providing the same freedoms that the
-software does. But this License is not limited to software manuals;
-it can be used for any textual work, regardless of subject matter or
-whether it is published as a printed book. We recommend this License
-principally for works whose purpose is instruction or reference.
-</p>
-</li><li> APPLICABILITY AND DEFINITIONS
-
-<p>This License applies to any manual or other work, in any medium, that
-contains a notice placed by the copyright holder saying it can be
-distributed under the terms of this License. Such a notice grants a
-world-wide, royalty-free license, unlimited in duration, to use that
-work under the conditions stated herein. The “Document”, below,
-refers to any such manual or work. Any member of the public is a
-licensee, and is addressed as “you”. You accept the license if you
-copy, modify or distribute the work in a way requiring permission
-under copyright law.
-</p>
-<p>A “Modified Version” of the Document means any work containing the
-Document or a portion of it, either copied verbatim, or with
-modifications and/or translated into another language.
-</p>
-<p>A “Secondary Section” is a named appendix or a front-matter section
-of the Document that deals exclusively with the relationship of the
-publishers or authors of the Document to the Document’s overall
-subject (or to related matters) and contains nothing that could fall
-directly within that overall subject. (Thus, if the Document is in
-part a textbook of mathematics, a Secondary Section may not explain
-any mathematics.) The relationship could be a matter of historical
-connection with the subject or with related matters, or of legal,
-commercial, philosophical, ethical or political position regarding
-them.
-</p>
-<p>The “Invariant Sections” are certain Secondary Sections whose titles
-are designated, as being those of Invariant Sections, in the notice
-that says that the Document is released under this License. If a
-section does not fit the above definition of Secondary then it is not
-allowed to be designated as Invariant. The Document may contain zero
-Invariant Sections. If the Document does not identify any Invariant
-Sections then there are none.
-</p>
-<p>The “Cover Texts” are certain short passages of text that are listed,
-as Front-Cover Texts or Back-Cover Texts, in the notice that says that
-the Document is released under this License. A Front-Cover Text may
-be at most 5 words, and a Back-Cover Text may be at most 25 words.
-</p>
-<p>A “Transparent” copy of the Document means a machine-readable copy,
-represented in a format whose specification is available to the
-general public, that is suitable for revising the document
-straightforwardly with generic text editors or (for images composed of
-pixels) generic paint programs or (for drawings) some widely available
-drawing editor, and that is suitable for input to text formatters or
-for automatic translation to a variety of formats suitable for input
-to text formatters. A copy made in an otherwise Transparent file
-format whose markup, or absence of markup, has been arranged to thwart
-or discourage subsequent modification by readers is not Transparent.
-An image format is not Transparent if used for any substantial amount
-of text. A copy that is not “Transparent” is called “Opaque”.
-</p>
-<p>Examples of suitable formats for Transparent copies include plain
-<small>ASCII</small> without markup, Texinfo input format, LaTeX input
-format, <acronym>SGML</acronym> or <acronym>XML</acronym> using a publicly available
-<acronym>DTD</acronym>, and standard-conforming simple <acronym>HTML</acronym>,
-PostScript or <acronym>PDF</acronym> designed for human modification. Examples
-of transparent image formats include <acronym>PNG</acronym>, <acronym>XCF</acronym> and
-<acronym>JPG</acronym>. Opaque formats include proprietary formats that can be
-read and edited only by proprietary word processors, <acronym>SGML</acronym> or
-<acronym>XML</acronym> for which the <acronym>DTD</acronym> and/or processing tools are
-not generally available, and the machine-generated <acronym>HTML</acronym>,
-PostScript or <acronym>PDF</acronym> produced by some word processors for
-output purposes only.
-</p>
-<p>The “Title Page” means, for a printed book, the title page itself,
-plus such following pages as are needed to hold, legibly, the material
-this License requires to appear in the title page. For works in
-formats which do not have any title page as such, “Title Page” means
-the text near the most prominent appearance of the work’s title,
-preceding the beginning of the body of the text.
-</p>
-<p>A section “Entitled XYZ” means a named subunit of the Document whose
-title either is precisely XYZ or contains XYZ in parentheses following
-text that translates XYZ in another language. (Here XYZ stands for a
-specific section name mentioned below, such as “Acknowledgements”,
-“Dedications”, “Endorsements”, or “History”.) To “Preserve the Title”
-of such a section when you modify the Document means that it remains a
-section “Entitled XYZ” according to this definition.
-</p>
-<p>The Document may include Warranty Disclaimers next to the notice which
-states that this License applies to the Document. These Warranty
-Disclaimers are considered to be included by reference in this
-License, but only as regards disclaiming warranties: any other
-implication that these Warranty Disclaimers may have is void and has
-no effect on the meaning of this License.
-</p>
-</li><li> VERBATIM COPYING
-
-<p>You may copy and distribute the Document in any medium, either
-commercially or noncommercially, provided that this License, the
-copyright notices, and the license notice saying this License applies
-to the Document are reproduced in all copies, and that you add no other
-conditions whatsoever to those of this License. You may not use
-technical measures to obstruct or control the reading or further
-copying of the copies you make or distribute. However, you may accept
-compensation in exchange for copies. If you distribute a large enough
-number of copies you must also follow the conditions in section 3.
-</p>
-<p>You may also lend copies, under the same conditions stated above, and
-you may publicly display copies.
-</p>
-</li><li> COPYING IN QUANTITY
-
-<p>If you publish printed copies (or copies in media that commonly have
-printed covers) of the Document, numbering more than 100, and the
-Document’s license notice requires Cover Texts, you must enclose the
-copies in covers that carry, clearly and legibly, all these Cover
-Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
-the back cover. Both covers must also clearly and legibly identify
-you as the publisher of these copies. The front cover must present
-the full title with all words of the title equally prominent and
-visible. You may add other material on the covers in addition.
-Copying with changes limited to the covers, as long as they preserve
-the title of the Document and satisfy these conditions, can be treated
-as verbatim copying in other respects.
-</p>
-<p>If the required texts for either cover are too voluminous to fit
-legibly, you should put the first ones listed (as many as fit
-reasonably) on the actual cover, and continue the rest onto adjacent
-pages.
-</p>
-<p>If you publish or distribute Opaque copies of the Document numbering
-more than 100, you must either include a machine-readable Transparent
-copy along with each Opaque copy, or state in or with each Opaque copy
-a computer-network location from which the general network-using
-public has access to download using public-standard network protocols
-a complete Transparent copy of the Document, free of added material.
-If you use the latter option, you must take reasonably prudent steps,
-when you begin distribution of Opaque copies in quantity, to ensure
-that this Transparent copy will remain thus accessible at the stated
-location until at least one year after the last time you distribute an
-Opaque copy (directly or through your agents or retailers) of that
-edition to the public.
-</p>
-<p>It is requested, but not required, that you contact the authors of the
-Document well before redistributing any large number of copies, to give
-them a chance to provide you with an updated version of the Document.
-</p>
-</li><li> MODIFICATIONS
-
-<p>You may copy and distribute a Modified Version of the Document under
-the conditions of sections 2 and 3 above, provided that you release
-the Modified Version under precisely this License, with the Modified
-Version filling the role of the Document, thus licensing distribution
-and modification of the Modified Version to whoever possesses a copy
-of it. In addition, you must do these things in the Modified Version:
-</p>
-<ol type="A" start="1">
-<li> Use in the Title Page (and on the covers, if any) a title distinct
-from that of the Document, and from those of previous versions
-(which should, if there were any, be listed in the History section
-of the Document). You may use the same title as a previous version
-if the original publisher of that version gives permission.
-
-</li><li> List on the Title Page, as authors, one or more persons or entities
-responsible for authorship of the modifications in the Modified
-Version, together with at least five of the principal authors of the
-Document (all of its principal authors, if it has fewer than five),
-unless they release you from this requirement.
-
-</li><li> State on the Title page the name of the publisher of the
-Modified Version, as the publisher.
-
-</li><li> Preserve all the copyright notices of the Document.
-
-</li><li> Add an appropriate copyright notice for your modifications
-adjacent to the other copyright notices.
-
-</li><li> Include, immediately after the copyright notices, a license notice
-giving the public permission to use the Modified Version under the
-terms of this License, in the form shown in the Addendum below.
-
-</li><li> Preserve in that license notice the full lists of Invariant Sections
-and required Cover Texts given in the Document’s license notice.
-
-</li><li> Include an unaltered copy of this License.
-
-</li><li> Preserve the section Entitled “History”, Preserve its Title, and add
-to it an item stating at least the title, year, new authors, and
-publisher of the Modified Version as given on the Title Page. If
-there is no section Entitled “History” in the Document, create one
-stating the title, year, authors, and publisher of the Document as
-given on its Title Page, then add an item describing the Modified
-Version as stated in the previous sentence.
-
-</li><li> Preserve the network location, if any, given in the Document for
-public access to a Transparent copy of the Document, and likewise
-the network locations given in the Document for previous versions
-it was based on. These may be placed in the “History” section.
-You may omit a network location for a work that was published at
-least four years before the Document itself, or if the original
-publisher of the version it refers to gives permission.
-
-</li><li> For any section Entitled “Acknowledgements” or “Dedications”, Preserve
-the Title of the section, and preserve in the section all the
-substance and tone of each of the contributor acknowledgements and/or
-dedications given therein.
-
-</li><li> Preserve all the Invariant Sections of the Document,
-unaltered in their text and in their titles. Section numbers
-or the equivalent are not considered part of the section titles.
-
-</li><li> Delete any section Entitled “Endorsements”. Such a section
-may not be included in the Modified Version.
-
-</li><li> Do not retitle any existing section to be Entitled “Endorsements” or
-to conflict in title with any Invariant Section.
-
-</li><li> Preserve any Warranty Disclaimers.
-</li></ol>
-
-<p>If the Modified Version includes new front-matter sections or
-appendices that qualify as Secondary Sections and contain no material
-copied from the Document, you may at your option designate some or all
-of these sections as invariant. To do this, add their titles to the
-list of Invariant Sections in the Modified Version’s license notice.
-These titles must be distinct from any other section titles.
-</p>
-<p>You may add a section Entitled “Endorsements”, provided it contains
-nothing but endorsements of your Modified Version by various
-parties—for example, statements of peer review or that the text has
-been approved by an organization as the authoritative definition of a
-standard.
-</p>
-<p>You may add a passage of up to five words as a Front-Cover Text, and a
-passage of up to 25 words as a Back-Cover Text, to the end of the list
-of Cover Texts in the Modified Version. Only one passage of
-Front-Cover Text and one of Back-Cover Text may be added by (or
-through arrangements made by) any one entity. If the Document already
-includes a cover text for the same cover, previously added by you or
-by arrangement made by the same entity you are acting on behalf of,
-you may not add another; but you may replace the old one, on explicit
-permission from the previous publisher that added the old one.
-</p>
-<p>The author(s) and publisher(s) of the Document do not by this License
-give permission to use their names for publicity for or to assert or
-imply endorsement of any Modified Version.
-</p>
-</li><li> COMBINING DOCUMENTS
-
-<p>You may combine the Document with other documents released under this
-License, under the terms defined in section 4 above for modified
-versions, provided that you include in the combination all of the
-Invariant Sections of all of the original documents, unmodified, and
-list them all as Invariant Sections of your combined work in its
-license notice, and that you preserve all their Warranty Disclaimers.
-</p>
-<p>The combined work need only contain one copy of this License, and
-multiple identical Invariant Sections may be replaced with a single
-copy. If there are multiple Invariant Sections with the same name but
-different contents, make the title of each such section unique by
-adding at the end of it, in parentheses, the name of the original
-author or publisher of that section if known, or else a unique number.
-Make the same adjustment to the section titles in the list of
-Invariant Sections in the license notice of the combined work.
-</p>
-<p>In the combination, you must combine any sections Entitled “History”
-in the various original documents, forming one section Entitled
-“History”; likewise combine any sections Entitled “Acknowledgements”,
-and any sections Entitled “Dedications”. You must delete all
-sections Entitled “Endorsements.”
-</p>
-</li><li> COLLECTIONS OF DOCUMENTS
-
-<p>You may make a collection consisting of the Document and other documents
-released under this License, and replace the individual copies of this
-License in the various documents with a single copy that is included in
-the collection, provided that you follow the rules of this License for
-verbatim copying of each of the documents in all other respects.
-</p>
-<p>You may extract a single document from such a collection, and distribute
-it individually under this License, provided you insert a copy of this
-License into the extracted document, and follow this License in all
-other respects regarding verbatim copying of that document.
-</p>
-</li><li> AGGREGATION WITH INDEPENDENT WORKS
-
-<p>A compilation of the Document or its derivatives with other separate
-and independent documents or works, in or on a volume of a storage or
-distribution medium, is called an “aggregate” if the copyright
-resulting from the compilation is not used to limit the legal rights
-of the compilation’s users beyond what the individual works permit.
-When the Document is included in an aggregate, this License does not
-apply to the other works in the aggregate which are not themselves
-derivative works of the Document.
-</p>
-<p>If the Cover Text requirement of section 3 is applicable to these
-copies of the Document, then if the Document is less than one half of
-the entire aggregate, the Document’s Cover Texts may be placed on
-covers that bracket the Document within the aggregate, or the
-electronic equivalent of covers if the Document is in electronic form.
-Otherwise they must appear on printed covers that bracket the whole
-aggregate.
-</p>
-</li><li> TRANSLATION
-
-<p>Translation is considered a kind of modification, so you may
-distribute translations of the Document under the terms of section 4.
-Replacing Invariant Sections with translations requires special
-permission from their copyright holders, but you may include
-translations of some or all Invariant Sections in addition to the
-original versions of these Invariant Sections. You may include a
-translation of this License, and all the license notices in the
-Document, and any Warranty Disclaimers, provided that you also include
-the original English version of this License and the original versions
-of those notices and disclaimers. In case of a disagreement between
-the translation and the original version of this License or a notice
-or disclaimer, the original version will prevail.
-</p>
-<p>If a section in the Document is Entitled “Acknowledgements”,
-“Dedications”, or “History”, the requirement (section 4) to Preserve
-its Title (section 1) will typically require changing the actual
-title.
-</p>
-</li><li> TERMINATION
-
-<p>You may not copy, modify, sublicense, or distribute the Document except
-as expressly provided for under this License. Any other attempt to
-copy, modify, sublicense or distribute the Document is void, and will
-automatically terminate your rights under this License. However,
-parties who have received copies, or rights, from you under this
-License will not have their licenses terminated so long as such
-parties remain in full compliance.
-</p>
-</li><li> FUTURE REVISIONS OF THIS LICENSE
-
-<p>The Free Software Foundation may publish new, revised versions
-of the GNU Free Documentation License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns. See
-<a href="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</a>.
-</p>
-<p>Each version of the License is given a distinguishing version number.
-If the Document specifies that a particular numbered version of this
-License “or any later version” applies to it, you have the option of
-following the terms and conditions either of that specified version or
-of any later version that has been published (not as a draft) by the
-Free Software Foundation. If the Document does not specify a version
-number of this License, you may choose any version ever published (not
-as a draft) by the Free Software Foundation.
-</p></li></ol>
-
-<a name="ADDENDUM_003a-How-to-use-this-License-for-your-documents"></a>
-<h3 class="heading">ADDENDUM: How to use this License for your documents</h3>
-
-<p>To use this License in a document you have written, include a copy of
-the License in the document and put the following copyright and
-license notices just after the title page:
-</p>
-<div class="smallexample">
-<pre class="smallexample"> Copyright (C) <var>year</var> <var>your name</var>.
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.2
- or any later version published by the Free Software Foundation;
- with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
- Texts. A copy of the license is included in the section entitled ``GNU
- Free Documentation License''.
-</pre></div>
-
-<p>If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
-replace the “with…Texts.” line with this:
-</p>
-<div class="smallexample">
-<pre class="smallexample"> with the Invariant Sections being <var>list their titles</var>, with
- the Front-Cover Texts being <var>list</var>, and with the Back-Cover Texts
- being <var>list</var>.
-</pre></div>
-
-<p>If you have Invariant Sections without Cover Texts, or some other
-combination of the three, merge those two alternatives to suit the
-situation.
-</p>
-<p>If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License,
-to permit their use in free software.
-</p>
-
-
-<hr>
-<a name="Index"></a>
-<div class="header">
-<p>
-Previous: <a href="#Copying-This-Manual" accesskey="p" rel="prev">Copying This Manual</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Indeks"></a>
-<h2 class="unnumbered">Индекс</h2>
-
-<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Index_cp_letter-A"><b>A</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-B"><b>B</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-C"><b>C</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-D"><b>D</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-E"><b>E</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-F"><b>F</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-G"><b>G</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-H"><b>H</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-I"><b>I</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-J"><b>J</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-L"><b>L</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-M"><b>M</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-N"><b>N</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-O"><b>O</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-P"><b>P</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Q"><b>Q</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-R"><b>R</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-S"><b>S</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-T"><b>T</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-V"><b>V</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-W"><b>W</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-X"><b>X</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Y"><b>Y</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Z"><b>Z</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Н"><b>Н</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-О"><b>О</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-С"><b>С</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Т"><b>Т</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Ц"><b>Ц</b></a>
-
-</td></tr></table>
-<table class="index-cp" border="0">
-<tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-A">A</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-AddLegend">AddLegend</a>:</td><td> </td><td valign="top"><a href="#Legend">Legend</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-AddLight">AddLight</a>:</td><td> </td><td valign="top"><a href="#Lighting">Lighting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-AddTick">AddTick</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Adjust">Adjust</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-alpha">alpha</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Alpha">Alpha</a>:</td><td> </td><td valign="top"><a href="#Transparency">Transparency</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-alphadef">alphadef</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-AlphaDef">AlphaDef</a>:</td><td> </td><td valign="top"><a href="#Transparency">Transparency</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Ambient">Ambient</a>:</td><td> </td><td valign="top"><a href="#Lighting">Lighting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Area">Area</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ArrowSize">ArrowSize</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ask">ask</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Aspect">Aspect</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-AutoCorrel">AutoCorrel</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Axial">Axial</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Axis">Axis</a>:</td><td> </td><td valign="top"><a href="#Curved-coordinates">Curved coordinates</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Axis-1">Axis</a>:</td><td> </td><td valign="top"><a href="#Axis-and-Colorbar">Axis and Colorbar</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-AxisStl">AxisStl</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-B">B</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Ball">Ball</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Barh">Barh</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Bars">Bars</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-BarWidth">BarWidth</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Beam">Beam</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Belt">Belt</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Box">Box</a>:</td><td> </td><td valign="top"><a href="#Axis-and-Colorbar">Axis and Colorbar</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-BoxPlot">BoxPlot</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Boxs">Boxs</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-C">C</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-call">call</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Candle">Candle</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Chart">Chart</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-chdir">chdir</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Clean">Clean</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ClearLegend">ClearLegend</a>:</td><td> </td><td valign="top"><a href="#Legend">Legend</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Clf">Clf</a>:</td><td> </td><td valign="top"><a href="#Background">Background</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CloseGIF">CloseGIF</a>:</td><td> </td><td valign="top"><a href="#Frames_002fAnimation">Frames/Animation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cloud">Cloud</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Colorbar">Colorbar</a>:</td><td> </td><td valign="top"><a href="#Axis-and-Colorbar">Axis and Colorbar</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Column">Column</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ColumnPlot">ColumnPlot</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Combine">Combine</a>:</td><td> </td><td valign="top"><a href="#Parallelization">Parallelization</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Combine-1">Combine</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cone">Cone</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cones">Cones</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cont">Cont</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cont3">Cont3</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ContD">ContD</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ContF">ContF</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ContF3">ContF3</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ContFXYZ">ContFXYZ</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ContXYZ">ContXYZ</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CopyFont">CopyFont</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Correl">Correl</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CosFFT">CosFFT</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CRange">CRange</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Create">Create</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Crop">Crop</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Crust">Crust</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CTick">CTick</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CumSum">CumSum</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Curve">Curve</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-cut">cut</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cut">Cut</a>:</td><td> </td><td valign="top"><a href="#Cutting">Cutting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CutOff">CutOff</a>:</td><td> </td><td valign="top"><a href="#Cutting">Cutting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-D">D</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-DataGrid">DataGrid</a>:</td><td> </td><td valign="top"><a href="#Data-manipulation">Data manipulation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-defchr">defchr</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-define">define</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-defnum">defnum</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Delete">Delete</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Dens">Dens</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Dens3">Dens3</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-DensXYZ">DensXYZ</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Dew">Dew</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Diff">Diff</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Diff2">Diff2</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-do">do</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Dots">Dots</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Drop">Drop</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-E">E</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-else">else</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-elseif">elseif</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-EndFrame">EndFrame</a>:</td><td> </td><td valign="top"><a href="#Frames_002fAnimation">Frames/Animation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-endif">endif</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Envelop">Envelop</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Error">Error</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Error-1">Error</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Evaluate">Evaluate</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Export">Export</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Extend">Extend</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-F">F</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Face">Face</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FaceX">FaceX</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FaceY">FaceY</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FaceZ">FaceZ</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fall">Fall</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-fgets">fgets</a>:</td><td> </td><td valign="top"><a href="#Text-printing">Text printing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fill">Fill</a>:</td><td> </td><td valign="top"><a href="#Data-manipulation">Data manipulation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fill-1">Fill</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Find">Find</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FindAny">FindAny</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fit">Fit</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fit2">Fit2</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fit3">Fit3</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FitS">FitS</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Flow">Flow</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FlowP">FlowP</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fl_005fMathGL">Fl_MathGL</a>:</td><td> </td><td valign="top"><a href="#Widget-classes">Widget classes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fl_005fMathGL-1">Fl_MathGL</a>:</td><td> </td><td valign="top"><a href="#Fl_005fMathGL-class">Fl_MathGL class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fog">Fog</a>:</td><td> </td><td valign="top"><a href="#Fog">Fog</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Font">Font</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-fontsize">fontsize</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-for">for</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FPlot">FPlot</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FSurf">FSurf</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-func">func</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-G">G</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-GetNumFrame">GetNumFrame</a>:</td><td> </td><td valign="top"><a href="#Frames_002fAnimation">Frames/Animation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-GetNx">GetNx</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-GetNy">GetNy</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-GetNz">GetNz</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-GetWarn">GetWarn</a>:</td><td> </td><td valign="top"><a href="#Error-handling">Error handling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Glyph">Glyph</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Grad">Grad</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Grid">Grid</a>:</td><td> </td><td valign="top"><a href="#Axis-and-Colorbar">Axis and Colorbar</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Grid-1">Grid</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Grid3">Grid3</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-H">H</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Hankel">Hankel</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Hist">Hist</a>:</td><td> </td><td valign="top"><a href="#Data-manipulation">Data manipulation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Hist-1">Hist</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-I">I</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-if">if</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Import">Import</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-InPlot">InPlot</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Insert">Insert</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Integral">Integral</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-J">J</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Join">Join</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-L">L</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Label">Label</a>:</td><td> </td><td valign="top"><a href="#Axis-and-Colorbar">Axis and Colorbar</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Label-1">Label</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Last">Last</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-legend">legend</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Legend">Legend</a>:</td><td> </td><td valign="top"><a href="#Legend">Legend</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Light">Light</a>:</td><td> </td><td valign="top"><a href="#Lighting">Lighting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Line">Line</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Linear">Linear</a>:</td><td> </td><td valign="top"><a href="#Interpolation">Interpolation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Linear1">Linear1</a>:</td><td> </td><td valign="top"><a href="#Interpolation">Interpolation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Linear1-1">Linear1</a>:</td><td> </td><td valign="top"><a href="#Interpolation">Interpolation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-List">List</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-load">load</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-LoadBackground">LoadBackground</a>:</td><td> </td><td valign="top"><a href="#Background">Background</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-LoadFont">LoadFont</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-M">M</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Map">Map</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Mark">Mark</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Mark-1">Mark</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-MarkSize">MarkSize</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Max">Max</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Maximal">Maximal</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Mesh">Mesh</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-meshnum">meshnum</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-MeshNum">MeshNum</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Message">Message</a>:</td><td> </td><td valign="top"><a href="#Error-handling">Error handling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglColor">mglColor</a>:</td><td> </td><td valign="top"><a href="#mglColor-class">mglColor class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglData">mglData</a>:</td><td> </td><td valign="top"><a href="#Data-constructor">Data constructor</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglDraw">mglDraw</a>:</td><td> </td><td valign="top"><a href="#mglDraw-class">mglDraw class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglFitPnts">mglFitPnts</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglGLUT">mglGLUT</a>:</td><td> </td><td valign="top"><a href="#Widget-classes">Widget classes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglGraph">mglGraph</a>:</td><td> </td><td valign="top"><a href="#MathGL-core">MathGL core</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglParse">mglParse</a>:</td><td> </td><td valign="top"><a href="#mglParse-class">mglParse class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglPoint">mglPoint</a>:</td><td> </td><td valign="top"><a href="#mglPoint-class">mglPoint class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglWnd">mglWnd</a>:</td><td> </td><td valign="top"><a href="#Widget-classes">Widget classes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglWnd-1">mglWnd</a>:</td><td> </td><td valign="top"><a href="#mglWnd-class">mglWnd class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Min">Min</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Minimal">Minimal</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Mirror">Mirror</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Modify">Modify</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Momentum">Momentum</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Momentum-1">Momentum</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-MPI_005fRecv">MPI_Recv</a>:</td><td> </td><td valign="top"><a href="#Parallelization">Parallelization</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-MPI_005fSend">MPI_Send</a>:</td><td> </td><td valign="top"><a href="#Parallelization">Parallelization</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-MultiPlot">MultiPlot</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-N">N</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-NeedStop">NeedStop</a>:</td><td> </td><td valign="top"><a href="#Stop-drawing">Stop drawing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-NewFrame">NewFrame</a>:</td><td> </td><td valign="top"><a href="#Frames_002fAnimation">Frames/Animation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-next">next</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Norm">Norm</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-NormSl">NormSl</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-O">O</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-once">once</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Origin">Origin</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-P">P</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Palette">Palette</a>:</td><td> </td><td valign="top"><a href="#Palette-and-colors">Palette and colors</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Perspective">Perspective</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Pipe">Pipe</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Plot">Plot</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Pop">Pop</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-PrintInfo">PrintInfo</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Push">Push</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Puts">Puts</a>:</td><td> </td><td valign="top"><a href="#Text-printing">Text printing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-PutsFit">PutsFit</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Putsw">Putsw</a>:</td><td> </td><td valign="top"><a href="#Text-printing">Text printing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-Q">Q</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-QMathGL">QMathGL</a>:</td><td> </td><td valign="top"><a href="#Widget-classes">Widget classes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-QMathGL-1">QMathGL</a>:</td><td> </td><td valign="top"><a href="#QMathGL-class">QMathGL class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-QuadPlot">QuadPlot</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-R">R</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Radar">Radar</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Ranges">Ranges</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Rasterize">Rasterize</a>:</td><td> </td><td valign="top"><a href="#Background">Background</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Read">Read</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ReadAll">ReadAll</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ReadHDF">ReadHDF</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ReadMat">ReadMat</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ReadRange">ReadRange</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Rearrange">Rearrange</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Refill">Refill</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Region">Region</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ResetFrames">ResetFrames</a>:</td><td> </td><td valign="top"><a href="#Frames_002fAnimation">Frames/Animation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Resize">Resize</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-RestoreFont">RestoreFont</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-return">return</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-rkstep">rkstep</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Roll">Roll</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Roots">Roots</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Rotate">Rotate</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-RotateN">RotateN</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-RotateText">RotateText</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-S">S</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Save">Save</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SaveHDF">SaveHDF</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Set">Set</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetAlphaDef">SetAlphaDef</a>:</td><td> </td><td valign="top"><a href="#Transparency">Transparency</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetAmbient">SetAmbient</a>:</td><td> </td><td valign="top"><a href="#Lighting">Lighting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetArrowSize">SetArrowSize</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetAxisStl">SetAxisStl</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetBarWidth">SetBarWidth</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetCoor">SetCoor</a>:</td><td> </td><td valign="top"><a href="#Curved-coordinates">Curved coordinates</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetCut">SetCut</a>:</td><td> </td><td valign="top"><a href="#Cutting">Cutting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetCutBox">SetCutBox</a>:</td><td> </td><td valign="top"><a href="#Cutting">Cutting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetEventFunc">SetEventFunc</a>:</td><td> </td><td valign="top"><a href="#Stop-drawing">Stop drawing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetFontDef">SetFontDef</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetFontSize">SetFontSize</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetFontSizeCM">SetFontSizeCM</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetFontSizeIN">SetFontSizeIN</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetFontSizePT">SetFontSizePT</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetFunc">SetFunc</a>:</td><td> </td><td valign="top"><a href="#Curved-coordinates">Curved coordinates</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetLegendBox">SetLegendBox</a>:</td><td> </td><td valign="top"><a href="#Legend">Legend</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetLegendMarks">SetLegendMarks</a>:</td><td> </td><td valign="top"><a href="#Legend">Legend</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetMarkSize">SetMarkSize</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetMask">SetMask</a>:</td><td> </td><td valign="top"><a href="#Masks">Masks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetMaskAngle">SetMaskAngle</a>:</td><td> </td><td valign="top"><a href="#Masks">Masks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetMeshNum">SetMeshNum</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetOrigin">SetOrigin</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetOriginTick">SetOriginTick</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetPalette">SetPalette</a>:</td><td> </td><td valign="top"><a href="#Palette-and-colors">Palette and colors</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetPlotId">SetPlotId</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetRange">SetRange</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetRanges">SetRanges</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetRotatedText">SetRotatedText</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetSize">SetSize</a>:</td><td> </td><td valign="top"><a href="#Export-picture">Export picture</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetTickLen">SetTickLen</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetTickRotate">SetTickRotate</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetTicks">SetTicks</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetTickSkip">SetTickSkip</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetTicksVal">SetTicksVal</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetTickTempl">SetTickTempl</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetTickTime">SetTickTime</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetTranspType">SetTranspType</a>:</td><td> </td><td valign="top"><a href="#Transparency">Transparency</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetTuneTicks">SetTuneTicks</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetWarn">SetWarn</a>:</td><td> </td><td valign="top"><a href="#Error-handling">Error handling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Sew">Sew</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ShowImage">ShowImage</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SinFFT">SinFFT</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Smooth">Smooth</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Sort">Sort</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Sphere">Sphere</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Spline">Spline</a>:</td><td> </td><td valign="top"><a href="#Interpolation">Interpolation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Spline1">Spline1</a>:</td><td> </td><td valign="top"><a href="#Interpolation">Interpolation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Spline1-1">Spline1</a>:</td><td> </td><td valign="top"><a href="#Interpolation">Interpolation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Squeeze">Squeeze</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-StartGIF">StartGIF</a>:</td><td> </td><td valign="top"><a href="#Frames_002fAnimation">Frames/Animation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Stem">Stem</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Step">Step</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-STFA">STFA</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-StickPlot">StickPlot</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Stop">Stop</a>:</td><td> </td><td valign="top"><a href="#Stop-drawing">Stop drawing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-stop">stop</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SubData">SubData</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SubPlot">SubPlot</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Sum">Sum</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Surf">Surf</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Surf3">Surf3</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Surf3A">Surf3A</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Surf3C">Surf3C</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SurfA">SurfA</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SurfC">SurfC</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Swap">Swap</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-T">T</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Tape">Tape</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Tens">Tens</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Ternary">Ternary</a>:</td><td> </td><td valign="top"><a href="#Curved-coordinates">Curved coordinates</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Text">Text</a>:</td><td> </td><td valign="top"><a href="#Text-printing">Text printing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TextMark">TextMark</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TickLen">TickLen</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Tile">Tile</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TileS">TileS</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Title">Title</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Torus">Torus</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Trace">Trace</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Traj">Traj</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Transpose">Transpose</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TranspType">TranspType</a>:</td><td> </td><td valign="top"><a href="#Transparency">Transparency</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TriCont">TriCont</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TriPlot">TriPlot</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Tube">Tube</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-V">V</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-value">value</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Var">Var</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-variant">variant</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Vect">Vect</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-View">View</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-W">W</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-while">while</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-widgets">widgets</a>:</td><td> </td><td valign="top"><a href="#Using-MathGL-window">Using MathGL window</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-widgets-1">widgets</a>:</td><td> </td><td valign="top"><a href="#Widget-classes">Widget classes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-widgets-2">widgets</a>:</td><td> </td><td valign="top"><a href="#Fl_005fMathGL-class">Fl_MathGL class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-widgets-3">widgets</a>:</td><td> </td><td valign="top"><a href="#QMathGL-class">QMathGL class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-widgets-4">widgets</a>:</td><td> </td><td valign="top"><a href="#wxMathGL-class">wxMathGL class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-window">window</a>:</td><td> </td><td valign="top"><a href="#Using-MathGL-window">Using MathGL window</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-window-1">window</a>:</td><td> </td><td valign="top"><a href="#Widget-classes">Widget classes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-window-2">window</a>:</td><td> </td><td valign="top"><a href="#mglWnd-class">mglWnd class</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Write">Write</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteBMP">WriteBMP</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteBPS">WriteBPS</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteEPS">WriteEPS</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteFrame">WriteFrame</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteGIF">WriteGIF</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteJPEG">WriteJPEG</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteOBJ">WriteOBJ</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WritePNG">WritePNG</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WritePRC">WritePRC</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteSVG">WriteSVG</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteTEX">WriteTEX</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteTGA">WriteTGA</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-WriteWGL">WriteWGL</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-wxMathGL">wxMathGL</a>:</td><td> </td><td valign="top"><a href="#wxMathGL-class">wxMathGL class</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-X">X</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-xrange">xrange</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-XRange">XRange</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-XTick">XTick</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-Y">Y</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-yrange">yrange</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-YRange">YRange</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-YTick">YTick</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-Z">Z</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-zrange">zrange</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ZRange">ZRange</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ZTick">ZTick</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-Н">Н</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Nastroika-MathGL">Настройка MathGL</a>:</td><td> </td><td valign="top"><a href="#Graphics-setup">Graphics setup</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-О">О</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Obzor-MathGL">Обзор MathGL</a>:</td><td> </td><td valign="top"><a href="#Overview">Overview</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-С">С</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Stilx-linii">Стиль линий</a>:</td><td> </td><td valign="top"><a href="#Line-styles">Line styles</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Stilx-markerov">Стиль маркеров</a>:</td><td> </td><td valign="top"><a href="#Line-styles">Line styles</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Stilx-strelok">Стиль стрелок</a>:</td><td> </td><td valign="top"><a href="#Line-styles">Line styles</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Stilx-teksta">Стиль текста</a>:</td><td> </td><td valign="top"><a href="#Font-styles">Font styles</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-Т">Т</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Tekstovye-formuly">Текстовые формулы</a>:</td><td> </td><td valign="top"><a href="#Textual-formulas">Textual formulas</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-Ц">Ц</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cvetovaya-skhema">Цветовая схема</a>:</td><td> </td><td valign="top"><a href="#Color-scheme">Color scheme</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-</table>
-<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Index_cp_letter-A"><b>A</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-B"><b>B</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-C"><b>C</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-D"><b>D</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-E"><b>E</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-F"><b>F</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-G"><b>G</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-H"><b>H</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-I"><b>I</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-J"><b>J</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-L"><b>L</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-M"><b>M</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-N"><b>N</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-O"><b>O</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-P"><b>P</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Q"><b>Q</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-R"><b>R</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-S"><b>S</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-T"><b>T</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-V"><b>V</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-W"><b>W</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-X"><b>X</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Y"><b>Y</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Z"><b>Z</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Н"><b>Н</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-О"><b>О</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-С"><b>С</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Т"><b>Т</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Ц"><b>Ц</b></a>
-
-</td></tr></table>
-
-<hr>
-
-
-
-</div><script type="text/javascript" src="accordion.js"></script></body>
-</html>
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<!-- This manual is for MathGL (version 2.4.2), a collection of classes and routines for scientific plotting. Please report any errors in this manual to mathgl.abalakin@gmail.org.
-
-Copyright (C) 2008-2012 Alexey A. Balakin.
-
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
-Texts. A copy of the license is included in the section entitled "GNU
-Free Documentation License."
- -->
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>MGL script language for version 2.4.2</title>
-
-<meta name="description" content="MGL script language for version 2.4.2">
-<meta name="keywords" content="MGL script language for version 2.4.2">
-<meta name="resource-type" content="document">
-<meta name="distribution" content="global">
-<meta name="Generator" content="texi2any">
-<link href="#Top" rel="start" title="Top">
-<link href="#Index" rel="index" title="Index">
-<link href="#SEC_Contents" rel="contents" title="Table of Contents">
-<link href="dir.html#Top" rel="up" title="(dir)">
-<style type="text/css">
-<!--
-a.summary-letter {text-decoration: none}
-blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
-div.display {margin-left: 3.2em}
-div.example {margin-left: 3.2em}
-div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
-kbd {font-style: oblique}
-pre.display {font-family: inherit}
-pre.format {font-family: inherit}
-pre.menu-comment {font-family: serif}
-pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
-span.nolinebreak {white-space: nowrap}
-span.roman {font-family: initial; font-weight: normal}
-span.sansserif {font-family: sans-serif; font-weight: normal}
-ul.no-bullet {list-style: none}
--->
-</style>
-
-
-</head>
-
-<body >
-<h1 class="settitle" align="center">MGL script language for version 2.4.2</h1>
-
-
-
-
-<a name="SEC_Contents"></a>
-<h2 class="contents-heading">Table of Contents</h2>
-
-<div class="contents">
-
-<ul class="no-bullet">
- <li><a name="toc-MGL-scripts-1" href="#MGL-scripts">1 MGL scripts</a>
- <ul class="no-bullet">
- <li><a name="toc-MGL-definition-1" href="#MGL-definition">1.1 MGL definition</a></li>
- <li><a name="toc-Program-flow-commands-1" href="#Program-flow-commands">1.2 Program flow commands</a></li>
- <li><a name="toc-Special-comments-1" href="#Special-comments">1.3 Special comments</a></li>
- <li><a name="toc-LaTeX-package-1" href="#LaTeX-package">1.4 LaTeX package</a></li>
- </ul></li>
- <li><a name="toc-General-concepts-1" href="#General-concepts">2 General concepts</a>
- <ul class="no-bullet">
- <li><a name="toc-Coordinate-axes-1" href="#Coordinate-axes">2.1 Coordinate axes</a></li>
- <li><a name="toc-Color-styles-1" href="#Color-styles">2.2 Color styles</a></li>
- <li><a name="toc-Line-styles-1" href="#Line-styles">2.3 Line styles</a></li>
- <li><a name="toc-Color-scheme-1" href="#Color-scheme">2.4 Color scheme</a></li>
- <li><a name="toc-Font-styles-1" href="#Font-styles">2.5 Font styles</a></li>
- <li><a name="toc-Textual-formulas-1" href="#Textual-formulas">2.6 Textual formulas</a></li>
- <li><a name="toc-Command-options-1" href="#Command-options">2.7 Command options</a></li>
- <li><a name="toc-Interfaces-1" href="#Interfaces">2.8 Interfaces</a></li>
- </ul></li>
- <li><a name="toc-MathGL-core-1" href="#MathGL-core">3 MathGL core</a>
- <ul class="no-bullet">
- <li><a name="toc-Create-and-delete-objects" href="#Constructor">3.1 Create and delete objects</a></li>
- <li><a name="toc-Graphics-setup-1" href="#Graphics-setup">3.2 Graphics setup</a>
- <ul class="no-bullet">
- <li><a name="toc-Transparency-1" href="#Transparency">3.2.1 Transparency</a></li>
- <li><a name="toc-Lighting-1" href="#Lighting">3.2.2 Lighting</a></li>
- <li><a name="toc-Fog-1" href="#Fog">3.2.3 Fog</a></li>
- <li><a name="toc-Default-sizes-1" href="#Default-sizes">3.2.4 Default sizes</a></li>
- <li><a name="toc-Cutting-1" href="#Cutting">3.2.5 Cutting</a></li>
- <li><a name="toc-Font-settings-1" href="#Font-settings">3.2.6 Font settings</a></li>
- <li><a name="toc-Palette-and-colors-1" href="#Palette-and-colors">3.2.7 Palette and colors</a></li>
- <li><a name="toc-Masks-1" href="#Masks">3.2.8 Masks</a></li>
- <li><a name="toc-Error-handling-1" href="#Error-handling">3.2.9 Error handling</a></li>
- <li><a name="toc-Stop-drawing-1" href="#Stop-drawing">3.2.10 Stop drawing</a></li>
- </ul></li>
- <li><a name="toc-Axis-settings-1" href="#Axis-settings">3.3 Axis settings</a>
- <ul class="no-bullet">
- <li><a name="toc-Ranges-_0028bounding-box_0029-1" href="#Ranges-_0028bounding-box_0029">3.3.1 Ranges (bounding box)</a></li>
- <li><a name="toc-Curved-coordinates-1" href="#Curved-coordinates">3.3.2 Curved coordinates</a></li>
- <li><a name="toc-Ticks-1" href="#Ticks">3.3.3 Ticks</a></li>
- </ul></li>
- <li><a name="toc-Subplots-and-rotation-1" href="#Subplots-and-rotation">3.4 Subplots and rotation</a></li>
- <li><a name="toc-Export-picture-1" href="#Export-picture">3.5 Export picture</a>
- <ul class="no-bullet">
- <li><a name="toc-Export-to-file-1" href="#Export-to-file">3.5.1 Export to file</a></li>
- <li><a name="toc-Frames_002fAnimation-1" href="#Frames_002fAnimation">3.5.2 Frames/Animation</a></li>
- <li><a name="toc-Bitmap-in-memory-1" href="#Bitmap-in-memory">3.5.3 Bitmap in memory</a></li>
- <li><a name="toc-Parallelization-1" href="#Parallelization">3.5.4 Parallelization</a></li>
- </ul></li>
- <li><a name="toc-Background-1" href="#Background">3.6 Background</a></li>
- <li><a name="toc-Primitives-1" href="#Primitives">3.7 Primitives</a></li>
- <li><a name="toc-Text-printing-1" href="#Text-printing">3.8 Text printing</a></li>
- <li><a name="toc-Axis-and-Colorbar-1" href="#Axis-and-Colorbar">3.9 Axis and Colorbar</a></li>
- <li><a name="toc-Legend-1" href="#Legend">3.10 Legend</a></li>
- <li><a name="toc-1D-plotting-1" href="#g_t1D-plotting">3.11 1D plotting</a></li>
- <li><a name="toc-2D-plotting-1" href="#g_t2D-plotting">3.12 2D plotting</a></li>
- <li><a name="toc-3D-plotting-1" href="#g_t3D-plotting">3.13 3D plotting</a></li>
- <li><a name="toc-Dual-plotting-1" href="#Dual-plotting">3.14 Dual plotting</a></li>
- <li><a name="toc-Vector-fields-1" href="#Vector-fields">3.15 Vector fields</a></li>
- <li><a name="toc-Other-plotting-1" href="#Other-plotting">3.16 Other plotting</a></li>
- <li><a name="toc-Nonlinear-fitting-1" href="#Nonlinear-fitting">3.17 Nonlinear fitting</a></li>
- <li><a name="toc-Data-manipulation-1" href="#Data-manipulation">3.18 Data manipulation</a></li>
- </ul></li>
- <li><a name="toc-Data-processing-1" href="#Data-processing">4 Data processing</a>
- <ul class="no-bullet">
- <li><a name="toc-Public-variables-1" href="#Public-variables">4.1 Public variables</a></li>
- <li><a name="toc-Data-constructor-1" href="#Data-constructor">4.2 Data constructor</a></li>
- <li><a name="toc-Data-resizing-1" href="#Data-resizing">4.3 Data resizing</a></li>
- <li><a name="toc-Data-filling-1" href="#Data-filling">4.4 Data filling</a></li>
- <li><a name="toc-File-I_002fO-1" href="#File-I_002fO">4.5 File I/O</a></li>
- <li><a name="toc-Make-another-data-1" href="#Make-another-data">4.6 Make another data</a></li>
- <li><a name="toc-Data-changing-1" href="#Data-changing">4.7 Data changing</a></li>
- <li><a name="toc-Interpolation-1" href="#Interpolation">4.8 Interpolation</a></li>
- <li><a name="toc-Data-information-1" href="#Data-information">4.9 Data information</a></li>
- <li><a name="toc-Operators-1" href="#Operators">4.10 Operators</a></li>
- <li><a name="toc-Global-functions-1" href="#Global-functions">4.11 Global functions</a></li>
- <li><a name="toc-Evaluate-expression-1" href="#Evaluate-expression">4.12 Evaluate expression</a></li>
- <li><a name="toc-Special-data-classes-1" href="#Special-data-classes">4.13 Special data classes</a></li>
- </ul></li>
- <li><a name="toc-MathGL-examples" href="#Examples">5 MathGL examples</a>
- <ul class="no-bullet">
- <li><a name="toc-Basic-usage-1" href="#Basic-usage">5.1 Basic usage</a></li>
- <li><a name="toc-Advanced-usage-1" href="#Advanced-usage">5.2 Advanced usage</a>
- <ul class="no-bullet">
- <li><a name="toc-Subplots-1" href="#Subplots">5.2.1 Subplots</a></li>
- <li><a name="toc-Axis-and-ticks-1" href="#Axis-and-ticks">5.2.2 Axis and ticks</a></li>
- <li><a name="toc-Curvilinear-coordinates-1" href="#Curvilinear-coordinates">5.2.3 Curvilinear coordinates</a></li>
- <li><a name="toc-Colorbars-1" href="#Colorbars">5.2.4 Colorbars</a></li>
- <li><a name="toc-Bounding-box-1" href="#Bounding-box">5.2.5 Bounding box</a></li>
- <li><a name="toc-Ternary-axis-1" href="#Ternary-axis">5.2.6 Ternary axis</a></li>
- <li><a name="toc-Text-features-1" href="#Text-features">5.2.7 Text features</a></li>
- <li><a name="toc-Legend-sample-1" href="#Legend-sample">5.2.8 Legend sample</a></li>
- <li><a name="toc-Cutting-sample-1" href="#Cutting-sample">5.2.9 Cutting sample</a></li>
- </ul></li>
- <li><a name="toc-Data-handling-1" href="#Data-handling">5.3 Data handling</a>
- <ul class="no-bullet">
- <li><a name="toc-Array-creation-1" href="#Array-creation">5.3.1 Array creation</a></li>
- <li><a name="toc-Change-data-1" href="#Change-data">5.3.2 Change data</a></li>
- </ul></li>
- <li><a name="toc-Data-plotting-1" href="#Data-plotting">5.4 Data plotting</a></li>
- <li><a name="toc-Hints-1" href="#Hints">5.5 Hints</a>
- <ul class="no-bullet">
- <li><a name="toc-_0060_0060Compound_0027_0027-graphics-1" href="#g_t_0060_0060Compound_0027_0027-graphics">5.5.1 “Compound” graphics</a></li>
- <li><a name="toc-Transparency-and-lighting-1" href="#Transparency-and-lighting">5.5.2 Transparency and lighting</a></li>
- <li><a name="toc-Types-of-transparency-1" href="#Types-of-transparency">5.5.3 Types of transparency</a></li>
- <li><a name="toc-Axis-projection-1" href="#Axis-projection">5.5.4 Axis projection</a></li>
- <li><a name="toc-Adding-fog-1" href="#Adding-fog">5.5.5 Adding fog</a></li>
- <li><a name="toc-Lighting-sample-1" href="#Lighting-sample">5.5.6 Lighting sample</a></li>
- <li><a name="toc-Using-primitives-1" href="#Using-primitives">5.5.7 Using primitives</a></li>
- <li><a name="toc-STFA-sample-1" href="#STFA-sample">5.5.8 STFA sample</a></li>
- <li><a name="toc-Mapping-visualization-1" href="#Mapping-visualization">5.5.9 Mapping visualization</a></li>
- <li><a name="toc-Data-interpolation-1" href="#Data-interpolation">5.5.10 Data interpolation</a></li>
- <li><a name="toc-Making-regular-data-1" href="#Making-regular-data">5.5.11 Making regular data</a></li>
- <li><a name="toc-Making-histogram-1" href="#Making-histogram">5.5.12 Making histogram</a></li>
- <li><a name="toc-Nonlinear-fitting-hints-1" href="#Nonlinear-fitting-hints">5.5.13 Nonlinear fitting hints</a></li>
- <li><a name="toc-PDE-solving-hints-1" href="#PDE-solving-hints">5.5.14 PDE solving hints</a></li>
- <li><a name="toc-Drawing-phase-plain-1" href="#Drawing-phase-plain">5.5.15 Drawing phase plain</a></li>
- <li><a name="toc-Pulse-properties-1" href="#Pulse-properties">5.5.16 Pulse properties</a></li>
- <li><a name="toc-Using-MGL-parser-1" href="#Using-MGL-parser">5.5.17 Using MGL parser</a></li>
- <li><a name="toc-Using-options-1" href="#Using-options">5.5.18 Using options</a></li>
- <li><a name="toc-_0060_0060Templates_0027_0027-1" href="#g_t_0060_0060Templates_0027_0027">5.5.19 “Templates”</a></li>
- <li><a name="toc-Stereo-image-1" href="#Stereo-image">5.5.20 Stereo image</a></li>
- <li><a name="toc-Reduce-memory-usage-1" href="#Reduce-memory-usage">5.5.21 Reduce memory usage</a></li>
- <li><a name="toc-Scanning-file" href="#Saving-and-scanning-file">5.5.22 Scanning file</a></li>
- <li><a name="toc-Mixing-bitmap-and-vector-output-1" href="#Mixing-bitmap-and-vector-output">5.5.23 Mixing bitmap and vector output</a></li>
- </ul></li>
- <li><a name="toc-FAQ-1" href="#FAQ">5.6 FAQ</a></li>
- </ul></li>
- <li><a name="toc-All-samples-1" href="#All-samples">6 All samples</a>
- <ul class="no-bullet">
- <li><a name="toc-Functions-for-initialization" href="#initialization-sample">6.1 Functions for initialization</a></li>
- <li><a name="toc-Sample-3wave" href="#g_t3wave-sample">6.2 Sample `<samp>3wave</samp>`</a></li>
- <li><a name="toc-Sample-alpha" href="#alpha-sample">6.3 Sample `<samp>alpha</samp>`</a></li>
- <li><a name="toc-Sample-apde" href="#apde-sample">6.4 Sample `<samp>apde</samp>`</a></li>
- <li><a name="toc-Sample-area" href="#area-sample">6.5 Sample `<samp>area</samp>`</a></li>
- <li><a name="toc-Sample-aspect" href="#aspect-sample">6.6 Sample `<samp>aspect</samp>`</a></li>
- <li><a name="toc-Sample-axial" href="#axial-sample">6.7 Sample `<samp>axial</samp>`</a></li>
- <li><a name="toc-Sample-axis" href="#axis-sample">6.8 Sample `<samp>axis</samp>`</a></li>
- <li><a name="toc-Sample-barh" href="#barh-sample">6.9 Sample `<samp>barh</samp>`</a></li>
- <li><a name="toc-Sample-bars" href="#bars-sample">6.10 Sample `<samp>bars</samp>`</a></li>
- <li><a name="toc-Sample-belt" href="#belt-sample">6.11 Sample `<samp>belt</samp>`</a></li>
- <li><a name="toc-Sample-bifurcation" href="#bifurcation-sample">6.12 Sample `<samp>bifurcation</samp>`</a></li>
- <li><a name="toc-Sample-box" href="#box-sample">6.13 Sample `<samp>box</samp>`</a></li>
- <li><a name="toc-Sample-boxplot" href="#boxplot-sample">6.14 Sample `<samp>boxplot</samp>`</a></li>
- <li><a name="toc-Sample-boxs" href="#boxs-sample">6.15 Sample `<samp>boxs</samp>`</a></li>
- <li><a name="toc-Sample-candle" href="#candle-sample">6.16 Sample `<samp>candle</samp>`</a></li>
- <li><a name="toc-Sample-chart" href="#chart-sample">6.17 Sample `<samp>chart</samp>`</a></li>
- <li><a name="toc-Sample-cloud" href="#cloud-sample">6.18 Sample `<samp>cloud</samp>`</a></li>
- <li><a name="toc-Sample-colorbar" href="#colorbar-sample">6.19 Sample `<samp>colorbar</samp>`</a></li>
- <li><a name="toc-Sample-combined" href="#combined-sample">6.20 Sample `<samp>combined</samp>`</a></li>
- <li><a name="toc-Sample-cones" href="#cones-sample">6.21 Sample `<samp>cones</samp>`</a></li>
- <li><a name="toc-Sample-cont" href="#cont-sample">6.22 Sample `<samp>cont</samp>`</a></li>
- <li><a name="toc-Sample-cont3" href="#cont3-sample">6.23 Sample `<samp>cont3</samp>`</a></li>
- <li><a name="toc-Sample-cont_005fxyz" href="#cont_005fxyz-sample">6.24 Sample `<samp>cont_xyz</samp>`</a></li>
- <li><a name="toc-Sample-contd" href="#contd-sample">6.25 Sample `<samp>contd</samp>`</a></li>
- <li><a name="toc-Sample-contf" href="#contf-sample">6.26 Sample `<samp>contf</samp>`</a></li>
- <li><a name="toc-Sample-contf3" href="#contf3-sample">6.27 Sample `<samp>contf3</samp>`</a></li>
- <li><a name="toc-Sample-contf_005fxyz" href="#contf_005fxyz-sample">6.28 Sample `<samp>contf_xyz</samp>`</a></li>
- <li><a name="toc-Sample-contv" href="#contv-sample">6.29 Sample `<samp>contv</samp>`</a></li>
- <li><a name="toc-Sample-correl" href="#correl-sample">6.30 Sample `<samp>correl</samp>`</a></li>
- <li><a name="toc-Sample-curvcoor" href="#curvcoor-sample">6.31 Sample `<samp>curvcoor</samp>`</a></li>
- <li><a name="toc-Sample-cut" href="#cut-sample">6.32 Sample `<samp>cut</samp>`</a></li>
- <li><a name="toc-Sample-dat_005fdiff" href="#dat_005fdiff-sample">6.33 Sample `<samp>dat_diff</samp>`</a></li>
- <li><a name="toc-Sample-dat_005fextra" href="#dat_005fextra-sample">6.34 Sample `<samp>dat_extra</samp>`</a></li>
- <li><a name="toc-Sample-data1" href="#data1-sample">6.35 Sample `<samp>data1</samp>`</a></li>
- <li><a name="toc-Sample-data2" href="#data2-sample">6.36 Sample `<samp>data2</samp>`</a></li>
- <li><a name="toc-Sample-dens" href="#dens-sample">6.37 Sample `<samp>dens</samp>`</a></li>
- <li><a name="toc-Sample-dens3" href="#dens3-sample">6.38 Sample `<samp>dens3</samp>`</a></li>
- <li><a name="toc-Sample-dens_005fxyz" href="#dens_005fxyz-sample">6.39 Sample `<samp>dens_xyz</samp>`</a></li>
- <li><a name="toc-Sample-detect" href="#detect-sample">6.40 Sample `<samp>detect</samp>`</a></li>
- <li><a name="toc-Sample-dew" href="#dew-sample">6.41 Sample `<samp>dew</samp>`</a></li>
- <li><a name="toc-Sample-diffract" href="#diffract-sample">6.42 Sample `<samp>diffract</samp>`</a></li>
- <li><a name="toc-Sample-dilate" href="#dilate-sample">6.43 Sample `<samp>dilate</samp>`</a></li>
- <li><a name="toc-Sample-dots" href="#dots-sample">6.44 Sample `<samp>dots</samp>`</a></li>
- <li><a name="toc-Sample-earth" href="#earth-sample">6.45 Sample `<samp>earth</samp>`</a></li>
- <li><a name="toc-Sample-error" href="#error-sample">6.46 Sample `<samp>error</samp>`</a></li>
- <li><a name="toc-Sample-error2" href="#error2-sample">6.47 Sample `<samp>error2</samp>`</a></li>
- <li><a name="toc-Sample-export" href="#export-sample">6.48 Sample `<samp>export</samp>`</a></li>
- <li><a name="toc-Sample-fall" href="#fall-sample">6.49 Sample `<samp>fall</samp>`</a></li>
- <li><a name="toc-Sample-fexport" href="#fexport-sample">6.50 Sample `<samp>fexport</samp>`</a></li>
- <li><a name="toc-Sample-fit" href="#fit-sample">6.51 Sample `<samp>fit</samp>`</a></li>
- <li><a name="toc-Sample-flame2d" href="#flame2d-sample">6.52 Sample `<samp>flame2d</samp>`</a></li>
- <li><a name="toc-Sample-flow" href="#flow-sample">6.53 Sample `<samp>flow</samp>`</a></li>
- <li><a name="toc-Sample-flow3" href="#flow3-sample">6.54 Sample `<samp>flow3</samp>`</a></li>
- <li><a name="toc-Sample-fog" href="#fog-sample">6.55 Sample `<samp>fog</samp>`</a></li>
- <li><a name="toc-Sample-fonts" href="#fonts-sample">6.56 Sample `<samp>fonts</samp>`</a></li>
- <li><a name="toc-Sample-grad" href="#grad-sample">6.57 Sample `<samp>grad</samp>`</a></li>
- <li><a name="toc-Sample-hist" href="#hist-sample">6.58 Sample `<samp>hist</samp>`</a></li>
- <li><a name="toc-Sample-ifs2d" href="#ifs2d-sample">6.59 Sample `<samp>ifs2d</samp>`</a></li>
- <li><a name="toc-Sample-ifs3d" href="#ifs3d-sample">6.60 Sample `<samp>ifs3d</samp>`</a></li>
- <li><a name="toc-Sample-indirect" href="#indirect-sample">6.61 Sample `<samp>indirect</samp>`</a></li>
- <li><a name="toc-Sample-inplot" href="#inplot-sample">6.62 Sample `<samp>inplot</samp>`</a></li>
- <li><a name="toc-Sample-iris" href="#iris-sample">6.63 Sample `<samp>iris</samp>`</a></li>
- <li><a name="toc-Sample-label" href="#label-sample">6.64 Sample `<samp>label</samp>`</a></li>
- <li><a name="toc-Sample-lamerey" href="#lamerey-sample">6.65 Sample `<samp>lamerey</samp>`</a></li>
- <li><a name="toc-Sample-legend" href="#legend-sample">6.66 Sample `<samp>legend</samp>`</a></li>
- <li><a name="toc-Sample-light" href="#light-sample">6.67 Sample `<samp>light</samp>`</a></li>
- <li><a name="toc-Sample-loglog" href="#loglog-sample">6.68 Sample `<samp>loglog</samp>`</a></li>
- <li><a name="toc-Sample-map" href="#map-sample">6.69 Sample `<samp>map</samp>`</a></li>
- <li><a name="toc-Sample-mark" href="#mark-sample">6.70 Sample `<samp>mark</samp>`</a></li>
- <li><a name="toc-Sample-mask" href="#mask-sample">6.71 Sample `<samp>mask</samp>`</a></li>
- <li><a name="toc-Sample-mesh" href="#mesh-sample">6.72 Sample `<samp>mesh</samp>`</a></li>
- <li><a name="toc-Sample-mirror" href="#mirror-sample">6.73 Sample `<samp>mirror</samp>`</a></li>
- <li><a name="toc-Sample-molecule" href="#molecule-sample">6.74 Sample `<samp>molecule</samp>`</a></li>
- <li><a name="toc-Sample-ode" href="#ode-sample">6.75 Sample `<samp>ode</samp>`</a></li>
- <li><a name="toc-Sample-ohlc" href="#ohlc-sample">6.76 Sample `<samp>ohlc</samp>`</a></li>
- <li><a name="toc-Sample-param1" href="#param1-sample">6.77 Sample `<samp>param1</samp>`</a></li>
- <li><a name="toc-Sample-param2" href="#param2-sample">6.78 Sample `<samp>param2</samp>`</a></li>
- <li><a name="toc-Sample-param3" href="#param3-sample">6.79 Sample `<samp>param3</samp>`</a></li>
- <li><a name="toc-Sample-paramv" href="#paramv-sample">6.80 Sample `<samp>paramv</samp>`</a></li>
- <li><a name="toc-Sample-parser" href="#parser-sample">6.81 Sample `<samp>parser</samp>`</a></li>
- <li><a name="toc-Sample-pde" href="#pde-sample">6.82 Sample `<samp>pde</samp>`</a></li>
- <li><a name="toc-Sample-pendelta" href="#pendelta-sample">6.83 Sample `<samp>pendelta</samp>`</a></li>
- <li><a name="toc-Sample-pipe" href="#pipe-sample">6.84 Sample `<samp>pipe</samp>`</a></li>
- <li><a name="toc-Sample-plot" href="#plot-sample">6.85 Sample `<samp>plot</samp>`</a></li>
- <li><a name="toc-Sample-pmap" href="#pmap-sample">6.86 Sample `<samp>pmap</samp>`</a></li>
- <li><a name="toc-Sample-primitives" href="#primitives-sample">6.87 Sample `<samp>primitives</samp>`</a></li>
- <li><a name="toc-Sample-projection" href="#projection-sample">6.88 Sample `<samp>projection</samp>`</a></li>
- <li><a name="toc-Sample-projection5" href="#projection5-sample">6.89 Sample `<samp>projection5</samp>`</a></li>
- <li><a name="toc-Sample-pulse" href="#pulse-sample">6.90 Sample `<samp>pulse</samp>`</a></li>
- <li><a name="toc-Sample-qo2d" href="#qo2d-sample">6.91 Sample `<samp>qo2d</samp>`</a></li>
- <li><a name="toc-Sample-quality0" href="#quality0-sample">6.92 Sample `<samp>quality0</samp>`</a></li>
- <li><a name="toc-Sample-quality1" href="#quality1-sample">6.93 Sample `<samp>quality1</samp>`</a></li>
- <li><a name="toc-Sample-quality2" href="#quality2-sample">6.94 Sample `<samp>quality2</samp>`</a></li>
- <li><a name="toc-Sample-quality4" href="#quality4-sample">6.95 Sample `<samp>quality4</samp>`</a></li>
- <li><a name="toc-Sample-quality5" href="#quality5-sample">6.96 Sample `<samp>quality5</samp>`</a></li>
- <li><a name="toc-Sample-quality6" href="#quality6-sample">6.97 Sample `<samp>quality6</samp>`</a></li>
- <li><a name="toc-Sample-quality8" href="#quality8-sample">6.98 Sample `<samp>quality8</samp>`</a></li>
- <li><a name="toc-Sample-radar" href="#radar-sample">6.99 Sample `<samp>radar</samp>`</a></li>
- <li><a name="toc-Sample-refill" href="#refill-sample">6.100 Sample `<samp>refill</samp>`</a></li>
- <li><a name="toc-Sample-region" href="#region-sample">6.101 Sample `<samp>region</samp>`</a></li>
- <li><a name="toc-Sample-scanfile" href="#scanfile-sample">6.102 Sample `<samp>scanfile</samp>`</a></li>
- <li><a name="toc-Sample-schemes" href="#schemes-sample">6.103 Sample `<samp>schemes</samp>`</a></li>
- <li><a name="toc-Sample-section" href="#section-sample">6.104 Sample `<samp>section</samp>`</a></li>
- <li><a name="toc-Sample-several_005flight" href="#several_005flight-sample">6.105 Sample `<samp>several_light</samp>`</a></li>
- <li><a name="toc-Sample-solve" href="#solve-sample">6.106 Sample `<samp>solve</samp>`</a></li>
- <li><a name="toc-Sample-stem" href="#stem-sample">6.107 Sample `<samp>stem</samp>`</a></li>
- <li><a name="toc-Sample-step" href="#step-sample">6.108 Sample `<samp>step</samp>`</a></li>
- <li><a name="toc-Sample-stereo" href="#stereo-sample">6.109 Sample `<samp>stereo</samp>`</a></li>
- <li><a name="toc-Sample-stfa" href="#stfa-sample">6.110 Sample `<samp>stfa</samp>`</a></li>
- <li><a name="toc-Sample-style" href="#style-sample">6.111 Sample `<samp>style</samp>`</a></li>
- <li><a name="toc-Sample-surf" href="#surf-sample">6.112 Sample `<samp>surf</samp>`</a></li>
- <li><a name="toc-Sample-surf3" href="#surf3-sample">6.113 Sample `<samp>surf3</samp>`</a></li>
- <li><a name="toc-Sample-surf3a" href="#surf3a-sample">6.114 Sample `<samp>surf3a</samp>`</a></li>
- <li><a name="toc-Sample-surf3c" href="#surf3c-sample">6.115 Sample `<samp>surf3c</samp>`</a></li>
- <li><a name="toc-Sample-surf3ca" href="#surf3ca-sample">6.116 Sample `<samp>surf3ca</samp>`</a></li>
- <li><a name="toc-Sample-surfa" href="#surfa-sample">6.117 Sample `<samp>surfa</samp>`</a></li>
- <li><a name="toc-Sample-surfc" href="#surfc-sample">6.118 Sample `<samp>surfc</samp>`</a></li>
- <li><a name="toc-Sample-surfca" href="#surfca-sample">6.119 Sample `<samp>surfca</samp>`</a></li>
- <li><a name="toc-Sample-table" href="#table-sample">6.120 Sample `<samp>table</samp>`</a></li>
- <li><a name="toc-Sample-tape" href="#tape-sample">6.121 Sample `<samp>tape</samp>`</a></li>
- <li><a name="toc-Sample-tens" href="#tens-sample">6.122 Sample `<samp>tens</samp>`</a></li>
- <li><a name="toc-Sample-ternary" href="#ternary-sample">6.123 Sample `<samp>ternary</samp>`</a></li>
- <li><a name="toc-Sample-text" href="#text-sample">6.124 Sample `<samp>text</samp>`</a></li>
- <li><a name="toc-Sample-text2" href="#text2-sample">6.125 Sample `<samp>text2</samp>`</a></li>
- <li><a name="toc-Sample-textmark" href="#textmark-sample">6.126 Sample `<samp>textmark</samp>`</a></li>
- <li><a name="toc-Sample-ticks" href="#ticks-sample">6.127 Sample `<samp>ticks</samp>`</a></li>
- <li><a name="toc-Sample-tile" href="#tile-sample">6.128 Sample `<samp>tile</samp>`</a></li>
- <li><a name="toc-Sample-tiles" href="#tiles-sample">6.129 Sample `<samp>tiles</samp>`</a></li>
- <li><a name="toc-Sample-torus" href="#torus-sample">6.130 Sample `<samp>torus</samp>`</a></li>
- <li><a name="toc-Sample-traj" href="#traj-sample">6.131 Sample `<samp>traj</samp>`</a></li>
- <li><a name="toc-Sample-triangulation" href="#triangulation-sample">6.132 Sample `<samp>triangulation</samp>`</a></li>
- <li><a name="toc-Sample-triplot" href="#triplot-sample">6.133 Sample `<samp>triplot</samp>`</a></li>
- <li><a name="toc-Sample-tube" href="#tube-sample">6.134 Sample `<samp>tube</samp>`</a></li>
- <li><a name="toc-Sample-type0" href="#type0-sample">6.135 Sample `<samp>type0</samp>`</a></li>
- <li><a name="toc-Sample-type1" href="#type1-sample">6.136 Sample `<samp>type1</samp>`</a></li>
- <li><a name="toc-Sample-type2" href="#type2-sample">6.137 Sample `<samp>type2</samp>`</a></li>
- <li><a name="toc-Sample-vect" href="#vect-sample">6.138 Sample `<samp>vect</samp>`</a></li>
- <li><a name="toc-Sample-vect3" href="#vect3-sample">6.139 Sample `<samp>vect3</samp>`</a></li>
- <li><a name="toc-Sample-_0027venn_0027" href="#venn-sample">6.140 Sample `venn`</a></li>
- </ul></li>
- <li><a name="toc-Symbols-and-hot_002dkeys-1" href="#Symbols-and-hot_002dkeys">Appendix A Symbols and hot-keys</a>
- <ul class="no-bullet">
- <li><a name="toc-Symbols-for-styles-1" href="#Symbols-for-styles">A.1 Symbols for styles</a></li>
- <li><a name="toc-Hot_002dkeys-for-mglview-1" href="#Hot_002dkeys-for-mglview">A.2 Hot-keys for mglview</a></li>
- <li><a name="toc-Hot_002dkeys-for-UDAV-1" href="#Hot_002dkeys-for-UDAV">A.3 Hot-keys for UDAV</a></li>
- </ul></li>
- <li><a name="toc-GNU-Free-Documentation-License" href="#Copying-This-Manual">Appendix B GNU Free Documentation License</a></li>
- <li><a name="toc-Index-1" href="#Index">Index</a></li>
-</ul>
-</div>
-
-
-<a name="Top"></a>
-<div class="header">
-<p>
-Next: <a href="#MGL-scripts" accesskey="n" rel="next">MGL scripts</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="MGL-script-language"></a>
-<h1 class="top">MGL script language</h1>
-
-<p>This file documents the MGL script language. It corresponds to release 2.4.2 of the MathGL library. Please report any errors in this manual to <a href="mailto:mathgl.abalakin@gmail.org">mathgl.abalakin@gmail.org</a>. More information about MGL and MathGL can be found at the project homepage, <a href="http://mathgl.sourceforge.net/">http://mathgl.sourceforge.net/</a>.
-</p>
-<p>Copyright © 2008-2012 Alexey A. Balakin.
-</p>
-<blockquote>
-<p>Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
-Texts. A copy of the license is included in the section entitled “GNU
-Free Documentation License.”
-</p></blockquote>
-
-
-
-<table class="menu" border="0" cellspacing="0">
-<tr><th colspan="3" align="left" valign="top"></th></tr><tr><td align="left" valign="top">• <a href="#MGL-scripts" accesskey="1">MGL scripts</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#General-concepts" accesskey="2">General concepts</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#MathGL-core" accesskey="3">MathGL core</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-processing" accesskey="4">Data processing</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Examples" accesskey="5">Examples</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#All-samples" accesskey="6">All samples</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Symbols-and-hot_002dkeys" accesskey="7">Symbols and hot-keys</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Copying-This-Manual" accesskey="8">Copying This Manual</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Index" accesskey="9">Index</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-
-
-
-<hr>
-<a name="MGL-scripts"></a>
-<div class="header">
-<p>
-Next: <a href="#General-concepts" accesskey="n" rel="next">General concepts</a>, Previous: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-
-<a name="MGL-scripts-1"></a>
-<h2 class="chapter">1 MGL scripts</h2>
-
-
-<p>MathGL library supports the simplest scripts for data handling and plotting. These scripts can be used independently (with the help of UDAV, mglconv, mglview programs and others
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#MGL-definition" accesskey="1">MGL definition</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Program-flow-commands" accesskey="2">Program flow commands</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Special-comments" accesskey="3">Special comments</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#LaTeX-package" accesskey="4">LaTeX package</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-
-<hr>
-<a name="MGL-definition"></a>
-<div class="header">
-<p>
-Next: <a href="#Program-flow-commands" accesskey="n" rel="next">Program flow commands</a>, Up: <a href="#MGL-scripts" accesskey="u" rel="up">MGL scripts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="MGL-definition-1"></a>
-<h3 class="section">1.1 MGL definition</h3>
-
-
-<p>MGL script language is rather simple. Each string is a command. First word of string is the name of command. Other words are command arguments. Words are separated from each other by space or tabulation symbol. The upper or lower case of words is important, i.e. variables <var>a</var> and <var>A</var> are different variables. Symbol `<samp>#</samp>` starts the comment (all characters after # will be ignored). The exception is situation when `<samp>#</samp>` is a part of some string. Also options can be specified after symbol `<samp>;</samp>` (see <a href="#Command-options">Command options</a>). Symbol `<samp>:</samp>` starts new command (like new line character) if it is not placed inside a string or inside brackets.
-</p>
-<p>If string contain references to external parameters (substrings `<samp>$0</samp>`, `<samp>$1</samp>` ... `<samp>$9</samp>`) or definitions (substrings `<samp>$a</samp>`, `<samp>$b</samp>` ... `<samp>$z</samp>`) then before execution the values of parameter/definition will be substituted instead of reference. It allows to use the same MGL script for different parameters (filenames, paths, condition and so on).
-</p>
-<p>Argument can be a string, a variable (data arrays) or a number (scalars).
-</p><ul>
-<li> The string is any symbols between ordinary marks `<samp>'</samp>`. Long strings can be concatenated from several lines by `<samp>\</samp>` symbol. I.e. the string `<samp>'a +\<br> b'</samp>` will give string `<samp>'a + b'</samp>` (here `<samp><br></samp>` is newline). There are several operations which can be performed with string:
-<ul>
-<li> Concatenation of strings and numbers using `<samp>,</samp>` with out spaces (for example, `<samp>'max(u)=',u.max,' a.u.'</samp>` or `<samp>'u=',!(1+i2)</samp>` for complex numbers);
-</li><li> Getting n-th symbol of the string using `<samp>[]</samp>` (for example, `<samp>'abc'[1]</samp>` will give <code>'b'</code>);
-</li><li> Adding value to the last character of the string using `<samp>+</samp>` (for example, `<samp>'abc'+3</samp>` will give <code>'abf'</code>).
-</li></ul>
-
-</li><li> Usually variable have a name which is arbitrary combination of symbols (except spaces and `<samp>'</samp>`) started from a letter. Note, you can start an expression with `<samp>!</samp>` symbol if you want to use complex values. For example, the code <code>new x 100 'x':copy !b !exp(1i*x)</code> will create real valued data <var>x</var> and complex data <var>b</var>, which is equal to <em>exp(I*x)</em>, where <em>I^2=-1</em>. A temporary array can be used as variable too:
-<ul>
-<li> sub-arrays (like in <a href="#subdata">subdata</a> command) as command argument. For example, <code>a(1)</code> or <code>a(1,:)</code> or <code>a(1,:,:)</code> is second row, <code>a(:,2)</code> or <code>a(:,2,:)</code> is third column, <code>a(:,:,0)</code> is first slice and so on. Also you can extract a part of array from m-th to n-th element by code <code>a(m:n,:,:)</code> or just <code>a(m:n)</code>.
-
-</li><li> any column combinations defined by formulas, like <code>a('n*w^2/exp(t)')</code> if names for data columns was specified (by <a href="#idset">idset</a> command or in the file at string started with <code>##</code>).
-
-</li><li> any expression (without spaces) of existed variables produce temporary variable. For example, `<samp>sqrt(dat(:,5)+1)</samp>` will produce temporary variable with data values equal to <code>tmp[i,j] = sqrt(dat[i,5,j]+1)</code>. At this symbol `<samp>`</samp>` will return transposed data array: both `<samp>`sqrt(dat(:,5)+1)</samp>` and `<samp>sqrt(`dat(:,5)+1)</samp>` will produce temporary variable with data values equal to <code>tmp[i,j] = sqrt(dat[j,5,i]+1)</code>.
-
-</li><li> temporary variable of higher dimensions by help of []. For example, `<samp>[1,2,3]</samp>` will produce a temporary vector of 3 elements {1, 2, 3}; `<samp>[[11,12],[21,22]]</samp>` will produce matrix 2*2 and so on. Here you can join even an arrays of the same dimensions by construction like `<samp>[v1,v2,...,vn]</samp>`.
-
-</li><li> result of code for making new data (see <a href="#Make-another-data">Make another data</a>) inside {}. For example, `<samp>{sum dat 'x'}</samp>` produce temporary variable which contain result of summation of <var>dat</var> along direction `x`. This is the same array <var>tmp</var> as produced by command `<samp>sum tmp dat 'x'</samp>`. You can use nested constructions, like `<samp>{sum {max dat 'z'} 'x'}</samp>`.
-</li></ul>
-<p>Temporary variables can not be used as 1st argument for commands which create (return) the data (like `<samp>new</samp>`, `<samp>read</samp>`, `<samp>hist</samp>` and so on).
-</p>
-</li><li> Special names <code>nan=#QNAN, inf=INFINITY, rnd=random value, pi=3.1415926..., on=1, off=0, all=-1, :=-1</code>, variables with suffixes (see <a href="#Data-information">Data information</a>), names defined by <a href="#define">define</a> command, time values (in format "hh-mm-ss_DD.MM.YYYY", "hh-mm-ss" or "DD.MM.YYYY") are treated as number. Also results of formulas with sizes 1x1x1 are treated as number (for example, `<samp>pi/dat.nx</samp>`).
-</li></ul>
-<p>Before the first using all variables must be defined with the help of commands, like, <a href="#new">new</a>, <a href="#var">var</a>, <a href="#list">list</a>, <a href="#copy">copy</a>, <a href="#read">read</a>, <a href="#hist">hist</a>, <a href="#sum">sum</a> and so on (see sections <a href="#Data-constructor">Data constructor</a>, <a href="#Data-filling">Data filling</a> and <a href="#Make-another-data">Make another data</a>).
-</p>
-<p>Command may have several set of possible arguments (for example, <code>plot ydat</code> and <code>plot xdat ydat</code>). All command arguments for a selected set must be specified. However, some arguments can have default values. These argument are printed in [], like <code>text ydat ['stl'='']</code> or <code>text x y 'txt' ['fnt'='' size=-1]</code>. At this, the record <code>[arg1 arg2 arg3 ...]</code> means <code>[arg1 [arg2 [arg3 ...]]]</code>, i.e. you can omit only tailing arguments if you agree with its default values. For example, <code>text x y 'txt' '' 1</code> or <code>text x y 'txt' ''</code> is correct, but <code>text x y 'txt' 1</code> is incorrect (argument <code>'fnt'</code> is missed).
-</p>
-<p>You can provide several variants of arguments for a command by using `<samp>?</samp>` symbol for separating them. The actual argument being used is set by <a href="#variant">variant</a>. At this, the last argument is used if the value of <a href="#variant">variant</a> is large than the number of provided variants. By default the first argument is used (i.e. as for <code>variant 0</code>). For example, the first plot will be drawn by blue (default is the first argument `<samp>b</samp>`), but the plot after <code>variant 1</code> will be drawn by red dash (the second is `<samp>r|</samp>`):
-</p><pre class="verbatim">fplot 'x' 'b'?'r'
-variant 1
-fplot 'x^3' 'b'?'r|'
-</pre>
-
-
-<hr>
-<a name="Program-flow-commands"></a>
-<div class="header">
-<p>
-Next: <a href="#Special-comments" accesskey="n" rel="next">Special comments</a>, Previous: <a href="#MGL-definition" accesskey="p" rel="prev">MGL definition</a>, Up: <a href="#MGL-scripts" accesskey="u" rel="up">MGL scripts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Program-flow-commands-1"></a>
-<h3 class="section">1.2 Program flow commands</h3>
-
-
-<p>Below I show commands to control program flow, like, conditions, loops, define script arguments and so on. Other commands can be found in chapters <a href="#MathGL-core">MathGL core</a> and <a href="#Data-processing">Data processing</a>. Note, that some of program flow commands (like <a href="#define">define</a>, <a href="#ask">ask</a>, <a href="#call">call</a>, <a href="#for">for</a>, <a href="#func">func</a>) should be placed alone in the string.
-</p>
-<a name="index-chdir"></a>
-<a name="chdir"></a><dl>
-<dt><a name="index-chdir-1"></a>MGL command: <em></em> <strong>chdir</strong> <em>'path'</em></dt>
-<dd><p>Changes the current directory to <var>path</var>.
-</p></dd></dl>
-
-<a name="index-ask"></a>
-<a name="ask"></a><dl>
-<dt><a name="index-ask-1"></a>MGL command: <em></em> <strong>ask</strong> <em>$N 'question'</em></dt>
-<dd><p>Sets <var>N</var>-th script argument to answer which give the user on the <var>question</var>. Usually this show dialog with question where user can enter some text as answer. Here <var>N</var> is digit (0...9) or alpha (a...z).
-</p></dd></dl>
-
-<a name="index-define"></a>
-<a name="define"></a><dl>
-<dt><a name="index-define-1"></a>MGL command: <em></em> <strong>define</strong> <em>$N smth</em></dt>
-<dd><p>Sets <var>N</var>-th script argument to <var>smth</var>. Note, that <var>smth</var> is used as is (with `<samp>'</samp>` symbols if present). Here <var>N</var> is digit (0...9) or alpha (a...z).
-</p></dd></dl>
-<dl>
-<dt><a name="index-define-2"></a>MGL command: <em></em> <strong>define</strong> <em>name smth</em></dt>
-<dd><p>Create scalar variable <code>name</code> which have the numeric value of <code>smth</code>. Later you can use this variable as usual number.
-</p></dd></dl>
-<a name="index-defchr"></a>
-<a name="defchr"></a><dl>
-<dt><a name="index-defchr-1"></a>MGL command: <em></em> <strong>defchr</strong> <em>$N smth</em></dt>
-<dd><p>Sets <var>N</var>-th script argument to character with value evaluated from <var>smth</var>. Here <var>N</var> is digit (0...9) or alpha (a...z).
-</p></dd></dl>
-<a name="index-defnum"></a>
-<a name="defnum"></a><dl>
-<dt><a name="index-defnum-1"></a>MGL command: <em></em> <strong>defnum</strong> <em>$N smth</em></dt>
-<dd><p>Sets <var>N</var>-th script argument to number with value evaluated from <var>smth</var>. Here <var>N</var> is digit (0...9) or alpha (a...z).
-</p></dd></dl>
-
-
-<a name="index-call"></a>
-<a name="call"></a><dl>
-<dt><a name="index-call-1"></a>MGL command: <em></em> <strong>call</strong> <em>'funcname' [ARG1 ARG2 ... ARG9]</em></dt>
-<dd><p>Executes function <var>fname</var> (or script if function is not found). Optional arguments will be passed to functions. See also <a href="#func">func</a>.
-</p></dd></dl>
-<a name="index-func"></a>
-<a name="func"></a><dl>
-<dt><a name="index-func-1"></a>MGL command: <em></em> <strong>func</strong> <em>'funcname' [narg=0]</em></dt>
-<dd><p>Define the function <var>fname</var> and number of required arguments. The arguments will be placed in script parameters $1, $2, ... $9. Note, script execution is stopped at <code>func</code> keyword, similarly to <a href="#stop">stop</a> command. See also <a href="#return">return</a>.
-</p></dd></dl>
-<a name="index-return"></a>
-<a name="return"></a><dl>
-<dt><a name="index-return-1"></a>MGL command: <em></em> <strong>return</strong></dt>
-<dd><p>Return from the function. See also <a href="#func">func</a>.
-</p></dd></dl>
-
-<a name="index-load"></a>
-<a name="load"></a><dl>
-<dt><a name="index-load-1"></a>MGL command: <em></em> <strong>load</strong> <em>'filename'</em></dt>
-<dd><p>Load additional MGL command from external module (DLL or .so), located in file <var>filename</var>. This module have to contain array with name <code>mgl_cmd_extra</code> of type <code>mglCommand</code>, which describe provided commands.
-</p></dd></dl>
-
-
-<a name="index-if"></a>
-<a name="if"></a><a name="then"></a><dl>
-<dt><a name="index-if-1"></a>MGL command: <em></em> <strong>if</strong> <em><code>val</code> <strong>then</strong> <code>CMD</code></em></dt>
-<dd><p>Executes command <code>CMD</code> only if <code>val</code> is nonzero.
-</p></dd></dl>
-<dl>
-<dt><a name="index-if-2"></a>MGL command: <em></em> <strong>if</strong> <em><code>val</code></em></dt>
-<dd><p>Starts block which will be executed if <code>val</code> is nonzero.
-</p></dd></dl>
-<dl>
-<dt><a name="index-if-3"></a>MGL command: <em></em> <strong>if</strong> <em>dat 'cond'</em></dt>
-<dd><p>Starts block which will be executed if <var>dat</var> satisfy to <var>cond</var>.
-</p></dd></dl>
-<a name="index-elseif"></a>
-<a name="elseif"></a><dl>
-<dt><a name="index-elseif-1"></a>MGL command: <em></em> <strong>elseif</strong> <em><code>val</code></em></dt>
-<dd><p>Starts block which will be executed if previous <code>if</code> or <code>elseif</code> is false and <code>val</code> is nonzero.
-</p></dd></dl>
-<dl>
-<dt><a name="index-elseif-2"></a>MGL command: <em></em> <strong>elseif</strong> <em>dat 'cond'</em></dt>
-<dd><p>Starts block which will be executed if previous <code>if</code> or <code>elseif</code> is false and <var>dat</var> satisfy to <var>cond</var>.
-</p></dd></dl>
-<a name="index-else"></a>
-<a name="else"></a><dl>
-<dt><a name="index-else-1"></a>MGL command: <em></em> <strong>else</strong></dt>
-<dd><p>Starts block which will be executed if previous <code>if</code> or <code>elseif</code> is false.
-</p></dd></dl>
-<a name="index-endif"></a>
-<a name="endif"></a><dl>
-<dt><a name="index-endif-1"></a>MGL command: <em></em> <strong>endif</strong></dt>
-<dd><p>Finishes <code>if/elseif/else</code> block.
-</p></dd></dl>
-
-<a name="index-for"></a>
-<a name="for"></a><dl>
-<dt><a name="index-for-1"></a>MGL command: <em></em> <strong>for</strong> <em>$N <code>v1 v2 [dv=1]</code></em></dt>
-<dd><p>Starts loop with $<var>N</var>-th argument changing from <var>v1</var> to <var>v2</var> with the step <var>dv</var>. Here <var>N</var> is digit (0...9) or alpha (a...z).
-</p></dd></dl>
-<dl>
-<dt><a name="index-for-2"></a>MGL command: <em></em> <strong>for</strong> <em>$N dat</em></dt>
-<dd><p>Starts loop with $<var>N</var>-th argument changing for <var>dat</var> values. Here <var>N</var> is digit (0...9) or alpha (a...z).
-</p></dd></dl>
-<a name="index-next"></a>
-<a name="next"></a><dl>
-<dt><a name="index-next-1"></a>MGL command: <em></em> <strong>next</strong></dt>
-<dd><p>Finishes <code>for</code> loop.
-</p></dd></dl>
-
-<a name="index-do"></a>
-<a name="do"></a><dl>
-<dt><a name="index-do-1"></a>MGL command: <em></em> <strong>do</strong></dt>
-<dd><p>Starts infinite loop.
-</p></dd></dl>
-<a name="index-while"></a>
-<a name="while"></a><dl>
-<dt><a name="index-while-1"></a>MGL command: <em></em> <strong>while</strong> <em><code>val</code></em></dt>
-<dd><p>Continue loop iterations if <var>val</var> is nonzero, or finishes loop otherwise.
-</p></dd></dl>
-<dl>
-<dt><a name="index-while-2"></a>MGL command: <em></em> <strong>while</strong> <em>dat 'cond'</em></dt>
-<dd><p>Continue loop iterations if <var>dat</var> satisfy to <var>cond</var>, or finishes loop otherwise.
-</p></dd></dl>
-
-<a name="index-once"></a>
-<a name="once"></a><dl>
-<dt><a name="index-once-1"></a>MGL command: <em></em> <strong>once</strong> <em><code>val</code></em></dt>
-<dd><p>The code between <code>once on</code> and <code>once off</code> will be executed only once. Useful for large data manipulation in programs like UDAV.
-</p></dd></dl>
-<a name="index-stop"></a>
-<a name="stop"></a><dl>
-<dt><a name="index-stop-1"></a>MGL command: <em></em> <strong>stop</strong></dt>
-<dd><p>Terminate execution.
-</p></dd></dl>
-
-<a name="index-variant"></a>
-<a name="variant"></a><dl>
-<dt><a name="index-variant-1"></a>MGL command: <em></em> <strong>variant</strong> <em><code>val</code></em></dt>
-<dd><p>Set variant of argument(s) separated by `<samp>?</samp>` symbol to be used in further commands.
-</p></dd></dl>
-
-
-<a name="index-rkstep"></a>
-<a name="rkstep"></a><dl>
-<dt><a name="index-rkstep-1"></a>MGL command: <em></em> <strong>rkstep</strong> <em>eq1;... var1;... [<code>dt=1</code>]</em></dt>
-<dd><p>Make one step for ordinary differential equation(s) {var1` = eq1, ... } with time-step <var>dt</var>. Here variable(s) `<samp>var1</samp>`, ... are the ones, defined in MGL script previously. The Runge-Kutta 4-th order method is used for solution.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Special-comments"></a>
-<div class="header">
-<p>
-Next: <a href="#LaTeX-package" accesskey="n" rel="next">LaTeX package</a>, Previous: <a href="#Program-flow-commands" accesskey="p" rel="prev">Program flow commands</a>, Up: <a href="#MGL-scripts" accesskey="u" rel="up">MGL scripts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Special-comments-1"></a>
-<h3 class="section">1.3 Special comments</h3>
-
-
-<p>There are number of special comments for MGL script, which set some global behavior (like, animation, dialog for parameters and so on). All these special comments starts with double sign <code>##</code>. Let consider them.
-</p>
-<dl compact="compact">
-<dt>`<samp><strong>##c</strong> <code>v1 v2 [dv=1]</code></samp>`</dt>
-<dd><p>Sets the parameter for animation loop relative to variable <code>$0</code>. Here <var>v1</var> and <var>v2</var> are initial and final values, <var>dv</var> is the increment.
-</p>
-</dd>
-<dt>`<samp><strong>##a</strong> val</samp>`</dt>
-<dd><p>Adds the parameter <var>val</var> to the list of animation relative to variable <code>$0</code>. You can use it several times (one parameter per line) or combine it with animation loop <strong>##c</strong>.
-</p>
-</dd>
-<dt>`<samp><strong>##d</strong> $I kind|label|par1|par2|...</samp>`</dt>
-<dd><p>Creates custom dialog for changing plot properties. Each line adds one widget to the dialog. Here <var>$I</var> is id ($0,$1...$9,$a,$b...$z), <var>label</var> is the label of widget, <var>kind</var> is the kind of the widget:
-</p><ul>
-<li> `e` for editor or input line (parameter is initial value) ,
-</li><li> `v` for spinner or counter (parameters are "ini|min|max|step|big_step"),
-</li><li> `s` for slider (parameters are "ini|min|max|step"),
-</li><li> `b` for check box (parameter is "ini"; also understand "on"=1),
-</li><li> `c` for choice (parameters are possible choices).
-</li></ul>
-<p>Now, it work in FLTK-based <code>mgllab</code> and <code>mglview</code> only.
-</p>
-
-</dd>
-</dl>
-
-
-<hr>
-<a name="LaTeX-package"></a>
-<div class="header">
-<p>
-Previous: <a href="#Special-comments" accesskey="p" rel="prev">Special comments</a>, Up: <a href="#MGL-scripts" accesskey="u" rel="up">MGL scripts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="LaTeX-package-1"></a>
-<h3 class="section">1.4 LaTeX package</h3>
-
-
-<p>There is LaTeX package <code>mgltex</code> (was made by Diego Sejas Viscarra) which allow one to make figures directly from MGL script located in LaTeX file.
-</p>
-<p>For using this package you need to specify <code>--shell-escape</code> option for <em>latex/pdflatex</em> or manually run <em>mglconv</em> tool with produced MGL scripts for generation of images. Don`t forgot to run <em>latex/pdflatex</em> second time to insert generated images into the output document. Also you need to run <em>pdflatex</em> third time to update converted from EPS images if you are using vector EPS output (default).
-</p>
-<p>The package may have following options: <code>draft</code>, <code>final</code> — the same as in the <em>graphicx</em> package; <code>on</code>, <code>off</code> — to activate/deactivate the creation of scripts and graphics; <code>comments</code>, <code>nocomments</code> — to make visible/invisible comments contained inside <code>mglcomment</code> environments; <code>jpg</code>, <code>jpeg</code>, <code>png</code> — to export graphics as JPEG/PNG images; <code>eps</code>, <code>epsz</code> — to export to uncompressed/compressed EPS format as primitives; <code>bps</code>, <code>bpsz</code> — to export to uncompressed/compressed EPS format as bitmap (doesn`t work with <em>pdflatex</em>); <code>pdf</code> — to export to 3D PDF; <code>tex</code> — to export to <em>LaTeX/tikz</em> document.
-</p>
-<p>The package defines the following environments:
-</p><dl compact="compact">
-<dt>`<samp>mgl</samp>`</dt>
-<dd><p>It writes its contents to a general script which has the same name as the LaTeX document, but its extension is <em>.mgl</em>. The code in this environment is compiled and the image produced is included. It takes exactly the same optional arguments as the <code>\includegraphics</code> command, plus an additional argument <var>imgext</var>, which specifies the extension to save the image.
-</p>
-<p>An example of usage of `<samp>mgl</samp>` environment would be:
-</p><pre class="verbatim">\begin{mglfunc}{prepare2d}
- new a 50 40 '0.6*sin(pi*(x+1))*sin(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
- new b 50 40 '0.6*cos(pi*(x+1))*cos(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-\end{mglfunc}
-
-\begin{figure}[!ht]
- \centering
- \begin{mgl}[width=0.85\textwidth,height=7.5cm]
- fog 0.5
- call 'prepare2d'
- subplot 2 2 0 : title 'Surf plot (default)' : rotate 50 60 : light on : box : surf a
-
- subplot 2 2 1 : title '"\#" style; meshnum 10' : rotate 50 60 : box
- surf a '#'; meshnum 10
-
- subplot 2 2 2 : title 'Mesh plot' : rotate 50 60 : box
- mesh a
-
- new x 50 40 '0.8*sin(pi*x)*sin(pi*(y+1)/2)'
- new y 50 40 '0.8*cos(pi*x)*sin(pi*(y+1)/2)'
- new z 50 40 '0.8*cos(pi*(y+1)/2)'
- subplot 2 2 3 : title 'parametric form' : rotate 50 60 : box
- surf x y z 'BbwrR'
- \end{mgl}
-\end{figure}
-</pre>
-</dd>
-<dt>`<samp>mgladdon</samp>`</dt>
-<dd><p>It adds its contents to the general script, without producing any image.
-</p></dd>
-<dt>`<samp>mglcode</samp>`</dt>
-<dd><p>Is exactly the same as `<samp>mgl</samp>`, but it writes its contents verbatim to its own file, whose name is specified as a mandatory argument.
-</p></dd>
-<dt>`<samp>mglscript</samp>`</dt>
-<dd><p>Is exactly the same as `<samp>mglcode</samp>`, but it doesn`t produce any image, nor accepts optional arguments. It is useful, for example, to create a MGL script, which can later be post processed by another package like "listings".
-</p></dd>
-<dt>`<samp>mglblock</samp>`</dt>
-<dd><p>It writes its contents verbatim to a file, specified as a mandatory argument, and to the LaTeX document, and numerates each line of code.
-</p>
-</dd>
-<dt>`<samp>mglverbatim</samp>`</dt>
-<dd><p>Exactly the same as `<samp>mglblock</samp>`, but it doesn`t write to a file. This environment doesn`t have arguments.
-</p></dd>
-<dt>`<samp>mglfunc</samp>`</dt>
-<dd><p>Is used to define MGL functions. It takes one mandatory argument, which is the name of the function, plus one additional argument, which specifies the number of arguments of the function. The environment needs to contain only the body of the function, since the first and last lines are appended automatically, and the resulting code is written at the end of the general script, after the <a href="#stop">stop</a> command, which is also written automatically. The warning is produced if 2 or more function with the same name is defined.
-</p></dd>
-<dt>`<samp>mglcomment</samp>`</dt>
-<dd><p>Is used to contain multiline comments. This comments will be visible/invisible in the output document, depending on the use of the package options <code>comments</code> and <code>nocomments</code> (see above), or the <code>\mglcomments</code> and <code>\mglnocomments</code> commands (see bellow).
-</p></dd>
-<dt>`<samp>mglsetup</samp>`</dt>
-<dd><p>If many scripts with the same code are to be written, the repetitive code can be written inside this environment only once, then this code will be used automatically every time the `<samp>\mglplot</samp>` command is used (see below). It takes one optional argument, which is a name to be associated to the corresponding contents of the environment; this name can be passed to the `<samp>\mglplot</samp>` command to use the corresponding block of code automatically (see below).
-</p></dd>
-</dl>
-
-<p>The package also defines the following commands:
-</p><dl compact="compact">
-<dt>`<samp>\mglplot</samp>`</dt>
-<dd><p>It takes one mandatory argument, which is MGL instructions separated by the symbol `<samp>:</samp>` this argument can be more than one line long. It takes the same optional arguments as the `<samp>mgl</samp>` environment, plus an additional argument <var>setup</var>, which indicates the name associated to a block of code inside a `<samp>mglsetup</samp>` environment. The code inside the mandatory argument will be appended to the block of code specified, and the resulting code will be written to the general script.
-</p>
-<p>An example of usage of `<samp>\mglplot</samp>` command would be:
-</p><pre class="verbatim">\begin{mglsetup}
- box '@{W9}' : axis
-\end{mglsetup}
-\begin{mglsetup}[2d]
- box : axis
- grid 'xy' ';k'
-\end{mglsetup}
-\begin{mglsetup}[3d]
- rotate 50 60
- box : axis : grid 'xyz' ';k'
-\end{mglsetup}
-\begin{figure}[!ht]
- \centering
- \mglplot[scale=0.5]{new a 200 'sin(pi*x)' : plot a '2B'}
-\end{figure}
-\begin{figure}[!ht]
- \centering
- \mglplot[scale=0.5,setup=2d]{
- fplot 'sin(pi*x)' '2B' :
- fplot 'cos(pi*x^2)' '2R'
- }
-\end{figure}
-\begin{figure}[!ht]
- \centering
- \mglplot[setup=3d]{fsurf 'sin(pi*x)+cos(pi*y)'}
-\end{figure}
-</pre>
-</dd>
-<dt>`<samp>\mglgraphics</samp>`</dt>
-<dd><p>This command takes the same optional arguments as the `<samp>mgl</samp>` environment, and one mandatory argument, which is the name of a MGL script. This command will compile the corresponding script and include the resulting image. It is useful when you have a script outside the LaTeX document, and you want to include the image, but you don`t want to type the script again.
-</p></dd>
-<dt>`<samp>\mglinclude</samp>`</dt>
-<dd><p>This is like `<samp>\mglgraphics</samp>` but, instead of creating/including the corresponding image, it writes the contents of the MGL script to the LaTeX document, and numerates the lines.
-</p></dd>
-<dt>`<samp>\mgldir</samp>`</dt>
-<dd><p>This command can be used in the preamble of the document to specify a directory where LaTeX will save the MGL scripts and generate the corresponding images. This directory is also where `<samp>\mglgraphics</samp>` and `<samp>\mglinclude</samp>` will look for scripts.
-</p></dd>
-<dt>`<samp>\mglquality</samp>`</dt>
-<dd><p>Adjust the quality of the MGL graphics produced similarly to <a href="#quality">quality</a>.
-</p></dd>
-<dt>`<samp>\mgltexon, \mgltexoff</samp>`</dt>
-<dd><p>Activate/deactivate the creation of MGL scripts and images. Notice these commands have local behavior in the sense that their effect is from the point they are called on.
-</p></dd>
-<dt>`<samp>\mglcomment, \mglnocomment</samp>`</dt>
-<dd><p>Make visible/invisible the contents of the <code>mglcomment</code> environments. These commands have local effect too.
-</p></dd>
-<dt>`<samp>\mglTeX</samp>`</dt>
-<dd><p>It just pretty prints the name of the package.
-</p></dd>
-</dl>
-
-<p>As an additional feature, when an image is not found or cannot be included, instead of issuing an error, <code>mgltex</code> prints a box with the word `<samp>MGL image not found</samp>` in the LaTeX document.
-</p>
-
-
-
-
-
-
-<hr>
-<a name="General-concepts"></a>
-<div class="header">
-<p>
-Next: <a href="#MathGL-core" accesskey="n" rel="next">MathGL core</a>, Previous: <a href="#MGL-scripts" accesskey="p" rel="prev">MGL scripts</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="General-concepts-1"></a>
-<h2 class="chapter">2 General concepts</h2>
-
-
-<p>The set of MathGL features is rather rich - just the number of basic graphics types
-is larger than 50. Also there are functions for data handling, plot setup and so on. In spite of it I tried to keep a similar style in function names and in the order of arguments. Mostly it is
-used for different drawing functions.
-</p>
-<p>There are six most general (base) concepts:
-</p><ol>
-<li> <strong>Any picture is created in memory first.</strong> The internal (memory) representation can be different: bitmap picture (for <code>SetQuality(MGL_DRAW_LMEM)</code> or <code><a href="#quality">quality</a> 6</code>) or the list of vector primitives (default). After that the user may decide what he/she want: save to file, display on the screen, run animation, do additional editing and so on. This approach assures a high portability of the program - the source code will produce exactly the same picture in <em>any</em> OS. Another big positive consequence is the ability to create the picture in the console program (using command line, without creating a window)!
-</li><li> <strong>Every plot settings (style of lines, font, color scheme) are specified by a string.</strong> It provides convenience for user/programmer - short string with parameters is more comprehensible than a large set of parameters. Also it provides portability - the strings are the same in any OS so that it is not necessary to think about argument types.
-</li><li> <strong>All functions have “simplified” and “advanced” forms.</strong> It is done for user`s convenience. One needs to specify only one data array in the “simplified” form in order to see the result. But one may set parametric dependence of coordinates and produce rather complex curves and surfaces in the “advanced” form. In both cases the order of function arguments is the same: first data arrays, second the string with style, and later string with options for additional plot tuning.
-</li><li> <strong>All data arrays for plotting are encapsulated in mglData(A) class.</strong> This reduces the number of errors while working with memory and provides a uniform interface for data of different types (mreal, double and so on) or for formula plotting.
-</li><li> <strong>All plots are vector plots.</strong> The MathGL library is intended for handling scientific data which have vector nature (lines, faces, matrices and so on). As a result, vector representation is used in all cases! In addition, the vector representation allows one to scale the plot easily - change the canvas size by a factor of 2, and the picture will be proportionally scaled.
-</li><li> <strong>New drawing never clears things drawn already.</strong> This, in some sense, unexpected, idea allows to create a lot of “combined” graphics. For example, to make a surface with contour lines one needs to call the function for surface plotting and the function for contour lines plotting (in any order). Thus the special functions for making this “combined” plots (as it is done in Matlab and some other plotting systems) are superfluous.
-</li></ol>
-
-<p>In addition to the general concepts I want to comment on some non-trivial or less commonly used general ideas - plot positioning, axis specification and curvilinear coordinates, styles for lines, text and color scheme.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Coordinate-axes" accesskey="1">Coordinate axes</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Color-styles" accesskey="2">Color styles</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Line-styles" accesskey="3">Line styles</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Color-scheme" accesskey="4">Color scheme</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Font-styles" accesskey="5">Font styles</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Textual-formulas" accesskey="6">Textual formulas</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Command-options" accesskey="7">Command options</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Interfaces" accesskey="8">Interfaces</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Coordinate-axes"></a>
-<div class="header">
-<p>
-Next: <a href="#Color-styles" accesskey="n" rel="next">Color styles</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Coordinate-axes-1"></a>
-<h3 class="section">2.1 Coordinate axes</h3>
-
-
-<p>Two axis representations are used in MathGL. The first one consists of normalizing coordinates of data points in axis range (see <a href="#Axis-settings">Axis settings</a>). If <code>SetCut()</code> is <code>true</code> then the outlier points are omitted, otherwise they are projected to the bounding box (see <a href="#Cutting">Cutting</a>). Also, the point will be omitted if it lies inside the box defined by <code>SetCutBox()</code> or if the value of formula <code>CutOff()</code> is nonzero for its coordinates. After that, transformation formulas defined by <code>SetFunc()</code> or <code>SetCoor()</code> are applied to the data point (see <a href="#Curved-coordinates">Curved coordinates</a>). Finally, the data point is plotted by one of the functions.
-</p>
-<p>The range of <em>x, y, z</em>-axis can be specified by <code>SetRange()</code> or <a href="#ranges">ranges</a> functions. Its origin is specified by <a href="#origin">origin</a> function. At this you can you can use <code>NAN</code> values for selecting axis origin automatically.
-</p>
-<p>There is 4-th axis <em>c</em> (color axis or colorbar) in addition to the usual axes <em>x, y, z</em>. It sets the range of values for the surface coloring. Its borders are automatically set to values of z-range during the call of <a href="#ranges">ranges</a> function. Also, one can directly set it by call <code>SetRange('c', ...)</code>. Use <a href="#colorbar">colorbar</a> function for drawing the colorbar.
-</p>
-<p>The form (appearence) of tick labels is controlled by <code>SetTicks()</code> function (see <a href="#Ticks">Ticks</a>). Function <var>SetTuneTicks</var> switches on/off tick enhancing by factoring out acommon multiplier (for small coordinate values, like 0.001 to 0.002, or large, like from 1000 to 2000) or common component (for narrow range, like from 0.999 to 1.000). Finally, you may use functions <code>SetTickTempl()</code> for setting templates for tick labels (it supports TeX symbols). Also, there is a possibility to print arbitrary text as tick labels the by help of <code>SetTicksVal()</code> function.
-</p>
-
-<hr>
-<a name="Color-styles"></a>
-<div class="header">
-<p>
-Next: <a href="#Line-styles" accesskey="n" rel="next">Line styles</a>, Previous: <a href="#Coordinate-axes" accesskey="p" rel="prev">Coordinate axes</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Color-styles-1"></a>
-<h3 class="section">2.2 Color styles</h3>
-
-
-<p>Base colors are defined by one of symbol `<samp>wkrgbcymhRGBCYMHWlenupqLENUPQ</samp>`.
-<p>The color types are: `<samp>k</samp>` - black, `<samp>r</samp>` - <span style="color: rgb(255, 0, 0);">red</span>, `<samp>R</samp>` - <span style="color: rgb(127, 0, 0);">dark red</span>, `<samp>g</samp>` - <span style="color: rgb(0, 255, 0);">green</span>, `<samp>G</samp>` - <span style="color: rgb(0, 127, 0);">dark green</span>, `<samp>b</samp>` - <span style="color: rgb(0, 0, 255);">blue</span>, `<samp>B</samp>` - <span style="color: rgb(0, 0, 127);">dark blue</span>, `<samp>c</samp>` - <span style="color: rgb(0, 255, 255);">cyan</span>, `<samp>C</samp>` - <span style="color: rgb(0, 127, 127);">dark cyan</span>, `<samp>m</samp>` - <span style="color: rgb(255, 0, 255);">magenta</span>, `<samp>M</samp>` - <span style="color: rgb(127, 0, 127);">dark magenta</span>, `<samp>y</samp>` - <span style="color: rgb(255, 255, 0);">yellow</span>, `<samp>Y</samp>` - <span style="color: rgb(127, 127, 0);">dark yellow (gold)</span>, `<samp>h</samp>` - <span style="color: rgb(127, 127, 127);">gray</span>, `<samp>H</samp>` - <span style="color: rgb(76, 76, 76);">dark gray</span>, `<samp>w</samp>` - white, `<samp>W</samp>` - <span style="color: rgb(178, 178, 178);">bright gray</span>, `<samp>l</samp>` - <span style="color: rgb(0, 255, 127);">green-blue</span>, `<samp>L</samp>` - <span style="color: rgb(0, 127, 63);">dark green-blue</span>, `<samp>e</samp>` - <span style="color: rgb(127, 255, 0);">green-yellow</span>, `<samp>E</samp>` - <span style="color: rgb(63, 127, 0);">dark green-yellow</span>, `<samp>n</samp>` - <span style="color: rgb(0, 127, 255);">sky-blue</span>, `<samp>N</samp>` - <span style="color: rgb(0, 63, 127);">dark sky-blue</span>, `<samp>u</samp>` - <span style="color: rgb(127, 0, 255);">blue-violet</span>, `<samp>U</samp>` - <span style="color: rgb(63, 0, 127);">dark blue-violet</span>, `<samp>p</samp>` - <span style="color: rgb(255, 0, 127);">purple</span>, `<samp>P</samp>` - <span style="color: rgb(127, 0, 63);">dark purple</span>, `<samp>q</samp>` - <span style="color: rgb(255, 127, 0);">orange</span>, `<samp>Q</samp>` - <span style="color: rgb(127, 63, 0);">dark orange (brown)</span>.</p>
-</p>
-<p>You can also use “bright” colors. The “bright” color contain 2 symbols in brackets `<samp>{cN}</samp>`: first one is the usual symbol for color id, the second one is a digit for its brightness. The digit can be in range `<samp>1</samp>`...`<samp>9</samp>`. Number `<samp>5</samp>` corresponds to a normal color, `<samp>1</samp>` is a very dark version of the color (practically black), and `<samp>9</samp>` is a very bright version of the color (practically white). For example, the colors can be `<samp>{b2}</samp>` `<samp>{b7}</samp>` `<samp>{r7}</samp>` and so on.
-</p>
-<p>Finally, you can specify RGB or RGBA values of a color using format `<samp>{xRRGGBB}</samp>` or `<samp>{xRRGGBBAA}</samp>` correspondingly. For example, `<samp>{xFF9966}</samp>` give you
-<span style="color: rgb(255, 153, 102);">melone</span> color.
-</p>
-
-<hr>
-<a name="Line-styles"></a>
-<div class="header">
-<p>
-Next: <a href="#Color-scheme" accesskey="n" rel="next">Color scheme</a>, Previous: <a href="#Color-styles" accesskey="p" rel="prev">Color styles</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Line-styles-1"></a>
-<h3 class="section">2.3 Line styles</h3>
-
-
-<a name="index-Line-style"></a>
-<a name="index-Mark-style"></a>
-<a name="index-Arrows"></a>
-
-<p>The line style is defined by the string which may contain specifications for color (`<samp>wkrgbcymhRGBCYMHWlenupqLENUPQ</samp>`), dashing style (`<samp>-|;:ji=</samp>` or space), width (`<samp>123456789</samp>`) and marks (`<samp>*o+xsd.^v<></samp>` and `<samp>#</samp>` modifier). If one of the type of information is omitted then default values used with next color from palette (see <a href="#Palette-and-colors">Palette and colors</a>). Note, that internal color counter will be nullified by any change of palette. This includes even hidden change (for example, by <a href="#box">box</a> or <a href="#axis">axis</a> functions).
-By default palette contain following colors: <span style="color: rgb(76, 76, 76);">dark gray</span> `<samp>H</samp>`, <span style="color: rgb(0, 0, 255);">blue</span> `<samp>b</samp>`, <span style="color: rgb(0, 255, 0);">green</span> `<samp>g</samp>`, <span style="color: rgb(255, 0, 0);">red</span> `<samp>r</samp>`, <span style="color: rgb(0, 255, 255);">cyan</span> `<samp>c</samp>`, <span style="color: rgb(255, 0, 255);">magenta</span> `<samp>m</samp>`, <span style="color: rgb(255, 255, 0);">yellow</span> `<samp>y</samp>`, <span style="color: rgb(127, 127, 127);">gray</span> `<samp>h</samp>`, <span style="color: rgb(0, 255, 127);">green-blue</span> `<samp>l</samp>`, <span style="color: rgb(0, 127, 255);">sky-blue</span> `<samp>n</samp>`, <span style="color: rgb(255, 127, 0);">orange</span> `<samp>q</samp>`, <span style="color: rgb(127, 255, 0);">green-yellow</span> `<samp>e</samp>`, <span style="color: rgb(127, 0, 255);">blue-violet</span> `<samp>u</samp>`, <span style="color: rgb(255, 0, 127);">purple</span> `<samp>p</samp>`.
-
-<p>Dashing style has the following meaning: space - no line (usable for plotting only marks), `<samp>-</samp>` - solid line (■■■■■■■■■■■■■■■■), `<samp>|</samp>` - long dashed line (■■■■■■■■□□□□□□□□), `<samp>;</samp>` - dashed line (■■■■□□□□■■■■□□□□), `<samp>=</samp>` - small dashed line (■■□□■■□□■■□□■■□□), `<samp>:</samp>` - dotted line (■□□□■□□□■□□□■□□□), `<samp>j</samp>` - dash-dotted line (■■■■■■■□□□□■□□□□), `<samp>i</samp>` - small dash-dotted line (■■■□□■□□■■■□□■□□), `<samp>{dNNNN}</samp>` - manual mask style (for v.2.3 and later, like `<samp>{df090}</samp>` for (■■■■□□□□■□□■□□□□)).</p>
-</p>
-<p>Marker types are: `<samp>o</samp>` - circle, `<samp>+</samp>` - cross, `<samp>x</samp>` - skew cross, `<samp>s</samp>` - square, `<samp>d</samp>` - rhomb (or diamond), `<samp>.</samp>` - dot (point), `<samp>^</samp>` - triangle up, `<samp>v</samp>` - triangle down, `<samp><</samp>` - triangle left, `<samp>></samp>` - triangle right, `<samp>#*</samp>` - Y sign, `<samp>#+</samp>` - squared cross, `<samp>#x</samp>` - squared skew cross, `<samp>#.</samp>` - circled dot. If string contain symbol `<samp>#</samp>` then the solid versions of markers are used.
-</p>
-<p>You can provide user-defined symbols (see <a href="#addsymbol">addsymbol</a>) to draw it as marker by using `<samp>&</samp>` style. In particular, `<samp>&*</samp>`, `<samp>&o</samp>`, `<samp>&+</samp>`, `<samp>&x</samp>`, `<samp>&s</samp>`, `<samp>&d</samp>`, `<samp>&.</samp>`, `<samp>&^</samp>`, `<samp>&v</samp>`, `<samp>&<</samp>`, `<samp>&></samp>` will draw user-defined symbol `<samp>*o+xsd.^v<></samp>` correspondingly; and
-`<samp>&#o</samp>`, `<samp>&#+</samp>`, `<samp>&#x</samp>`, `<samp>&#s</samp>`, `<samp>&#d</samp>`, `<samp>&#.</samp>`, `<samp>&#^</samp>`, `<samp>&#v</samp>`, `<samp>&#<</samp>`, `<samp>&#></samp>` will draw user-defined symbols `<samp>YOPXSDCTVLR</samp>` correspondingly. Note, that wired version of user-defined symbols will be drawn if you set negative marker size (see <a href="#marksize">marksize</a> or <code>size</code> in <a href="#Command-options">Command options</a>).
-</p>
-<p>One may specify to draw a special symbol (an arrow) at the beginning and at the end of line. This is done if the specification string contains one of the following symbols: `<samp>A</samp>` - outer arrow, `<samp>V</samp>` - inner arrow, `<samp>I</samp>` - transverse hatches, `<samp>K</samp>` - arrow with hatches, `<samp>T</samp>` - triangle, `<samp>S</samp>` - square, `<samp>D</samp>` - rhombus, `<samp>O</samp>` - circle, `<samp>X</samp>` - skew cross, `<samp>_</samp>` - nothing (the default). The following rule applies: the first symbol specifies the arrow at the end of line, the second specifies the arrow at the beginning of the line. For example, `<samp>r-A</samp>` defines a red solid line with usual arrow at the end, `<samp>b|AI</samp>` defines a blue dash line with an arrow at the end and with hatches at the beginning, `<samp>_O</samp>` defines a line with the current style and with a circle at the beginning. These styles are applicable during the graphics plotting as well (for example, <a href="#g_t1D-plotting">1D plotting</a>).
-</p>
-<div align="center"><img src="png/style.png" alt="Color and line styles.">
-</div>
-
-<hr>
-<a name="Color-scheme"></a>
-<div class="header">
-<p>
-Next: <a href="#Font-styles" accesskey="n" rel="next">Font styles</a>, Previous: <a href="#Line-styles" accesskey="p" rel="prev">Line styles</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Color-scheme-1"></a>
-<h3 class="section">2.4 Color scheme</h3>
-
-
-<a name="index-Color-scheme"></a>
-
-<p>The color scheme is used for determining the color of surfaces, isolines, isosurfaces and so on. The color scheme is defined by the string, which may contain several characters that are color id (see <a href="#Line-styles">Line styles</a>) or characters `<samp>#:|</samp>`. Symbol `<samp>#</samp>` switches to mesh drawing or to a wire plot. Symbol `<samp>|</samp>` disables color interpolation in color scheme, which can be useful, for example, for sharp colors during matrix plotting. Symbol `<samp>:</samp>` terminate the color scheme parsing. Following it, the user may put styles for the text, rotation axis for curves/isocontours, and so on. Color scheme may contain up to 32 color values.
-</p>
-<p>The final color is a linear interpolation of color array. The color array is constructed from the string ids (including “bright” colors, see <a href="#Color-styles">Color styles</a>). The argument is the amplitude normalized in color range (see <a href="#Axis-settings">Axis settings</a>). For example, string containing 4 characters `<samp>bcyr</samp>` corresponds to a colorbar from blue (lowest value) through cyan (next value) through yellow (next value) to the red (highest value). String `<samp>kw</samp>` corresponds to a colorbar from black (lowest value) to white (highest value). String `<samp>m</samp>` corresponds to a simple magenta color.
-</p>
-<p>The special 2-axis color scheme (like in <a href="#map">map</a> plot) can be used if it contain symbol `<samp>%</samp>`. In this case the second direction (alpha channel) is used as second coordinate for colors. At this, up to 4 colors can be specified for corners: {c1,a1}, {c2,a1}, {c1,a2}, {c2,a2}. Here color and alpha ranges are {c1,c2} and {a1,a2} correspondingly. If one specify less than 4 colors then black color is used for corner {c1,a1}. If only 2 colors are specified then the color of their sum is used for corner {c2,a2}.
-</p>
-<p>There are several useful combinations. String `<samp>kw</samp>` corresponds to the simplest gray color scheme where higher values are brighter. String `<samp>wk</samp>` presents the inverse gray color scheme where higher value is darker. Strings `<samp>kRryw</samp>`, `<samp>kGgw</samp>`, `<samp>kBbcw</samp>` present the well-known <em>hot</em>, <em>summer</em> and <em>winter</em> color schemes. Strings `<samp>BbwrR</samp>` and `<samp>bBkRr</samp>` allow to view bi-color figure on white or black background, where negative values are blue and positive values are red. String `<samp>BbcyrR</samp>` gives a color scheme similar to the well-known <em>jet</em> color scheme.
-</p>
-<p>For more precise coloring, you can change default (equidistant) position of colors in color scheme. The format is `<samp>{CN,pos}</samp>`, `<samp>{CN,pos}</samp>` or `<samp>{xRRGGBB,pos}</samp>`. The position value <var>pos</var> should be in range [0, 1]. Note, that alternative method for fine tuning of the color scheme is using the formula for coloring (see <a href="#Curved-coordinates">Curved coordinates</a>).
-</p>
-<div align="center"><img src="png/schemes.png" alt="Most popular color schemes.">
-</div>
-<p>When coloring by <em>coordinate</em> (used in <a href="#map">map</a>), the final color is determined by the position of the point in 3d space and is calculated from formula c=x*c[1] + y*c[2]. Here, c[1], c[2] are the first two elements of color array; x, y are normalized to axis range coordinates of the point.
-</p>
-<p>Additionally, MathGL can apply mask to face filling at bitmap rendering. The kind of mask is specified by one of symbols `<samp>-+=;oOsS~<>jdD*^</samp>` in color scheme. Mask can be rotated by arbitrary angle by command <a href="#mask">mask</a> or by three predefined values +45, -45 and 90 degree by symbols `<samp>\/I</samp>` correspondingly. Examples of predefined masks are shown on the figure below.
-</p>
-<div align="center"><img src="png/mask.png" alt="Example of masks for face coloring.">
-</div>
-<p>However, you can redefine mask for one symbol by specifying new matrix of size 8*8 as second argument for <a href="#mask">mask</a> command. For example, the right-down subplot on the figure above is produced by code<br>
-<code>mask '+' 'ff00182424f800':dens a '3+'</code><br>
-or just use manual mask style (for v.2.3 and later)<br>
-<code>dens a '3{s00ff00182424f800}'</code>
-</p>
-
-<hr>
-<a name="Font-styles"></a>
-<div class="header">
-<p>
-Next: <a href="#Textual-formulas" accesskey="n" rel="next">Textual formulas</a>, Previous: <a href="#Color-scheme" accesskey="p" rel="prev">Color scheme</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Font-styles-1"></a>
-<h3 class="section">2.5 Font styles</h3>
-
-
-<a name="index-Font-styles"></a>
-
-<p>Text style is specified by the string which may contain: color id characters `<samp>wkrgbcymhRGBCYMHW</samp>` (see <a href="#Color-styles">Color styles</a>), and font style (`<samp>ribwou</samp>`) and/or alignment (`<samp>LRC</samp>`) specifications. At this, font style and alignment begin after the separator `<samp>:</samp>`. For example, `<samp>r:iCb</samp>` sets the bold (`<samp>b</samp>`) italic (`<samp>i</samp>`) font text aligned at the center (`<samp>C</samp>`) and with red color (`<samp>r</samp>`). Starting from MathGL v.2.3, you can set not single color for whole text, but use color gradient for printed text (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-<p>The font styles are: `<samp>r</samp>` - roman (or regular) font, `<samp>i</samp>` - italic style, `<samp>b</samp>` - bold style. By default roman roman font is used. The align types are: `<samp>L</samp>` - align left (default), `<samp>C</samp>` - align center, `<samp>R</samp>` - align right, `<samp>T</samp>` - align under, `<samp>V</samp>` - align center vertical. Additional font effects are: `<samp>w</samp>` - wired, `<samp>o</samp>` - over-lined, `<samp>u</samp>` - underlined.
-</p>
-<p>Also a parsing of the LaTeX-like syntax is provided. There are commands for the font style changing inside the string (for example, use \b for bold font): \a or \overline - over-lined, \b or \textbf - bold, \i or \textit - italic, \r or \textrm - roman (disable bold and italic attributes), \u or \underline - underlined, \w or \wire - wired, \big - bigger size, @ - smaller size. The lower and upper indexes are specified by `<samp>_</samp>` and `<samp>^</samp>` symbols. At this the changed font style is applied only on next symbol or symbols in braces {}. The text in braces {} are treated as single symbol that allow one to print the index of index. For example, compare the strings `<samp>sin (x^{2^3})</samp>` and `<samp>sin (x^2^3)</samp>`. You may also change text color inside string by command #? or by \color? where `<samp>?</samp>` is symbolic id of the color (see <a href="#Color-styles">Color styles</a>). For example, words `<samp>blue</samp>` and `<samp>red</samp>` will be colored in the string `<samp>#b{blue} and \colorr{red} text</samp>`. The most of functions understand the newline symbol `<samp>\n</samp>` and allows to print multi-line text. Finally, you can use arbitrary (if it was defined in font-face) UTF codes by command <code>\utf0x????</code>. For example, <code>\utf0x3b1</code> will produce
- α symbol.
-</p>
-<p>The most of commands for special TeX or AMSTeX symbols, the commands for font style changing (\textrm, \textbf, \textit, \textsc, \overline, \underline), accents (\hat, \tilde, \dot, \ddot, \acute, \check, \grave, \bar, \breve) and roots (\sqrt, \sqrt3, \sqrt4) are recognized. The full list contain approximately 2000 commands. Note that first space symbol after the command is ignored, but second one is printed as normal symbol (space). For example, the following strings produce the same result <em>\tilde a</em>: `<samp>\tilde{a}</samp>`; `<samp>\tilde a</samp>`; `<samp>\tilde{}a</samp>`.
-</p>
-In particular, the Greek letters are recognizable special symbols: α - \alpha, β - \beta, γ - \gamma, δ - \delta, ε - \epsilon, η - \eta, ι - \iota, χ - \chi, κ - \kappa, λ - \lambda, μ - \mu, ν - \nu, o - \o, ω - \omega, ϕ - \phi, π - \pi, ψ - \psi, ρ - \rho, σ - \sigma, θ - \theta, τ - \tau, υ - \upsilon, ξ - \xi, ζ - \zeta, ς - \varsigma, ɛ - \varepsilon, ϑ - \vartheta, φ - \varphi, ϰ - \varkappa; A - \Alpha, B - \Beta, Γ - \Gamma, Δ - \Delta, E - \Epsilon, H - \Eta, I - \Iota, C - \Chi, K - \Kappa, Λ - \Lambda, M - \Mu, N - \Nu, O - \O, Ω - \Omega, Φ - \Phi, Π - \Pi, Ψ - \Psi, R - \Rho, Σ - \Sigma, Θ - \Theta, T - \Tau, Υ - \Upsilon, Ξ - \Xi, Z - \Zeta.
-
-<p>The small part of most common special TeX symbols are: ∠ - \angle, ⋅ - \cdot, ♣ - \clubsuit, ✓ - \checkmark, ∪ - \cup, ∩ - \cap, ♢ - \diamondsuit, ◇ - \diamond, ÷
- - \div,
-↓ - \downarrow, † - \dag, ‡ - \ddag, ≡ - \equiv, ∃ - \exists, ⌢ - \frown, ♭ - \flat, ≥ - \ge, ≥ - \geq, ≧ - \geqq, ← - \gets, ♡ - \heartsuit, ∞ - \infty, ∫ - \int, \Int, ℑ - \Im, ♢ - \lozenge, ⟨ - \langle, ≤ - \le, ≤ - \leq, ≦ - \leqq, ← - \leftarrow, ∓ - \mp, ∇ - \nabla, ≠ - \ne, ≠ - \neq, ♮ - \natural, ∮ - \oint, ⊙ - \odot, ⊕ - \oplus, ∂ - \partial, ∥ - \parallel, ⊥ -\perp, ± - \pm, ∝ - \propto, ∏ - \prod, ℜ - \Re, → - \rightarrow, ⟩ - \rangle, ♠ - \spadesuit, ~ - \sim, ⌣ - \smile, ⊂ - \subset, ⊃ - \supset, √ - \sqrt or \surd, § - \S, ♯ - \sharp, ∑ - \sum, × - \times, → - \to, ∴ - \therefore, ↑ - \uparrow, ℘ - \wp. </p>
-
-<p>The font size can be defined explicitly (if <var>size</var>>0) or relatively to a base font size as |<var>size</var>|*<var>FontSize</var> (if <var>size</var><0). The value <var>size</var>=0 specifies that the string will not be printed. The base font size is measured in internal “MathGL” units. Special functions <code>SetFontSizePT(), SetFontSizeCM(), SetFontSizeIN()</code> (see <a href="#Font-settings">Font settings</a>) allow one to set it in more “common” variables for a given dpi value of the picture.
-</p>
-
-<hr>
-<a name="Textual-formulas"></a>
-<div class="header">
-<p>
-Next: <a href="#Command-options" accesskey="n" rel="next">Command options</a>, Previous: <a href="#Font-styles" accesskey="p" rel="prev">Font styles</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Textual-formulas-1"></a>
-<h3 class="section">2.6 Textual formulas</h3>
-
-
-<a name="index-Textual-formulas"></a>
-
-<p>MathGL have the fast variant of textual formula evaluation
-. There are a lot of functions and operators available. The operators are: `<samp>+</samp>` - addition, `<samp>-</samp>` - subtraction, `<samp>*</samp>` - multiplication, `<samp>/</samp>` - division, `<samp>%</samp>` - modulo, `<samp>^</samp>` - integer power. Also there are logical “operators”: `<samp><</samp>` - true if x<y, `<samp>></samp>` - true if x>y, `<samp>=</samp>` - true if x=y, `<samp>&</samp>` - true if x and y both nonzero, `<samp>|</samp>` - true if x or y nonzero. These logical operators have lowest priority and return 1 if true or 0 if false.
-</p>
-<p>The basic functions are: `<samp>sqrt(x)</samp>` - square root of <var>x</var>, `<samp>pow(x,y)</samp>` - power <var>x</var> in <var>y</var>, `<samp>ln(x)</samp>` - natural logarithm of <var>x</var>, `<samp>lg(x)</samp>` - decimal logarithm of <var>x</var>, `<samp>log(a,x)</samp>` - logarithm base <var>a</var> of <var>x</var>, `<samp>abs(x)</samp>` - absolute value of <var>x</var>, `<samp>sign(x)</samp>` - sign of <var>x</var>, `<samp>mod(x,y)</samp>` - <var>x</var> modulo <var>y</var>, `<samp>step(x)</samp>` - step function, `<samp>int(x)</samp>` - integer part of <var>x</var>, `<samp>rnd</samp>` - random number, `<samp>random(x)</samp>` - random data of size as in <var>x</var>, `<samp>hypot(x,y)</samp>`=sqrt(x^2+y^2) - hypotenuse, `<samp>cmplx(x,y)</samp>`=x+i*y - complex number, `<samp>pi</samp>` - number
-π = 3.1415926…, inf=∞
-</p>
-<p>Functions for complex numbers `<samp>real(x)</samp>`, `<samp>imag(x)</samp>`, `<samp>abs(x)</samp>`, `<samp>arg(x)</samp>`, `<samp>conj(x)</samp>`.
-</p>
-<p>Trigonometric functions are: `<samp>sin(x)</samp>`, `<samp>cos(x)</samp>`, `<samp>tan(x)</samp>` (or `<samp>tg(x)</samp>`). Inverse trigonometric functions are: `<samp>asin(x)</samp>`, `<samp>acos(x)</samp>`, `<samp>atan(x)</samp>`. Hyperbolic functions are: `<samp>sinh(x)</samp>` (or `<samp>sh(x)</samp>`), `<samp>cosh(x)</samp>` (or `<samp>ch(x)</samp>`), `<samp>tanh(x)</samp>` (or `<samp>th(x)</samp>`). Inverse hyperbolic functions are: `<samp>asinh(x)</samp>`, `<samp>acosh(x)</samp>`, `<samp>atanh(x)</samp>`.
-</p>
-<p>There are a set of special functions: `<samp>gamma(x)</samp>` - Gamma function Γ(x) = ∫<sub>0</sub><sup>∞</sup> t<sup>x-1</sup> exp(-t) dt, `<samp>gamma_inc(x,y)</samp>` - incomplete Gamma function Γ(x,y) = ∫<sub>y</sub><sup>∞</sup> t<sup>x-1</sup> exp(-t) dt, `<samp>psi(x)</samp>` - digamma function ψ(x) = Γ′(x)/Γ(x) for x≠0, `<samp>ai(x)</samp>` - Airy function Ai(x), `<samp>bi(x)</samp>` - Airy function Bi(x), `<samp>cl(x)</samp>` - Clausen function, `<samp>li2(x)</samp>` (or `<samp>dilog(x)</samp>`) - dilogarithm Li<sub>2</sub>(x) = -ℜ∫<sub>0</sub><sup>x</sup>ds log(1-s)/s, `<samp>sinc(x)</samp>` - compute sinc(x) = sin(πx)/(πx) for any value of x, `<samp>zeta(x)</samp>` - Riemann zeta function ζ(s) = ∑<sub>k=1</sub><sup>∞</sup>k<sup>-s</sup> for arbitrary s≠1, `<samp>eta(x)</samp>` - eta function η(s) = (1 - 2<sup>1-s</sup>)ζ(s) for arbitrary s, `<samp>lp(l,x)</samp>` - Legendre polynomial P<sub>l</sub>(x), (|x|≤1, l≥0), `<samp>w0(x)</samp>` - principal branch of the Lambert W function, `<samp>w1(x)</samp>` - principal branch of the Lambert W function. Function W(x) is defined to be solution of the equation: W exp(W) = x. </p>
-
-<p>The exponent integrals are: `<samp>ci(x)</samp>` - Cosine integral Ci(x) = ∫<sub>0</sub><sup>x</sup>dt cos(t)/t, `<samp>si(x)</samp>` - Sine integral Si(x) = ∫<sub>0</sub><sup>x</sup>dt sin(t)/t, `<samp>erf(x)</samp>` - error function erf(x) = (2/√π) ∫<sub>0</sub><sup>x</sup>dt exp(-t<sup>2</sup>) , `<samp>ei(x)</samp>` - exponential integral Ei(x) = -PV(∫<sub>-x</sub><sup>∞</sup>dt exp(-t)/t) (where PV denotes the principal value of the integral), `<samp>e1(x)</samp>` - exponential integral E<sub>1</sub>(x) = ℜ∫<sub>1</sub><sup>∞</sup>dt exp(-xt)/t, `<samp>e2(x)</samp>` - exponential integral E<sub>2</sub>(x) = ℜ∫<sub>1</sub>∞</sup>dt exp(-xt)/t<sup>2</sup>, `<samp>ei3(x)</samp>` - exponential integral Ei<sub>3</sub>(x) = ∫<sub>0</sub><sup>x</sup>dt exp(-t<sup>3</sup>) for x≥0. </p>
-
-<p>Bessel functions are: `<samp>j(nu,x)</samp>` - regular cylindrical Bessel function of fractional order <em>nu</em>, `<samp>y(nu,x)</samp>` - irregular cylindrical Bessel function of fractional order <em>nu</em>, `<samp>i(nu,x)</samp>` - regular modified Bessel function of fractional order <em>nu</em>, `<samp>k(nu,x)</samp>` - irregular modified Bessel function of fractional order <em>nu</em>. </p>
-
-<p>Elliptic integrals are: `<samp>ee(k)</samp>` - complete elliptic integral is denoted by E(k) = E(π/2,k), `<samp>ek(k)</samp>` - complete elliptic integral is denoted by K(k) = F(π/2,k), `<samp>e(phi,k)</samp>` - elliptic integral E(φ,k) = ∫<sub>0</sub><sup>φ</sup>dt √(1 - k<sup>2</sup>sin<sup>2</sup>(t)), `<samp>f(phi,k)</samp>` - elliptic integral F(φ,k) = ∫<sub>0</sub><sup>φ</sup>dt 1/√(1 - k<sup>2</sup>sin<sup>2</sup>(t))</p>
-
-<p>Jacobi elliptic functions are: `<samp>sn(u,m)</samp>`, `<samp>cn(u,m)</samp>`, `<samp>dn(u,m)</samp>`, `<samp>sc(u,m)</samp>`, `<samp>sd(u,m)</samp>`, `<samp>ns(u,m)</samp>`, `<samp>cs(u,m)</samp>`, `<samp>cd(u,m)</samp>`, `<samp>nc(u,m)</samp>`, `<samp>ds(u,m)</samp>`, `<samp>dc(u,m)</samp>`, `<samp>nd(u,m)</samp>`.
-</p>
-<p>Note, some of these functions are unavailable if MathGL was compiled without GSL support.
-</p>
-<p>There is no difference between lower or upper case in formulas. If argument value lie outside the range of function definition then function returns NaN.
-</p>
-
-<hr>
-<a name="Command-options"></a>
-<div class="header">
-<p>
-Next: <a href="#Interfaces" accesskey="n" rel="next">Interfaces</a>, Previous: <a href="#Textual-formulas" accesskey="p" rel="prev">Textual formulas</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Command-options-1"></a>
-<h3 class="section">2.7 Command options</h3>
-
-
-<p>Command options allow the easy setup of the selected plot by changing global settings only for this plot. Each option start from symbol `<samp>;</samp>`. Options work so that MathGL remember the current settings, change settings as it being set in the option, execute function and return the original settings back. So, the options are most usable for plotting functions.
-</p>
-<p>The most useful options are <code>xrange, yrange, zrange</code>. They sets the boundaries for data change. This boundaries are used for automatically filled variables. So, these options allow one to change the position of some plots. For example, in command <code>Plot(y,"","xrange 0.1 0.9");</code> or <code>plot y; xrange 0.1 0.9</code> the x coordinate will be equidistantly distributed in range 0.1 ... 0.9. See <a href="#Using-options">Using options</a>, for sample code and picture.
-</p>
-<p>The full list of options are:
-<a name="index-alpha"></a>
-<a name="index-alphadef"></a>
-</p><dl>
-<dt><a name="index-alpha-1"></a>MGL option: <strong>alpha</strong> <em><code>val</code></em></dt>
-<dd><p>Sets alpha value (transparency) of the plot. The value should be in range [0, 1]. See also <a href="#alphadef">alphadef</a>.
-</p></dd></dl>
-
-<a name="index-xrange"></a>
-<dl>
-<dt><a name="index-xrange-1"></a>MGL option: <strong>xrange</strong> <em><code>val1 val2</code></em></dt>
-<dd><p>Sets boundaries of x coordinate change for the plot. See also <a href="#xrange">xrange</a>.
-</p></dd></dl>
-<a name="index-yrange"></a>
-<dl>
-<dt><a name="index-yrange-1"></a>MGL option: <strong>yrange</strong> <em><code>val1 val2</code></em></dt>
-<dd><p>Sets boundaries of y coordinate change for the plot. See also <a href="#yrange">yrange</a>.
-</p></dd></dl>
-<a name="index-zrange"></a>
-<dl>
-<dt><a name="index-zrange-1"></a>MGL option: <strong>zrange</strong> <em><code>val1 val2</code></em></dt>
-<dd><p>Sets boundaries of z coordinate change for the plot. See also <a href="#zrange">zrange</a>.
-</p></dd></dl>
-
-<a name="index-cut"></a>
-<dl>
-<dt><a name="index-cut-1"></a>MGL option: <strong>cut</strong> <em><code>val</code></em></dt>
-<dd><p>Sets whether to cut or to project the plot points lying outside the bounding box. See also <a href="#cut">cut</a>.
-</p></dd></dl>
-<a name="index-fontsize"></a>
-<dl>
-<dt><a name="index-size"></a>MGL option: <strong>size</strong> <em><code>val</code></em></dt>
-<dd><p>Sets the size of text, marks and arrows. See also <a href="#font">font</a>, <a href="#marksize">marksize</a>, <a href="#arrowsize">arrowsize</a>.
-</p></dd></dl>
-<a name="index-meshnum"></a>
-<dl>
-<dt><a name="index-meshnum-1"></a>MGL option: <strong>meshnum</strong> <em><code>val</code></em></dt>
-<dd><p>Work like <a href="#meshnum">meshnum</a> command.
-</p></dd></dl>
-
-<a name="index-legend"></a>
-<dl>
-<dt><a name="index-legend-1"></a>MGL option: <strong>legend</strong> <em>'txt'</em></dt>
-<dd><p>Adds string `txt` to internal legend accumulator. The style of described line and mark is taken from arguments of the last <a href="#g_t1D-plotting">1D plotting</a> command. See also <a href="#legend">legend</a>.
-</p></dd></dl>
-<a name="index-value"></a>
-<dl>
-<dt><a name="index-value-1"></a>MGL option: <strong>value</strong> <em><code>val</code></em></dt>
-<dd><p>Set the value to be used as additional numeric parameter in plotting command.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Interfaces"></a>
-<div class="header">
-<p>
-Previous: <a href="#Command-options" accesskey="p" rel="prev">Command options</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Interfaces-1"></a>
-<h3 class="section">2.8 Interfaces</h3>
-
-
-<p>You can use <code>mglParse</code> class for executing MGL scripts from different languages.
-</p>
-
-
-
-<hr>
-<a name="MathGL-core"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-processing" accesskey="n" rel="next">Data processing</a>, Previous: <a href="#General-concepts" accesskey="p" rel="prev">General concepts</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="MathGL-core-1"></a>
-<h2 class="chapter">3 MathGL core</h2>
-
-<a name="index-mglGraph"></a>
-
-<p>This chapter contains a lot of plotting commands for 1D, 2D and 3D data. It also encapsulates parameters for axes drawing. Moreover an arbitrary coordinate transformation can be used for each axis. Additional information about colors, fonts, formula parsing can be found in <a href="#General-concepts">General concepts</a>. The full list of symbols used by MathGL for setting up plots can be found in <a href="#Symbols-for-styles">Symbols for styles</a>.
-</p>
-
-<p>Some of MathGL features will appear only in novel versions. To test used MathGL version you can use following function.
-<a name="version"></a></p><dl>
-<dt><a name="index-version"></a>MGL command: <em></em> <strong>version</strong> <em>'ver'</em></dt>
-<dd><p>Return zero if MathGL version is appropriate for required by <var>ver</var>, i.e. if major version is the same and minor version is greater or equal to one in <var>ver</var>.
-</p></dd></dl>
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Constructor" accesskey="1">Constructor</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Graphics-setup" accesskey="2">Graphics setup</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Axis-settings" accesskey="3">Axis settings</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Subplots-and-rotation" accesskey="4">Subplots and rotation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Export-picture" accesskey="5">Export picture</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Background" accesskey="6">Background</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Primitives" accesskey="7">Primitives</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Text-printing" accesskey="8">Text printing</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Axis-and-Colorbar" accesskey="9">Axis and Colorbar</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Legend">Legend</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#g_t1D-plotting">1D plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#g_t2D-plotting">2D plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#g_t3D-plotting">3D plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Dual-plotting">Dual plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Vector-fields">Vector fields</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Other-plotting">Other plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Nonlinear-fitting">Nonlinear fitting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-manipulation">Data manipulation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Constructor"></a>
-<div class="header">
-<p>
-Next: <a href="#Graphics-setup" accesskey="n" rel="next">Graphics setup</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Create-and-delete-objects"></a>
-<h3 class="section">3.1 Create and delete objects</h3>
-
-
-
-<p>You don`t need to create canvas object in MGL.
-</p>
-
-<hr>
-<a name="Graphics-setup"></a>
-<div class="header">
-<p>
-Next: <a href="#Axis-settings" accesskey="n" rel="next">Axis settings</a>, Previous: <a href="#Constructor" accesskey="p" rel="prev">Constructor</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Graphics-setup-1"></a>
-<h3 class="section">3.2 Graphics setup</h3>
-
-<a name="index-MathGL-setup"></a>
-
-<p>Functions and variables in this group influences on overall graphics appearance. So all of them should be placed <em>before</em> any actual plotting function calls.
-</p>
-<a name="reset"></a><dl>
-<dt><a name="index-reset"></a>MGL command: <em></em> <strong>reset</strong></dt>
-<dd><p>Restore initial values for all of parameters and clear the image.
-</p></dd></dl>
-
-<a name="setup"></a><dl>
-<dt><a name="index-setup"></a>MGL command: <em></em> <strong>setup</strong> <em><code>val flag</code></em></dt>
-<dd><p>Sets the value of internal binary <var>flag</var> to <var>val</var>. The list of flags can be found at <a href="https://sourceforge.net/p/mathgl/code/HEAD/tree/mathgl-2x/include/mgl2/define.h#l267">define.h</a>. The current list of flags are:
-</p><pre class="verbatim">#define MGL_ENABLE_CUT 0x00000004 ///< Flag which determines how points outside bounding box are drown.
-#define MGL_ENABLE_RTEXT 0x00000008 ///< Use text rotation along axis
-#define MGL_AUTO_FACTOR 0x00000010 ///< Enable autochange PlotFactor
-#define MGL_ENABLE_ALPHA 0x00000020 ///< Flag that Alpha is used
-#define MGL_ENABLE_LIGHT 0x00000040 ///< Flag of using lightning
-#define MGL_TICKS_ROTATE 0x00000080 ///< Allow ticks rotation
-#define MGL_TICKS_SKIP 0x00000100 ///< Allow ticks rotation
-#define MGL_DISABLE_SCALE 0x00000200 ///< Temporary flag for disable scaling (used for axis)
-#define MGL_FINISHED 0x00000400 ///< Flag that final picture (i.e. mglCanvas::G) is ready
-#define MGL_USE_GMTIME 0x00000800 ///< Use gmtime instead of localtime
-#define MGL_SHOW_POS 0x00001000 ///< Switch to show or not mouse click position
-#define MGL_CLF_ON_UPD 0x00002000 ///< Clear plot before Update()
-#define MGL_NOSUBTICKS 0x00004000 ///< Disable subticks drawing (for bounding box)
-#define MGL_LOCAL_LIGHT 0x00008000 ///< Keep light sources for each inplot
-#define MGL_VECT_FRAME 0x00010000 ///< Use DrwDat to remember all data of frames
-#define MGL_REDUCEACC 0x00020000 ///< Reduce accuracy of points (to reduce size of output files)
-#define MGL_PREFERVC 0x00040000 ///< Prefer vertex color instead of texture if output format supports
-#define MGL_ONESIDED 0x00080000 ///< Render only front side of surfaces if output format supports (for debugging)
-#define MGL_NO_ORIGIN 0x00100000 ///< Don't draw tick labels at axis origin
-#define MGL_GRAY_MODE 0x00200000 ///< Convert all colors to gray ones
-#define MGL_FULL_CURV 0x00400000 ///< Disable omitting points in straight-line part(s)
-#define MGL_NO_SCALE_REL 0x00800000 ///< Disable font scaling in relative inplots
-</pre></dd></dl>
-
-
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Transparency" accesskey="1">Transparency</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Lighting" accesskey="2">Lighting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Fog" accesskey="3">Fog</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Default-sizes" accesskey="4">Default sizes</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Cutting" accesskey="5">Cutting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Font-settings" accesskey="6">Font settings</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Palette-and-colors" accesskey="7">Palette and colors</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Masks" accesskey="8">Masks</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Error-handling" accesskey="9">Error handling</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Stop-drawing">Stop drawing</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Transparency"></a>
-<div class="header">
-<p>
-Next: <a href="#Lighting" accesskey="n" rel="next">Lighting</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Transparency-1"></a>
-<h4 class="subsection">3.2.1 Transparency</h4>
-
-<a name="index-Alpha"></a>
-<a name="index-AlphaDef"></a>
-<a name="index-TranspType"></a>
-
-<p>There are several functions and variables for setup transparency. The general function is <a href="#alpha">alpha</a> which switch on/off the transparency for overall plot. It influence only for graphics which created after <a href="#alpha">alpha</a> call (with one exception, OpenGL). Function <a href="#alphadef">alphadef</a> specify the default value of alpha-channel. Finally, function <a href="#transptype">transptype</a> set the kind of transparency. See <a href="#Transparency-and-lighting">Transparency and lighting</a>, for sample code and picture.
-</p>
-<a name="alpha"></a><dl>
-<dt><a name="index-alpha-2"></a>MGL command: <em></em> <strong>alpha</strong> <em><code>[val=on]</code></em></dt>
-<dd><p>Sets the transparency on/off and returns previous value of transparency. It is recommended to call this function before any plotting command. Default value is transparency off.
-</p></dd></dl>
-
-<a name="alphadef"></a><dl>
-<dt><a name="index-alphadef-1"></a>MGL command: <em></em> <strong>alphadef</strong> <em><code>val</code></em></dt>
-<dd><p>Sets default value of alpha channel (transparency) for all plotting functions. Initial value is 0.5.
-</p></dd></dl>
-
-<a name="transptype"></a><dl>
-<dt><a name="index-transptype"></a>MGL command: <em></em> <strong>transptype</strong> <em><code>val</code></em></dt>
-<dd><p>Set the type of transparency. Possible values are:
-</p><ul>
-<li> Normal transparency (`<samp>0</samp>`) - below things is less visible than upper ones. It does not look well in OpenGL mode (mglGraphGL) for several surfaces.
-</li><li> Glass-like transparency (`<samp>1</samp>`) - below and upper things are commutable and just decrease intensity of light by RGB channel.
-</li><li> Lamp-like transparency (`<samp>2</samp>`) - below and upper things are commutable and are the source of some additional light. I recommend to set <code>SetAlphaDef(0.3)</code> or less for lamp-like transparency.
-</li></ul>
-<p>See <a href="#Types-of-transparency">Types of transparency</a>, for sample code and picture..
-</p></dd></dl>
-
-
-<hr>
-<a name="Lighting"></a>
-<div class="header">
-<p>
-Next: <a href="#Fog" accesskey="n" rel="next">Fog</a>, Previous: <a href="#Transparency" accesskey="p" rel="prev">Transparency</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Lighting-1"></a>
-<h4 class="subsection">3.2.2 Lighting</h4>
-
-
-<a name="index-Light"></a>
-<a name="index-Ambient"></a>
-
-<p>There are several functions for setup lighting. The general function is <a href="#light">light</a> which switch on/off the lighting for overall plot. It influence only for graphics which created after <a href="#light">light</a> call (with one exception, OpenGL). Generally MathGL support up to 10 independent light sources. But in OpenGL mode only 8 of light sources is used due to OpenGL limitations. The position, color, brightness of each light source can be set separately. By default only one light source is active. It is source number <code>0</code> with white color, located at top of the plot. See <a href="#Lighting-sample">Lighting sample</a>, for sample code and picture.
-</p>
-<a name="light"></a><dl>
-<dt><a name="index-light"></a>MGL command: <em></em> <strong>light</strong> <em><code>[val=on]</code></em></dt>
-<dd><p>Sets the using of light on/off for overall plot. Function returns previous value of lighting. Default value is lightning off.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-light-1"></a>MGL command: <em></em> <strong>light</strong> <em><code>num</code> <code>val</code></em></dt>
-<dd><p>Switch on/off <var>n</var>-th light source separately.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-light-2"></a>MGL command: <em></em> <strong>light</strong> <em><code>num xdir ydir zdir</code> ['col'='w' <code>br=0.5</code>]</em></dt>
-<dt><a name="index-light-3"></a>MGL command: <em></em> <strong>light</strong> <em><code>num xdir ydir zdir xpos ypos zpos</code> ['col'='w' <code>br=0.5 ap=0</code>]</em></dt>
-<dd><p>The function adds a light source with identification <var>n</var> in direction <var>d</var> with color <var>c</var> and with brightness <var>bright</var> (which must be in range [0,1]). If position <var>r</var> is specified and isn`t NAN then light source is supposed to be local otherwise light source is supposed to be placed at infinity.
-</p></dd></dl>
-
-<a name="diffuse"></a><dl>
-<dt><a name="index-diffuse"></a>MGL command: <em></em> <strong>diffuse</strong> <em><code>val</code></em></dt>
-<dd><p>Set brightness of diffusive light (only for local light sources).
-</p></dd></dl>
-
-<a name="ambient"></a><dl>
-<dt><a name="index-ambient"></a>MGL command: <em></em> <strong>ambient</strong> <em><code>val</code></em></dt>
-<dd><p>Sets the brightness of ambient light. The value should be in range [0,1].
-</p></dd></dl>
-
-<a name="attachlight"></a><dl>
-<dt><a name="index-attachlight"></a>MGL command: <em></em> <strong>attachlight</strong> <em><code>val</code></em></dt>
-<dd><p>Set to attach light settings to <a href="#inplot">inplot</a>/<a href="#subplot">subplot</a>. Note, OpenGL and some output formats don`t support this feature.
-</p></dd></dl>
-
-
-<hr>
-<a name="Fog"></a>
-<div class="header">
-<p>
-Next: <a href="#Default-sizes" accesskey="n" rel="next">Default sizes</a>, Previous: <a href="#Lighting" accesskey="p" rel="prev">Lighting</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Fog-1"></a>
-<h4 class="subsection">3.2.3 Fog</h4>
-
-<a name="index-Fog"></a>
-
-<a name="fog"></a><dl>
-<dt><a name="index-fog"></a>MGL command: <em></em> <strong>fog</strong> <em><code>val [dz=0.25]</code></em></dt>
-<dd><p>Function imitate a fog in the plot. Fog start from relative distance <var>dz</var> from view point and its density growths exponentially in depth. So that the fog influence is determined by law ~ 1-exp(-<em>d*z</em>). Here <em>z</em> is normalized to 1 depth of the plot. If value <var>d</var>=<code>0</code> then the fog is absent. Note, that fog was applied at stage of image creation, not at stage of drawing. See <a href="#Adding-fog">Adding fog</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<hr>
-<a name="Default-sizes"></a>
-<div class="header">
-<p>
-Next: <a href="#Cutting" accesskey="n" rel="next">Cutting</a>, Previous: <a href="#Fog" accesskey="p" rel="prev">Fog</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Default-sizes-1"></a>
-<h4 class="subsection">3.2.4 Default sizes</h4>
-
-<a name="index-BarWidth"></a>
-<a name="index-MarkSize"></a>
-<a name="index-ArrowSize"></a>
-<a name="index-MeshNum"></a>
-
-<p>These variables control the default (initial) values for most graphics parameters including sizes of markers, arrows, line width and so on. As any other settings these ones will influence only on plots created after the settings change.
-</p>
-<a name="barwidth"></a><dl>
-<dt><a name="index-barwidth"></a>MGL command: <em></em> <strong>barwidth</strong> <em><code>val</code></em></dt>
-<dd><p>Sets relative width of rectangles in <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#boxplot">boxplot</a>, <a href="#candle">candle</a>, <a href="#ohlc">ohlc</a>. Default value is <code>0.7</code>.
-</p></dd></dl>
-
-<a name="marksize"></a><dl>
-<dt><a name="index-marksize"></a>MGL command: <em></em> <strong>marksize</strong> <em><code>val</code></em></dt>
-<dd><p>Sets size of marks for <a href="#g_t1D-plotting">1D plotting</a>. Default value is <code>1</code>.
-</p></dd></dl>
-
-<a name="arrowsize"></a><dl>
-<dt><a name="index-arrowsize"></a>MGL command: <em></em> <strong>arrowsize</strong> <em><code>val</code></em></dt>
-<dd><p>Sets size of arrows for <a href="#g_t1D-plotting">1D plotting</a>, lines and curves (see <a href="#Primitives">Primitives</a>). Default value is <code>1</code>.
-</p></dd></dl>
-
-<a name="meshnum"></a><a name="MeshNum"></a><dl>
-<dt><a name="index-meshnum-2"></a>MGL command: <em></em> <strong>meshnum</strong> <em><code>val</code></em></dt>
-<dd><p>Sets approximate number of lines in <a href="#mesh">mesh</a>, <a href="#fall">fall</a>, <a href="#grid2">grid2</a>, and also the number of hachures in <a href="#vect">vect</a>, <a href="#dew">dew</a>, and the number of cells in <a href="#cloud">cloud</a>, and the number of markers in <a href="#plot">plot</a>, <a href="#tens">tens</a>, <a href="#step">step</a>, <a href="#mark">mark</a>, <a href="#textmark">textmark</a>. By default (=0) it draws all lines/hachures/cells/markers.
-</p></dd></dl>
-
-<a name="facenum"></a><dl>
-<dt><a name="index-facenum"></a>MGL command: <em></em> <strong>facenum</strong> <em><code>val</code></em></dt>
-<dd><p>Sets approximate number of visible faces. Can be used for speeding up drawing by cost of lower quality. By default (=0) it draws all of them.
-</p></dd></dl>
-
-<a name="plotid"></a><dl>
-<dt><a name="index-plotid"></a>MGL command: <em></em> <strong>plotid</strong> <em>'id'</em></dt>
-<dd><p>Sets default name <var>id</var> as filename for saving (in FLTK window for example).
-</p></dd></dl>
-
-
-<a name="pendelta"></a><dl>
-<dt><a name="index-pendelta"></a>MGL command: <em></em> <strong>pendelta</strong> <em><code>val</code></em></dt>
-<dd><p>Changes the blur around lines and text (default is 1). For <var>val</var>>1 the text and lines are more sharped. For <var>val</var><1 the text and lines are more blurred.
-</p></dd></dl>
-
-
-<hr>
-<a name="Cutting"></a>
-<div class="header">
-<p>
-Next: <a href="#Font-settings" accesskey="n" rel="next">Font settings</a>, Previous: <a href="#Default-sizes" accesskey="p" rel="prev">Default sizes</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Cutting-1"></a>
-<h4 class="subsection">3.2.5 Cutting</h4>
-
-<a name="index-Cut"></a>
-
-<p>These variables and functions set the condition when the points are excluded (cutted) from the drawing. Note, that a point with NAN value(s) of coordinate or amplitude will be automatically excluded from the drawing. See <a href="#Cutting-sample">Cutting sample</a>, for sample code and picture.
-</p>
-<a name="cut"></a><dl>
-<dt><a name="index-cut-2"></a>MGL command: <em></em> <strong>cut</strong> <em><code>val</code></em></dt>
-<dd><p>Flag which determines how points outside bounding box are drawn. If it is <code>true</code> then points are excluded from plot (it is default) otherwise the points are projected to edges of bounding box.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-cut-3"></a>MGL command: <em></em> <strong>cut</strong> <em><code>x1 y1 z1 x2 y2 z2</code></em></dt>
-<dd><p>Lower and upper edge of the box in which never points are drawn. If both edges are the same (the variables are equal) then the cutting box is empty.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-cut-4"></a>MGL command: <em></em> <strong>cut</strong> <em>'cond'</em></dt>
-<dd><p>Sets the cutting off condition by formula <var>cond</var>. This condition determine will point be plotted or not. If value of formula is nonzero then point is omitted, otherwise it plotted. Set argument as <code>""</code> to disable cutting off condition.
-</p></dd></dl>
-
-
-<hr>
-<a name="Font-settings"></a>
-<div class="header">
-<p>
-Next: <a href="#Palette-and-colors" accesskey="n" rel="next">Palette and colors</a>, Previous: <a href="#Cutting" accesskey="p" rel="prev">Cutting</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Font-settings-1"></a>
-<h4 class="subsection">3.2.6 Font settings</h4>
-
-<a name="index-Font"></a>
-<a name="index-RotateText"></a>
-
-<a name="font"></a><dl>
-<dt><a name="index-font"></a>MGL command: <em></em> <strong>font</strong> <em>'fnt' [<code>val=6</code>]</em></dt>
-<dd><p>Font style for text and labels (see text). Initial style is `fnt`=`:rC` give Roman font with centering. Parameter <code>val</code> sets the size of font for tick and axis labels. Default font size of axis labels is 1.4 times large than for tick labels. For more detail, see <a href="#Font-styles">Font styles</a>.
-</p></dd></dl>
-
-<a name="rotatetext"></a><dl>
-<dt><a name="index-rotatetext"></a>MGL command: <em></em> <strong>rotatetext</strong> <em><code>val</code></em></dt>
-<dd><p>Sets to use or not text rotation.
-</p></dd></dl>
-
-<a name="scaletext"></a><dl>
-<dt><a name="index-scaletext"></a>MGL command: <em></em> <strong>scaletext</strong> <em><code>val</code></em></dt>
-<dd><p>Sets to scale text in relative <a href="#inplot">inplot</a> (including <a href="#columnplot">columnplot</a>, <a href="#gridplot">gridplot</a>, <a href="#stickplot">stickplot</a>, <a href="#shearplot">shearplot</a>) or not.
-</p></dd></dl>
-
-<a name="loadfont"></a><dl>
-<dt><a name="index-loadfont"></a>MGL command: <em></em> <strong>loadfont</strong> <em>['name'='']</em></dt>
-<dd><p>Load font typeface from <var>path</var>/<var>name</var>. Empty name will load default font.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Palette-and-colors"></a>
-<div class="header">
-<p>
-Next: <a href="#Masks" accesskey="n" rel="next">Masks</a>, Previous: <a href="#Font-settings" accesskey="p" rel="prev">Font settings</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Palette-and-colors-1"></a>
-<h4 class="subsection">3.2.7 Palette and colors</h4>
-
-<a name="index-Palette"></a>
-
-<a name="palette"></a><dl>
-<dt><a name="index-palette"></a>MGL command: <em></em> <strong>palette</strong> <em>'colors'</em></dt>
-<dd><p>Sets the palette as selected colors. Default value is <code>"Hbgrcmyhlnqeup"</code> that corresponds to colors: dark gray `<samp>H</samp>`, blue `<samp>b</samp>`, green `<samp>g</samp>`, red `<samp>r</samp>`, cyan `<samp>c</samp>`, magenta `<samp>m</samp>`, yellow `<samp>y</samp>`, gray `<samp>h</samp>`, blue-green `<samp>l</samp>`, sky-blue `<samp>n</samp>`, orange `<samp>q</samp>`, yellow-green `<samp>e</samp>`, blue-violet `<samp>u</samp>`, purple `<samp>p</samp>`. The palette is used mostly in 1D plots (see <a href="#g_t1D-plotting">1D plotting</a>) for curves which styles are not specified. Internal color counter will be nullified by any change of palette. This includes even hidden change (for example, by <a href="#box">box</a> or <a href="#axis">axis</a> functions).
-</p></dd></dl>
-
-
-
-<a name="gray"></a><dl>
-<dt><a name="index-gray"></a>MGL command: <em></em> <strong>gray</strong> <em>[<code>val=on</code>]</em></dt>
-<dd><p>Sets the gray-scale mode on/off.
-</p></dd></dl>
-
-
-<hr>
-<a name="Masks"></a>
-<div class="header">
-<p>
-Next: <a href="#Error-handling" accesskey="n" rel="next">Error handling</a>, Previous: <a href="#Palette-and-colors" accesskey="p" rel="prev">Palette and colors</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Masks-1"></a>
-<h4 class="subsection">3.2.8 Masks</h4>
-
-<a name="index-SetMask"></a>
-<a name="index-SetMaskAngle"></a>
-
-<a name="mask"></a><dl>
-<dt><a name="index-mask"></a>MGL command: <em></em> <strong>mask</strong> <em>'id' 'hex'</em></dt>
-<dt><a name="index-mask-1"></a>Команда MGL: <em></em> <strong>mask</strong> <em>'id' hex</em></dt>
-<dd><p>Sets new bit matrix <var>hex</var> of size 8*8 for mask with given <var>id</var>. This is global setting which influence on any later usage of symbol <var>id</var>. The predefined masks are (see <a href="#Color-scheme">Color scheme</a>): `<samp>-</samp>` is 000000FF00000000, `<samp>+</samp>` is 080808FF08080808, `<samp>=</samp>` is 0000FF00FF000000, `<samp>;</samp>` is 0000007700000000, `<samp>o</samp>` is 0000182424180000, `<samp>O</samp>` is 0000183C3C180000, `<samp>s</samp>` is 00003C24243C0000, `<samp>S</samp>` is 00003C3C3C3C0000, `<samp>~</samp>` is 0000060990600000, `<samp><</samp>` is 0060584658600000, `<samp>></samp>` is 00061A621A060000, `<samp>j</samp>` is 0000005F00000000, `<samp>d</samp>` is 0008142214080000, `<samp>D</samp>` is 00081C3E1C080000, `<samp>*</samp>` is 8142241818244281, `<samp>^</samp>` is 0000001824420000.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mask-2"></a>MGL command: <em></em> <strong>mask</strong> <em>angle</em></dt>
-<dd><p>Sets the default rotation angle (in degrees) for masks. Note, you can use symbols `<samp>\</samp>`, `<samp>/</samp>`, `<samp>I</samp>` in color scheme for setting rotation angles as 45, -45 and 90 degrees correspondingly.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Error-handling"></a>
-<div class="header">
-<p>
-Next: <a href="#Stop-drawing" accesskey="n" rel="next">Stop drawing</a>, Previous: <a href="#Masks" accesskey="p" rel="prev">Masks</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Error-handling-1"></a>
-<h4 class="subsection">3.2.9 Error handling</h4>
-
-<p>All warnings will be displayed automatically in special tool-window or in console.
-</p>
-
-<hr>
-<a name="Stop-drawing"></a>
-<div class="header">
-<p>
-Previous: <a href="#Error-handling" accesskey="p" rel="prev">Error handling</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Stop-drawing-1"></a>
-<h4 class="subsection">3.2.10 Stop drawing</h4>
-
-<p>You can use <a href="#stop">stop</a> command or press corresponding toolbutton to stop drawing and script execution.
-</p>
-
-<hr>
-<a name="Axis-settings"></a>
-<div class="header">
-<p>
-Next: <a href="#Subplots-and-rotation" accesskey="n" rel="next">Subplots and rotation</a>, Previous: <a href="#Graphics-setup" accesskey="p" rel="prev">Graphics setup</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Axis-settings-1"></a>
-<h3 class="section">3.3 Axis settings</h3>
-
-
-<p>These large set of variables and functions control how the axis and ticks will be drawn. Note that there is 3-step transformation of data coordinates are performed. Firstly, coordinates are projected if <code>Cut=true</code> (see <a href="#Cutting">Cutting</a>), after it transformation formulas are applied, and finally the data was normalized in bounding box. Note, that MathGL will produce warning if axis range and transformation formulas are not compatible.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Ranges-_0028bounding-box_0029" accesskey="1">Ranges (bounding box)</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Curved-coordinates" accesskey="2">Curved coordinates</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Ticks" accesskey="3">Ticks</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Ranges-_0028bounding-box_0029"></a>
-<div class="header">
-<p>
-Next: <a href="#Curved-coordinates" accesskey="n" rel="next">Curved coordinates</a>, Up: <a href="#Axis-settings" accesskey="u" rel="up">Axis settings</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Ranges-_0028bounding-box_0029-1"></a>
-<h4 class="subsection">3.3.1 Ranges (bounding box)</h4>
-
-<a name="index-CRange"></a>
-<a name="index-XRange"></a>
-<a name="index-YRange"></a>
-<a name="index-ZRange"></a>
-<a name="index-Ranges"></a>
-<a name="index-Origin"></a>
-
-<a name="xrange"></a><a name="yrange"></a><a name="zrange"></a><a name="crange"></a><dl>
-<dt><a name="index-xrange-2"></a>MGL command: <em></em> <strong>xrange</strong> <em><code>v1 v2</code> [<code>add=off</code>]</em></dt>
-<dt><a name="index-yrange-2"></a>MGL command: <em></em> <strong>yrange</strong> <em><code>v1 v2</code> [<code>add=off</code>]</em></dt>
-<dt><a name="index-zrange-2"></a>MGL command: <em></em> <strong>zrange</strong> <em><code>v1 v2</code> [<code>add=off</code>]</em></dt>
-<dt><a name="index-crange"></a>MGL command: <em></em> <strong>crange</strong> <em><code>v1 v2</code> [<code>add=off</code>]</em></dt>
-<dd><p>Sets or adds the range for `<samp>x</samp>`-,`<samp>y</samp>`-,`<samp>z</samp>`- coordinate or coloring (`<samp>c</samp>`). If one of values is <code>NAN</code> then it is ignored. See also <a href="#ranges">ranges</a>.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-xrange-3"></a>MGL command: <em></em> <strong>xrange</strong> <em>dat [<code>add=off</code>]</em></dt>
-<dt><a name="index-yrange-3"></a>MGL command: <em></em> <strong>yrange</strong> <em>dat [<code>add=off</code>]</em></dt>
-<dt><a name="index-zrange-3"></a>MGL command: <em></em> <strong>zrange</strong> <em>dat [<code>add=off</code>]</em></dt>
-<dt><a name="index-crange-1"></a>MGL command: <em></em> <strong>crange</strong> <em>dat [<code>add=off</code>]</em></dt>
-<dd><p>Sets the range for `<samp>x</samp>`-,`<samp>y</samp>`-,`<samp>z</samp>`- coordinate or coloring (`<samp>c</samp>`) as minimal and maximal values of data <var>dat</var>. Parameter <code>add=on</code> shows that the new range will be joined to existed one (not replace it).
-</p></dd></dl>
-
-<a name="ranges"></a><dl>
-<dt><a name="index-ranges"></a>MGL command: <em></em> <strong>ranges</strong> <em><code>x1 x2 y1 y2 [z1=0 z2=0]</code></em></dt>
-<dd><p>Sets the ranges of coordinates. If minimal and maximal values of the coordinate are the same then they are ignored. Also it sets the range for coloring (analogous to <code>crange z1 z2</code>). This is default color range for 2d plots. Initial ranges are [-1, 1].
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ranges-1"></a>MGL command: <em></em> <strong>ranges</strong> <em><code>xx yy [zz cc=zz]</code></em></dt>
-<dd><p>Sets the ranges of `<samp>x</samp>`-,`<samp>y</samp>`-,`<samp>z</samp>`-,`<samp>c</samp>`-coordinates and coloring as minimal and maximal values of data <var>xx</var>, <var>yy</var>, <var>zz</var>, <var>cc</var> correspondingly.
-</p></dd></dl>
-
-
-<a name="origin"></a><dl>
-<dt><a name="index-origin"></a>MGL command: <em></em> <strong>origin</strong> <em><code>x0 y0 [z0=nan]</code></em></dt>
-<dd><p>Sets center of axis cross section. If one of values is NAN then MathGL try to select optimal axis position.
-</p></dd></dl>
-
-<a name="zoomaxis"></a><dl>
-<dt><a name="index-zoomaxis"></a>MGL command: <em></em> <strong>zoomaxis</strong> <em><code>x1 x2</code></em></dt>
-<dt><a name="index-zoomaxis-1"></a>MGL command: <em></em> <strong>zoomaxis</strong> <em><code>x1 y1 x2 y2</code></em></dt>
-<dt><a name="index-zoomaxis-2"></a>MGL command: <em></em> <strong>zoomaxis</strong> <em><code>x1 y1 z1 x2 y2 z2</code></em></dt>
-<dt><a name="index-zoomaxis-3"></a>MGL command: <em></em> <strong>zoomaxis</strong> <em><code>x1 y1 z1 c1 x2 y2 z2 c2</code></em></dt>
-<dd><p>Additionally extend axis range for any settings made by <code>SetRange</code> or <code>SetRanges</code> functions according the formula <em>min += (max-min)*p1</em> and <em>max += (max-min)*p1</em> (or <em>min *= (max/min)^p1</em> and <em>max *= (max/min)^p1</em> for log-axis range when <em>inf>max/min>100</em> or <em>0<max/min<0.01</em>). Initial ranges are [0, 1]. Attention! this settings can not be overwritten by any other functions, including <code>DefaultPlotParam()</code>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Curved-coordinates"></a>
-<div class="header">
-<p>
-Next: <a href="#Ticks" accesskey="n" rel="next">Ticks</a>, Previous: <a href="#Ranges-_0028bounding-box_0029" accesskey="p" rel="prev">Ranges (bounding box)</a>, Up: <a href="#Axis-settings" accesskey="u" rel="up">Axis settings</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Curved-coordinates-1"></a>
-<h4 class="subsection">3.3.2 Curved coordinates</h4>
-
-<a name="index-Axis"></a>
-
-<dl>
-<dt><a name="index-axis"></a>MGL command: <em></em> <strong>axis</strong> <em>'fx' 'fy' 'fz' ['fa'='']</em></dt>
-<dd><p>Sets transformation formulas for curvilinear coordinate. Each string should contain mathematical expression for real coordinate depending on internal coordinates `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>` and `<samp>a</samp>` or `<samp>c</samp>` for colorbar. For example, the cylindrical coordinates are introduced as <code>SetFunc("x*cos(y)", "x*sin(y)", "z");</code>. For removing of formulas the corresponding parameter should be empty or <code>NULL</code>. Using transformation formulas will slightly slowing the program. Parameter <var>EqA</var> set the similar transformation formula for color scheme. See <a href="#Textual-formulas">Textual formulas</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-axis-1"></a>MGL command: <em></em> <strong>axis</strong> <em><code>how</code></em></dt>
-<dd><p>Sets one of the predefined transformation formulas for curvilinear coordinate. Parameter <var>how</var> define the coordinates:
-</p><dl compact="compact">
-<dt><code>mglCartesian=0</code></dt>
-<dd><p>Cartesian coordinates (no transformation, {x,y,z});
-</p></dd>
-<dt><code>mglPolar=1</code></dt>
-<dd><p>Polar coordinates: {x*cos(y), x*sin(y), z};
-</p></dd>
-<dt><code>mglSpherical=2</code></dt>
-<dd><p>Sperical coordinates: {x*sin(y)*cos(z), x*sin(y)*sin(z), x*cos(y)};
-</p></dd>
-<dt><code>mglParabolic=3</code></dt>
-<dd><p>Parabolic coordinates: {x*y, (x*x-y*y)/2, z}
-</p></dd>
-<dt><code>mglParaboloidal=4</code></dt>
-<dd><p>Paraboloidal coordinates: {(x*x-y*y)*cos(z)/2, (x*x-y*y)*sin(z)/2, x*y};
-</p></dd>
-<dt><code>mglOblate=5</code></dt>
-<dd><p>Oblate coordinates: {cosh(x)*cos(y)*cos(z), cosh(x)*cos(y)*sin(z), sinh(x)*sin(y)};
-</p></dd>
-<dt><code>mglProlate=6</code></dt>
-<dd><p>Prolate coordinates: {sinh(x)*sin(y)*cos(z), sinh(x)*sin(y)*sin(z), cosh(x)*cos(y)};
-</p></dd>
-<dt><code>mglElliptic=7</code></dt>
-<dd><p>Elliptic coordinates: {cosh(x)*cos(y), sinh(x)*sin(y), z};
-</p></dd>
-<dt><code>mglToroidal=8</code></dt>
-<dd><p>Toroidal coordinates: {sinh(x)*cos(z)/(cosh(x)-cos(y)), sinh(x)*sin(z)/(cosh(x)-cos(y)), sin(y)/(cosh(x)-cos(y))};
-</p></dd>
-<dt><code>mglBispherical=9</code></dt>
-<dd><p>Bispherical coordinates: {sin(y)*cos(z)/(cosh(x)-cos(y)), sin(y)*sin(z)/(cosh(x)-cos(y)), sinh(x)/(cosh(x)-cos(y))};
-</p></dd>
-<dt><code>mglBipolar=10</code></dt>
-<dd><p>Bipolar coordinates: {sinh(x)/(cosh(x)-cos(y)), sin(y)/(cosh(x)-cos(y)), z};
-</p></dd>
-<dt><code>mglLogLog=11</code></dt>
-<dd><p>Log-log coordinates: {lg(x), lg(y), lg(z)};
-</p></dd>
-<dt><code>mglLogX=12</code></dt>
-<dd><p>Log-x coordinates: {lg(x), y, z};
-</p></dd>
-<dt><code>mglLogY=13</code></dt>
-<dd><p>Log-y coordinates: {x, lg(y), z}.
-</p></dd>
-</dl>
-</dd></dl>
-
-<a name="ternary"></a><dl>
-<dt><a name="index-ternary"></a>MGL command: <em></em> <strong>ternary</strong> <em><code>val</code></em></dt>
-<dd><p>The function sets to draws Ternary (<var>tern</var>=<code>1</code>), Quaternary (<var>tern</var>=<code>2</code>) plot or projections (<var>tern</var>=<code>4,5,6</code>).
-</p>
-<p>Ternary plot is special plot for 3 dependent coordinates (components) <var>a</var>, <var>b</var>, <var>c</var> so that <var>a</var>+<var>b</var>+<var>c</var>=1. MathGL uses only 2 independent coordinates <var>a</var>=x and <var>b</var>=y since it is enough to plot everything. At this third coordinate z act as another parameter to produce contour lines, surfaces and so on.
-</p>
-<p>Correspondingly, Quaternary plot is plot for 4 dependent coordinates <var>a</var>, <var>b</var>, <var>c</var> and <var>d</var> so that <var>a</var>+<var>b</var>+<var>c</var>+<var>d</var>=1. MathGL uses only 3 independent coordinates <var>a</var>=x, <var>b</var>=y and <var>d</var>=z since it is enough to plot everything.
-</p>
-<p>Projections can be obtained by adding value <code>4</code> to <var>tern</var> argument. So, that <var>tern</var>=<code>4</code> will draw projections in Cartesian coordinates, <var>tern</var>=<code>5</code> will draw projections in Ternary coordinates, <var>tern</var>=<code>6</code> will draw projections in Quaternary coordinates. If you add <code>8</code> instead of <code>4</code> then all text labels will not be printed on projections.
-</p>
-<p>Use <code>Ternary(0)</code> for returning to usual axis. See <a href="#Ternary-axis">Ternary axis</a>, for sample code and picture. See <a href="#Axis-projection">Axis projection</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<hr>
-<a name="Ticks"></a>
-<div class="header">
-<p>
-Previous: <a href="#Curved-coordinates" accesskey="p" rel="prev">Curved coordinates</a>, Up: <a href="#Axis-settings" accesskey="u" rel="up">Axis settings</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Ticks-1"></a>
-<h4 class="subsection">3.3.3 Ticks</h4>
-
-<a name="index-AxisStl"></a>
-<a name="index-TickLen"></a>
-<a name="index-Adjust"></a>
-<a name="index-XTick"></a>
-<a name="index-YTick"></a>
-<a name="index-ZTick"></a>
-<a name="index-CTick"></a>
-
-<a name="adjust"></a><dl>
-<dt><a name="index-adjust"></a>MGL command: <em></em> <strong>adjust</strong> <em>['dir'='xyzc']</em></dt>
-<dd><p>Set the ticks step, number of sub-ticks and initial ticks position to be the most human readable for the axis along direction(s) <var>dir</var>. Also set <code>SetTuneTicks(true)</code>. Usually you don`t need to call this function except the case of returning to default settings.
-</p></dd></dl>
-
-<a name="xtick"></a><a name="ytick"></a><a name="ztick"></a><a name="ctick"></a><dl>
-<dt><a name="index-xtick"></a>MGL command: <em></em> <strong>xtick</strong> <em><code>val [sub=0 org=nan 'fact'='']</code></em></dt>
-<dt><a name="index-ytick"></a>MGL command: <em></em> <strong>ytick</strong> <em><code>val [sub=0 org=nan 'fact'='']</code></em></dt>
-<dt><a name="index-ztick"></a>MGL command: <em></em> <strong>ztick</strong> <em><code>val [sub=0 org=nan 'fact'='']</code></em></dt>
-<dt><a name="index-ctick"></a>MGL command: <em></em> <strong>ctick</strong> <em><code>val [sub=0 org=nan 'fact'='']</code></em></dt>
-<dd><p>Set the ticks step <var>d</var>, number of sub-ticks <var>ns</var> (used for positive <var>d</var>) and initial ticks position <var>org</var> for the axis along direction <var>dir</var> (use `c` for colorbar ticks). Variable <var>d</var> set step for axis ticks (if positive) or it`s number on the axis range (if negative). Zero value set automatic ticks. If <var>org</var> value is NAN then axis origin is used. Parameter <var>fact</var> set text which will be printed after tick label (like "\pi" for <var>d</var>=M_PI).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-xtick-1"></a>MGL command: <em></em> <strong>xtick</strong> <em><code>val1</code> 'lbl1' [<code>val2</code> 'lbl2' ...]</em></dt>
-<dt><a name="index-ytick-1"></a>MGL command: <em></em> <strong>ytick</strong> <em><code>val1</code> 'lbl1' [<code>val2</code> 'lbl2' ...]</em></dt>
-<dt><a name="index-ztick-1"></a>MGL command: <em></em> <strong>ztick</strong> <em><code>val1</code> 'lbl1' [<code>val2</code> 'lbl2' ...]</em></dt>
-<dt><a name="index-xtick-2"></a>MGL command: <em></em> <strong>xtick</strong> <em>vdat 'lbls' [<code>add=off</code>]</em></dt>
-<dt><a name="index-ytick-2"></a>MGL command: <em></em> <strong>ytick</strong> <em>vdat 'lbls' [<code>add=off</code>]</em></dt>
-<dt><a name="index-ztick-2"></a>MGL command: <em></em> <strong>ztick</strong> <em>vdat 'lbls' [<code>add=off</code>]</em></dt>
-<dd><p>Set the manual positions <var>val</var> and its labels <var>lbl</var> for ticks along axis <var>dir</var>. If array <var>val</var> is absent then values equidistantly distributed in x-axis range are used. Labels are separated by `<samp>\n</samp>` symbol. If only one value is specified in MGL command then the label will be <em>add</em> to the current ones. Use <code>SetTicks()</code> to restore automatic ticks.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-xtick-3"></a>MGL command: <em></em> <strong>xtick</strong> <em>'templ'</em></dt>
-<dt><a name="index-ytick-3"></a>MGL command: <em></em> <strong>ytick</strong> <em>'templ'</em></dt>
-<dt><a name="index-ztick-3"></a>MGL command: <em></em> <strong>ztick</strong> <em>'templ'</em></dt>
-<dt><a name="index-ctick-1"></a>MGL command: <em></em> <strong>ctick</strong> <em>'templ'</em></dt>
-<dd><p>Set template <var>templ</var> for x-,y-,z-axis ticks or colorbar ticks. It may contain TeX symbols also. If <var>templ</var>=<code>""</code> then default template is used (in simplest case it is `<samp>%.2g</samp>`). If template start with `<samp>&</samp>` symbol then <code>long</code> integer value will be passed instead of default type <code>double</code>. Setting on template switch off automatic ticks tuning.
-</p></dd></dl>
-
-<a name="ticktime"></a><dl>
-<dt><a name="index-ticktime"></a>MGL command: <em></em> <strong>ticktime</strong> <em>'dir' [<code>dv=0</code> 'tmpl'='']</em></dt>
-<dd><p>Sets time labels with step <var>val</var> and template <var>templ</var> for x-,y-,z-axis ticks or colorbar ticks. It may contain TeX symbols also. The format of template <var>templ</var> is the same as described in <a href="http://www.manpagez.com/man/3/strftime/">http://www.manpagez.com/man/3/strftime/</a>. Most common variants are `<samp>%X</samp>` for national representation of time, `<samp>%x</samp>` for national representation of date, `<samp>%Y</samp>` for year with century. If <var>val</var>=0 and/or <var>templ</var>="" then automatic tick step and/or template will be selected. You can use <code>mgl_get_time</code>() function for obtaining number of second for given date/time string. Note, that MS Visual Studio couldn`t handle date before 1970.
-</p></dd></dl>
-
-
-<a name="tuneticks"></a><dl>
-<dt><a name="index-tuneticks"></a>MGL command: <em></em> <strong>tuneticks</strong> <em><code>val</code> [<code>pos=1.15</code>]</em></dt>
-<dd><p>Switch on/off ticks enhancing by factoring common multiplier (for small, like from 0.001 to 0.002, or large, like from 1000 to 2000, coordinate values - enabled if <var>tune</var>&1 is nonzero) or common component (for narrow range, like from 0.999 to 1.000 - enabled if <var>tune</var>&2 is nonzero). Also set the position <var>pos</var> of common multiplier/component on the axis: =0 at minimal axis value, =1 at maximal axis value. Default value is 1.15.
-</p></dd></dl>
-
-<a name="tickshift"></a><dl>
-<dt><a name="index-tickshift"></a>MGL command: <em></em> <strong>tickshift</strong> <em><code>dx [dy=0 dz=0 dc=0]</code></em></dt>
-<dd><p>Set value of additional shift for ticks labels.
-</p></dd></dl>
-
-
-<a name="origintick"></a><dl>
-<dt><a name="index-origintick"></a>MGL command: <em></em> <strong>origintick</strong> <em><code>val</code></em></dt>
-<dd><p>Enable/disable drawing of ticks labels at axis origin. In C/Fortran you can use <code>mgl_set_flag(gr,val, MGL_NO_ORIGIN);</code>.
-</p></dd></dl>
-
-<a name="ticklen"></a><dl>
-<dt><a name="index-ticklen"></a>MGL command: <em></em> <strong>ticklen</strong> <em><code>val</code> [<code>stt=1</code>]</em></dt>
-<dd><p>The relative length of axis ticks. Default value is <code>0.1</code>. Parameter <var>stt</var>>0 set relative length of subticks which is in <code>sqrt(1+stt)</code> times smaller.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-axisstl"></a>MGL command: <em></em> <strong>axisstl</strong> <em>'stl' ['tck'='' 'sub'='']</em></dt>
-<dd><p>The line style of axis (<var>stl</var>), ticks (<var>tck</var>) and subticks (<var>sub</var>). If <var>stl</var> is empty then default style is used (`<samp>k</samp>` or `<samp>w</samp>` depending on transparency type). If <var>tck</var> or <var>sub</var> is empty then axis style is used (i.e. <var>stl</var>).
-</p></dd></dl>
-
-
-<hr>
-<a name="Subplots-and-rotation"></a>
-<div class="header">
-<p>
-Next: <a href="#Export-picture" accesskey="n" rel="next">Export picture</a>, Previous: <a href="#Axis-settings" accesskey="p" rel="prev">Axis settings</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Subplots-and-rotation-1"></a>
-<h3 class="section">3.4 Subplots and rotation</h3>
-
-<a name="index-Aspect"></a>
-<a name="index-Rotate"></a>
-<a name="index-RotateN"></a>
-<a name="index-SubPlot"></a>
-<a name="index-MultiPlot"></a>
-<a name="index-StickPlot"></a>
-<a name="index-ColumnPlot"></a>
-<a name="index-InPlot"></a>
-<a name="index-Title"></a>
-<a name="index-Perspective"></a>
-<a name="index-View"></a>
-<a name="index-Push"></a>
-<a name="index-Pop"></a>
-
-<p>These functions control how and where further plotting will be placed. There is a certain calling order of these functions for the better plot appearance. First one should be <a href="#subplot">subplot</a>, <a href="#multiplot">multiplot</a> or <a href="#inplot">inplot</a> for specifying the place. Second one can be <a href="#title">title</a> for adding title for the subplot. After it a <a href="#rotate">rotate</a>, <a href="#shear">shear</a> and <a href="#aspect">aspect</a>. And finally any other plotting functions may be called. Alternatively you can use <a href="#columnplot">columnplot</a>, <a href="#gridplot">gridplot</a>, <a href="#stickplot">stickplot</a>, <a href="#shearplot">shearplot</a> or relative <a href="#inplot">inplot</a> for positioning plots in the column (or grid, or stick) one by another without gap between plot axis (bounding boxes). See <a href="#Subplots">Subplots</a>, for sample code and picture.
-</p>
-<a name="subplot"></a><dl>
-<dt><a name="index-subplot"></a>MGL command: <em></em> <strong>subplot</strong> <em><code>nx ny m</code> ['stl'='<>_^' <code>dx=0 dy=0</code>]</em></dt>
-<dd><p>Puts further plotting in a <var>m</var>-th cell of <var>nx</var>*<var>ny</var> grid of the whole frame area. The position of the cell can be shifted from its default position by relative size <var>dx</var>, <var>dy</var>. This function set off any aspects or rotations. So it should be used first for creating the subplot. Extra space will be reserved for axis/colorbar if <var>stl</var> contain:
-</p><ul>
-<li> `<samp>L</samp>` or `<samp><</samp>` - at left side,
-</li><li> `<samp>R</samp>` or `<samp>></samp>` - at right side,
-</li><li> `<samp>A</samp>` or `<samp>^</samp>` - at top side,
-</li><li> `<samp>U</samp>` or `<samp>_</samp>` - at bottom side,
-</li><li> `<samp>#</samp>` - reserve none space (use whole region for axis range) - axis and tick labels will be invisible by default.
-</li></ul>
-<p>From the aesthetical point of view it is not recommended to use this function with different matrices in the same frame. Note, colorbar can be invisible (be out of image borders) if you set empty style `<samp></samp>`.
-</p></dd></dl>
-
-<a name="multiplot"></a><dl>
-<dt><a name="index-multiplot"></a>MGL command: <em></em> <strong>multiplot</strong> <em><code>nx ny m dx dy</code> ['style'='<>_^' sx sy]</em></dt>
-<dd><p>Puts further plotting in a rectangle of <var>dx</var>*<var>dy</var> cells starting from <var>m</var>-th cell of <var>nx</var>*<var>ny</var> grid of the whole frame area. The position of the rectangular area can be shifted from its default position by relative size <var>sx</var>, <var>sy</var>. This function set off any aspects or rotations. So it should be used first for creating subplot. Extra space will be reserved for axis/colorbar if <var>stl</var> contain:
-</p><ul>
-<li> `<samp>L</samp>` or `<samp><</samp>` - at left side,
-</li><li> `<samp>R</samp>` or `<samp>></samp>` - at right side,
-</li><li> `<samp>A</samp>` or `<samp>^</samp>` - at top side,
-</li><li> `<samp>U</samp>` or `<samp>_</samp>` - at bottom side.
-`<samp>#</samp>` - reserve none space (use whole region for axis range) - axis and tick labels will be invisible by default.
-</li></ul>
-</dd></dl>
-
-<a name="inplot"></a><dl>
-<dt><a name="index-inplot"></a>MGL command: <em></em> <strong>inplot</strong> <em><code>x1 x2 y1 y2 [rel=on]</code></em></dt>
-<dd><p>Puts further plotting in some region of the whole frame surface. This function allows one to create a plot in arbitrary place of the screen. The position is defined by rectangular coordinates [<var>x1</var>, <var>x2</var>]*[<var>y1</var>, <var>y2</var>]. The coordinates <var>x1</var>, <var>x2</var>, <var>y1</var>, <var>y2</var> are normalized to interval [0, 1]. If parameter <var>rel</var>=<code>true</code> then the relative position to current <a href="#subplot">subplot</a> (or <a href="#inplot">inplot</a> with <var>rel</var>=<code>false</code>) is used. This function set off any aspects or rotations. So it should be used first for creating subplot.
-</p></dd></dl>
-
-<a name="columnplot"></a><dl>
-<dt><a name="index-columnplot"></a>MGL command: <em></em> <strong>columnplot</strong> <em><code>num ind [d=0]</code></em></dt>
-<dd><p>Puts further plotting in <var>ind</var>-th cell of column with <var>num</var> cells. The position is relative to previous <a href="#subplot">subplot</a> (or <a href="#inplot">inplot</a> with <var>rel</var>=<code>false</code>). Parameter <var>d</var> set extra gap between cells.
-</p></dd></dl>
-
-<a name="gridplot"></a><dl>
-<dt><a name="index-gridplot"></a>MGL command: <em></em> <strong>gridplot</strong> <em><code>nx ny ind [d=0]</code></em></dt>
-<dd><p>Puts further plotting in <var>ind</var>-th cell of <var>nx</var>*<var>ny</var> grid. The position is relative to previous <a href="#subplot">subplot</a> (or <a href="#inplot">inplot</a> with <var>rel</var>=<code>false</code>). Parameter <var>d</var> set extra gap between cells.
-</p></dd></dl>
-
-<a name="stickplot"></a><dl>
-<dt><a name="index-stickplot"></a>MGL command: <em></em> <strong>stickplot</strong> <em><code>num ind tet phi</code></em></dt>
-<dd><p>Puts further plotting in <var>ind</var>-th cell of stick with <var>num</var> cells. At this, stick is rotated on angles <var>tet</var>, <var>phi</var>. The position is relative to previous <a href="#subplot">subplot</a> (or <a href="#inplot">inplot</a> with <var>rel</var>=<code>false</code>).
-</p></dd></dl>
-
-<a name="shearplot"></a><dl>
-<dt><a name="index-shearplot"></a>MGL command: <em></em> <strong>shearplot</strong> <em><code>num ind sx sy [xd yd]</code></em></dt>
-<dd><p>Puts further plotting in <var>ind</var>-th cell of stick with <var>num</var> cells. At this, cell is sheared on values <var>sx</var>, <var>sy</var>. Stick direction is specified be <var>xd</var> and <var>yd</var>. The position is relative to previous <a href="#subplot">subplot</a> (or <a href="#inplot">inplot</a> with <var>rel</var>=<code>false</code>).
-</p></dd></dl>
-
-
-<a name="title"></a><dl>
-<dt><a name="index-title"></a>MGL command: <em></em> <strong>title</strong> <em>'title' ['stl'='' <code>size=-2</code>]</em></dt>
-<dd><p>Add text <var>title</var> for current subplot/inplot. Parameter <var>stl</var> can contain:
-</p><ul>
-<li> font style (see, <a href="#Font-styles">Font styles</a>);
-</li><li> `<samp>#</samp>` for box around the title.
-</li></ul>
-<p>Parameter <var>size</var> set font size. This function set off any aspects or rotations. So it should be used just after creating subplot.
-</p></dd></dl>
-
-<a name="rotate"></a><dl>
-<dt><a name="index-rotate"></a>MGL command: <em></em> <strong>rotate</strong> <em><code>tetx tetz [tety=0]</code></em></dt>
-<dd><p>Rotates a further plotting relative to each axis {x, z, y} consecutively on angles <var>TetX</var>, <var>TetZ</var>, <var>TetY</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-rotate-1"></a>MGL command: <em></em> <strong>rotate</strong> <em><code>tet x y z</code></em></dt>
-<dd><p>Rotates a further plotting around vector {<var>x</var>, <var>y</var>, <var>z</var>} on angle <var>Tet</var>.
-</p></dd></dl>
-
-<a name="shear"></a><dl>
-<dt><a name="index-shear"></a>MGL command: <em></em> <strong>shear</strong> <em><code>sx sy</code></em></dt>
-<dd><p>Shears a further plotting on values <var>sx</var>, <var>sy</var>.
-</p></dd></dl>
-
-<a name="aspect"></a><dl>
-<dt><a name="index-aspect"></a>MGL command: <em></em> <strong>aspect</strong> <em><code>ax ay [az=1]</code></em></dt>
-<dd><p>Defines aspect ratio for the plot. The viewable axes will be related one to another as the ratio <var>Ax:Ay:Az</var>. For the best effect it should be used after <a href="#rotate">rotate</a> function. If <var>Ax</var> is <code>NAN</code> then function try to select optimal aspect ratio to keep equal ranges for x-y axis. At this, <var>Ay</var> will specify proportionality factor, or set to use automatic one if <var>Ay</var>=<code>NAN</code>.
-</p></dd></dl>
-
-
-<p>There are 3 functions <code>View()</code>, <code>Zoom()</code> and <code>Perspective()</code> which transform whole image. I.e. they act as secondary transformation matrix. They were introduced for rotating/zooming the whole plot by mouse. It is not recommended to call them for picture drawing.
-</p>
-<a name="perspective"></a><dl>
-<dt><a name="index-perspective"></a>MGL command: <em></em> <strong>perspective</strong> <em><code>val</code></em></dt>
-<dd><p>Add (switch on) the perspective to plot. The parameter <em>a = Depth/(Depth+dz) \in [0,1)</em>. By default (<code>a=0</code>) the perspective is off.
-</p></dd></dl>
-
-<a name="view"></a><dl>
-<dt><a name="index-view"></a>MGL command: <em></em> <strong>view</strong> <em><code>tetx tetz [tety=0]</code></em></dt>
-<dd><p>Rotates a further plotting relative to each axis {x, z, y} consecutively on angles <var>TetX</var>, <var>TetZ</var>, <var>TetY</var>. Rotation is done independently on <a href="#rotate">rotate</a>. Attention! this settings can not be overwritten by <code>DefaultPlotParam()</code>. Use <code>Zoom(0,0,1,1)</code> to return default view.
-</p></dd></dl>
-
-<a name="zoom"></a><dl>
-<dt><a name="index-zoom"></a>MGL command: <em></em> <strong>zoom</strong> <em><code>x1 y1 x2 y2</code></em></dt>
-<dd><p>The function changes the scale of graphics that correspond to zoom in/out of the picture. After function call the current plot will be cleared and further the picture will contain plotting from its part [x1,x2]*[y1,y2]. Here picture coordinates <var>x1</var>, <var>x2</var>, <var>y1</var>, <var>y2</var> changes from 0 to 1. Attention! this settings can not be overwritten by any other functions, including <code>DefaultPlotParam()</code>. Use <code>Zoom(0,0,1,1)</code> to return default view.
-</p></dd></dl>
-
-
-<hr>
-<a name="Export-picture"></a>
-<div class="header">
-<p>
-Next: <a href="#Background" accesskey="n" rel="next">Background</a>, Previous: <a href="#Subplots-and-rotation" accesskey="p" rel="prev">Subplots and rotation</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Export-picture-1"></a>
-<h3 class="section">3.5 Export picture</h3>
-
-<a name="index-SetSize"></a>
-
-<p>Functions in this group save or give access to produced picture. So, usually they should be called after plotting is done.
-</p>
-<a name="setsize"></a><dl>
-<dt><a name="index-setsize"></a>MGL command: <em></em> <strong>setsize</strong> <em><code>w h</code></em></dt>
-<dd><p>Sets size of picture in pixels. This function <strong>should be</strong> called before any other plotting because it completely remove picture contents if <var>clear</var>=<code>true</code>. Function just clear pixels and scale all primitives if <var>clear</var>=<code>false</code>.
-</p></dd></dl>
-
-<a name="setsizescl"></a><dl>
-<dt><a name="index-setsizescl"></a>MGL command: <em></em> <strong>setsizescl</strong> <em><code>factor</code></em></dt>
-<dd><p>Set factor for width and height in all further calls of <a href="#setsize">setsize</a>. This command is <strong>obsolete</strong> since v.2.4.2.
-</p></dd></dl>
-
-<a name="quality"></a><dl>
-<dt><a name="index-quality"></a>MGL command: <em></em> <strong>quality</strong> <em>[<code>val</code>=2]</em></dt>
-<dd><p>Sets quality of the plot depending on value <var>val</var>: <code>MGL_DRAW_WIRE=0</code> - no face drawing (fastest), <code>MGL_DRAW_FAST=1</code> - no color interpolation (fast), <code>MGL_DRAW_NORM=2</code> - high quality (normal), <code>MGL_DRAW_HIGH=3</code> - high quality with 3d primitives (arrows and marks); <code>MGL_DRAW_LMEM=0x4</code> - direct bitmap drawing (low memory usage); <code>MGL_DRAW_DOTS=0x8</code> - for dots drawing instead of primitives (extremely fast).
-</p></dd></dl>
-
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Export-to-file" accesskey="1">Export to file</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Frames_002fAnimation" accesskey="2">Frames/Animation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Bitmap-in-memory" accesskey="3">Bitmap in memory</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Parallelization" accesskey="4">Parallelization</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Export-to-file"></a>
-<div class="header">
-<p>
-Next: <a href="#Frames_002fAnimation" accesskey="n" rel="next">Frames/Animation</a>, Up: <a href="#Export-picture" accesskey="u" rel="up">Export picture</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Export-to-file-1"></a>
-<h4 class="subsection">3.5.1 Export to file</h4>
-
-<a name="index-Write"></a>
-
-<p>These functions export current view to a graphic file. The filename <var>fname</var> should have appropriate extension. Parameter <var>descr</var> gives the short description of the picture. Just now the transparency is supported in PNG, SVG, OBJ and PRC files.
-</p>
-<a name="write"></a><dl>
-<dt><a name="index-write"></a>MGL command: <em></em> <strong>write</strong> <em>['fname'='']</em></dt>
-<dd><p>Exports current frame to a file <var>fname</var> which type is determined by the extension. Parameter <var>descr</var> adds description to file (can be <code>""</code>). If <var>fname</var>=<code>""</code> then the file `<samp>frame####.jpg</samp>` is used, where `<samp>####</samp>` is current frame id and name `<samp>frame</samp>` is defined by <a href="#plotid">plotid</a> class property.
-</p></dd></dl>
-
-<a name="bbox"></a><dl>
-<dt><a name="index-bbox"></a>MGL command: <em></em> <strong>bbox</strong> <em>x1 y1 [x2=<code>-1</code> y2=<code>-1</code>]</em></dt>
-<dd><p>Set boundary box for export graphics into 2D file formats. If <var>x2</var><0 (<var>y2</var><0) then original image width (height) will be used. If <var>x1</var><0 or <var>y1</var><0 or <var>x1</var>>=<var>x2</var>|Width or <var>y1</var>>=<var>y2</var>|Height then cropping will be disabled.
-</p></dd></dl>
-
-
-
-
-
-<hr>
-<a name="Frames_002fAnimation"></a>
-<div class="header">
-<p>
-Next: <a href="#Bitmap-in-memory" accesskey="n" rel="next">Bitmap in memory</a>, Previous: <a href="#Export-to-file" accesskey="p" rel="prev">Export to file</a>, Up: <a href="#Export-picture" accesskey="u" rel="up">Export picture</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Frames_002fAnimation-1"></a>
-<h4 class="subsection">3.5.2 Frames/Animation</h4>
-
-
-<p>There are no commands for making animation in MGL. However you can use features of <code>mglconv</code> and <code>mglview</code> utilities. For example, by busing special comments `<samp>##a </samp>` or `<samp>##c </samp>`.
-</p>
-
-
-<hr>
-<a name="Bitmap-in-memory"></a>
-<div class="header">
-<p>
-Next: <a href="#Parallelization" accesskey="n" rel="next">Parallelization</a>, Previous: <a href="#Frames_002fAnimation" accesskey="p" rel="prev">Frames/Animation</a>, Up: <a href="#Export-picture" accesskey="u" rel="up">Export picture</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Bitmap-in-memory-1"></a>
-<h4 class="subsection">3.5.3 Bitmap in memory</h4>
-
-
-
-
-<hr>
-<a name="Parallelization"></a>
-<div class="header">
-<p>
-Previous: <a href="#Bitmap-in-memory" accesskey="p" rel="prev">Bitmap in memory</a>, Up: <a href="#Export-picture" accesskey="u" rel="up">Export picture</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Parallelization-1"></a>
-<h4 class="subsection">3.5.4 Parallelization</h4>
-
-
-
-
-
-<hr>
-<a name="Background"></a>
-<div class="header">
-<p>
-Next: <a href="#Primitives" accesskey="n" rel="next">Primitives</a>, Previous: <a href="#Export-picture" accesskey="p" rel="prev">Export picture</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Background-1"></a>
-<h3 class="section">3.6 Background</h3>
-
-<a name="index-LoadBackground"></a>
-<a name="index-Clf"></a>
-<a name="index-Rasterize"></a>
-
-<p>These functions change background image.
-</p>
-<a name="clf"></a><dl>
-<dt><a name="index-clf"></a>MGL command: <em></em> <strong>clf</strong> <em>['col']</em></dt>
-<dt><a name="index-clf-1"></a>MGL command: <em></em> <strong>clf</strong> <em>r g b</em></dt>
-<dd><p>Clear the picture and fill background by specified color.
-</p></dd></dl>
-
-<a name="rasterize"></a><dl>
-<dt><a name="index-rasterize"></a>MGL command: <em></em> <strong>rasterize</strong></dt>
-<dd><p>Force drawing the plot and use it as background. After it, function clear the list of primitives, like <a href="#clf">clf</a>. This function is useful if you want save part of plot as bitmap one (for example, large surfaces, isosurfaces or vector fields) and keep some parts as vector one (like annotation, curves, axis and so on).
-</p></dd></dl>
-
-<a name="background"></a><dl>
-<dt><a name="index-background"></a>MGL command: <em></em> <strong>background</strong> <em>'fname' [<code>alpha=1</code>]</em></dt>
-<dd><p>Load PNG or JPEG file <var>fname</var> as background for the plot. Parameter <var>alpha</var> manually set transparency of the background.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Primitives"></a>
-<div class="header">
-<p>
-Next: <a href="#Text-printing" accesskey="n" rel="next">Text printing</a>, Previous: <a href="#Background" accesskey="p" rel="prev">Background</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Primitives-1"></a>
-<h3 class="section">3.7 Primitives</h3>
-
-<a name="index-Ball"></a>
-<a name="index-Line"></a>
-<a name="index-Curve"></a>
-<a name="index-Glyph"></a>
-<a name="index-Face"></a>
-<a name="index-FaceX"></a>
-<a name="index-FaceY"></a>
-<a name="index-FaceZ"></a>
-<a name="index-Cone"></a>
-<a name="index-Drop"></a>
-<a name="index-Sphere"></a>
-
-
-<p>These functions draw some simple objects like line, point, sphere, drop, cone and so on. See <a href="#Using-primitives">Using primitives</a>, for sample code and picture.
-</p>
-<a name="ball"></a><dl>
-<dt><a name="index-ball"></a>MGL command: <em></em> <strong>ball</strong> <em><code>x y</code> ['col'='r.']</em></dt>
-<dt><a name="index-ball-1"></a>MGL command: <em></em> <strong>ball</strong> <em><code>x y z</code> ['col'='r.']</em></dt>
-<dd><p>Draws a mark (point `<samp>.</samp>` by default) at position <var>p</var>={<var>x</var>, <var>y</var>, <var>z</var>} with color <var>col</var>.
-</p></dd></dl>
-
-<a name="errbox"></a><dl>
-<dt><a name="index-errbox"></a>MGL command: <em></em> <strong>errbox</strong> <em><code>x y ex ey</code> ['stl'='']</em></dt>
-<dt><a name="index-errbox-1"></a>MGL command: <em></em> <strong>errbox</strong> <em><code>x y z ex ey ez</code> ['stl'='']</em></dt>
-<dd><p>Draws a 3d error box at position <var>p</var>={<var>x</var>, <var>y</var>, <var>z</var>} with sizes <var>e</var>={<var>ex</var>, <var>ey</var>, <var>ez</var>} and style <var>stl</var>. Use NAN for component of <var>e</var> to reduce number of drawn elements.
-</p></dd></dl>
-
-<a name="line"></a><dl>
-<dt><a name="index-line"></a>MGL command: <em></em> <strong>line</strong> <em><code>x1 y1 x2 y2</code> ['stl'='']</em></dt>
-<dt><a name="index-line-1"></a>MGL command: <em></em> <strong>line</strong> <em><code>x1 y1 z1 x2 y2 z2</code> ['stl'='']</em></dt>
-<dd><p>Draws a geodesic line (straight line in Cartesian coordinates) from point <var>p1</var> to <var>p2</var> using line style <var>stl</var>. Parameter <var>num</var> define the “quality” of the line. If <var>num</var>=<code>2</code> then the straight line will be drawn in all coordinate system (independently on transformation formulas (see <a href="#Curved-coordinates">Curved coordinates</a>). Contrary, for large values (for example, =<code>100</code>) the geodesic line will be drawn in corresponding coordinate system (straight line in Cartesian coordinates, circle in polar coordinates and so on). Line will be drawn even if it lies out of bounding box.
-</p></dd></dl>
-
-<a name="curve"></a><dl>
-<dt><a name="index-curve"></a>MGL command: <em></em> <strong>curve</strong> <em><code>x1 y1 dx1 dy1 x2 y2 dx2 dy2</code> ['stl'='']</em></dt>
-<dt><a name="index-curve-1"></a>MGL command: <em></em> <strong>curve</strong> <em><code>x1 y1 z1 dx1 dy1 dz1 x2 y2 z2 dx2 dy2 dz2</code> ['stl'='']</em></dt>
-<dd><p>Draws Bezier-like curve from point <var>p1</var> to <var>p2</var> using line style <var>stl</var>. At this tangent is codirected with <var>d1</var>, <var>d2</var> and proportional to its amplitude. Parameter <var>num</var> define the “quality” of the curve. If <var>num</var>=<code>2</code> then the straight line will be drawn in all coordinate system (independently on transformation formulas, see <a href="#Curved-coordinates">Curved coordinates</a>). Contrary, for large values (for example, =<code>100</code>) the spline like Bezier curve will be drawn in corresponding coordinate system. Curve will be drawn even if it lies out of bounding box.
-</p></dd></dl>
-
-<a name="face"></a><dl>
-<dt><a name="index-face"></a>MGL command: <em></em> <strong>face</strong> <em><code>x1 y1 x2 y2 x3 y3 x4 y4</code> ['stl'='']</em></dt>
-<dt><a name="index-face-1"></a>MGL command: <em></em> <strong>face</strong> <em><code>x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4</code> ['stl'='']</em></dt>
-<dd><p>Draws the solid quadrangle (face) with vertexes <var>p1</var>, <var>p2</var>, <var>p3</var>, <var>p4</var> and with color(s) <var>stl</var>. At this colors can be the same for all vertexes or different if all 4 colors are specified for each vertex. Face will be drawn even if it lies out of bounding box.
-</p></dd></dl>
-
-<a name="rect"></a><dl>
-<dt><a name="index-rect"></a>MGL command: <em></em> <strong>rect</strong> <em><code>x1 y1 x2 y2</code> ['stl'='']</em></dt>
-<dt><a name="index-rect-1"></a>MGL command: <em></em> <strong>rect</strong> <em><code>x1 y1 z1 x2 y2 z2</code> ['stl'='']</em></dt>
-<dd><p>Draws the solid rectangle (face) with vertexes {<var>x1</var>, <var>y1</var>, <var>z1</var>} and {<var>x2</var>, <var>y2</var>, <var>z2</var>} with color <var>stl</var>. At this colors can be the same for all vertexes or separately if all 4 colors are specified for each vertex. Face will be drawn even if it lies out of bounding box.
-</p></dd></dl>
-
-<a name="facex"></a><a name="facey"></a><a name="facez"></a><dl>
-<dt><a name="index-facex"></a>MGL command: <em></em> <strong>facex</strong> <em><code>x0 y0 z0 wy wz</code> ['stl'='' <code>d1=0 d2=0</code>]</em></dt>
-<dt><a name="index-facey"></a>MGL command: <em></em> <strong>facey</strong> <em><code>x0 y0 z0 wx wz</code> ['stl'='' <code>d1=0 d2=0</code>]</em></dt>
-<dt><a name="index-facez"></a>MGL command: <em></em> <strong>facez</strong> <em><code>x0 y0 z0 wx wy</code> ['stl'='' <code>d1=0 d2=0</code>]</em></dt>
-<dd><p>Draws the solid rectangle (face) perpendicular to [x,y,z]-axis correspondingly at position {<var>x0</var>, <var>y0</var>, <var>z0</var>} with color <var>stl</var> and with widths <var>wx</var>, <var>wy</var>, <var>wz</var> along corresponding directions. At this colors can be the same for all vertexes or separately if all 4 colors are specified for each vertex. Parameters <var>d1</var>!=0, <var>d2</var>!=0 set additional shift of the last vertex (i.e. to draw quadrangle). Face will be drawn even if it lies out of bounding box.
-</p></dd></dl>
-
-<a name="sphere"></a><dl>
-<dt><a name="index-sphere"></a>MGL command: <em></em> <strong>sphere</strong> <em><code>x0 y0 r</code> ['col'='r']</em></dt>
-<dt><a name="index-sphere-1"></a>MGL command: <em></em> <strong>sphere</strong> <em><code>x0 y0 z0 r</code> ['col'='r']</em></dt>
-<dd><p>Draw the sphere with radius <var>r</var> and center at point <var>p</var>={<var>x0</var>, <var>y0</var>, <var>z0</var>} and color <var>stl</var>.
-</p></dd></dl>
-
-<a name="drop"></a><dl>
-<dt><a name="index-drop"></a>MGL command: <em></em> <strong>drop</strong> <em><code>x0 y0 dx dy r</code> ['col'='r' <code>sh=1 asp=1</code>]</em></dt>
-<dt><a name="index-drop-1"></a>MGL command: <em></em> <strong>drop</strong> <em><code>x0 y0 z0 dx dy dz r</code> ['col'='r' <code>sh=1 asp=1</code>]</em></dt>
-<dd><p>Draw the drop with radius <var>r</var> at point <var>p</var> elongated in direction <var>d</var> and with color <var>col</var>. Parameter <var>shift</var> set the degree of drop oblongness: `<samp>0</samp>` is sphere, `<samp>1</samp>` is maximally oblongness drop. Parameter <var>ap</var> set relative width of the drop (this is analogue of “ellipticity” for the sphere).
-</p></dd></dl>
-
-<a name="cone"></a><dl>
-<dt><a name="index-cone"></a>MGL command: <em></em> <strong>cone</strong> <em><code>x1 y1 z1 x2 y2 z2 r1</code> [<code>r2=-1</code> 'stl'='']</em></dt>
-<dd><p>Draw tube (or truncated cone if <var>edge</var>=<code>false</code>) between points <var>p1</var>, <var>p2</var> with radius at the edges <var>r1</var>, <var>r2</var>. If <var>r2</var><0 then it is supposed that <var>r2</var>=<var>r1</var>. The cone color is defined by string <var>stl</var>. Parameter <var>stl</var> can contain:
-</p><ul>
-<li> `<samp>@</samp>` for drawing edges;
-</li><li> `<samp>#</samp>` for wired cones;
-</li><li> `<samp>t</samp>` for drawing tubes/cylinder instead of cones/prisms;
-</li><li> `<samp>4</samp>`, `<samp>6</samp>`, `<samp>8</samp>` for drawing square, hex- or octo-prism instead of cones.
-</li></ul>
-</dd></dl>
-
-<a name="circle"></a><dl>
-<dt><a name="index-circle"></a>MGL command: <em></em> <strong>circle</strong> <em><code>x0 y0 r</code> ['col'='r']</em></dt>
-<dt><a name="index-circle-1"></a>MGL command: <em></em> <strong>circle</strong> <em><code>x0 y0 z0 r</code> ['col'='r']</em></dt>
-<dd><p>Draw the circle with radius <var>r</var> and center at point <var>p</var>={<var>x0</var>, <var>y0</var>, <var>z0</var>}. Parameter <var>col</var> may contain
-</p><ul>
-<li> colors for filling and boundary (second one if style `<samp>@</samp>` is used, black color is used by default);
-</li><li> `<samp>#</samp>` for wire figure (boundary only);
-</li><li> `<samp>@</samp>` for filling and boundary.
-</li></ul>
-</dd></dl>
-
-<a name="ellipse"></a><dl>
-<dt><a name="index-ellipse"></a>MGL command: <em></em> <strong>ellipse</strong> <em><code>x1 y1 x2 y2 r</code> ['col'='r']</em></dt>
-<dt><a name="index-ellipse-1"></a>MGL command: <em></em> <strong>ellipse</strong> <em><code>x1 y1 z1 x2 y2 z2 r</code> ['col'='r']</em></dt>
-<dd><p>Draw the ellipse with radius <var>r</var> and focal points <var>p1</var>, <var>p2</var>. Parameter <var>col</var> may contain
-</p><ul>
-<li> colors for filling and boundary (second one if style `<samp>@</samp>` is used, black color is used by default);
-</li><li> `<samp>#</samp>` for wire figure (boundary only);
-</li><li> `<samp>@</samp>` for filling and boundary.
-</li></ul>
-</dd></dl>
-
-<a name="rhomb"></a><dl>
-<dt><a name="index-rhomb"></a>MGL command: <em></em> <strong>rhomb</strong> <em><code>x1 y1 x2 y2 r</code> ['col'='r']</em></dt>
-<dt><a name="index-rhomb-1"></a>MGL command: <em></em> <strong>rhomb</strong> <em><code>x1 y1 z1 x2 y2 z2 r</code> ['col'='r']</em></dt>
-<dd><p>Draw the rhombus with width <var>r</var> and edge points <var>p1</var>, <var>p2</var>. Parameter <var>col</var> may contain
-</p><ul>
-<li> colors for filling and boundary (second one if style `<samp>@</samp>` is used, black color is used by default);
-</li><li> `<samp>#</samp>` for wire figure (boundary only);
-</li><li> `<samp>@</samp>` for filling and boundary.
-</li></ul>
-</dd></dl>
-
-<a name="arc"></a><dl>
-<dt><a name="index-arc"></a>MGL command: <em></em> <strong>arc</strong> <em><code>x0 y0 x1 y1 a</code> ['col'='r']</em></dt>
-<dt><a name="index-arc-1"></a>MGL command: <em></em> <strong>arc</strong> <em><code>x0 y0 z0 x1 y1 a</code> ['col'='r']</em></dt>
-<dt><a name="index-arc-2"></a>MGL command: <em></em> <strong>arc</strong> <em><code>x0 y0 z0 xa ya za x1 y1 z1 a</code> ['col'='r']</em></dt>
-<dd><p>Draw the arc around axis <var>pa</var> (default is z-axis <var>pa</var>={0,0,1}) with center at <var>p0</var> and starting from point <var>p1</var>. Parameter <var>a</var> set the angle of arc in degree. Parameter <var>col</var> may contain color of the arc and arrow style for arc edges.
-</p></dd></dl>
-
-<a name="polygon"></a><dl>
-<dt><a name="index-polygon"></a>MGL command: <em></em> <strong>polygon</strong> <em><code>x0 y0 x1 y1 num</code> ['col'='r']</em></dt>
-<dt><a name="index-polygon-1"></a>MGL command: <em></em> <strong>polygon</strong> <em><code>x0 y0 z0 x1 y1 z1 num</code> ['col'='r']</em></dt>
-<dd><p>Draw the polygon with <var>num</var> edges starting from <var>p1</var>. The center of polygon is located in <var>p0</var>. Parameter <var>col</var> may contain
-</p><ul>
-<li> colors for filling and boundary (second one if style `<samp>@</samp>` is used, black color is used by default);
-</li><li> `<samp>#</samp>` for wire figure (boundary only);
-</li><li> `<samp>@</samp>` for filling and boundary.
-</li></ul>
-</dd></dl>
-
-
-<a name="logo"></a><dl>
-<dt><a name="index-logo"></a>MGL command: <em></em> <strong>logo</strong> <em>'fname' [smooth=off]</em></dt>
-<dd><p>Draw bitmap (logo) along whole axis range, which can be changed by <a href="#Command-options">Command options</a>. Bitmap can be loaded from file or specified as RGBA values for pixels. Parameter <var>smooth</var> set to draw bitmap without or with color interpolation.
-</p></dd></dl>
-
-
-<a name="symbol"></a><dl>
-<dt><a name="index-symbol"></a>MGL command: <em></em> <strong>symbol</strong> <em><code>x y</code> 'id' ['fnt'='' <code>size=-1</code>]</em></dt>
-<dt><a name="index-symbol-1"></a>MGL command: <em></em> <strong>symbol</strong> <em><code>x y z</code> 'id' ['fnt'='' <code>size=-1</code>]</em></dt>
-<dd><p>Draws user-defined symbol with name <var>id</var> at position <var>p</var> with style specifying by <var>fnt</var>. The size of font is set by <var>size</var> parameter (default is <code>-1</code>). The string <var>fnt</var> may contain color specification ended by `<samp>:</samp>` symbol; styles `<samp>a</samp>`, `<samp>A</samp>` to draw at absolute position {<var>x</var>, <var>y</var>} (supposed to be in range [0,1]) of picture (for `<samp>A</samp>`) or subplot/inplot (for `<samp>a</samp>`); and style `<samp>w</samp>` to draw wired symbol.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-symbol-2"></a>MGL command: <em></em> <strong>symbol</strong> <em><code>x y dx dy</code> 'id' ['fnt'=':L' <code>size=-1</code>]</em></dt>
-<dt><a name="index-symbol-3"></a>MGL command: <em></em> <strong>symbol</strong> <em><code>x y z dx dy dz</code> 'id' ['fnt'=':L' <code>size=-1</code>]</em></dt>
-<dd><p>The same as previous but symbol will be drawn rotated along direction <var>d</var>.
-</p></dd></dl>
-
-<a name="addsymbol"></a><dl>
-<dt><a name="index-addsymbol"></a>MGL command: <em></em> <strong>addsymbol</strong> <em>'id' xdat ydat</em></dt>
-<dd><p>Add user-defined symbol with name <var>id</var> and contour {<var>xdat</var>, <var>ydat</var>}. You can use <code>NAN</code> values to set break (jump) of contour curve.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Text-printing"></a>
-<div class="header">
-<p>
-Next: <a href="#Axis-and-Colorbar" accesskey="n" rel="next">Axis and Colorbar</a>, Previous: <a href="#Primitives" accesskey="p" rel="prev">Primitives</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Text-printing-1"></a>
-<h3 class="section">3.8 Text printing</h3>
-
-<a name="index-Text"></a>
-<a name="index-Label"></a>
-<a name="index-fgets"></a>
-
-<p>These functions draw the text. There are functions for drawing text in arbitrary place, in arbitrary direction and along arbitrary curve. MathGL can use arbitrary font-faces and parse many TeX commands (for more details see <a href="#Font-styles">Font styles</a>). All these functions have 2 variant: for printing 8-bit text (<code>char *</code>) and for printing Unicode text (<code>wchar_t *</code>). In first case the conversion into the current locale is used. So sometimes you need to specify it by <code>setlocale()</code> function. The <var>size</var> argument control the size of text: if positive it give the value, if negative it give the value relative to <code>SetFontSize()</code>. The font type (STIX, arial, courier, times and so on) can be selected by function LoadFont(). See <a href="#Font-settings">Font settings</a>.
-</p>
-<p>The font parameters are described by string. This string may set the text color `<samp>wkrgbcymhRGBCYMHW</samp>` (see <a href="#Color-styles">Color styles</a>). Starting from MathGL v.2.3, you can set color gradient for text (see <a href="#Color-scheme">Color scheme</a>). Also, after delimiter symbol `<samp>:</samp>`, it can contain characters of font type (`<samp>rbiwou</samp>`) and/or align (`<samp>LRCTV</samp>`) specification. The font types are: `<samp>r</samp>` - roman (or regular) font, `<samp>i</samp>` - italic style, `<samp>b</samp>` - bold style, `<samp>w</samp>` - wired style, `<samp>o</samp>` - over-lined text, `<samp>u</samp>` - underlined text. By default roman font is used. The align types are: `<samp>L</samp>` - align left (default), `<samp>C</samp>` - align center, `<samp>R</samp>` - align right, `<samp>T</samp>` - align under, `<samp>V</samp>` - align center vertical. For example, string `<samp>b:iC</samp>` correspond to italic font style for centered text which printed by blue color.
-</p>
-<p>If string contains symbols `<samp>aA</samp>` then text is printed at absolute position {<var>x</var>, <var>y</var>} (supposed to be in range [0,1]) of picture (for `<samp>A</samp>`) or subplot/inplot (for `<samp>a</samp>`). If string contains symbol `<samp>@</samp>` then box around text is drawn.
-</p>
-<p>See <a href="#Text-features">Text features</a>, for sample code and picture.
-</p>
-<a name="text"></a><dl>
-<dt><a name="index-text"></a>MGL command: <em></em> <strong>text</strong> <em><code>x y</code> 'text' ['fnt'='' <code>size=-1</code>]</em></dt>
-<dt><a name="index-text-1"></a>MGL command: <em></em> <strong>text</strong> <em><code>x y z</code> 'text' ['fnt'='' <code>size=-1</code>]</em></dt>
-<dd><p>Draws the string <var>text</var> at position <var>p</var> with fonts specifying by the criteria <var>fnt</var>. The size of font is set by <var>size</var> parameter (default is <code>-1</code>).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-text-2"></a>MGL command: <em></em> <strong>text</strong> <em><code>x y dx dy</code> 'text' ['fnt'=':L' <code>size=-1</code>]</em></dt>
-<dt><a name="index-text-3"></a>MGL command: <em></em> <strong>text</strong> <em><code>x y z dx dy dz</code> 'text' ['fnt'=':L' <code>size=-1</code>]</em></dt>
-<dd><p>Draws the string <var>text</var> at position <var>p</var> along direction <var>d</var> with specified <var>size</var>. Parameter <var>fnt</var> set text style and text position: under (`<samp>T</samp>`) or above (`<samp>t</samp>`) the line.
-</p></dd></dl>
-
-<a name="fgets"></a><dl>
-<dt><a name="index-fgets-1"></a>MGL command: <em></em> <strong>fgets</strong> <em><code>x y</code> 'fname' [<code>n=0</code> 'fnt'='' <code>size=-1.4</code>]</em></dt>
-<dt><a name="index-fgets-2"></a>MGL command: <em></em> <strong>fgets</strong> <em><code>x y z</code> 'fname' [<code>n=0</code> 'fnt'='' <code>size=-1.4</code>]</em></dt>
-<dd><p>Draws unrotated <var>n</var>-th line of file <var>fname</var> at position {<var>x</var>,<var>y</var>,<var>z</var>} with specified <var>size</var>. By default parameters from <a href="#font">font</a> command are used.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-text-4"></a>MGL command: <em></em> <strong>text</strong> <em>ydat 'text' ['fnt'='']</em></dt>
-<dt><a name="index-text-5"></a>MGL command: <em></em> <strong>text</strong> <em>xdat ydat 'text' ['fnt'='']</em></dt>
-<dt><a name="index-text-6"></a>MGL command: <em></em> <strong>text</strong> <em>xdat ydat zdat 'text' ['fnt'='']</em></dt>
-<dd><p>The function draws <var>text</var> along the curve between points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]} by font style <var>fnt</var>. The string <var>fnt</var> may contain symbols `<samp>t</samp>` for printing the text under the curve (default), or `<samp>T</samp>` for printing the text under the curve. The sizes of 1st dimension must be equal for all arrays <code>x.nx=y.nx=z.nx</code>. If array <var>x</var> is not specified then its an automatic array is used with values equidistantly distributed in x-axis range (see <a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a>). If array <var>z</var> is not specified then <var>z</var>[i] equal to minimal z-axis value is used. String <var>opt</var> contain command options (see <a href="#Command-options">Command options</a>).
-</p></dd></dl>
-
-
-<hr>
-<a name="Axis-and-Colorbar"></a>
-<div class="header">
-<p>
-Next: <a href="#Legend" accesskey="n" rel="next">Legend</a>, Previous: <a href="#Text-printing" accesskey="p" rel="prev">Text printing</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Axis-and-Colorbar-1"></a>
-<h3 class="section">3.9 Axis and Colorbar</h3>
-
-<a name="index-Axis-1"></a>
-<a name="index-Box"></a>
-<a name="index-Grid"></a>
-<a name="index-Colorbar"></a>
-<a name="index-Label-1"></a>
-
-<p>These functions draw the “things for measuring”, like axis with ticks, colorbar with ticks, grid along axis, bounding box and labels for axis. For more information see <a href="#Axis-settings">Axis settings</a>.
-</p>
-<a name="axis"></a><dl>
-<dt><a name="index-axis-2"></a>MGL command: <em></em> <strong>axis</strong> <em>['dir'='xyz' 'stl'='']</em></dt>
-<dd><p>Draws axes with ticks (see <a href="#Axis-settings">Axis settings</a>). Parameter <var>dir</var> may contain:
-</p><ul>
-<li> `<samp>xyz</samp>` for drawing axis in corresponding direction;
-</li><li> `<samp>XYZ</samp>` for drawing axis in corresponding direction but with inverted positions of labels;
-</li><li> `<samp>~</samp>` or `<samp>_</samp>` for disabling tick labels;
-</li><li> `<samp>U</samp>` for disabling rotation of tick labels;
-</li><li> `<samp>^</samp>` for inverting default axis origin;
-</li><li> `<samp>!</samp>` for disabling ticks tuning (see <a href="#tuneticks">tuneticks</a>);
-</li><li> `<samp>AKDTVISO</samp>` for drawing arrow at the end of axis;
-</li><li> `<samp>a</samp>` for forced adjusting of axis ticks;
-</li><li> `<samp>:</samp>` for drawing lines through point (0,0,0);
-</li><li> `<samp>f</samp>` for printing ticks labels in fixed format;
-</li><li> `<samp>E</samp>` for using `<samp>E</samp>` instead of `<samp>e</samp>` in ticks labels;
-</li><li> `<samp>F</samp>` for printing ticks labels in LaTeX format;
-</li><li> `<samp>+</samp>` for printing `<samp>+</samp>` for positive ticks;
-</li><li> `<samp>-</samp>` for printing usual `<samp>-</samp>` in ticks labels;
-</li><li> `<samp>0123456789</samp>` for precision at printing ticks labels.
-</li></ul>
-<p>Styles of ticks and axis can be overrided by using <var>stl</var> string. Option <code>value</code> set the manual rotation angle for the ticks. See <a href="#Axis-and-ticks">Axis and ticks</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="colorbar"></a><dl>
-<dt><a name="index-colorbar"></a>MGL command: <em></em> <strong>colorbar</strong> <em>['sch'='']</em></dt>
-<dd><p>Draws colorbar. Parameter <var>sch</var> may contain:
-</p><ul>
-<li> color scheme (see <a href="#Color-scheme">Color scheme</a>);
-</li><li> `<samp><>^_</samp>` for positioning at left, at right, at top or at bottom correspondingly;
-</li><li> `<samp>I</samp>` for positioning near bounding (by default, is positioned at edges of subplot);
-</li><li> `<samp>A</samp>` for using absolute coordinates;
-</li><li> `<samp>~</samp>` for disabling tick labels.
-</li><li> `<samp>!</samp>` for disabling ticks tuning (see <a href="#tuneticks">tuneticks</a>);
-</li><li> `<samp>f</samp>` for printing ticks labels in fixed format;
-</li><li> `<samp>E</samp>` for using `<samp>E</samp>` instead of `<samp>e</samp>` in ticks labels;
-</li><li> `<samp>F</samp>` for printing ticks labels in LaTeX format;
-</li><li> `<samp>+</samp>` for printing `<samp>+</samp>` for positive ticks;
-</li><li> `<samp>-</samp>` for printing usual `<samp>-</samp>` in ticks labels;
-</li><li> `<samp>0123456789</samp>` for precision at printing ticks labels.
-</li></ul>
-<p>See <a href="#Colorbars">Colorbars</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-colorbar-1"></a>MGL command: <em></em> <strong>colorbar</strong> <em>vdat ['sch'='']</em></dt>
-<dd><p>The same as previous but with sharp colors <var>sch</var> (current palette if <code>sch=""</code>) for values <var>v</var>. See <a href="#contd-sample">contd sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-colorbar-2"></a>MGL command: <em></em> <strong>colorbar</strong> <em>'sch' <code>x y [w=1 h=1]</code></em></dt>
-<dd><p>The same as first one but at arbitrary position of subplot {<var>x</var>, <var>y</var>} (supposed to be in range [0,1]). Parameters <var>w</var>, <var>h</var> set the relative width and height of the colorbar.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-colorbar-3"></a>MGL command: <em></em> <strong>colorbar</strong> <em>vdat 'sch' <code>x y [w=1 h=1]</code></em></dt>
-<dd><p>The same as previous but with sharp colors <var>sch</var> (current palette if <code>sch=""</code>) for values <var>v</var>. See <a href="#contd-sample">contd sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="grid"></a><dl>
-<dt><a name="index-grid"></a>MGL command: <em></em> <strong>grid</strong> <em>['dir'='xyz' 'pen'='B']</em></dt>
-<dd><p>Draws grid lines perpendicular to direction determined by string parameter <var>dir</var>. If <var>dir</var> contain `<samp>!</samp>` then grid lines will be drawn at coordinates of subticks also. The step of grid lines is the same as tick step for <a href="#axis">axis</a>. The style of lines is determined by <var>pen</var> parameter (default value is dark blue solid line `<samp>B-</samp>`).
-</p></dd></dl>
-
-<a name="box"></a><dl>
-<dt><a name="index-box"></a>MGL command: <em></em> <strong>box</strong> <em>['stl'='k' <code>ticks=on</code>]</em></dt>
-<dd><p>Draws bounding box outside the plotting volume with color <var>col</var>. If <var>col</var> contain `<samp>@</samp>` then filled faces are drawn. At this first color is used for faces (default is light yellow), last one for edges. See <a href="#Bounding-box">Bounding box</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="xlabel"></a><a name="ylabel"></a><a name="zlabel"></a><a name="tlabel"></a><dl>
-<dt><a name="index-xlabel"></a>MGL command: <em></em> <strong>xlabel</strong> <em>'text' [<code>pos=1</code>]</em></dt>
-<dt><a name="index-ylabel"></a>MGL command: <em></em> <strong>ylabel</strong> <em>'text' [<code>pos=1</code>]</em></dt>
-<dt><a name="index-zlabel"></a>MGL command: <em></em> <strong>zlabel</strong> <em>'text' [<code>pos=1</code>]</em></dt>
-<dt><a name="index-tlabel"></a>MGL command: <em></em> <strong>tlabel</strong> <em>'text' [<code>pos=1</code>]</em></dt>
-<dd><p>Prints the label <var>text</var> for axis <var>dir</var>=`<samp>x</samp>`,`<samp>y</samp>`,`<samp>z</samp>`,`<samp>t</samp>` (here `<samp>t</samp>` is “ternary” axis <em>t=1-x-y</em>). The position of label is determined by <var>pos</var> parameter. If <var>pos</var>=0 then label is printed at the center of axis. If <var>pos</var>>0 then label is printed at the maximum of axis. If <var>pos</var><0 then label is printed at the minimum of axis. Option <code>value</code> set additional shifting of the label. See <a href="#Text-printing">Text printing</a>.
-</p></dd></dl>
-
-
-<hr>
-<a name="Legend"></a>
-<div class="header">
-<p>
-Next: <a href="#g_t1D-plotting" accesskey="n" rel="next">1D plotting</a>, Previous: <a href="#Axis-and-Colorbar" accesskey="p" rel="prev">Axis and Colorbar</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Legend-1"></a>
-<h3 class="section">3.10 Legend</h3>
-
-<a name="index-Legend"></a>
-<a name="index-AddLegend"></a>
-<a name="index-ClearLegend"></a>
-<a name="index-SetLegendBox"></a>
-<a name="index-SetLegendMarks"></a>
-
-<p>These functions draw legend to the graph (useful for <a href="#g_t1D-plotting">1D plotting</a>). Legend entry is a pair of strings: one for style of the line, another one with description text (with included TeX parsing). The arrays of strings may be used directly or by accumulating first to the internal arrays (by function <a href="#addlegend">addlegend</a>) and further plotting it. The position of the legend can be selected automatic or manually (even out of bounding box). Parameters <var>fnt</var> and <var>size</var> specify the font style and size (see <a href="#Font-settings">Font settings</a>). Option <code>value</code> set the relative width of the line sample and the text indent. If line style string for entry is empty then the corresponding text is printed without indent. Parameter <var>fnt</var> may contain:
-</p><ul>
-<li> font style for legend text;
-</li><li> `<samp>A</samp>` for positioning in absolute coordinates;
-</li><li> `<samp>^</samp>` for positioning outside of specified point;
-</li><li> `<samp>#</samp>` for drawing box around legend;
-</li><li> `<samp>-</samp>` for arranging legend entries horizontally;
-</li><li> colors for face (1st one), for border (2nd one) and for text (last one). If less than 3 colors are specified then the color for border is black (for 2 and less colors), and the color for face is white (for 1 or none colors).
-</li></ul>
-<p>See <a href="#Legend-sample">Legend sample</a>, for sample code and picture.
-</p>
-<a name="legend"></a><dl>
-<dt><a name="index-legend-2"></a>MGL command: <em></em> <strong>legend</strong> <em>[<code>pos=3</code> 'fnt'='#']</em></dt>
-<dd><p>Draws legend of accumulated legend entries by font <var>fnt</var> with <var>size</var>. Parameter <var>pos</var> sets the position of the legend: `<samp>0</samp>` is bottom left corner, `<samp>1</samp>` is bottom right corner, `<samp>2</samp>` is top left corner, `<samp>3</samp>` is top right corner (is default). Option <code>value</code> set the space between line samples and text (default is 0.1).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-legend-3"></a>MGL command: <em></em> <strong>legend</strong> <em><code>x y</code> ['fnt'='#']</em></dt>
-<dd><p>Draws legend of accumulated legend entries by font <var>fnt</var> with <var>size</var>. Position of legend is determined by parameter <var>x</var>, <var>y</var> which supposed to be normalized to interval [0,1]. Option <code>value</code> set the space between line samples and text (default is 0.1).
-</p></dd></dl>
-
-<a name="addlegend"></a><dl>
-<dt><a name="index-addlegend"></a>MGL command: <em></em> <strong>addlegend</strong> <em>'text' 'stl'</em></dt>
-<dd><p>Adds string <var>text</var> to internal legend accumulator. The style of described line and mark is specified in string <var>style</var> (see <a href="#Line-styles">Line styles</a>).
-</p></dd></dl>
-
-<a name="clearlegend"></a><dl>
-<dt><a name="index-clearlegend"></a>MGL command: <em></em> <strong>clearlegend</strong></dt>
-<dd><p>Clears saved legend strings.
-</p></dd></dl>
-
-<a name="legendmarks"></a><dl>
-<dt><a name="index-legendmarks"></a>MGL command: <em></em> <strong>legendmarks</strong> <em><code>val</code></em></dt>
-<dd><p>Set the number of marks in the legend. By default 1 mark is used.
-</p></dd></dl>
-
-
-<hr>
-<a name="g_t1D-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#g_t2D-plotting" accesskey="n" rel="next">2D plotting</a>, Previous: <a href="#Legend" accesskey="p" rel="prev">Legend</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="g_t1D-plotting-1"></a>
-<h3 class="section">3.11 1D plotting</h3>
-
-<a name="index-Plot"></a>
-<a name="index-Radar"></a>
-<a name="index-Tens"></a>
-<a name="index-Area"></a>
-<a name="index-Region"></a>
-<a name="index-Stem"></a>
-<a name="index-Bars"></a>
-<a name="index-Barh"></a>
-<a name="index-Chart"></a>
-<a name="index-Step"></a>
-<a name="index-Torus"></a>
-<a name="index-Tube"></a>
-<a name="index-Mark"></a>
-<a name="index-TextMark"></a>
-<a name="index-Error"></a>
-<a name="index-BoxPlot"></a>
-<a name="index-Candle"></a>
-<a name="index-Tape"></a>
-<a name="index-Label-2"></a>
-<a name="index-Cones"></a>
-
-<p>These functions perform plotting of 1D data. 1D means that data depended from only 1 parameter like parametric curve {x[i],y[i],z[i]}, i=1...n. By default (if absent) values of <var>x</var>[i] are equidistantly distributed in axis range, and <var>z</var>[i] equal to minimal z-axis value. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension <strong>must be equal</strong> for all arrays <code>x.nx=y.nx=z.nx</code>.
-</p>
-<p>String <var>pen</var> specifies the color and style of line and marks (see <a href="#Line-styles">Line styles</a>). By default (<code>pen=""</code>) solid line with color from palette is used (see <a href="#Palette-and-colors">Palette and colors</a>). Symbol `<samp>!</samp>` set to use new color from palette for each point (not for each curve, as default). String <var>opt</var> contain command options (see <a href="#Command-options">Command options</a>).
-</p>
-<a name="plot"></a><dl>
-<dt><a name="index-plot"></a>MGL command: <em></em> <strong>plot</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-plot-1"></a>MGL command: <em></em> <strong>plot</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-plot-2"></a>MGL command: <em></em> <strong>plot</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dd><p>These functions draw continuous lines between points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. If <var>pen</var> contain `<samp>a</samp>` then segments between points outside of axis range are drawn too. If <var>pen</var> contain `<samp>~</samp>` then number of segments is reduce for quasi-straight curves. See also <a href="#area">area</a>, <a href="#step">step</a>, <a href="#stem">stem</a>, <a href="#tube">tube</a>, <a href="#mark">mark</a>, <a href="#error">error</a>, <a href="#belt">belt</a>, <a href="#tens">tens</a>, <a href="#tape">tape</a>, <a href="#meshnum">meshnum</a>. See <a href="#plot-sample">plot sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="radar"></a><dl>
-<dt><a name="index-radar"></a>MGL command: <em></em> <strong>radar</strong> <em>adat ['stl'='']</em></dt>
-<dd><p>This functions draws radar chart which is continuous lines between points located on an radial lines (like plot in Polar coordinates). Option <code>value</code> set the additional shift of data (i.e. the data <var>a</var>+<code>value</code> is used instead of <var>a</var>). If <code>value<0</code> then <code>r=max(0, -min(value)</code>. If <var>pen</var> containt `<samp>#</samp>` symbol then "grid" (radial lines and circle for <var>r</var>) is drawn. If <var>pen</var> contain `<samp>a</samp>` then segments between points outside of axis range are drawn too. See also <a href="#plot">plot</a>, <a href="#meshnum">meshnum</a>. See <a href="#radar-sample">radar sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="step"></a><dl>
-<dt><a name="index-step"></a>MGL command: <em></em> <strong>step</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-step-1"></a>MGL command: <em></em> <strong>step</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-step-2"></a>MGL command: <em></em> <strong>step</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dd><p>These functions draw continuous stairs for points to axis plane. If <var>x</var>.nx><var>y</var>.nx then <var>x</var> set the edges of bars, rather than its central positions. See also <a href="#plot">plot</a>, <a href="#stem">stem</a>, <a href="#tile">tile</a>, <a href="#boxs">boxs</a>, <a href="#meshnum">meshnum</a>. See <a href="#step-sample">step sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="tens"></a><dl>
-<dt><a name="index-tens"></a>MGL command: <em></em> <strong>tens</strong> <em>ydat cdat ['stl'='']</em></dt>
-<dt><a name="index-tens-1"></a>MGL command: <em></em> <strong>tens</strong> <em>xdat ydat cdat ['stl'='']</em></dt>
-<dt><a name="index-tens-2"></a>MGL command: <em></em> <strong>tens</strong> <em>xdat ydat zdat cdat ['stl'='']</em></dt>
-<dd><p>These functions draw continuous lines between points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]} with color defined by the special array <var>c</var>[i] (look like tension plot). String <var>pen</var> specifies the color scheme (see <a href="#Color-scheme">Color scheme</a>) and style and/or width of line (see <a href="#Line-styles">Line styles</a>). If <var>pen</var> contain `<samp>a</samp>` then segments between points outside of axis range are drawn too. If <var>pen</var> contain `<samp>~</samp>` then number of segments is reduce for quasi-straight curves. See also <a href="#plot">plot</a>, <a href="#mesh">mesh</a>, <a href="#fall">fall</a>, <a href="#meshnum">meshnum</a>. See <a href="#tens-sample">tens sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="tape"></a><dl>
-<dt><a name="index-tape"></a>MGL command: <em></em> <strong>tape</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-tape-1"></a>MGL command: <em></em> <strong>tape</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-tape-2"></a>MGL command: <em></em> <strong>tape</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dd><p>These functions draw tapes of normals for curve between points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Initial tape(s) was selected in x-y plane (for `<samp>x</samp>` in <var>pen</var>) and/or y-z plane (for `<samp>x</samp>` in <var>pen</var>). The width of tape is proportional to <a href="#barwidth">barwidth</a> and can be changed by option <code>value</code>. See also <a href="#plot">plot</a>, <a href="#flow">flow</a>, <a href="#barwidth">barwidth</a>. See <a href="#tape-sample">tape sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="area"></a><dl>
-<dt><a name="index-area"></a>MGL command: <em></em> <strong>area</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-area-1"></a>MGL command: <em></em> <strong>area</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-area-2"></a>MGL command: <em></em> <strong>area</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dd><p>These functions draw continuous lines between points and fills it to axis plane. Also you can use gradient filling if number of specified colors is equal to 2*number of curves. If <var>pen</var> contain `<samp>#</samp>` then wired plot is drawn. If <var>pen</var> contain `<samp>a</samp>` then segments between points outside of axis range are drawn too. See also <a href="#plot">plot</a>, <a href="#bars">bars</a>, <a href="#stem">stem</a>, <a href="#region">region</a>. See <a href="#area-sample">area sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="region"></a><dl>
-<dt><a name="index-region"></a>MGL command: <em></em> <strong>region</strong> <em>ydat1 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-region-1"></a>MGL command: <em></em> <strong>region</strong> <em>xdat ydat1 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-region-2"></a>MGL command: <em></em> <strong>region</strong> <em>xdat1 ydat1 xdat2 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-region-3"></a>MGL command: <em></em> <strong>region</strong> <em>xdat1 ydat1 zdat1 xdat2 ydat2 zdat2 ['stl'='']</em></dt>
-<dd><p>These functions fill area between 2 curves. Dimensions of arrays <var>y1</var> and <var>y2</var> must be equal. Also you can use gradient filling if number of specified colors is equal to 2*number of curves. If for 2D version <var>pen</var> contain symbol `<samp>i</samp>` then only area with y1<y<y2 will be filled else the area with y2<y<y1 will be filled too. If <var>pen</var> contain `<samp>#</samp>` then wired plot is drawn. If <var>pen</var> contain `<samp>a</samp>` then segments between points outside of axis range are drawn too. See also <a href="#area">area</a>, <a href="#bars">bars</a>, <a href="#stem">stem</a>. See <a href="#region-sample">region sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="stem"></a><dl>
-<dt><a name="index-stem"></a>MGL command: <em></em> <strong>stem</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-stem-1"></a>MGL command: <em></em> <strong>stem</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-stem-2"></a>MGL command: <em></em> <strong>stem</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dd><p>These functions draw vertical lines from points to axis plane. See also <a href="#area">area</a>, <a href="#bars">bars</a>, <a href="#plot">plot</a>, <a href="#mark">mark</a>. See <a href="#stem-sample">stem sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="bars"></a><dl>
-<dt><a name="index-bars"></a>MGL command: <em></em> <strong>bars</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-bars-1"></a>MGL command: <em></em> <strong>bars</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-bars-2"></a>MGL command: <em></em> <strong>bars</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dd><p>These functions draw vertical bars from points to axis plane. Parameter <var>pen</var> can contain:
-</p><ul>
-<li> `<samp>a</samp>` for drawing lines one above another (like summation);
-</li><li> `<samp>f</samp>` for drawing waterfall chart, which show the cumulative effect of sequential positive or negative values;
-</li><li> `<samp>F</samp>` for using fixed (minimal) width for all bars;
-</li><li> `<samp><</samp>`, `<samp>^</samp>` or `<samp>></samp>` for aligning boxes left, right or centering them at its x-coordinates.
-</li></ul>
-<p>You can give different colors for positive and negative values if number of specified colors is equal to 2*number of curves. If <var>x</var>.nx><var>y</var>.nx then <var>x</var> set the edges of bars, rather than its central positions. See also <a href="#barh">barh</a>, <a href="#cones">cones</a>, <a href="#area">area</a>, <a href="#stem">stem</a>, <a href="#chart">chart</a>, <a href="#barwidth">barwidth</a>. See <a href="#bars-sample">bars sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="barh"></a><dl>
-<dt><a name="index-barh"></a>MGL command: <em></em> <strong>barh</strong> <em>vdat ['stl'='']</em></dt>
-<dt><a name="index-barh-1"></a>MGL command: <em></em> <strong>barh</strong> <em>ydat vdat ['stl'='']</em></dt>
-<dd><p>These functions draw horizontal bars from points to axis plane. Parameter <var>pen</var> can contain:
-</p><ul>
-<li> `<samp>a</samp>` for drawing lines one above another (like summation);
-</li><li> `<samp>f</samp>` for drawing waterfall chart, which show the cumulative effect of sequential positive or negative values;
-</li><li> `<samp>F</samp>` for using fixed (minimal) width for all bars;
-</li><li> `<samp><</samp>`, `<samp>^</samp>` or `<samp>></samp>` for aligning boxes left, right or centering them at its x-coordinates.
-</li></ul>
-<p>You can give different colors for positive and negative values if number of specified colors is equal to 2*number of curves. If <var>x</var>.nx><var>y</var>.nx then <var>x</var> set the edges of bars, rather than its central positions. See also <a href="#bars">bars</a>, <a href="#barwidth">barwidth</a>. See <a href="#barh-sample">barh sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="cones"></a><dl>
-<dt><a name="index-cones"></a>MGL command: <em></em> <strong>cones</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-cones-1"></a>MGL command: <em></em> <strong>cones</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-cones-2"></a>MGL command: <em></em> <strong>cones</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dd><p>These functions draw cones from points to axis plane. If string contain symbol `<samp>a</samp>` then cones are drawn one above another (like summation). You can give different colors for positive and negative values if number of specified colors is equal to 2*number of curves. Parameter <var>pen</var> can contain:
-</p><ul>
-<li> `<samp>@</samp>` for drawing edges;
-</li><li> `<samp>#</samp>` for wired cones;
-</li><li> `<samp>t</samp>` for drawing tubes/cylinders instead of cones/prisms;
-</li><li> `<samp>4</samp>`, `<samp>6</samp>`, `<samp>8</samp>` for drawing square, hex- or octo-prism instead of cones;
-</li><li> `<samp><</samp>`, `<samp>^</samp>` or `<samp>></samp>` for aligning boxes left, right or centering them at its x-coordinates.
-</li></ul>
-<p>See also <a href="#bars">bars</a>, <a href="#cone">cone</a>, <a href="#barwidth">barwidth</a>. See <a href="#cones-sample">cones sample</a>, for sample code and picture.
-</p></dd></dl>
-
-
-
-<a name="chart"></a><dl>
-<dt><a name="index-chart"></a>MGL command: <em></em> <strong>chart</strong> <em>adat ['col'='']</em></dt>
-<dd><p>The function draws colored stripes (boxes) for data in array <var>a</var>. The number of stripes is equal to the number of rows in <var>a</var> (equal to <var>a.ny</var>). The color of each next stripe is cyclically changed from colors specified in string <var>col</var> or in palette Pal (see <a href="#Palette-and-colors">Palette and colors</a>). Spaces in colors denote transparent “color” (i.e. corresponding stripe(s) are not drawn). The stripe width is proportional to value of element in <var>a</var>. Chart is plotted only for data with non-negative elements. If string <var>col</var> have symbol `<samp>#</samp>` then black border lines are drawn. The most nice form the chart have in 3d (after rotation of coordinates) or in cylindrical coordinates (becomes so called Pie chart). See <a href="#chart-sample">chart sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="boxplot"></a><dl>
-<dt><a name="index-boxplot"></a>MGL command: <em></em> <strong>boxplot</strong> <em>adat ['stl'='']</em></dt>
-<dt><a name="index-boxplot-1"></a>MGL command: <em></em> <strong>boxplot</strong> <em>xdat adat ['stl'='']</em></dt>
-<dd><p>These functions draw boxplot (also known as a box-and-whisker diagram) at points <var>x</var>[i]. This is five-number summaries of data <var>a</var>[i,j] (minimum, lower quartile (Q1), median (Q2), upper quartile (Q3) and maximum) along second (j-th) direction. If <var>pen</var> contain `<samp><</samp>`, `<samp>^</samp>` or `<samp>></samp>` then boxes will be aligned left, right or centered at its x-coordinates. See also <a href="#plot">plot</a>, <a href="#error">error</a>, <a href="#bars">bars</a>, <a href="#barwidth">barwidth</a>. See <a href="#boxplot-sample">boxplot sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="candle"></a><dl>
-<dt><a name="index-candle"></a>MGL command: <em></em> <strong>candle</strong> <em>vdat1 ['stl'='']</em></dt>
-<dt><a name="index-candle-1"></a>MGL command: <em></em> <strong>candle</strong> <em>vdat1 vdat2 ['stl'='']</em></dt>
-<dt><a name="index-candle-2"></a>MGL command: <em></em> <strong>candle</strong> <em>vdat1 ydat1 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-candle-3"></a>MGL command: <em></em> <strong>candle</strong> <em>vdat1 vdat2 ydat1 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-candle-4"></a>MGL command: <em></em> <strong>candle</strong> <em>xdat vdat1 vdat2 ydat1 ydat2 ['stl'='']</em></dt>
-<dd><p>These functions draw candlestick chart at points <var>x</var>[i]. This is a combination of a line-chart and a bar-chart, in that each bar represents the range of price movement over a given time interval. Wire (or white) candle correspond to price growth <var>v1</var>[i]<<var>v2</var>[i], opposite case - solid (or dark) candle. You can give different colors for growth and decrease values if number of specified colors is equal to 2. If <var>pen</var> contain `<samp>#</samp>` then the wire candle will be used even for 2-color scheme. "Shadows" show the minimal <var>y1</var> and maximal <var>y2</var> prices. If <var>v2</var> is absent then it is determined as <var>v2</var>[i]=<var>v1</var>[i+1]. See also <a href="#plot">plot</a>, <a href="#bars">bars</a>, <a href="#ohlc">ohlc</a>, <a href="#barwidth">barwidth</a>. See <a href="#candle-sample">candle sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="ohlc"></a><dl>
-<dt><a name="index-ohlc"></a>MGL command: <em></em> <strong>ohlc</strong> <em>odat hdat ldat cdat ['stl'='']</em></dt>
-<dt><a name="index-ohlc-1"></a>MGL command: <em></em> <strong>ohlc</strong> <em>xdat odat hdat ldat cdat ['stl'='']</em></dt>
-<dd><p>These functions draw Open-High-Low-Close diagram. This diagram show vertical line for between maximal(high <var>h</var>) and minimal(low <var>l</var>) values, as well as horizontal lines before/after vertical line for initial(open <var>o</var>)/final(close <var>c</var>) values of some process (usually price). You can give different colors for up and down values (when closing values higher or not as in previous point) if number of specified colors is equal to 2*number of curves. See also <a href="#candle">candle</a>, <a href="#plot">plot</a>, <a href="#barwidth">barwidth</a>. See <a href="#ohlc-sample">ohlc sample</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="error"></a><dl>
-<dt><a name="index-error"></a>MGL command: <em></em> <strong>error</strong> <em>ydat yerr ['stl'='']</em></dt>
-<dt><a name="index-error-1"></a>MGL command: <em></em> <strong>error</strong> <em>xdat ydat yerr ['stl'='']</em></dt>
-<dt><a name="index-error-2"></a>MGL command: <em></em> <strong>error</strong> <em>xdat ydat xerr yerr ['stl'='']</em></dt>
-<dd><p>These functions draw error boxes {<var>ex</var>[i], <var>ey</var>[i]} at points {<var>x</var>[i], <var>y</var>[i]}. This can be useful, for example, in experimental points, or to show numeric error or some estimations and so on. If string <var>pen</var> contain symbol `<samp>@</samp>` than large semitransparent mark is used instead of error box. See also <a href="#plot">plot</a>, <a href="#mark">mark</a>. See <a href="#error-sample">error sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="mark"></a><dl>
-<dt><a name="index-mark"></a>MGL command: <em></em> <strong>mark</strong> <em>ydat rdat ['stl'='']</em></dt>
-<dt><a name="index-mark-1"></a>MGL command: <em></em> <strong>mark</strong> <em>xdat ydat rdat ['stl'='']</em></dt>
-<dt><a name="index-mark-2"></a>MGL command: <em></em> <strong>mark</strong> <em>xdat ydat zdat rdat ['stl'='']</em></dt>
-<dd><p>These functions draw marks with size <var>r</var>[i]*<a href="#marksize">marksize</a> at points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. If you need to draw markers of the same size then you can use <a href="#plot">plot</a> function with empty line style `<samp> </samp>`. For markers with size in axis range use <a href="#error">error</a> with style `<samp>@</samp>`. See also <a href="#plot">plot</a>, <a href="#textmark">textmark</a>, <a href="#error">error</a>, <a href="#stem">stem</a>, <a href="#meshnum">meshnum</a>. See <a href="#mark-sample">mark sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="textmark"></a><dl>
-<dt><a name="index-textmark"></a>MGL command: <em></em> <strong>textmark</strong> <em>ydat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-textmark-1"></a>MGL command: <em></em> <strong>textmark</strong> <em>ydat rdat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-textmark-2"></a>MGL command: <em></em> <strong>textmark</strong> <em>xdat ydat rdat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-textmark-3"></a>MGL command: <em></em> <strong>textmark</strong> <em>xdat ydat zdat rdat 'txt' ['stl'='']</em></dt>
-<dd><p>These functions draw string <var>txt</var> as marks with size proportional to <var>r</var>[i]*<var>marksize</var> at points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. By default (if omitted) <var>r</var>[i]=1. See also <a href="#plot">plot</a>, <a href="#mark">mark</a>, <a href="#stem">stem</a>, <a href="#meshnum">meshnum</a>. See <a href="#textmark-sample">textmark sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="label"></a><dl>
-<dt><a name="index-label"></a>MGL command: <em></em> <strong>label</strong> <em>ydat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-label-1"></a>MGL command: <em></em> <strong>label</strong> <em>xdat ydat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-label-2"></a>MGL command: <em></em> <strong>label</strong> <em>xdat ydat zdat 'txt' ['stl'='']</em></dt>
-<dd><p>These functions draw string <var>txt</var> at points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. If string <var>txt</var> contain `<samp>%x</samp>`, `<samp>%y</samp>`, `<samp>%z</samp>` or `<samp>%n</samp>` then it will be replaced by the value of x-,y-,z-coordinate of the point or its index. String <var>fnt</var> may contain:
-</p><ul>
-<li> font style <a href="#Font-styles">Font styles</a>;
-</li><li> `<samp>f</samp>` for fixed format of printed numbers;
-</li><li> `<samp>E</samp>` for using `<samp>E</samp>` instead of `<samp>e</samp>`;
-</li><li> `<samp>F</samp>` for printing in LaTeX format;
-</li><li> `<samp>+</samp>` for printing `<samp>+</samp>` for positive numbers;
-</li><li> `<samp>-</samp>` for printing usual `<samp>-</samp>`;
-</li><li> `<samp>0123456789</samp>` for precision at printing numbers.
-</li></ul>
-<p>See also <a href="#plot">plot</a>, <a href="#mark">mark</a>, <a href="#textmark">textmark</a>, <a href="#table">table</a>. See <a href="#label-sample">label sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="table"></a><dl>
-<dt><a name="index-table"></a>MGL command: <em></em> <strong>table</strong> <em>vdat 'txt' ['stl'='#']</em></dt>
-<dt><a name="index-table-1"></a>MGL command: <em></em> <strong>table</strong> <em>x y vdat 'txt' ['stl'='#']</em></dt>
-<dd><p>These functions draw table with values of <var>val</var> and captions from string <var>txt</var> (separated by newline symbol `<samp>\n</samp>`) at points {<var>x</var>, <var>y</var>} (default at {0,0}) related to current subplot. String <var>fnt</var> may contain:
-</p><ul>
-<li> font style <a href="#Font-styles">Font styles</a>;
-</li><li> `<samp>#</samp>` for drawing cell borders;
-</li><li> `<samp>|</samp>` for limiting table widh by subplot one (equal to option `<samp>value 1</samp>`);
-</li><li> `<samp>=</samp>` for equal width of all cells;
-</li><li> `<samp>f</samp>` for fixed format of printed numbers;
-</li><li> `<samp>E</samp>` for using `<samp>E</samp>` instead of `<samp>e</samp>`;
-</li><li> `<samp>F</samp>` for printing in LaTeX format;
-</li><li> `<samp>+</samp>` for printing `<samp>+</samp>` for positive numbers;
-</li><li> `<samp>-</samp>` for printing usual `<samp>-</samp>`;
-</li><li> `<samp>0123456789</samp>` for precision at printing numbers.
-</li></ul>
-<p>Option <code>value</code> set the width of the table (default is 1). See also <a href="#plot">plot</a>, <a href="#label">label</a>. See <a href="#table-sample">table sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="iris"></a><dl>
-<dt><a name="index-iris"></a>MGL command: <em></em> <strong>iris</strong> <em>dats 'ids' ['stl'='']</em></dt>
-<dt><a name="index-iris-1"></a>MGL command: <em></em> <strong>iris</strong> <em>dats rngs 'ids' ['stl'='']</em></dt>
-<dd><p>Draws Iris plots for determining cross-dependences of data arrays <var>dats</var> (see <a href="http://en.wikipedia.org/wiki/Iris_flower_data_set">http://en.wikipedia.org/wiki/Iris_flower_data_set</a>). Data <var>rngs</var> of size 2*<var>dats</var>.nx provide manual axis ranges for each column. String <var>ids</var> contain column names, separated by `<samp>;</samp>` symbol. Option <code>value</code> set the text size for column names. You can add another data set to existing Iris plot by providing the same ranges <var>rngs</var> and empty column names <var>ids</var>. See also <a href="#plot">plot</a>. See <a href="#iris-sample">iris sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="tube"></a><dl>
-<dt><a name="index-tube"></a>MGL command: <em></em> <strong>tube</strong> <em>ydat rdat ['stl'='']</em></dt>
-<dt><a name="index-tube-1"></a>MGL command: <em></em> <strong>tube</strong> <em>ydat <code>rval</code> ['stl'='']</em></dt>
-<dt><a name="index-tube-2"></a>MGL command: <em></em> <strong>tube</strong> <em>xdat ydat rdat ['stl'='']</em></dt>
-<dt><a name="index-tube-3"></a>MGL command: <em></em> <strong>tube</strong> <em>xdat ydat <code>rval</code> ['stl'='']</em></dt>
-<dt><a name="index-tube-4"></a>MGL command: <em></em> <strong>tube</strong> <em>xdat ydat zdat rdat ['stl'='']</em></dt>
-<dt><a name="index-tube-5"></a>MGL command: <em></em> <strong>tube</strong> <em>xdat ydat zdat <code>rval</code> ['stl'='']</em></dt>
-<dd><p>These functions draw the tube with variable radius <var>r</var>[i] along the curve between points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Option <code>value</code> set the number of segments at cross-section (default is 25). See also <a href="#plot">plot</a>. See <a href="#tube-sample">tube sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="torus"></a><dl>
-<dt><a name="index-torus"></a>MGL command: <em></em> <strong>torus</strong> <em>rdat zdat ['stl'='']</em></dt>
-<dd><p>These functions draw surface which is result of curve {<var>r</var>, <var>z</var>} rotation around axis. If string <var>pen</var> contain symbols `<samp>x</samp>` or `<samp>z</samp>` then rotation axis will be set to specified direction (default is `<samp>y</samp>`). If string <var>pen</var> have symbol `<samp>#</samp>` then wire plot is produced. If string <var>pen</var> have symbol `<samp>.</samp>` then plot by dots is produced. See also <a href="#plot">plot</a>, <a href="#axial">axial</a>. See <a href="#torus-sample">torus sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="lamerey"></a><dl>
-<dt><a name="index-lamerey"></a>MGL command: <em></em> <strong>lamerey</strong> <em><code>x0</code> ydat ['stl'='']</em></dt>
-<dt><a name="index-lamerey-1"></a>MGL command: <em></em> <strong>lamerey</strong> <em><code>x0</code> 'y(x)' ['stl'='']</em></dt>
-<dd><p>These functions draw Lamerey diagram for mapping x_new = y(x_old) starting from point <var>x0</var>. String <var>stl</var> may contain line style, symbol `<samp>v</samp>` for drawing arrows, symbol `<samp>~</samp>` for disabling first segment. Option <code>value</code> set the number of segments to be drawn (default is 20). See also <a href="#plot">plot</a>, <a href="#fplot">fplot</a>, <a href="#bifurcation">bifurcation</a>, <a href="#pmap">pmap</a>. See <a href="#lamerey-sample">lamerey sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="bifurcation"></a><dl>
-<dt><a name="index-bifurcation"></a>MGL command: <em></em> <strong>bifurcation</strong> <em><code>dx</code> ydat ['stl'='']</em></dt>
-<dt><a name="index-bifurcation-1"></a>MGL command: <em></em> <strong>bifurcation</strong> <em><code>dx</code> 'y(x)' ['stl'='']</em></dt>
-<dd><p>These functions draw bifurcation diagram for mapping x_new = y(x_old). Parameter <var>dx</var> set the accuracy along x-direction. String <var>stl</var> set color. Option <code>value</code> set the number of stationary points (default is 1024). See also <a href="#plot">plot</a>, <a href="#fplot">fplot</a>, <a href="#lamerey">lamerey</a>. See <a href="#bifurcation-sample">bifurcation sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="pmap"></a><dl>
-<dt><a name="index-pmap"></a>MGL command: <em></em> <strong>pmap</strong> <em>ydat sdat ['stl'='']</em></dt>
-<dt><a name="index-pmap-1"></a>MGL command: <em></em> <strong>pmap</strong> <em>xdat ydat sdat ['stl'='']</em></dt>
-<dt><a name="index-pmap-2"></a>MGL command: <em></em> <strong>pmap</strong> <em>xdat ydat zdat sdat ['stl'='']</em></dt>
-<dd><p>These functions draw Poincare map for curve {<var>x</var>, <var>y</var>, <var>z</var>} at surface <var>s</var>=0. Basically, it show intersections of the curve and the surface. String <var>stl</var> set the style of marks. See also <a href="#plot">plot</a>, <a href="#mark">mark</a>, <a href="#lamerey">lamerey</a>. See <a href="#pmap-sample">pmap sample</a>, for sample code and picture.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="g_t2D-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#g_t3D-plotting" accesskey="n" rel="next">3D plotting</a>, Previous: <a href="#g_t1D-plotting" accesskey="p" rel="prev">1D plotting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="g_t2D-plotting-1"></a>
-<h3 class="section">3.12 2D plotting</h3>
-
-<a name="index-Mesh"></a>
-<a name="index-Fall"></a>
-<a name="index-Belt"></a>
-<a name="index-Surf"></a>
-<a name="index-Boxs"></a>
-<a name="index-Tile"></a>
-<a name="index-Dens"></a>
-<a name="index-Cont"></a>
-<a name="index-ContF"></a>
-<a name="index-ContD"></a>
-<a name="index-Axial"></a>
-<a name="index-Grad"></a>
-<a name="index-Grid-1"></a>
-
-<p>These functions perform plotting of 2D data. 2D means that data depend from 2 independent parameters like matrix <em>f(x_i,y_j), i=1...n, j=1...m</em>. By default (if absent) values of <var>x</var>, <var>y</var> are equidistantly distributed in axis range. The plots are drawn for each z slice of the data. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> should be equal <code>x.nx=z.nx && y.nx=z.ny</code> or <code>x.nx=y.nx=z.nx && x.ny=y.ny=z.ny</code>. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>z</var>). String <var>sch</var> sets the color scheme (see <a href="#Color-scheme">Color scheme</a>) for plot. String <var>opt</var> contain command options (see <a href="#Command-options">Command options</a>).
-</p>
-<a name="surf"></a><dl>
-<dt><a name="index-surf"></a>MGL command: <em></em> <strong>surf</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-surf-1"></a>MGL command: <em></em> <strong>surf</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>The function draws surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. If string <var>sch</var> have symbol `<samp>#</samp>` then grid lines are drawn. If string <var>sch</var> have symbol `<samp>.</samp>` then plot by dots is produced. See also <a href="#mesh">mesh</a>, <a href="#dens">dens</a>, <a href="#belt">belt</a>, <a href="#tile">tile</a>, <a href="#boxs">boxs</a>, <a href="#surfc">surfc</a>, <a href="#surfa">surfa</a>. See <a href="#surf-sample">surf sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="mesh"></a><dl>
-<dt><a name="index-mesh"></a>MGL command: <em></em> <strong>mesh</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-mesh-1"></a>MGL command: <em></em> <strong>mesh</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>The function draws mesh lines for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. See also <a href="#surf">surf</a>, <a href="#fall">fall</a>, <a href="#meshnum">meshnum</a>, <a href="#cont">cont</a>, <a href="#tens">tens</a>. See <a href="#mesh-sample">mesh sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="fall"></a><dl>
-<dt><a name="index-fall"></a>MGL command: <em></em> <strong>fall</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-fall-1"></a>MGL command: <em></em> <strong>fall</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>The function draws fall lines for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. This plot can be used for plotting several curves shifted in depth one from another. If <var>sch</var> contain `<samp>x</samp>` then lines are drawn along x-direction else (by default) lines are drawn along y-direction. See also <a href="#belt">belt</a>, <a href="#mesh">mesh</a>, <a href="#tens">tens</a>, <a href="#meshnum">meshnum</a>. See <a href="#fall-sample">fall sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="belt"></a><dl>
-<dt><a name="index-belt"></a>MGL command: <em></em> <strong>belt</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-belt-1"></a>MGL command: <em></em> <strong>belt</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>The function draws belts for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. This plot can be used as 3d generalization of <a href="#plot">plot</a>). If <var>sch</var> contain `<samp>x</samp>` then belts are drawn along x-direction else (by default) belts are drawn along y-direction. See also <a href="#fall">fall</a>, <a href="#surf">surf</a>, <a href="#beltc">beltc</a>, <a href="#plot">plot</a>, <a href="#meshnum">meshnum</a>. See <a href="#belt-sample">belt sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="boxs"></a><dl>
-<dt><a name="index-boxs"></a>MGL command: <em></em> <strong>boxs</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-boxs-1"></a>MGL command: <em></em> <strong>boxs</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>The function draws vertical boxes for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. Symbol `<samp>@</samp>` in <var>sch</var> set to draw filled boxes. See also <a href="#surf">surf</a>, <a href="#dens">dens</a>, <a href="#tile">tile</a>, <a href="#step">step</a>. See <a href="#boxs-sample">boxs sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="tile"></a><dl>
-<dt><a name="index-tile"></a>MGL command: <em></em> <strong>tile</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-tile-1"></a>MGL command: <em></em> <strong>tile</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-tile-2"></a>MGL command: <em></em> <strong>tile</strong> <em>xdat ydat zdat cdat ['sch'='']</em></dt>
-<dd><p>The function draws horizontal tiles for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} and color it by matrix <var>c</var>[i,j] (<var>c</var>=<var>z</var> if <var>c</var> is not provided). If string <var>sch</var> contain style `<samp>x</samp>` or `<samp>y</samp>` then tiles will be oriented perpendicular to x- or y-axis. Such plot can be used as 3d generalization of <a href="#step">step</a>. See also <a href="#surf">surf</a>, <a href="#boxs">boxs</a>, <a href="#step">step</a>, <a href="#tiles">tiles</a>. See <a href="#tile-sample">tile sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="dens"></a><dl>
-<dt><a name="index-dens"></a>MGL command: <em></em> <strong>dens</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-dens-1"></a>MGL command: <em></em> <strong>dens</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>The function draws density plot for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} at <var>z</var> equal to minimal z-axis value. If string <var>sch</var> have symbol `<samp>#</samp>` then grid lines are drawn. If string <var>sch</var> have symbol `<samp>.</samp>` then plot by dots is produced. See also <a href="#surf">surf</a>, <a href="#cont">cont</a>, <a href="#contf">contf</a>, <a href="#boxs">boxs</a>, <a href="#tile">tile</a>, <code>dens[xyz]</code>. See <a href="#dens-sample">dens sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="cont"></a><dl>
-<dt><a name="index-cont"></a>MGL command: <em></em> <strong>cont</strong> <em>vdat zdat ['sch'='']</em></dt>
-<dt><a name="index-cont-1"></a>MGL command: <em></em> <strong>cont</strong> <em>vdat xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>The function draws contour lines for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} at <var>z</var>=<var>v</var>[k], or at <var>z</var> equal to minimal z-axis value if <var>sch</var> contain symbol `<samp>_</samp>`. Contours are plotted for <var>z</var>[i,j]=<var>v</var>[k] where <var>v</var>[k] are values of data array <var>v</var>. If string <var>sch</var> have symbol `<samp>t</samp>` or `<samp>T</samp>` then contour labels <var>v</var>[k] will be drawn below (or above) the contours. See also <a href="#dens">dens</a>, <a href="#contf">contf</a>, <a href="#contd">contd</a>, <a href="#axial">axial</a>, <code>cont[xyz]</code>. See <a href="#cont-sample">cont sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-cont-2"></a>MGL command: <em></em> <strong>cont</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-cont-3"></a>MGL command: <em></em> <strong>cont</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>The same as previous with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in color range. Here <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 7). If string <var>sch</var> contain symbol `<samp>.</samp>` then only contours at levels with saddle points will be drawn.
-</p></dd></dl>
-
-<a name="contf"></a><dl>
-<dt><a name="index-contf"></a>MGL command: <em></em> <strong>contf</strong> <em>vdat zdat ['sch'='']</em></dt>
-<dt><a name="index-contf-1"></a>MGL command: <em></em> <strong>contf</strong> <em>vdat xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>The function draws solid (or filled) contour lines for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} at <var>z</var>=<var>v</var>[k], or at <var>z</var> equal to minimal z-axis value if <var>sch</var> contain symbol `<samp>_</samp>`. Contours are plotted for <var>z</var>[i,j]=<var>v</var>[k] where <var>v</var>[k] are values of data array <var>v</var> (must be <code>v.nx>2</code>). See also <a href="#dens">dens</a>, <a href="#cont">cont</a>, <a href="#contd">contd</a>, <code>contf[xyz]</code>. See <a href="#contf-sample">contf sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-contf-2"></a>MGL command: <em></em> <strong>contf</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-contf-3"></a>MGL command: <em></em> <strong>contf</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>The same as previous with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in color range. Here <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 7).
-</p></dd></dl>
-
-<a name="contd"></a><dl>
-<dt><a name="index-contd"></a>MGL command: <em></em> <strong>contd</strong> <em>vdat zdat ['sch'='']</em></dt>
-<dt><a name="index-contd-1"></a>MGL command: <em></em> <strong>contd</strong> <em>vdat xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>The function draws solid (or filled) contour lines for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} at <var>z</var>=<var>v</var>[k] (or at <var>z</var> equal to minimal z-axis value if <var>sch</var> contain symbol `<samp>_</samp>`) with manual colors. Contours are plotted for <var>z</var>[i,j]=<var>v</var>[k] where <var>v</var>[k] are values of data array <var>v</var> (must be <code>v.nx>2</code>). String <var>sch</var> sets the contour colors: the color of k-th contour is determined by character <code>sch[k%strlen(sch)]</code>. See also <a href="#dens">dens</a>, <a href="#cont">cont</a>, <a href="#contf">contf</a>. See <a href="#contd-sample">contd sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-contd-2"></a>MGL command: <em></em> <strong>contd</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-contd-3"></a>MGL command: <em></em> <strong>contd</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>The same as previous with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in color range. Here <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 7).
-</p></dd></dl>
-
-<a name="contp"></a><dl>
-<dt><a name="index-contp"></a>MGL command: <em></em> <strong>contp</strong> <em>vdat xdat ydat zdat adat ['sch'='']</em></dt>
-<dd><p>The function draws contour lines on surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. Contours are plotted for <var>a</var>[i,j]=<var>v</var>[k] where <var>v</var>[k] are values of data array <var>v</var>. If string <var>sch</var> have symbol `<samp>t</samp>` or `<samp>T</samp>` then contour labels <var>v</var>[k] will be drawn below (or above) the contours. If string <var>sch</var> have symbol `<samp>f</samp>` then solid contours will be drawn. See also <a href="#cont">cont</a>, <a href="#contf">contf</a>, <a href="#surfc">surfc</a>, <code>cont[xyz]</code>. </p></dd></dl>
-
-<dl>
-<dt><a name="index-contp-1"></a>MGL command: <em></em> <strong>contp</strong> <em>xdat ydat zdat adat ['sch'='']</em></dt>
-<dd><p>The same as previous with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in color range. Here <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 7).
-</p></dd></dl>
-
-
-<a name="contv"></a><dl>
-<dt><a name="index-contv"></a>MGL command: <em></em> <strong>contv</strong> <em>vdat zdat ['sch'='']</em></dt>
-<dt><a name="index-contv-1"></a>MGL command: <em></em> <strong>contv</strong> <em>vdat xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>The function draws vertical cylinder (tube) at contour lines for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} at <var>z</var>=<var>v</var>[k], or at <var>z</var> equal to minimal z-axis value if <var>sch</var> contain symbol `<samp>_</samp>`. Contours are plotted for <var>z</var>[i,j]=<var>v</var>[k] where <var>v</var>[k] are values of data array <var>v</var>. See also <a href="#cont">cont</a>, <a href="#contf">contf</a>. See <a href="#contv-sample">contv sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-contv-2"></a>MGL command: <em></em> <strong>contv</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-contv-3"></a>MGL command: <em></em> <strong>contv</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>The same as previous with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in color range. Here <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 7).
-</p></dd></dl>
-
-<a name="axial"></a><dl>
-<dt><a name="index-axial"></a>MGL command: <em></em> <strong>axial</strong> <em>vdat zdat ['sch'='']</em></dt>
-<dt><a name="index-axial-1"></a>MGL command: <em></em> <strong>axial</strong> <em>vdat xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>The function draws surface which is result of contour plot rotation for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. Contours are plotted for <var>z</var>[i,j]=<var>v</var>[k] where <var>v</var>[k] are values of data array <var>v</var>. If string <var>sch</var> have symbol `<samp>#</samp>` then wire plot is produced. If string <var>sch</var> have symbol `<samp>.</samp>` then plot by dots is produced. If string contain symbols `<samp>x</samp>` or `<samp>z</samp>` then rotation axis will be set to specified direction (default is `<samp>y</samp>`). See also <a href="#cont">cont</a>, <a href="#contf">contf</a>, <a href="#torus">torus</a>, <a href="#surf3">surf3</a>. See <a href="#axial-sample">axial sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-axial-2"></a>MGL command: <em></em> <strong>axial</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-axial-3"></a>MGL command: <em></em> <strong>axial</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>The same as previous with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in color range. Here <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 3).
-</p></dd></dl>
-
-<a name="grid2"></a><dl>
-<dt><a name="index-grid2"></a>MGL command: <em></em> <strong>grid2</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-grid2-1"></a>MGL command: <em></em> <strong>grid2</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>The function draws grid lines for density plot of surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} at <var>z</var> equal to minimal z-axis value. See also <a href="#dens">dens</a>, <a href="#cont">cont</a>, <a href="#contf">contf</a>, <a href="#grid3">grid3</a>, <a href="#meshnum">meshnum</a>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="g_t3D-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#Dual-plotting" accesskey="n" rel="next">Dual plotting</a>, Previous: <a href="#g_t2D-plotting" accesskey="p" rel="prev">2D plotting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="g_t3D-plotting-1"></a>
-<h3 class="section">3.13 3D plotting</h3>
-
-<a name="index-Surf3"></a>
-<a name="index-Dens3"></a>
-<a name="index-Cont3"></a>
-<a name="index-ContF3"></a>
-<a name="index-Grid3"></a>
-<a name="index-Cloud"></a>
-<a name="index-Beam"></a>
-
-<p>These functions perform plotting of 3D data. 3D means that data depend from 3 independent parameters like matrix <em>f(x_i,y_j,z_k), i=1...n, j=1...m, k=1...l</em>. By default (if absent) values of <var>x</var>, <var>y</var>, <var>z</var> are equidistantly distributed in axis range. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var>, <var>a</var> should be equal <code>x.nx=a.nx && y.nx=a.ny && z.nz=a.nz</code> or <code>x.nx=y.nx=z.nx=a.nx && x.ny=y.ny=z.ny=a.ny && x.nz=y.nz=z.nz=a.nz</code>. Arrays <var>x</var>, <var>y</var> and <var>z</var> can be vectors (not matrices as <var>a</var>). String <var>sch</var> sets the color scheme (see <a href="#Color-scheme">Color scheme</a>) for plot. String <var>opt</var> contain command options (see <a href="#Command-options">Command options</a>).
-</p>
-<a name="surf3"></a><dl>
-<dt><a name="index-surf3"></a>MGL command: <em></em> <strong>surf3</strong> <em>adat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-surf3-1"></a>MGL command: <em></em> <strong>surf3</strong> <em>xdat ydat zdat adat <code>val</code> ['sch'='']</em></dt>
-<dd><p>The function draws isosurface plot for 3d array specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) at <var>a</var>(x,y,z)=<var>val</var>. If string contain `<samp>#</samp>` then wire plot is produced. If string <var>sch</var> have symbol `<samp>.</samp>` then plot by dots is produced. Note, that there is possibility of incorrect plotting due to uncertainty of cross-section defining if there are two or more isosurface intersections inside one cell. See also <a href="#cloud">cloud</a>, <a href="#dens3">dens3</a>, <a href="#surf3c">surf3c</a>, <a href="#surf3a">surf3a</a>, <a href="#axial">axial</a>. See <a href="#surf3-sample">surf3 sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-surf3-2"></a>MGL command: <em></em> <strong>surf3</strong> <em>adat ['sch'='']</em></dt>
-<dt><a name="index-surf3-3"></a>MGL command: <em></em> <strong>surf3</strong> <em>xdat ydat zdat adat ['sch'='']</em></dt>
-<dd><p>Draws <var>num</var>-th uniformly distributed in color range isosurfaces for 3d data. Here <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 3).
-</p></dd></dl>
-
-<a name="cloud"></a><dl>
-<dt><a name="index-cloud"></a>MGL command: <em></em> <strong>cloud</strong> <em>adat ['sch'='']</em></dt>
-<dt><a name="index-cloud-1"></a>MGL command: <em></em> <strong>cloud</strong> <em>xdat ydat zdat adat ['sch'='']</em></dt>
-<dd><p>The function draws cloud plot for 3d data specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). This plot is a set of cubes with color and transparency proportional to value of <var>a</var>. The resulting plot is like cloud - low value is transparent but higher ones are not. The number of plotting cells depend on <a href="#meshnum">meshnum</a>. If string <var>sch</var> contain symbol `<samp>.</samp>` then lower quality plot will produced with much low memory usage. If string <var>sch</var> contain symbol `<samp>i</samp>` then transparency will be inversed, i.e. higher become transparent and lower become not transparent. See also <a href="#surf3">surf3</a>, <a href="#meshnum">meshnum</a>. See <a href="#cloud-sample">cloud sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="dens3"></a><dl>
-<dt><a name="index-dens3"></a>MGL command: <em></em> <strong>dens3</strong> <em>adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-dens3-1"></a>MGL command: <em></em> <strong>dens3</strong> <em>xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dd><p>The function draws density plot for 3d data specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). Density is plotted at slice <var>sVal</var> in direction {`<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`} if <var>sch</var> contain corresponding symbol (by default, `<samp>y</samp>` direction is used). If string <var>stl</var> have symbol `<samp>#</samp>` then grid lines are drawn. See also <a href="#cont3">cont3</a>, <a href="#contf3">contf3</a>, <a href="#dens">dens</a>, <a href="#grid3">grid3</a>. See <a href="#dens3-sample">dens3 sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="cont3"></a><dl>
-<dt><a name="index-cont3"></a>MGL command: <em></em> <strong>cont3</strong> <em>vdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-cont3-1"></a>MGL command: <em></em> <strong>cont3</strong> <em>vdat xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dd><p>The function draws contour plot for 3d data specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). Contours are plotted for values specified in array <var>v</var> at slice <var>sVal</var> in direction {`<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`} if <var>sch</var> contain corresponding symbol (by default, `<samp>y</samp>` direction is used). If string <var>sch</var> have symbol `<samp>#</samp>` then grid lines are drawn. If string <var>sch</var> have symbol `<samp>t</samp>` or `<samp>T</samp>` then contour labels will be drawn below (or above) the contours. See also <a href="#dens3">dens3</a>, <a href="#contf3">contf3</a>, <a href="#cont">cont</a>, <a href="#grid3">grid3</a>. See <a href="#cont3-sample">cont3 sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-cont3-2"></a>MGL command: <em></em> <strong>cont3</strong> <em>adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-cont3-3"></a>MGL command: <em></em> <strong>cont3</strong> <em>xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dd><p>The same as previous with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in color range. Here <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 7).
-</p></dd></dl>
-
-<a name="contf3"></a><dl>
-<dt><a name="index-contf3"></a>MGL command: <em></em> <strong>contf3</strong> <em>vdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-contf3-1"></a>MGL command: <em></em> <strong>contf3</strong> <em>vdat xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dd><p>The function draws solid (or filled) contour plot for 3d data specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). Contours are plotted for values specified in array <var>v</var> at slice <var>sVal</var> in direction {`<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`} if <var>sch</var> contain corresponding symbol (by default, `<samp>y</samp>` direction is used). If string <var>sch</var> have symbol `<samp>#</samp>` then grid lines are drawn. See also <a href="#dens3">dens3</a>, <a href="#cont3">cont3</a>, <a href="#contf">contf</a>, <a href="#grid3">grid3</a>. See <a href="#contf3-sample">contf3 sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-contf3-2"></a>MGL command: <em></em> <strong>contf3</strong> <em>adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-contf3-3"></a>MGL command: <em></em> <strong>contf3</strong> <em>xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dd><p>The same as previous with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in color range. Here <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 7).
-</p></dd></dl>
-
-<a name="grid3"></a><dl>
-<dt><a name="index-grid3"></a>MGL command: <em></em> <strong>grid3</strong> <em>adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-grid3-1"></a>MGL command: <em></em> <strong>grid3</strong> <em>xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dd><p>The function draws grid for 3d data specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). Grid is plotted at slice <var>sVal</var> in direction {`<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`} if <var>sch</var> contain corresponding symbol (by default, `<samp>y</samp>` direction is used). See also <a href="#cont3">cont3</a>, <a href="#contf3">contf3</a>, <a href="#dens3">dens3</a>, <a href="#grid2">grid2</a>, <a href="#meshnum">meshnum</a>.
-</p></dd></dl>
-
-<a name="beam"></a><dl>
-<dt><a name="index-beam"></a>MGL command: <em></em> <strong>beam</strong> <em>tr g1 g2 adat <code>rval</code> ['sch'='' <code>flag=0 num=3</code>]</em></dt>
-<dd><p>Draws the isosurface for 3d array <var>a</var> at constant values of <var>a</var>=<var>val</var>. This is special kind of plot for <var>a</var> specified in accompanied coordinates along curve <var>tr</var> with orts <var>g1</var>, <var>g2</var> and with transverse scale <var>r</var>. Variable <var>flag</var> is bitwise: `<samp>0x1</samp>` - draw in accompanied (not laboratory) coordinates; `<samp>0x2</samp>` - draw projection to <em>\rho-z</em> plane; `<samp>0x4</samp>` - draw normalized in each slice field. The x-size of data arrays <var>tr</var>, <var>g1</var>, <var>g2</var> must be nx>2. The y-size of data arrays <var>tr</var>, <var>g1</var>, <var>g2</var> and z-size of the data array <var>a</var> must be equal. See also <a href="#surf3">surf3</a>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Dual-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#Vector-fields" accesskey="n" rel="next">Vector fields</a>, Previous: <a href="#g_t3D-plotting" accesskey="p" rel="prev">3D plotting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Dual-plotting-1"></a>
-<h3 class="section">3.14 Dual plotting</h3>
-
-<a name="index-SurfC"></a>
-<a name="index-SurfA"></a>
-<a name="index-Surf3C"></a>
-<a name="index-Surf3A"></a>
-<a name="index-TileS"></a>
-<a name="index-Map"></a>
-<a name="index-STFA"></a>
-
-<p>These plotting functions draw <em>two matrix</em> simultaneously. There are 5 generally different types of data representations: surface or isosurface colored by other data (SurfC, Surf3C), surface or isosurface transpared by other data (SurfA, Surf3A), tiles with variable size (TileS), mapping diagram (Map), STFA diagram (STFA). By default (if absent) values of <var>x</var>, <var>y</var>, <var>z</var> are equidistantly distributed in axis range. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var>, <var>c</var> should be equal. Arrays <var>x</var>, <var>y</var> (and <var>z</var> for <code>Surf3C, Surf3A</code>) can be vectors (not matrices as <var>c</var>). String <var>sch</var> sets the color scheme (see <a href="#Color-scheme">Color scheme</a>) for plot. String <var>opt</var> contain command options (see <a href="#Command-options">Command options</a>).
-</p>
-<a name="surfc"></a><dl>
-<dt><a name="index-surfc"></a>MGL command: <em></em> <strong>surfc</strong> <em>zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-surfc-1"></a>MGL command: <em></em> <strong>surfc</strong> <em>xdat ydat zdat cdat ['sch'='']</em></dt>
-<dd><p>The function draws surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} and color it by matrix <var>c</var>[i,j]. If string <var>sch</var> have symbol `<samp>#</samp>` then grid lines are drawn. If string <var>sch</var> have symbol `<samp>.</samp>` then plot by dots is produced. All dimensions of arrays <var>z</var> and <var>c</var> must be equal. Surface is plotted for each z slice of the data. See also <a href="#surf">surf</a>, <a href="#surfa">surfa</a>, <a href="#surfca">surfca</a>, <a href="#beltc">beltc</a>, <a href="#surf3c">surf3c</a>. See <a href="#surfc-sample">surfc sample</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="beltc"></a><dl>
-<dt><a name="index-beltc"></a>MGL command: <em></em> <strong>beltc</strong> <em>zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-beltc-1"></a>MGL command: <em></em> <strong>beltc</strong> <em>xdat ydat zdat cdat ['sch'='']</em></dt>
-<dd><p>The function draws belts for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} and color it by matrix <var>c</var>[i,j]. This plot can be used as 3d generalization of <a href="#plot">plot</a>). If <var>sch</var> contain `<samp>x</samp>` then belts are drawn along x-direction else (by default) belts are drawn along y-direction. See also <a href="#belt">belt</a>, <a href="#surfc">surfc</a>, <a href="#meshnum">meshnum</a>. </p></dd></dl>
-
-
-
-<a name="surf3c"></a><dl>
-<dt><a name="index-surf3c"></a>MGL command: <em></em> <strong>surf3c</strong> <em>adat cdat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-surf3c-1"></a>MGL command: <em></em> <strong>surf3c</strong> <em>xdat ydat zdat adat cdat <code>val</code> ['sch'='']</em></dt>
-<dd><p>The function draws isosurface plot for 3d array specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) at <var>a</var>(x,y,z)=<var>val</var>. It is mostly the same as <a href="#surf3">surf3</a> function but the color of isosurface depends on values of array <var>c</var>. If string <var>sch</var> contain `<samp>#</samp>` then wire plot is produced. If string <var>sch</var> have symbol `<samp>.</samp>` then plot by dots is produced. See also <a href="#surf3">surf3</a>, <a href="#surfc">surfc</a>, <a href="#surf3a">surf3a</a>, <a href="#surf3ca">surf3ca</a>. See <a href="#surf3c-sample">surf3c sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-surf3c-2"></a>MGL command: <em></em> <strong>surf3c</strong> <em>adat cdat ['sch'='']</em></dt>
-<dt><a name="index-surf3c-3"></a>MGL command: <em></em> <strong>surf3c</strong> <em>xdat ydat zdat adat cdat ['sch'='']</em></dt>
-<dd><p>Draws <var>num</var>-th uniformly distributed in color range isosurfaces for 3d data. Here <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 3).
-</p></dd></dl>
-
-
-<a name="surfa"></a><dl>
-<dt><a name="index-surfa"></a>MGL command: <em></em> <strong>surfa</strong> <em>zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-surfa-1"></a>MGL command: <em></em> <strong>surfa</strong> <em>xdat ydat zdat cdat ['sch'='']</em></dt>
-<dd><p>The function draws surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} and transparent it by matrix <var>c</var>[i,j]. If string <var>sch</var> have symbol `<samp>#</samp>` then grid lines are drawn. If string <var>sch</var> have symbol `<samp>.</samp>` then plot by dots is produced. All dimensions of arrays <var>z</var> and <var>c</var> must be equal. Surface is plotted for each z slice of the data. See also <a href="#surf">surf</a>, <a href="#surfc">surfc</a>, <a href="#surfca">surfca</a>, <a href="#surf3a">surf3a</a>. See <a href="#surfa-sample">surfa sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="surf3a"></a><dl>
-<dt><a name="index-surf3a"></a>MGL command: <em></em> <strong>surf3a</strong> <em>adat cdat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-surf3a-1"></a>MGL command: <em></em> <strong>surf3a</strong> <em>xdat ydat zdat adat cdat <code>val</code> ['sch'='']</em></dt>
-<dd><p>The function draws isosurface plot for 3d array specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) at <var>a</var>(x,y,z)=<var>val</var>. It is mostly the same as <a href="#surf3">surf3</a> function but the transparency of isosurface depends on values of array <var>c</var>. If string <var>sch</var> contain `<samp>#</samp>` then wire plot is produced. If string <var>sch</var> have symbol `<samp>.</samp>` then plot by dots is produced. See also <a href="#surf3">surf3</a>, <a href="#surfc">surfc</a>, <a href="#surf3a">surf3a</a>, <a href="#surf3ca">surf3ca</a>. See <a href="#surf3a-sample">surf3a sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-surf3a-2"></a>MGL command: <em></em> <strong>surf3a</strong> <em>adat cdat ['sch'='']</em></dt>
-<dt><a name="index-surf3a-3"></a>MGL command: <em></em> <strong>surf3a</strong> <em>xdat ydat zdat adat cdat ['sch'='']</em></dt>
-<dd><p>Draws <var>num</var>-th uniformly distributed in color range isosurfaces for 3d data. At this array <var>c</var> can be vector with values of transparency and <var>num</var>=<var>c</var>.nx. In opposite case <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 3).
-</p></dd></dl>
-
-
-
-<a name="surfca"></a><dl>
-<dt><a name="index-surfca"></a>MGL command: <em></em> <strong>surfca</strong> <em>zdat cdat adat ['sch'='']</em></dt>
-<dt><a name="index-surfca-1"></a>MGL command: <em></em> <strong>surfca</strong> <em>xdat ydat zdat cdat adat ['sch'='']</em></dt>
-<dd><p>The function draws surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}, color it by matrix <var>c</var>[i,j] and transparent it by matrix <var>a</var>[i,j]. If string <var>sch</var> have symbol `<samp>#</samp>` then grid lines are drawn. If string <var>sch</var> have symbol `<samp>.</samp>` then plot by dots is produced. All dimensions of arrays <var>z</var> and <var>c</var> must be equal. Surface is plotted for each z slice of the data. Note, you can use <a href="#map">map</a>-like coloring if use `<samp>%</samp>` in color scheme. See also <a href="#surf">surf</a>, <a href="#surfc">surfc</a>, <a href="#surfa">surfa</a>, <a href="#surf3ca">surf3ca</a>. See <a href="#surfca-sample">surfca sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="surf3ca"></a><dl>
-<dt><a name="index-surf3ca"></a>MGL command: <em></em> <strong>surf3ca</strong> <em>adat cdat bdat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-surf3ca-1"></a>MGL command: <em></em> <strong>surf3ca</strong> <em>xdat ydat zdat adat cdat bdat <code>val</code> ['sch'='']</em></dt>
-<dd><p>The function draws isosurface plot for 3d array specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) at <var>a</var>(x,y,z)=<var>val</var>. It is mostly the same as <a href="#surf3">surf3</a> function but the color and the transparency of isosurface depends on values of array <var>c</var> and <var>b</var> correspondingly. If string <var>sch</var> contain `<samp>#</samp>` then wire plot is produced. If string <var>sch</var> have symbol `<samp>.</samp>` then plot by dots is produced. Note, you can use <a href="#map">map</a>-like coloring if use `<samp>%</samp>` in color scheme. See also <a href="#surf3">surf3</a>, <a href="#surfca">surfca</a>, <a href="#surf3c">surf3c</a>, <a href="#surf3a">surf3a</a>. See <a href="#surf3ca-sample">surf3ca sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-surf3ca-2"></a>MGL command: <em></em> <strong>surf3ca</strong> <em>adat cdat bdat ['sch'='']</em></dt>
-<dt><a name="index-surf3ca-3"></a>MGL command: <em></em> <strong>surf3ca</strong> <em>xdat ydat zdat adat cdat bdat ['sch'='']</em></dt>
-<dd><p>Draws <var>num</var>-th uniformly distributed in color range isosurfaces for 3d data. Here parameter <var>num</var> is equal to parameter <code>value</code> in options <var>opt</var> (default is 3).
-</p></dd></dl>
-
-<a name="tiles"></a><dl>
-<dt><a name="index-tiles"></a>MGL command: <em></em> <strong>tiles</strong> <em>zdat rdat ['sch'='']</em></dt>
-<dt><a name="index-tiles-1"></a>MGL command: <em></em> <strong>tiles</strong> <em>xdat ydat zdat rdat ['sch'='']</em></dt>
-<dt><a name="index-tiles-2"></a>MGL command: <em></em> <strong>tiles</strong> <em>xdat ydat zdat rdat cdat ['sch'='']</em></dt>
-<dd><p>The function draws horizontal tiles for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} and color it by matrix <var>c</var>[i,j]. It is mostly the same as <a href="#tile">tile</a> but the size of tiles is determined by <var>r</var> array. If string <var>sch</var> contain style `<samp>x</samp>` or `<samp>y</samp>` then tiles will be oriented perpendicular to x- or y-axis. This is some kind of “transparency” useful for exporting to EPS files. Tiles is plotted for each z slice of the data. See also <a href="#surfa">surfa</a>, <a href="#tile">tile</a>. See <a href="#tiles-sample">tiles sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="map"></a><dl>
-<dt><a name="index-map"></a>MGL command: <em></em> <strong>map</strong> <em>udat vdat ['sch'='']</em></dt>
-<dt><a name="index-map-1"></a>MGL command: <em></em> <strong>map</strong> <em>xdat ydat udat vdat ['sch'='']</em></dt>
-<dd><p>The function draws mapping plot for matrices {<var>ax</var>, <var>ay</var> } which parametrically depend on coordinates <var>x</var>, <var>y</var>. The initial position of the cell (point) is marked by color. Height is proportional to Jacobian(ax,ay). This plot is like Arnold diagram ??? If string <var>sch</var> contain symbol `<samp>.</samp>` then the color ball at matrix knots are drawn otherwise face is drawn. See <a href="#Mapping-visualization">Mapping visualization</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="stfa"></a><dl>
-<dt><a name="index-stfa"></a>MGL command: <em></em> <strong>stfa</strong> <em>re im <code>dn</code> ['sch'='']</em></dt>
-<dt><a name="index-stfa-1"></a>MGL command: <em></em> <strong>stfa</strong> <em>xdat ydat re im <code>dn</code> ['sch'='']</em></dt>
-<dd><p>Draws spectrogram of complex array <var>re</var>+i*<var>im</var> for Fourier size of <var>dn</var> points at plane <var>z</var> equal to minimal z-axis value. For example in 1D case, result is density plot of data <em>res[i,j]=|\sum_d^dn exp(I*j*d)*(re[i*dn+d]+I*im[i*dn+d])|/dn</em> with size {int(nx/dn), dn, ny}. At this array <var>re</var>, <var>im</var> parametrically depend on coordinates <var>x</var>, <var>y</var>. The size of <var>re</var> and <var>im</var> must be the same. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>re</var> should be equal. Arrays <var>x</var>, <var>y</var> can be vectors (not matrix as <var>re</var>). See <a href="#stfa-sample">stfa sample</a>, for sample code and picture.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Vector-fields"></a>
-<div class="header">
-<p>
-Next: <a href="#Other-plotting" accesskey="n" rel="next">Other plotting</a>, Previous: <a href="#Dual-plotting" accesskey="p" rel="prev">Dual plotting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Vector-fields-1"></a>
-<h3 class="section">3.15 Vector fields</h3>
-
-<a name="index-Traj"></a>
-<a name="index-Vect"></a>
-<a name="index-Dew"></a>
-<a name="index-Flow"></a>
-<a name="index-FlowP"></a>
-<a name="index-Pipe"></a>
-
-<p>These functions perform plotting of 2D and 3D vector fields. There are 5 generally different types of vector fields representations: simple vector field (Vect), vectors along the curve (Traj), vector field by dew-drops (Dew), flow threads (Flow, FlowP), flow pipes (Pipe). By default (if absent) values of <var>x</var>, <var>y</var>, <var>z</var> are equidistantly distributed in axis range. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var>, <var>ax</var> should be equal. The size of <var>ax</var>, <var>ay</var> and <var>az</var> must be equal. Arrays <var>x</var>, <var>y</var>, <var>z</var> can be vectors (not matrices as <var>ax</var>). String <var>sch</var> sets the color scheme (see <a href="#Color-scheme">Color scheme</a>) for plot. String <var>opt</var> contain command options (see <a href="#Command-options">Command options</a>).
-</p>
-<a name="traj"></a><dl>
-<dt><a name="index-traj"></a>MGL command: <em></em> <strong>traj</strong> <em>xdat ydat udat vdat ['sch'='']</em></dt>
-<dt><a name="index-traj-1"></a>MGL command: <em></em> <strong>traj</strong> <em>xdat ydat zdat udat vdat wdat ['sch'='']</em></dt>
-<dd><p>The function draws vectors {<var>ax</var>, <var>ay</var>, <var>az</var>} along a curve {<var>x</var>, <var>y</var>, <var>z</var>}. The length of arrows are proportional to <em>\sqrt{ax^2+ay^2+az^2}</em>. String <var>pen</var> specifies the color (see <a href="#Line-styles">Line styles</a>). By default (<code>pen=""</code>) color from palette is used (see <a href="#Palette-and-colors">Palette and colors</a>). Option <code>value</code> set the vector length factor (if non-zero) or vector length to be proportional the distance between curve points (if <code>value=0</code>). The minor sizes of all arrays must be equal and large 2. The plots are drawn for each row if one of the data is the matrix. See also <a href="#vect">vect</a>. See <a href="#traj-sample">traj sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="vect"></a><dl>
-<dt><a name="index-vect"></a>MGL command: <em></em> <strong>vect</strong> <em>udat vdat ['sch'='']</em></dt>
-<dt><a name="index-vect-1"></a>MGL command: <em></em> <strong>vect</strong> <em>xdat ydat udat vdat ['sch'='']</em></dt>
-<dd><p>The function draws plane vector field plot for the field {<var>ax</var>, <var>ay</var>} depending parametrically on coordinates <var>x</var>, <var>y</var> at level <var>z</var> equal to minimal z-axis value. The length and color of arrows are proportional to <em>\sqrt{ax^2+ay^2}</em>. The number of arrows depend on <a href="#meshnum">meshnum</a>. The appearance of the hachures (arrows) can be changed by symbols:
-</p><ul>
-<li> `<samp>f</samp>` for drawing arrows with fixed lengths,
-</li><li> `<samp>></samp>`, `<samp><</samp>` for drawing arrows to or from the cell point (default is centering),
-</li><li> `<samp>.</samp>` for drawing hachures with dots instead of arrows,
-</li><li> `<samp>=</samp>` for enabling color gradient along arrows.
-</li></ul>
-<p>See also <a href="#flow">flow</a>, <a href="#dew">dew</a>. See <a href="#vect-sample">vect sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-vect-2"></a>MGL command: <em></em> <strong>vect</strong> <em>udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-vect-3"></a>MGL command: <em></em> <strong>vect</strong> <em>xdat ydat zdat udat vdat wdat ['sch'='']</em></dt>
-<dd><p>This is 3D version of the first functions. Here arrays <var>ax</var>, <var>ay</var>, <var>az</var> must be 3-ranged tensors with equal sizes and the length and color of arrows is proportional to <em>\sqrt{ax^2+ay^2+az^2}</em>.
-</p></dd></dl>
-
-<a name="vect3"></a><dl>
-<dt><a name="index-vect3"></a>MGL command: <em></em> <strong>vect3</strong> <em>udat vdat wdat ['sch'='' sval]</em></dt>
-<dt><a name="index-vect3-1"></a>MGL command: <em></em> <strong>vect3</strong> <em>xdat ydat zdat udat vdat wdat ['sch'='' sval]</em></dt>
-<dd><p>The function draws 3D vector field plot for the field {<var>ax</var>, <var>ay</var>, <var>az</var>} depending parametrically on coordinates <var>x</var>, <var>y</var>, <var>z</var>. Vector field is drawn at slice <var>sVal</var> in direction {`<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`} if <var>sch</var> contain corresponding symbol (by default, `<samp>y</samp>` direction is used). The length and color of arrows are proportional to <em>\sqrt{ax^2+ay^2+az^2}</em>. The number of arrows depend on <a href="#meshnum">meshnum</a>. The appearance of the hachures (arrows) can be changed by symbols:
-</p><ul>
-<li> `<samp>f</samp>` for drawing arrows with fixed lengths,
-</li><li> `<samp>></samp>`, `<samp><</samp>` for drawing arrows to or from the cell point (default is centering),
-</li><li> `<samp>.</samp>` for drawing hachures with dots instead of arrows,
-</li><li> `<samp>=</samp>` for enabling color gradient along arrows.
-</li></ul>
-<p>See also <a href="#vect">vect</a>, <a href="#flow">flow</a>, <a href="#dew">dew</a>. See <a href="#vect3-sample">vect3 sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="dew"></a><dl>
-<dt><a name="index-dew"></a>MGL command: <em></em> <strong>dew</strong> <em>udat vdat ['sch'='']</em></dt>
-<dt><a name="index-dew-1"></a>MGL command: <em></em> <strong>dew</strong> <em>xdat ydat udat vdat ['sch'='']</em></dt>
-<dd><p>The function draws dew-drops for plane vector field {<var>ax</var>, <var>ay</var>} depending parametrically on coordinates <var>x</var>, <var>y</var> at level <var>z</var> equal to minimal z-axis value. Note that this is very expensive plot in memory usage and creation time! The color of drops is proportional to <em>\sqrt{ax^2+ay^2}</em>. The number of drops depend on <a href="#meshnum">meshnum</a>. See also <a href="#vect">vect</a>. See <a href="#dew-sample">dew sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="flow"></a><dl>
-<dt><a name="index-flow"></a>MGL command: <em></em> <strong>flow</strong> <em>udat vdat ['sch'='']</em></dt>
-<dt><a name="index-flow-1"></a>MGL command: <em></em> <strong>flow</strong> <em>xdat ydat udat vdat ['sch'='']</em></dt>
-<dd><p>The function draws flow threads for the plane vector field {<var>ax</var>, <var>ay</var>} parametrically depending on coordinates <var>x</var>, <var>y</var> at level <var>z</var> equal to minimal z-axis value. Option <code>value</code> set the approximate number of threads (default is 5), or accuracy for stationary points (if style `<samp>.</samp>` is used) . String <var>sch</var> may contain:
-</p><ul>
-<li> color scheme - up-half (warm) corresponds to normal flow (like attractor), bottom-half (cold) corresponds to inverse flow (like source);
-</li><li> `<samp>#</samp>` for starting threads from edges only;
-</li><li> `<samp>.</samp>` for drawing separatrices only (flow threads to/from stationary points).
-</li><li> `<samp>*</samp>` for starting threads from a 2D array of points inside the data;
-</li><li> `<samp>v</samp>` for drawing arrows on the threads;
-</li><li> `<samp>x</samp>`, `<samp>z</samp>` for drawing tapes of normals in x-y and y-z planes correspondingly.
-</li></ul>
-<p>See also <a href="#pipe">pipe</a>, <a href="#vect">vect</a>, <a href="#tape">tape</a>, <a href="#flow3">flow3</a>, <a href="#barwidth">barwidth</a>. See <a href="#flow-sample">flow sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-flow-2"></a>MGL command: <em></em> <strong>flow</strong> <em>udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-flow-3"></a>MGL command: <em></em> <strong>flow</strong> <em>xdat ydat zdat udat vdat wdat ['sch'='']</em></dt>
-<dd><p>This is 3D version of the first functions. Here arrays <var>ax</var>, <var>ay</var>, <var>az</var> must be 3-ranged tensors with equal sizes and the color of line is proportional to <em>\sqrt{ax^2+ay^2+az^2}</em>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-flow-4"></a>MGL command: <em></em> <strong>flow</strong> <em><code>x0 y0</code> udat vdat ['sch'='']</em></dt>
-<dt><a name="index-flow-5"></a>MGL command: <em></em> <strong>flow</strong> <em><code>x0 y0</code> xdat ydat udat vdat ['sch'='']</em></dt>
-<dd><p>The same as first one (<a href="#flow">flow</a>) but draws single flow thread starting from point <var>p0</var>={<var>x0</var>,<var>y0</var>,<var>z0</var>}.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-flow-6"></a>MGL command: <em></em> <strong>flow</strong> <em><code>x0 y0 z0</code> udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-flow-7"></a>MGL command: <em></em> <strong>flow</strong> <em><code>x0 y0 z0</code> xdat ydat zdat udat vdat wdat ['sch'='']</em></dt>
-<dd><p>This is 3D version of the previous functions.
-</p></dd></dl>
-
-<a name="flow3"></a><dl>
-<dt><a name="index-flow3"></a>MGL command: <em></em> <strong>flow3</strong> <em>udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-flow3-1"></a>MGL command: <em></em> <strong>flow3</strong> <em>xdat ydat zdat udat vdat ['sch'='']</em></dt>
-<dd><p>The function draws flow threads for the 3D vector field {<var>ax</var>, <var>ay</var>, <var>az</var>} parametrically depending on coordinates <var>x</var>, <var>y</var>, <var>z</var>. Flow threads starts from given plane. Option <code>value</code> set the approximate number of threads (default is 5). String <var>sch</var> may contain:
-</p><ul>
-<li> color scheme - up-half (warm) corresponds to normal flow (like attractor), bottom-half (cold) corresponds to inverse flow (like source);
-</li><li> `<samp>x</samp>`, `<samp>z</samp>` for normal of starting plane (default is y-direction);
-</li><li> `<samp>v</samp>` for drawing arrows on the threads;
-</li><li> `<samp>t</samp>` for drawing tapes of normals in x-y and y-z planes.
-</li></ul>
-<p>See also <a href="#flow">flow</a>, <a href="#pipe">pipe</a>, <a href="#vect">vect</a>. See <a href="#flow3-sample">flow3 sample</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="grad"></a><dl>
-<dt><a name="index-grad"></a>MGL command: <em></em> <strong>grad</strong> <em>pdat ['sch'='']</em></dt>
-<dt><a name="index-grad-1"></a>MGL command: <em></em> <strong>grad</strong> <em>xdat ydat pdat ['sch'='']</em></dt>
-<dt><a name="index-grad-2"></a>MGL command: <em></em> <strong>grad</strong> <em>xdat ydat zdat pdat ['sch'='']</em></dt>
-<dd><p>The function draws gradient lines for scalar field <var>phi</var>[i,j] (or <var>phi</var>[i,j,k] in 3d case) specified parametrically {<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]}. Number of lines is proportional to <code>value</code> option (default is 5). See also <a href="#dens">dens</a>, <a href="#cont">cont</a>, <a href="#flow">flow</a>.
-</p></dd></dl>
-
-<a name="pipe"></a><dl>
-<dt><a name="index-pipe"></a>MGL command: <em></em> <strong>pipe</strong> <em>udat vdat ['sch'='' <code>r0=0.05</code>]</em></dt>
-<dt><a name="index-pipe-1"></a>MGL command: <em></em> <strong>pipe</strong> <em>xdat ydat udat vdat ['sch'='' <code>r0=0.05</code>]</em></dt>
-<dd><p>The function draws flow pipes for the plane vector field {<var>ax</var>, <var>ay</var>} parametrically depending on coordinates <var>x</var>, <var>y</var> at level <var>z</var> equal to minimal z-axis value. Number of pipes is proportional to <code>value</code> option (default is 5). If `<samp>#</samp>` symbol is specified then pipes start only from edges of axis range. The color of lines is proportional to <em>\sqrt{ax^2+ay^2}</em>. Warm color corresponds to normal flow (like attractor). Cold one corresponds to inverse flow (like source). Parameter <var>r0</var> set the base pipe radius. If <var>r0</var><0 or symbol `<samp>i</samp>` is specified then pipe radius is inverse proportional to amplitude. The vector field is plotted for each z slice of <var>ax</var>, <var>ay</var>. See also <a href="#flow">flow</a>, <a href="#vect">vect</a>. See <a href="#pipe-sample">pipe sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-pipe-2"></a>MGL command: <em></em> <strong>pipe</strong> <em>udat vdat wdat ['sch'='' <code>r0=0.05</code>]</em></dt>
-<dt><a name="index-pipe-3"></a>MGL command: <em></em> <strong>pipe</strong> <em>xdat ydat zdat udat vdat wdat ['sch'='' <code>r0=0.05</code>]</em></dt>
-<dd><p>This is 3D version of the first functions. Here arrays <var>ax</var>, <var>ay</var>, <var>az</var> must be 3-ranged tensors with equal sizes and the color of line is proportional to <em>\sqrt{ax^2+ay^2+az^2}</em>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Other-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#Nonlinear-fitting" accesskey="n" rel="next">Nonlinear fitting</a>, Previous: <a href="#Vector-fields" accesskey="p" rel="prev">Vector fields</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Other-plotting-1"></a>
-<h3 class="section">3.16 Other plotting</h3>
-
-<a name="index-DensXYZ"></a>
-<a name="index-ContXYZ"></a>
-<a name="index-ContFXYZ"></a>
-<a name="index-Dots"></a>
-<a name="index-Crust"></a>
-<a name="index-TriPlot"></a>
-<a name="index-TriCont"></a>
-<a name="index-QuadPlot"></a>
-<a name="index-FPlot"></a>
-<a name="index-FSurf"></a>
-
-<p>These functions perform miscellaneous plotting. There is unstructured data points plots (Dots), surface reconstruction (Crust), surfaces on the triangular or quadrangular mesh (TriPlot, TriCont, QuadPlot), textual formula plotting (Plots by formula), data plots at edges (Dens[XYZ], Cont[XYZ], ContF[XYZ]). Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. See <a href="#Color-scheme">Color scheme</a>.
-</p>
-<a name="densz"></a><a name="densy"></a><a name="densx"></a><a name="DensXYZ"></a><dl>
-<dt><a name="index-densx"></a>MGL command: <em></em> <strong>densx</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-densy"></a>MGL command: <em></em> <strong>densy</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-densz"></a>MGL command: <em></em> <strong>densz</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dd><p>These plotting functions draw density plot in x, y, or z plain. If <var>a</var> is a tensor (3-dimensional data) then interpolation to a given <var>sVal</var> is performed. These functions are useful for creating projections of the 3D data array to the bounding box. See also <a href="#ContXYZ">ContXYZ</a>, <a href="#ContFXYZ">ContFXYZ</a>, <a href="#dens">dens</a>, <a href="#Data-manipulation">Data manipulation</a>. See <a href="#dens_005fxyz-sample">dens_xyz sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="contz"></a><a name="conty"></a><a name="contx"></a><a name="ContXYZ"></a><dl>
-<dt><a name="index-contx"></a>MGL command: <em></em> <strong>contx</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-conty"></a>MGL command: <em></em> <strong>conty</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-contz"></a>MGL command: <em></em> <strong>contz</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dd><p>These plotting functions draw contour lines in x, y, or z plain. If <var>a</var> is a tensor (3-dimensional data) then interpolation to a given <var>sVal</var> is performed. These functions are useful for creating projections of the 3D data array to the bounding box. Option <code>value</code> set the number of contours. See also <a href="#ContFXYZ">ContFXYZ</a>, <a href="#DensXYZ">DensXYZ</a>, <a href="#cont">cont</a>, <a href="#Data-manipulation">Data manipulation</a>. See <a href="#cont_005fxyz-sample">cont_xyz sample</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="contfz"></a><a name="contfy"></a><a name="contfx"></a><a name="ContFXYZ"></a><dl>
-<dt><a name="index-contfx"></a>MGL command: <em></em> <strong>contfx</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-contfy"></a>MGL command: <em></em> <strong>contfy</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-contfz"></a>MGL command: <em></em> <strong>contfz</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dd><p>These plotting functions draw solid contours in x, y, or z plain. If <var>a</var> is a tensor (3-dimensional data) then interpolation to a given <var>sVal</var> is performed. These functions are useful for creating projections of the 3D data array to the bounding box. Option <code>value</code> set the number of contours. See also <a href="#ContFXYZ">ContFXYZ</a>, <a href="#DensXYZ">DensXYZ</a>, <a href="#cont">cont</a>, <a href="#Data-manipulation">Data manipulation</a>. See <a href="#contf_005fxyz-sample">contf_xyz sample</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="fplot"></a><dl>
-<dt><a name="index-fplot"></a>MGL command: <em></em> <strong>fplot</strong> <em>'y(x)' ['pen'='']</em></dt>
-<dd><p>Draws command function `<samp>y(x)</samp>` at plane <var>z</var> equal to minimal z-axis value, where `<samp>x</samp>` variable is changed in <code>xrange</code>. You do not need to create the data arrays to plot it. Option <code>value</code> set initial number of points. See also <a href="#plot">plot</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-fplot-1"></a>MGL command: <em></em> <strong>fplot</strong> <em>'x(t)' 'y(t)' 'z(t)' ['pen'='']</em></dt>
-<dd><p>Draws command parametrical curve {`<samp>x(t)</samp>`, `<samp>y(t)</samp>`, `<samp>z(t)</samp>`} where `<samp>t</samp>` variable is changed in range [0, 1]. You do not need to create the data arrays to plot it. Option <code>value</code> set number of points. See also <a href="#plot">plot</a>.
-</p></dd></dl>
-
-<a name="fsurf"></a><dl>
-<dt><a name="index-fsurf"></a>MGL command: <em></em> <strong>fsurf</strong> <em>'z(x,y)' ['sch'='']</em></dt>
-<dd><p>Draws command surface for function `<samp>z(x,y)</samp>` where `<samp>x</samp>`, `<samp>y</samp>` variable are changed in <code>xrange, yrange</code>. You do not need to create the data arrays to plot it. Option <code>value</code> set number of points. See also <a href="#surf">surf</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-fsurf-1"></a>MGL command: <em></em> <strong>fsurf</strong> <em>'x(u,v)' 'y(u,v)' 'z(u,v)' ['sch'='']</em></dt>
-<dd><p>Draws command parametrical surface {`<samp>x(u,v)</samp>`, `<samp>y(u,v)</samp>`, `<samp>z(u,v)</samp>`} where `<samp>u</samp>`, `<samp>v</samp>` variable are changed in range [0, 1]. You do not need to create the data arrays to plot it. Option <code>value</code> set number of points. See also <a href="#surf">surf</a>.
-</p></dd></dl>
-
-<a name="triplot"></a><dl>
-<dt><a name="index-triplot"></a>MGL command: <em></em> <strong>triplot</strong> <em>idat xdat ydat ['sch'='']</em></dt>
-<dt><a name="index-triplot-1"></a>MGL command: <em></em> <strong>triplot</strong> <em>idat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-triplot-2"></a>MGL command: <em></em> <strong>triplot</strong> <em>idat xdat ydat zdat cdat ['sch'='']</em></dt>
-<dd><p>The function draws the surface of triangles. Triangle vertexes are set by indexes <var>id</var> of data points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. String <var>sch</var> sets the color scheme. If string contain `<samp>#</samp>` then wire plot is produced. First dimensions of <var>id</var> must be 3 or greater. Arrays <var>x</var>, <var>y</var>, <var>z</var> must have equal sizes. Parameter <var>c</var> set the colors of triangles (if <var>id</var>.ny=<var>c</var>.nx) or colors of vertexes (if <var>x</var>.nx=<var>c</var>.nx). See also <a href="#dots">dots</a>, <a href="#crust">crust</a>, <a href="#quadplot">quadplot</a>, <a href="#triangulation">triangulation</a>. See <a href="#triplot-sample">triplot sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="tricont"></a><dl>
-<dt><a name="index-tricont"></a>MGL command: <em></em> <strong>tricont</strong> <em>vdat idat xdat ydat zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-tricont-1"></a>MGL command: <em></em> <strong>tricont</strong> <em>vdat idat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-tricont-2"></a>MGL command: <em></em> <strong>tricont</strong> <em>idat xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>The function draws contour lines for surface of triangles at <var>z</var>=<var>v</var>[k] (or at <var>z</var> equal to minimal z-axis value if <var>sch</var> contain symbol `<samp>_</samp>`). Triangle vertexes are set by indexes <var>id</var> of data points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Contours are plotted for <var>z</var>[i,j]=<var>v</var>[k] where <var>v</var>[k] are values of data array <var>v</var>. If <var>v</var> is absent then arrays of option <code>value</code> elements equidistantly distributed in color range is used. String <var>sch</var> sets the color scheme. Array <var>c</var> (if specified) is used for contour coloring. First dimensions of <var>id</var> must be 3 or greater. Arrays <var>x</var>, <var>y</var>, <var>z</var> must have equal sizes. Parameter <var>c</var> set the colors of triangles (if <var>id</var>.ny=<var>c</var>.nx) or colors of vertexes (if <var>x</var>.nx=<var>c</var>.nx). See also <a href="#triplot">triplot</a>, <a href="#cont">cont</a>, <a href="#triangulation">triangulation</a>.
-</p></dd></dl>
-
-<a name="quadplot"></a><dl>
-<dt><a name="index-quadplot"></a>MGL command: <em></em> <strong>quadplot</strong> <em>idat xdat ydat ['sch'='']</em></dt>
-<dt><a name="index-quadplot-1"></a>MGL command: <em></em> <strong>quadplot</strong> <em>idat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-quadplot-2"></a>MGL command: <em></em> <strong>quadplot</strong> <em>idat xdat ydat zdat cdat ['sch'='']</em></dt>
-<dd><p>The function draws the surface of quadrangles. Quadrangles vertexes are set by indexes <var>id</var> of data points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. String <var>sch</var> sets the color scheme. If string contain `<samp>#</samp>` then wire plot is produced. First dimensions of <var>id</var> must be 4 or greater. Arrays <var>x</var>, <var>y</var>, <var>z</var> must have equal sizes. Parameter <var>c</var> set the colors of quadrangles (if <var>id</var>.ny=<var>c</var>.nx) or colors of vertexes (if <var>x</var>.nx=<var>c</var>.nx). See also <a href="#triplot">triplot</a>. See <a href="#triplot-sample">triplot sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="dots"></a><dl>
-<dt><a name="index-dots"></a>MGL command: <em></em> <strong>dots</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-dots-1"></a>MGL command: <em></em> <strong>dots</strong> <em>xdat ydat zdat adat ['sch'='']</em></dt>
-<dd><p>The function draws the arbitrary placed points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. String <var>sch</var> sets the color scheme and kind of marks. If arrays <var>c</var>, <var>a</var> are specified then they define colors and transparencies of dots. You can use <a href="#tens">tens</a> plot with style `<samp> .</samp>` to draw non-transparent dots with specified colors. Arrays <var>x</var>, <var>y</var>, <var>z</var>, <var>a</var> must have equal sizes. See also <a href="#crust">crust</a>, <a href="#tens">tens</a>, <a href="#mark">mark</a>, <a href="#plot">plot</a>. See <a href="#dots-sample">dots sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="crust"></a><dl>
-<dt><a name="index-crust"></a>MGL command: <em></em> <strong>crust</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>The function reconstruct and draws the surface for arbitrary placed points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. String <var>sch</var> sets the color scheme. If string contain `<samp>#</samp>` then wire plot is produced. Arrays <var>x</var>, <var>y</var>, <var>z</var> must have equal sizes. See also <a href="#dots">dots</a>, <a href="#triplot">triplot</a>. </p></dd></dl>
-
-
-<hr>
-<a name="Nonlinear-fitting"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-manipulation" accesskey="n" rel="next">Data manipulation</a>, Previous: <a href="#Other-plotting" accesskey="p" rel="prev">Other plotting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Nonlinear-fitting-1"></a>
-<h3 class="section">3.17 Nonlinear fitting</h3>
-
-<a name="index-Fit"></a>
-<a name="index-FitS"></a>
-<a name="index-PutsFit"></a>
-<a name="index-mglFitPnts"></a>
-<a name="index-Fit2"></a>
-<a name="index-Fit3"></a>
-
-<p>These functions fit data to formula. Fitting goal is to find formula parameters for the best fit the data points, i.e. to minimize the sum <em>\sum_i (f(x_i, y_i, z_i) - a_i)^2/s_i^2</em>. At this, approximation function `<samp>f</samp>` can depend only on one argument `<samp>x</samp>` (1D case), on two arguments `<samp>x,y</samp>` (2D case) and on three arguments `<samp>x,y,z</samp>` (3D case). The function `<samp>f</samp>` also may depend on parameters. Normally the list of fitted parameters is specified by <var>var</var> string (like, `<samp>abcd</samp>`). Usually user should supply initial values for fitted parameters by <var>ini</var> variable. But if he/she don`t supply it then the zeros are used. Parameter <var>print</var>=<code>true</code> switch on printing the found coefficients to <var>Message</var> (see <a href="#Error-handling">Error handling</a>).
-</p>
-<p>Functions Fit() and FitS() do not draw the obtained data themselves. They fill the data <var>fit</var> by formula `<samp>f</samp>` with found coefficients and return it. At this, the `<samp>x,y,z</samp>` coordinates are equidistantly distributed in the axis range. Number of points in <var>fit</var> is defined by option <code>value</code> (default is <var>mglFitPnts</var>=100). Note, that this functions use GSL library and do something only if MathGL was compiled with GSL support. See <a href="#Nonlinear-fitting-hints">Nonlinear fitting hints</a>, for sample code and picture.
-</p>
-<a name="fits"></a><dl>
-<dt><a name="index-fits"></a>MGL command: <em></em> <strong>fits</strong> <em>res adat sdat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fits-1"></a>MGL command: <em></em> <strong>fits</strong> <em>res xdat adat sdat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fits-2"></a>MGL command: <em></em> <strong>fits</strong> <em>res xdat ydat adat sdat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fits-3"></a>MGL command: <em></em> <strong>fits</strong> <em>res xdat ydat zdat adat sdat 'func' 'var' [ini=0]</em></dt>
-<dd><p>Fit data along x-, y- and z-directions for array specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) with weight factor <var>s</var>[i,j,k].
-</p></dd></dl>
-
-<a name="fit"></a><dl>
-<dt><a name="index-fit"></a>MGL command: <em></em> <strong>fit</strong> <em>res adat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fit-1"></a>MGL command: <em></em> <strong>fit</strong> <em>res xdat adat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fit-2"></a>MGL command: <em></em> <strong>fit</strong> <em>res xdat ydat adat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fit-3"></a>MGL command: <em></em> <strong>fit</strong> <em>res xdat ydat zdat adat 'func' 'var' [ini=0]</em></dt>
-<dd><p>Fit data along x-, y- and z-directions for array specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) with weight factor 1.
-</p></dd></dl>
-
-
-
-<a name="putsfit"></a><dl>
-<dt><a name="index-putsfit"></a>MGL command: <em></em> <strong>putsfit</strong> <em><code>x y</code> ['pre'='' 'fnt'='' <code>size=-1</code>]</em></dt>
-<dd><p>Print last fitted formula with found coefficients (as numbers) at position <var>p0</var>. The string <var>prefix</var> will be printed before formula. All other parameters are the same as in <a href="#Text-printing">Text printing</a>.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Data-manipulation"></a>
-<div class="header">
-<p>
-Previous: <a href="#Nonlinear-fitting" accesskey="p" rel="prev">Nonlinear fitting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-manipulation-1"></a>
-<h3 class="section">3.18 Data manipulation</h3>
-
-<a name="index-Hist"></a>
-<a name="index-Fill"></a>
-<a name="index-DataGrid"></a>
-
-<dl>
-<dt><a name="index-hist"></a>MGL command: <em></em> <strong>hist</strong> <em><small>RES</small> xdat adat</em></dt>
-<dt><a name="index-hist-1"></a>MGL command: <em></em> <strong>hist</strong> <em><small>RES</small> xdat ydat adat</em></dt>
-<dt><a name="index-hist-2"></a>MGL command: <em></em> <strong>hist</strong> <em><small>RES</small> xdat ydat zdat adat</em></dt>
-<dd><p>These functions make distribution (histogram) of data. They do not draw the obtained data themselves. These functions can be useful if user have data defined for random points (for example, after PIC simulation) and he want to produce a plot which require regular data (defined on grid(s)). The range for grids is always selected as axis range. Arrays <var>x</var>, <var>y</var>, <var>z</var> define the positions (coordinates) of random points. Array <var>a</var> define the data value. Number of points in output array <var>res</var> is defined by option <code>value</code> (default is <var>mglFitPnts</var>=100).
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-fill"></a>MGL command: <em></em> <strong>fill</strong> <em>dat 'eq'</em></dt>
-<dt><a name="index-fill-1"></a>MGL command: <em></em> <strong>fill</strong> <em>dat 'eq' vdat</em></dt>
-<dt><a name="index-fill-2"></a>MGL command: <em></em> <strong>fill</strong> <em>dat 'eq' vdat wdat</em></dt>
-<dd><p>Fills the value of array `<samp>u</samp>` according to the formula in string <var>eq</var>. Formula is an arbitrary expression depending on variables `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`, `<samp>u</samp>`, `<samp>v</samp>`, `<samp>w</samp>`. Coordinates `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>` are supposed to be normalized in axis range. Variable `<samp>u</samp>` is the original value of the array. Variables `<samp>v</samp>` and `<samp>w</samp>` are values of arrays <var>v</var>, <var>w</var> which can be <code>NULL</code> (i.e. can be omitted).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-datagrid"></a>MGL command: <em></em> <strong>datagrid</strong> <em>dat xdat ydat zdat</em></dt>
-<dd><p>Fills the value of array `<samp>u</samp>` according to the linear interpolation of triangulated surface, found for arbitrary placed points `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`. Interpolation is done at points equidistantly distributed in axis range. NAN value is used for grid points placed outside of triangulated surface. See <a href="#Making-regular-data">Making regular data</a>, for sample code and picture.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-refill"></a>MGL command: <em></em> <strong>refill</strong> <em>dat xdat vdat [sl=-1]</em></dt>
-<dt><a name="index-refill-1"></a>MGL command: <em></em> <strong>refill</strong> <em>dat xdat ydat vdat [sl=-1]</em></dt>
-<dt><a name="index-refill-2"></a>MGL command: <em></em> <strong>refill</strong> <em>dat xdat ydat zdat vdat</em></dt>
-<dd><p>Fills by interpolated values of array <var>v</var> at the point {<var>x</var>, <var>y</var>, <var>z</var>}={<code>X[i], Y[j], Z[k]</code>} (or {<var>x</var>, <var>y</var>, <var>z</var>}={<code>X[i,j,k], Y[i,j,k], Z[i,j,k]</code>} if <var>x</var>, <var>y</var>, <var>z</var> are not 1d arrays), where <code>X,Y,Z</code> are equidistantly distributed in axis range and have the same sizes as array <var>dat</var>. If parameter <var>sl</var> is 0 or positive then changes will be applied only for slice <var>sl</var>.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-pde"></a>MGL command: <em></em> <strong>pde</strong> <em><small>RES</small> 'ham' ini_re ini_im [<code>dz=0.1 k0=100</code>]</em></dt>
-<dd><p>Solves equation du/dz = i*k0*<var>ham</var>(p,q,x,y,z,|u|)[u], where p=-i/k0*d/dx, q=-i/k0*d/dy are pseudo-differential operators. Parameters <var>ini_re</var>, <var>ini_im</var> specify real and imaginary part of initial field distribution. Coordinates `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>` are supposed to be normalized in axis range. Note, that really this ranges are increased by factor 3/2 for purpose of reducing reflection from boundaries. Parameter <var>dz</var> set the step along evolutionary coordinate z. At this moment, simplified form of function <var>ham</var> is supported - all “mixed” terms (like `<samp>x*p</samp>`->x*d/dx) are excluded. For example, in 2D case this function is effectively <em>ham = f(p,z) + g(x,z,u)</em>. However commutable combinations (like `<samp>x*q</samp>`->x*d/dy) are allowed. Here variable `<samp>u</samp>` is used for field amplitude |u|. This allow one solve nonlinear problems - for example, for nonlinear Shrodinger equation you may set <code>ham="p^2 + q^2 - u^2"</code>. You may specify imaginary part for wave absorption, like <code>ham = "p^2 + i*x*(x>0)"</code>, but only if dependence on variable `<samp>i</samp>` is linear (i.e. <em>ham = hre+i*him</em>). See <a href="#PDE-solving-hints">PDE solving hints</a>, for sample code and picture.
-</p></dd></dl>
-
-
-
-
-
-
-
-
-
-
-<hr>
-<a name="Data-processing"></a>
-<div class="header">
-<p>
-Next: <a href="#Examples" accesskey="n" rel="next">Examples</a>, Previous: <a href="#MathGL-core" accesskey="p" rel="prev">MathGL core</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-processing-1"></a>
-<h2 class="chapter">4 Data processing</h2>
-
-
-<p>This chapter describe commands for allocation, resizing, loading and saving, modifying of data arrays. Also it can numerically differentiate and integrate data, interpolate, fill data by formula and so on. Class supports data with dimensions up to 3 (like function of 3 variables - x,y,z). Data arrays are denoted by Small Caps (like <small>DAT</small>) if it can be (re-)created by MGL commands.
-</p>
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Public-variables" accesskey="1">Public variables</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-constructor" accesskey="2">Data constructor</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-resizing" accesskey="3">Data resizing</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-filling" accesskey="4">Data filling</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#File-I_002fO" accesskey="5">File I/O</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Make-another-data" accesskey="6">Make another data</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-changing" accesskey="7">Data changing</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Interpolation" accesskey="8">Interpolation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-information" accesskey="9">Data information</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Operators">Operators</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Global-functions">Global functions</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Evaluate-expression">Evaluate expression</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Special-data-classes">Special data classes</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Public-variables"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-constructor" accesskey="n" rel="next">Data constructor</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Public-variables-1"></a>
-<h3 class="section">4.1 Public variables</h3>
-
-
-<p>MGL don`t support direct access to data arrays. See section <a href="#Data-filling">Data filling</a>
-</p>
-
-
-<hr>
-<a name="Data-constructor"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-resizing" accesskey="n" rel="next">Data resizing</a>, Previous: <a href="#Public-variables" accesskey="p" rel="prev">Public variables</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-constructor-1"></a>
-<h3 class="section">4.2 Data constructor</h3>
-
-<a name="index-mglData"></a>
-
-<p>There are many functions, which can create data for output (see <a href="#Data-filling">Data filling</a>, <a href="#File-I_002fO">File I/O</a>, <a href="#Make-another-data">Make another data</a>, <a href="#Global-functions">Global functions</a>). Here I put most useful of them.
-</p>
-<a name="new"></a><dl>
-<dt><a name="index-new"></a>MGL command: <em></em> <strong>new</strong> <em><small>DAT</small> [<code>nx=1</code> 'eq']</em></dt>
-<dt><a name="index-new-1"></a>MGL command: <em></em> <strong>new</strong> <em><small>DAT</small> <code>nx ny</code> ['eq']</em></dt>
-<dt><a name="index-new-2"></a>MGL command: <em></em> <strong>new</strong> <em><small>DAT</small> <code>nx ny nz</code> ['eq']</em></dt>
-<dd><p>Default constructor. Allocates the memory for data array and initializes it by zero. If string <var>eq</var> is specified then data will be filled by corresponding formula as in <a href="#fill">fill</a>.
-</p></dd></dl>
-
-<a name="copy"></a><dl>
-<dt><a name="index-copy"></a>MGL command: <em></em> <strong>copy</strong> <em><small>DAT</small> dat2 ['eq'='']</em></dt>
-<dt><a name="index-copy-1"></a>MGL command: <em></em> <strong>copy</strong> <em><small>DAT</small> <code>val</code></em></dt>
-<dd><p>Copy constructor. Allocates the memory for data array and copy values from other array. At this, if parameter <var>eq</var> or <var>val</var> is specified then the data will be modified by corresponding formula similarly to <a href="#fill">fill</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-copy-2"></a>MGL command: <em></em> <strong>copy</strong> <em><small>REDAT</small> <small>IMDAT</small> dat2 ['eq'='']</em></dt>
-<dd><p>Allocates the memory for data array and copy real and imaginary values from complex array <var>dat2</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-copy-3"></a>MGL command: <em></em> <strong>copy</strong> <em>'name'</em></dt>
-<dd><p>Allocates the memory for data array and copy values from other array specified by its name, which can be "invalid" for MGL names (like one read from HDF5 files).
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-read"></a>MGL command: <em></em> <strong>read</strong> <em><small>DAT</small> 'fname'</em></dt>
-<dd><p>Reads data from tab-separated text file with auto determining sizes of the data.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-delete"></a>MGL command: <em></em> <strong>delete</strong> <em>dat</em></dt>
-<dt><a name="index-delete-1"></a>MGL command: <em></em> <strong>delete</strong> <em>'name'</em></dt>
-<dd><p>Deletes the data array from memory.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Data-resizing"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-filling" accesskey="n" rel="next">Data filling</a>, Previous: <a href="#Data-constructor" accesskey="p" rel="prev">Data constructor</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-resizing-1"></a>
-<h3 class="section">4.3 Data resizing</h3>
-
-<a name="index-Create"></a>
-<a name="index-Rearrange"></a>
-<a name="index-Extend"></a>
-<a name="index-Transpose"></a>
-<a name="index-Squeeze"></a>
-<a name="index-Crop"></a>
-<a name="index-Insert"></a>
-<a name="index-Delete"></a>
-<a name="index-Sort"></a>
-<a name="index-Clean"></a>
-<a name="index-Join"></a>
-
-<dl>
-<dt><a name="index-new-3"></a>MGL command: <em></em> <strong>new</strong> <em><small>DAT</small> [<code>nx=1 ny=1 nz=1</code>]</em></dt>
-<dd><p>Creates or recreates the array with specified size and fills it by zero. This function does nothing if one of parameters <var>mx</var>, <var>my</var>, <var>mz</var> is zero or negative.
-</p></dd></dl>
-
-<a name="rearrange"></a><dl>
-<dt><a name="index-rearrange"></a>MGL command: <em></em> <strong>rearrange</strong> <em>dat <code>mx [my=0 mz=0]</code></em></dt>
-<dd><p>Rearrange dimensions without changing data array so that resulting sizes should be <var>mx</var>*<var>my</var>*<var>mz</var> < nx*ny*nz. If some of parameter <var>my</var> or <var>mz</var> are zero then it will be selected to optimal fill of data array. For example, if <var>my</var>=0 then it will be change to <var>my</var>=nx*ny*nz/<var>mx</var> and <var>mz</var>=1.
-</p></dd></dl>
-
-<a name="transpose"></a><dl>
-<dt><a name="index-transpose"></a>MGL command: <em></em> <strong>transpose</strong> <em>dat ['dim'='yxz']</em></dt>
-<dd><p>Transposes (shift order of) dimensions of the data. New order of dimensions is specified in string <var>dim</var>. This function can be useful also after reading of one-dimensional data.
-</p></dd></dl>
-
-<a name="extend"></a><dl>
-<dt><a name="index-extend"></a>MGL command: <em></em> <strong>extend</strong> <em>dat <code>n1 [n2=0]</code></em></dt>
-<dd><p>Increase the dimensions of the data by inserting new (|<var>n1</var>|+1)-th slices after (for <var>n1</var>>0) or before (for <var>n1</var><0) of existed one. It is possible to insert 2 dimensions simultaneously for 1d data by using parameter <var>n2</var>. Data to new slices is copy from existed one. For example, for <var>n1</var>>0 new array will be
-a_ij^new = a_i^old where j=0...<var>n1</var>. Correspondingly, for <var>n1</var><0 new array will be a_ij^new = a_j^old where i=0...|<var>n1</var>|.
-</p></dd></dl>
-
-<a name="squeeze"></a><dl>
-<dt><a name="index-squeeze"></a>MGL command: <em></em> <strong>squeeze</strong> <em>dat <code>rx [ry=1 rz=1 sm=off]</code></em></dt>
-<dd><p>Reduces the data size by excluding data elements which indexes are not divisible by <var>rx</var>, <var>ry</var>, <var>rz</var> correspondingly. Parameter <var>smooth</var> set to use smoothing
-(i.e. out[i]=\sum_{j=i,i+r} a[j]/r) or not (i.e. out[i]=a[j*r]).
-</p></dd></dl>
-
-<a name="crop"></a><dl>
-<dt><a name="index-crop"></a>MGL command: <em></em> <strong>crop</strong> <em>dat <code>n1 n2</code> 'dir'</em></dt>
-<dd><p>Cuts off edges of the data <var>i</var><<var>n1</var> and <var>i</var>><var>n2</var> if <var>n2</var>>0 or <var>i</var>><code>n[xyz]</code>-<var>n2</var> if <var>n2</var><=0 along direction <var>dir</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-crop-1"></a>MGL command: <em></em> <strong>crop</strong> <em>dat 'how'</em></dt>
-<dd><p>Cuts off far edge of the data to be more optimal for fast Fourier transform. The resulting size will be the closest value of 2^n*3^m*5^l to the original one. The string <var>how</var> may contain: `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>` for directions, and `<samp>2</samp>`, `<samp>3</samp>`, `<samp>5</samp>` for using corresponding bases.
-</p></dd></dl>
-
-<a name="insert"></a><dl>
-<dt><a name="index-insert"></a>MGL command: <em></em> <strong>insert</strong> <em>dat 'dir' <code>[pos=off num=0]</code></em></dt>
-<dd><p>Insert <var>num</var> slices along <var>dir</var>-direction at position <var>pos</var> and fill it by zeros.
-</p></dd></dl>
-
-<a name="delete"></a><dl>
-<dt><a name="index-delete-2"></a>MGL command: <em></em> <strong>delete</strong> <em>dat 'dir' <code>[pos=off num=0]</code></em></dt>
-<dd><p>Delete <var>num</var> slices along <var>dir</var>-direction at position <var>pos</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-delete-3"></a>MGL command: <em></em> <strong>delete</strong> <em>dat</em></dt>
-<dt><a name="index-delete-4"></a>MGL command: <em></em> <strong>delete</strong> <em>'name'</em></dt>
-<dd><p>Deletes the whole data array.
-</p></dd></dl>
-
-<a name="sort"></a><dl>
-<dt><a name="index-sort"></a>MGL command: <em></em> <strong>sort</strong> <em>dat <code>idx [idy=-1]</code></em></dt>
-<dd><p>Sort data rows (or slices in 3D case) by values of specified column <var>idx</var> (or cell {<var>idx</var>,<var>idy</var>} for 3D case). Note, this function is not thread safe!
-</p></dd></dl>
-
-<a name="clean"></a><dl>
-<dt><a name="index-clean"></a>MGL command: <em></em> <strong>clean</strong> <em>dat <code>idx</code></em></dt>
-<dd><p>Delete rows which values are equal to next row for given column <var>idx</var>.
-</p></dd></dl>
-
-<a name="join"></a><dl>
-<dt><a name="index-join"></a>MGL command: <em></em> <strong>join</strong> <em>dat vdat [v2dat ...]</em></dt>
-<dd><p>Join data cells from <var>vdat</var> to <var>dat</var>. At this, function increase <var>dat</var> sizes according following: z-size for data arrays arrays with equal x-,y-sizes; or y-size for data arrays with equal x-sizes; or x-size otherwise.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Data-filling"></a>
-<div class="header">
-<p>
-Next: <a href="#File-I_002fO" accesskey="n" rel="next">File I/O</a>, Previous: <a href="#Data-resizing" accesskey="p" rel="prev">Data resizing</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-filling-1"></a>
-<h3 class="section">4.4 Data filling</h3>
-
-<a name="index-Fill-1"></a>
-<a name="index-Modify"></a>
-<a name="index-Set"></a>
-<a name="index-List"></a>
-<a name="index-Var"></a>
-<a name="index-Refill"></a>
-
-<a name="list"></a><dl>
-<dt><a name="index-list"></a>MGL command: <em></em> <strong>list</strong> <em><small>DAT</small> <code>v1 ...</code></em></dt>
-<dd><p>Creates new variable with name <var>dat</var> and fills it by numeric values of command arguments <code>v1 ...</code>. Command can create one-dimensional and two-dimensional arrays with arbitrary values. For creating 2d array the user should use delimiter `<samp>|</samp>` which means that the following values lie in next row. Array sizes are [maximal of row sizes * number of rows]. For example, command <code>list 1 | 2 3</code> creates the array [1 0; 2 3]. Note, that the maximal number of arguments is 1000.
-</p></dd></dl>
-<dl>
-<dt><a name="index-list-1"></a>MGL command: <em></em> <strong>list</strong> <em><small>DAT</small> d1 ...</em></dt>
-<dd><p>Creates new variable with name <var>dat</var> and fills it by data values of arrays of command arguments <var>d1 ...</var>. Command can create two-dimensional or three-dimensional (if arrays in arguments are 2d arrays) arrays with arbitrary values. Minor dimensions of all arrays in arguments should be equal to dimensions of first array d1. In the opposite case the argument will be ignored. Note, that the maximal number of arguments is 1000.
-</p></dd></dl>
-
-
-<a name="var"></a><dl>
-<dt><a name="index-var"></a>MGL command: <em></em> <strong>var</strong> <em><small>DAT</small> <code>num v1 [v2=nan]</code></em></dt>
-<dd><p>Creates new variable with name <var>dat</var> for one-dimensional array of size <var>num</var>. Array elements are equidistantly distributed in range [<var>v1</var>, <var>v2</var>]. If <var>v2</var>=<code>nan</code> then <var>v2=v1</var> is used.
-</p></dd></dl>
-
-<a name="fill"></a><dl>
-<dt><a name="index-fill-3"></a>MGL command: <em></em> <strong>fill</strong> <em>dat v1 v2 ['dir'='x']</em></dt>
-<dd><p>Equidistantly fills the data values to range [<var>v1</var>, <var>v2</var>] in direction <var>dir</var>={`<samp>x</samp>`,`<samp>y</samp>`,`<samp>z</samp>`}.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-fill-4"></a>MGL command: <em></em> <strong>fill</strong> <em>dat 'eq' [vdat wdat]</em></dt>
-<dd><p>Fills the value of array according to the formula in string <var>eq</var>. Formula is an arbitrary expression depending on variables `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`, `<samp>u</samp>`, `<samp>v</samp>`, `<samp>w</samp>`. Coordinates `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>` are supposed to be normalized in axis range of canvas <var>gr</var> (in difference from <code>Modify</code> functions). Variable `<samp>u</samp>` is the original value of the array. Variables `<samp>v</samp>` and `<samp>w</samp>` are values of <var>vdat</var>, <var>wdat</var> which can be <code>NULL</code> (i.e. can be omitted).
-</p></dd></dl>
-
-<a name="modify"></a><dl>
-<dt><a name="index-modify"></a>MGL command: <em></em> <strong>modify</strong> <em>dat 'eq' [<code>dim=0</code>]</em></dt>
-<dt><a name="index-modify-1"></a>MGL command: <em></em> <strong>modify</strong> <em>dat 'eq' vdat [wdat]</em></dt>
-<dd><p>The same as previous ones but coordinates `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>` are supposed to be normalized in range [0,1]. If <var>dim</var>>0 is specified then modification will be fulfilled only for slices >=<var>dim</var>.
-</p></dd></dl>
-
-<a name="fillsample"></a><dl>
-<dt><a name="index-fillsample"></a>MGL command: <em></em> <strong>fillsample</strong> <em>dat 'how'</em></dt>
-<dd><p>Fills data by `x` or `k` samples for Hankel (`h`) or Fourier (`f`) transform.
-</p></dd></dl>
-
-
-<a name="datagrid"></a><dl>
-<dt><a name="index-datagrid-1"></a>MGL command: <em></em> <strong>datagrid</strong> <em>dat xdat ydat zdat</em></dt>
-<dd><p>Fills the value of array according to the linear interpolation of triangulated surface assuming x-,y-coordinates equidistantly distributed in axis range (or in range [x1,x2]*[y1,y2]). Triangulated surface is found for arbitrary placed points `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`. NAN value is used for grid points placed outside of triangulated surface. See <a href="#Making-regular-data">Making regular data</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="put"></a><dl>
-<dt><a name="index-put"></a>MGL command: <em></em> <strong>put</strong> <em>dat <code>val [i=all j=all k=all]</code></em></dt>
-<dd><p>Sets value(s) of array a[<var>i</var>, <var>j</var>, <var>k</var>] = <var>val</var>. Negative indexes <var>i</var>, <var>j</var>, <var>k</var>=-1 set the value <var>val</var> to whole range in corresponding direction(s). For example, <code>Put(val,-1,0,-1);</code> sets a[i,0,j]=<var>val</var> for i=0...(nx-1), j=0...(nz-1).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-put-1"></a>MGL command: <em></em> <strong>put</strong> <em>dat vdat [<code>i=all j=all k=all</code>]</em></dt>
-<dd><p>Copies value(s) from array <var>v</var> to the range of original array. Negative indexes <var>i</var>, <var>j</var>, <var>k</var>=-1 set the range in corresponding direction(s). At this minor dimensions of array <var>v</var> should be large than corresponding dimensions of this array. For example, <code>Put(v,-1,0,-1);</code> sets a[i,0,j]=v.ny>nz ? v[i,j] : v[i], where i=0...(nx-1), j=0...(nz-1) and condition v.nx>=nx is true.
-</p></dd></dl>
-
-<a name="refill"></a><dl>
-<dt><a name="index-refill-3"></a>MGL command: <em></em> <strong>refill</strong> <em>dat xdat vdat [sl=-1]</em></dt>
-<dt><a name="index-refill-4"></a>MGL command: <em></em> <strong>refill</strong> <em>dat xdat ydat vdat [sl=-1]</em></dt>
-<dt><a name="index-refill-5"></a>MGL command: <em></em> <strong>refill</strong> <em>dat xdat ydat zdat vdat</em></dt>
-<dd><p>Fills by interpolated values of array <var>v</var> at the point {<var>x</var>, <var>y</var>, <var>z</var>}={<code>X[i], Y[j], Z[k]</code>} (or {<var>x</var>, <var>y</var>, <var>z</var>}={<code>X[i,j,k], Y[i,j,k], Z[i,j,k]</code>} if <var>x</var>, <var>y</var>, <var>z</var> are not 1d arrays), where <code>X,Y,Z</code> are equidistantly distributed in range [<var>x1</var>,<var>x2</var>]*[<var>y1</var>,<var>y2</var>]*[<var>z1</var>,<var>z2</var>] and have the same sizes as this array. If parameter <var>sl</var> is 0 or positive then changes will be applied only for slice <var>sl</var>.
-</p></dd></dl>
-
-<a name="gspline"></a><dl>
-<dt><a name="index-gspline"></a>MGL command: <em></em> <strong>gspline</strong> <em>dat xdat vdat [sl=-1]</em></dt>
-<dd><p>Fills by global cubic spline values of array <var>v</var> at the point <var>x</var>=<code>X[i]</code>, where <code>X</code> are equidistantly distributed in range [<var>x1</var>,<var>x2</var>] and have the same sizes as this array. If parameter <var>sl</var> is 0 or positive then changes will be applied only for slice <var>sl</var>.
-</p></dd></dl>
-
-<a name="idset"></a><dl>
-<dt><a name="index-idset"></a>MGL command: <em></em> <strong>idset</strong> <em>dat 'ids'</em></dt>
-<dd><p>Sets the symbol <var>ids</var> for data columns. The string should contain one symbol `a`...`z` per column. These ids are used in <a href="#column">column</a>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="File-I_002fO"></a>
-<div class="header">
-<p>
-Next: <a href="#Make-another-data" accesskey="n" rel="next">Make another data</a>, Previous: <a href="#Data-filling" accesskey="p" rel="prev">Data filling</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="File-I_002fO-1"></a>
-<h3 class="section">4.5 File I/O</h3>
-
-<a name="index-Read"></a>
-<a name="index-ReadMat"></a>
-<a name="index-ReadRange"></a>
-<a name="index-ReadAll"></a>
-<a name="index-Save"></a>
-<a name="index-ReadHDF"></a>
-<a name="index-SaveHDF"></a>
-<a name="index-Import"></a>
-<a name="index-Export"></a>
-
-<a name="read"></a><dl>
-<dt><a name="index-read-1"></a>MGL command: <em></em> <strong>read</strong> <em><small>DAT</small> 'fname'</em></dt>
-<dt><a name="index-read-2"></a>MGL command: <em></em> <strong>read</strong> <em><small>REDAT</small> <small>IMDAT</small> 'fname'</em></dt>
-<dd><p>Reads data from tab-separated text file with auto determining sizes of the data. Double newline means the beginning of new z-slice.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-read-3"></a>MGL command: <em></em> <strong>read</strong> <em><small>DAT</small> 'fname' <code>mx [my=1 mz=1]</code></em></dt>
-<dt><a name="index-read-4"></a>MGL command: <em></em> <strong>read</strong> <em><small>REDAT</small> <small>IMDAT</small> 'fname' <code>mx [my=1 mz=1]</code></em></dt>
-<dd><p>Reads data from text file with specified data sizes. This function does nothing if one of parameters <var>mx</var>, <var>my</var> or <var>mz</var> is zero or negative.
-</p></dd></dl>
-
-<a name="readmat"></a><dl>
-<dt><a name="index-readmat"></a>MGL command: <em></em> <strong>readmat</strong> <em><small>DAT</small> 'fname' [<code>dim=2</code>]</em></dt>
-<dd><p>Read data from text file with size specified at beginning of the file by first <var>dim</var> numbers. At this, variable <var>dim</var> set data dimensions.
-</p></dd></dl>
-
-<a name="readall"></a><dl>
-<dt><a name="index-readall"></a>MGL command: <em></em> <strong>readall</strong> <em><small>DAT</small> 'templ' <code>v1 v2 [dv=1 slice=off]</code></em></dt>
-<dd><p>Join data arrays from several text files. The file names are determined by function call <code>sprintf(fname,templ,val);</code>, where <var>val</var> changes from <var>from</var> to <var>to</var> with step <var>step</var>. The data load one-by-one in the same slice if <var>as_slice</var>=<code>false</code> or as slice-by-slice if <var>as_slice</var>=<code>true</code>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-readall-1"></a>MGL command: <em></em> <strong>readall</strong> <em><small>DAT</small> 'templ' <code>[slice=off]</code></em></dt>
-<dd><p>Join data arrays from several text files which filenames satisfied the template <var>templ</var> (for example, <var>templ</var>=<code>"t_*.dat"</code>). The data load one-by-one in the same slice if <var>as_slice</var>=<code>false</code> or as slice-by-slice if <var>as_slice</var>=<code>true</code>.
-</p></dd></dl>
-
-<a name="scanfile"></a><dl>
-<dt><a name="index-scanfile"></a>MGL command: <em></em> <strong>scanfile</strong> <em><small>DAT</small> 'fname' 'templ'</em></dt>
-<dd><p>Read file <var>fname</var> line-by-line and scan each line for numbers according the template <var>templ</var>. The numbers denoted as `<samp>%g</samp>` in the template. See <a href="#Saving-and-scanning-file">Saving and scanning file</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="save"></a><dl>
-<dt><a name="index-save"></a>MGL command: <em></em> <strong>save</strong> <em>dat 'fname'</em></dt>
-<dd><p>Saves the whole data array (for <var>ns</var>=<code>-1</code>) or only <var>ns</var>-th slice to the text file <var>fname</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-save-1"></a>MGL command: <em></em> <strong>save</strong> <em>'str' 'fname' ['mode'='a']</em></dt>
-<dd><p>Saves the string <var>str</var> to the text file <var>fname</var>. For parameter <var>mode</var>=`<samp>a</samp>` will append string to the file (default); for <var>mode</var>=`<samp>w</samp>` will overwrite the file. See <a href="#Saving-and-scanning-file">Saving and scanning file</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="readhdf"></a><dl>
-<dt><a name="index-readhdf"></a>MGL command: <em></em> <strong>readhdf</strong> <em><small>DAT</small> 'fname' 'dname'</em></dt>
-<dd><p>Reads data array named <var>dname</var> from HDF5 or HDF4 file. This function does nothing if HDF5|HDF4 was disabled during library compilation.
-</p></dd></dl>
-
-<a name="savehdf"></a><dl>
-<dt><a name="index-savehdf"></a>MGL command: <em></em> <strong>savehdf</strong> <em>dat 'fname' 'dname' [<code>rewrite</code>=<code>off</code>]</em></dt>
-<dd><p>Saves data array named <var>dname</var> to HDF5 file. This function does nothing if HDF5 was disabled during library compilation.
-</p></dd></dl>
-
-<a name="datas"></a><dl>
-<dt><a name="index-datas"></a>MGL command: <em></em> <strong>datas</strong> <em>'fname'</em></dt>
-<dd><p>Put data names from HDF5 file <var>fname</var> into <var>buf</var> as `\t` separated fields. In MGL version the list of data names will be printed as message. This function does nothing if HDF5 was disabled during library compilation.
-</p></dd></dl>
-
-<a name="openhdf"></a><dl>
-<dt><a name="index-openhdf"></a>MGL command: <em></em> <strong>openhdf</strong> <em>'fname'</em></dt>
-<dd><p>Reads all data array from HDF5 file <var>fname</var> and create MGL variables with names of data names in HDF file. Complex variables will be created if data name starts with `<samp>!</samp>`.
-</p></dd></dl>
-
-
-
-<a name="import"></a><dl>
-<dt><a name="index-import"></a>MGL command: <em></em> <strong>import</strong> <em><small>DAT</small> 'fname' 'sch' [<code>v1=0 v2=1</code>]</em></dt>
-<dd><p>Reads data from bitmap file (now support only PNG format). The RGB values of bitmap pixels are transformed to mreal values in range [<var>v1</var>, <var>v2</var>] using color scheme <var>scheme</var> (see <a href="#Color-scheme">Color scheme</a>).
-</p></dd></dl>
-
-<a name="export"></a><dl>
-<dt><a name="index-export"></a>MGL command: <em></em> <strong>export</strong> <em>dat 'fname' 'sch' [<code>v1=0 v2=0</code>]</em></dt>
-<dd><p>Saves data matrix (or <code>ns</code>-th slice for 3d data) to bitmap file (now support only PNG format). The data values are transformed from range [<var>v1</var>, <var>v2</var>] to RGB pixels of bitmap using color scheme <var>scheme</var> (see <a href="#Color-scheme">Color scheme</a>). If <var>v1</var>>=<var>v2</var> then the values of <var>v1</var>, <var>v2</var> are automatically determined as minimal and maximal value of the data array.
-</p></dd></dl>
-
-
-<hr>
-<a name="Make-another-data"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-changing" accesskey="n" rel="next">Data changing</a>, Previous: <a href="#File-I_002fO" accesskey="p" rel="prev">File I/O</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Make-another-data-1"></a>
-<h3 class="section">4.6 Make another data</h3>
-
-<a name="index-SubData"></a>
-<a name="index-Column"></a>
-<a name="index-Trace"></a>
-<a name="index-Hist-1"></a>
-<a name="index-Resize"></a>
-<a name="index-Evaluate"></a>
-<a name="index-Combine"></a>
-<a name="index-Momentum"></a>
-<a name="index-Sum"></a>
-<a name="index-Min"></a>
-<a name="index-Max"></a>
-<a name="index-Roots"></a>
-<a name="index-Correl"></a>
-<a name="index-AutoCorrel"></a>
-
-
-<a name="subdata"></a><dl>
-<dt><a name="index-subdata"></a>MGL command: <em></em> <strong>subdata</strong> <em><small>RES</small> dat <code>xx [yy=all zz=all]</code></em></dt>
-<dd><p>Extracts sub-array data from the original data array keeping fixed positive index. For example <code>SubData(-1,2)</code> extracts 3d row (indexes are zero based), <code>SubData(4,-1)</code> extracts 5th column, <code>SubData(-1,-1,3)</code> extracts 4th slice and so on. If argument(s) are non-integer then linear interpolation between slices is used. In MGL version this command usually is used as inline one <code>dat(xx,yy,zz)</code>. Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-subdata-1"></a>MGL command: <em></em> <strong>subdata</strong> <em><small>RES</small> dat xdat [ydat zdat]</em></dt>
-<dd><p>Extracts sub-array data from the original data array for indexes specified by arrays <var>xx</var>, <var>yy</var>, <var>zz</var> (indirect access). This function work like previous one for 1D arguments or numbers, and resulting array dimensions are equal dimensions of 1D arrays for corresponding direction. For 2D and 3D arrays in arguments, the resulting array have the same dimensions as input arrays. The dimensions of all argument must be the same (or to be scalar 1*1*1) if they are 2D or 3D arrays. In MGL version this command usually is used as inline one <code>dat(xx,yy,zz)</code>. Function return NULL or create empty data if data cannot be created for given arguments. In C function some of <var>xx</var>, <var>yy</var>, <var>zz</var> can be NULL.
-</p></dd></dl>
-
-<a name="column"></a><dl>
-<dt><a name="index-column"></a>MGL command: <em></em> <strong>column</strong> <em><small>RES</small> dat 'eq'</em></dt>
-<dd><p>Get column (or slice) of the data filled by formula <var>eq</var> on column ids. For example, <code>Column("n*w^2/exp(t)");</code>. The column ids must be defined first by <a href="#idset">idset</a> function or read from files. In MGL version this command usually is used as inline one <code>dat('eq')</code>. Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<a name="resize"></a><dl>
-<dt><a name="index-resize"></a>MGL command: <em></em> <strong>resize</strong> <em><small>RES</small> dat <code>mx [my=1 mz=1]</code></em></dt>
-<dd><p>Resizes the data to new size <var>mx</var>, <var>my</var>, <var>mz</var> from box (part) [<var>x1</var>,<var>x2</var>] x [<var>y1</var>,<var>y2</var>] x [<var>z1</var>,<var>z2</var>] of original array. Initially x,y,z coordinates are supposed to be in [0,1]. If one of sizes <var>mx</var>, <var>my</var> or <var>mz</var> is 0 then initial size is used. Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<a name="evaluate"></a><dl>
-<dt><a name="index-evaluate"></a>MGL command: <em></em> <strong>evaluate</strong> <em><small>RES</small> dat idat [<code>norm=on</code>]</em></dt>
-<dt><a name="index-evaluate-1"></a>MGL command: <em></em> <strong>evaluate</strong> <em><small>RES</small> dat idat jdat [<code>norm=on</code>]</em></dt>
-<dt><a name="index-evaluate-2"></a>MGL command: <em></em> <strong>evaluate</strong> <em><small>RES</small> dat idat jdat kdat [<code>norm=on</code>]</em></dt>
-<dd><p>Gets array which values is result of interpolation of original array for coordinates from other arrays. All dimensions must be the same for data <var>idat</var>, <var>jdat</var>, <var>kdat</var>. Coordinates from <var>idat</var>, <var>jdat</var>, <var>kdat</var> are supposed to be normalized in range [0,1] (if <var>norm</var>=<code>true</code>) or in ranges [0,nx], [0,ny], [0,nz] correspondingly. Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<a name="section"></a><dl>
-<dt><a name="index-section"></a>MGL command: <em></em> <strong>section</strong> <em><small>RES</small> dat ids ['dir'='y' <code>val=nan</code>]</em></dt>
-<dt><a name="index-section-1"></a>MGL command: <em></em> <strong>section</strong> <em><small>RES</small> dat <code>id</code> ['dir'='y' <code>val=nan</code>]</em></dt>
-<dd><p>Gets array which is <var>id</var>-th section (range of slices separated by value <var>val</var>) of original array <var>dat</var>. For <var>id</var><0 the reverse order is used (i.e. -1 give last section). If several <var>ids</var> are provided then output array will be result of sequential joining of sections.
-</p></dd></dl>
-
-
-<a name="solve"></a><dl>
-<dt><a name="index-solve"></a>MGL command: <em></em> <strong>solve</strong> <em><small>RES</small> dat <code>val</code> 'dir' [<code>norm=on</code>]</em></dt>
-<dt><a name="index-solve-1"></a>MGL command: <em></em> <strong>solve</strong> <em><small>RES</small> dat <code>val</code> 'dir' idat [<code>norm=on</code>]</em></dt>
-<dd><p>Gets array which values is indexes (roots) along given direction <var>dir</var>, where interpolated values of data <var>dat</var> are equal to <var>val</var>. Output data will have the sizes of <var>dat</var> in directions transverse to <var>dir</var>. If data <var>idat</var> is provided then its values are used as starting points. This allows to find several branches by consequentive calls. Indexes are supposed to be normalized in range [0,1] (if <var>norm</var>=<code>true</code>) or in ranges [0,nx], [0,ny], [0,nz] correspondingly. Function return NULL or create empty data if data cannot be created for given arguments. See <a href="#Solve-sample">Solve sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="roots"></a><dl>
-<dt><a name="index-roots"></a>MGL command: <em></em> <strong>roots</strong> <em><small>RES</small> 'func' ini ['var'='x']</em></dt>
-<dt><a name="index-roots-1"></a>MGL command: <em></em> <strong>roots</strong> <em><small>RES</small> 'func' <code>ini</code> ['var'='x']</em></dt>
-<dd><p>Find roots of equation `func`=0 for variable <var>var</var> with initial guess <var>ini</var>. Secant method is used for root finding. Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-roots-2"></a>MGL command: <em></em> <strong>roots</strong> <em><small>RES</small> 'funcs' 'vars' ini</em></dt>
-<dd><p>Find roots of system of equations `funcs`=0 for variables <var>vars</var> with initial guesses <var>ini</var>. Secant method is used for root finding. Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<a name="detect"></a><dl>
-<dt><a name="index-detect"></a>MGL command: <em></em> <strong>detect</strong> <em><small>RES</small> dat <code>lvl dj [di=0 minlen=0]</code></em></dt>
-<dd><p>Get curves {x,y}, separated by NAN values, for local maximal values of array <var>dat</var> as function of x-coordinate. Noises below <var>lvl</var> amplitude are ignored. Parameter <var>dj</var> (in range [0,ny]) set the "attraction" y-distance of points to the curve. Similarly, <var>di</var> continue curve in x-direction through gaps smaller than <var>di</var> points. Curves with minimal length smaller than <var>minlen</var> will be ignored.
-</p></dd></dl>
-
-<a name="hist"></a><dl>
-<dt><a name="index-hist-3"></a>MGL command: <em></em> <strong>hist</strong> <em><small>RES</small> dat <code>num v1 v2 [nsub=0]</code></em></dt>
-<dt><a name="index-hist-4"></a>MGL command: <em></em> <strong>hist</strong> <em><small>RES</small> dat wdat <code>num v1 v2 [nsub=0]</code></em></dt>
-<dd><p>Creates <var>n</var>-th points distribution of the data values in range [<var>v1</var>, <var>v2</var>]. Array <var>w</var> specifies weights of the data elements (by default is 1). Parameter <var>nsub</var> define the number of additional interpolated points (for smoothness of histogram). Function return NULL or create empty data if data cannot be created for given arguments. See also <a href="#Data-manipulation">Data manipulation</a>
-</p></dd></dl>
-
-<a name="momentum"></a><dl>
-<dt><a name="index-momentum"></a>MGL command: <em></em> <strong>momentum</strong> <em><small>RES</small> dat 'how' ['dir'='z']</em></dt>
-<dd><p>Gets momentum (1d-array) of the data along direction <var>dir</var>. String <var>how</var> contain kind of momentum. The momentum is defined like as
-res_k = \sum_ij how(x_i,y_j,z_k) a_ij/ \sum_ij a_ij
-if <var>dir</var>=`<samp>z</samp>` and so on. Coordinates `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>` are data indexes normalized in range [0,1]. Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<a name="sum"></a><dl>
-<dt><a name="index-sum"></a>MGL command: <em></em> <strong>sum</strong> <em><small>RES</small> dat 'dir'</em></dt>
-<dd><p>Gets array which is the result of summation in given direction or direction(s). Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<a name="max"></a><dl>
-<dt><a name="index-max"></a>MGL command: <em></em> <strong>max</strong> <em><small>RES</small> dat 'dir'</em></dt>
-<dd><p>Gets array which is the maximal data values in given direction or direction(s). Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<a name="min"></a><dl>
-<dt><a name="index-min"></a>MGL command: <em></em> <strong>min</strong> <em><small>RES</small> dat 'dir'</em></dt>
-<dd><p>Gets array which is the maximal data values in given direction or direction(s). Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<a name="combine"></a><dl>
-<dt><a name="index-combine"></a>MGL command: <em></em> <strong>combine</strong> <em><small>RES</small> adat bdat</em></dt>
-<dd><p>Returns direct multiplication of arrays (like, res[i,j] = this[i]*a[j] and so on). Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<a name="trace"></a><dl>
-<dt><a name="index-trace"></a>MGL command: <em></em> <strong>trace</strong> <em><small>RES</small> dat</em></dt>
-<dd><p>Gets array of diagonal elements a[i,i] (for 2D case) or a[i,i,i] (for 3D case) where i=0...nx-1. Function return copy of itself for 1D case. Data array must have dimensions ny,nz >= nx or ny,nz = 1. Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-<a name="correl"></a><dl>
-<dt><a name="index-correl"></a>MGL command: <em></em> <strong>correl</strong> <em><small>RES</small> adat bdat 'dir'</em></dt>
-<dd><p>Find correlation between data <var>a</var> (or this in C++) and <var>b</var> along directions <var>dir</var>. Fourier transform is used to find the correlation. So, you may want to use functions <a href="#swap">swap</a> or <a href="#norm">norm</a> before plotting it. Function return NULL or create empty data if data cannot be created for given arguments.
-</p></dd></dl>
-
-
-<a name="pulse"></a><dl>
-<dt><a name="index-pulse"></a>MGL command: <em></em> <strong>pulse</strong> <em><small>RES</small> dat 'dir'</em></dt>
-<dd><p>Find pulse properties along direction <var>dir</var>: pulse maximum (in column 0) and its position (in column 1), pulse width near maximum (in column 3) and by half height (in column 2), energy in first pulse (in column 4). NAN values are used for widths if maximum is located near the edges. Note, that there is uncertainty for complex data. Usually one should use square of absolute value (i.e. |dat[i]|^2) for them. So, MathGL don`t provide this function for complex data arrays. However, C function will work even in this case but use absolute value (i.e. |dat[i]|). Function return NULL or create empty data if data cannot be created for given arguments. See also <a href="#max">max</a>, <a href="#min">min</a>, <a href="#momentum">momentum</a>, <a href="#sum">sum</a>. See <a href="#Pulse-properties">Pulse properties</a>, for sample code and picture.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Data-changing"></a>
-<div class="header">
-<p>
-Next: <a href="#Interpolation" accesskey="n" rel="next">Interpolation</a>, Previous: <a href="#Make-another-data" accesskey="p" rel="prev">Make another data</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-changing-1"></a>
-<h3 class="section">4.7 Data changing</h3>
-
-<a name="index-CumSum"></a>
-<a name="index-Integral"></a>
-<a name="index-Diff"></a>
-<a name="index-Diff2"></a>
-<a name="index-SinFFT"></a>
-<a name="index-CosFFT"></a>
-<a name="index-Hankel"></a>
-<a name="index-Swap"></a>
-<a name="index-Roll"></a>
-<a name="index-Mirror"></a>
-<a name="index-Sew"></a>
-<a name="index-Smooth"></a>
-<a name="index-Envelop"></a>
-<a name="index-Norm"></a>
-<a name="index-NormSl"></a>
-
-<p>These functions change the data in some direction like differentiations, integrations and so on. The direction in which the change will applied is specified by the string parameter, which may contain `<samp>x</samp>`, `<samp>y</samp>` or `<samp>z</samp>` characters for 1-st, 2-nd and 3-d dimension correspondingly.
-</p>
-<a name="cumsum"></a><dl>
-<dt><a name="index-cumsum"></a>MGL command: <em></em> <strong>cumsum</strong> <em>dat 'dir'</em></dt>
-<dd><p>Cumulative summation of the data in given direction or directions.
-</p></dd></dl>
-
-<a name="integrate"></a><dl>
-<dt><a name="index-integrate"></a>MGL command: <em></em> <strong>integrate</strong> <em>dat 'dir'</em></dt>
-<dd><p>Integrates (like cumulative summation) the data in given direction or directions.
-</p></dd></dl>
-
-<a name="diff"></a><dl>
-<dt><a name="index-diff"></a>MGL command: <em></em> <strong>diff</strong> <em>dat 'dir'</em></dt>
-<dd><p>Differentiates the data in given direction or directions.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-diff-1"></a>MGL command: <em></em> <strong>diff</strong> <em>dat xdat ydat [zdat]</em></dt>
-<dd><p>Differentiates the data specified parametrically in direction <var>x</var> with <var>y</var>, <var>z</var>=constant. Parametrical differentiation uses the formula (for 2D case): <em>da/dx = (a_j*y_i-a_i*y_j)/(x_j*y_i-x_i*y_j)</em> where <em>a_i=da/di, a_j=da/dj</em> denotes usual differentiation along 1st and 2nd dimensions. The similar formula is used for 3D case. Note, that you may change the order of arguments - for example, if you have 2D data a(i,j) which depend on coordinates {x(i,j), y(i,j)} then usual derivative along `<samp>x</samp>` will be <code>Diff(x,y);</code> and usual derivative along `<samp>y</samp>` will be <code>Diff(y,x);</code>.
-</p></dd></dl>
-
-<a name="diff2"></a><dl>
-<dt><a name="index-diff2"></a>MGL command: <em></em> <strong>diff2</strong> <em>dat 'dir'</em></dt>
-<dd><p>Double-differentiates (like Laplace operator) the data in given direction.
-</p></dd></dl>
-
-<a name="sinfft"></a><dl>
-<dt><a name="index-sinfft"></a>MGL command: <em></em> <strong>sinfft</strong> <em>dat 'dir'</em></dt>
-<dd><p>Do Sine transform of the data in given direction or directions. The Sine transform is <em>\sum a_j \sin(k j)</em> (see <a href="http://en.wikipedia.org/wiki/Discrete_sine_transform#DST-I">http://en.wikipedia.org/wiki/Discrete_sine_transform#DST-I</a>).
-</p></dd></dl>
-
-<a name="cosfft"></a><dl>
-<dt><a name="index-cosfft"></a>MGL command: <em></em> <strong>cosfft</strong> <em>dat 'dir'</em></dt>
-<dd><p>Do Cosine transform of the data in given direction or directions. The Cosine transform is <em>\sum a_j \cos(k j)</em> (see <a href="http://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-I">http://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-I</a>).
-</p></dd></dl>
-
-
-<a name="hankel"></a><dl>
-<dt><a name="index-hankel"></a>MGL command: <em></em> <strong>hankel</strong> <em>dat 'dir'</em></dt>
-<dd><p>Do Hankel transform of the data in given direction or directions. The Hankel transform is <em>\sum a_j J_0(k j)</em> (see <a href="http://en.wikipedia.org/wiki/Hankel_transform">http://en.wikipedia.org/wiki/Hankel_transform</a>).
-</p></dd></dl>
-
-<a name="wavelet"></a><dl>
-<dt><a name="index-wavelet"></a>MGL command: <em></em> <strong>wavelet</strong> <em>dat 'dir' <code>k</code></em></dt>
-<dd><p>Apply wavelet transform of the data in given direction or directions. Parameter <var>dir</var> set the kind of wavelet transform:
-`<samp>d</samp>` for daubechies, `<samp>D</samp>` for centered daubechies, `<samp>h</samp>` for haar, `<samp>H</samp>` for centered haar, `<samp>b</samp>` for bspline, `<samp>B</samp>` for centered bspline. If string <var>dir</var> contain symbol `<samp>i</samp>` then inverse wavelet transform is applied. Parameter <var>k</var> set the size of wavelet transform.
-</p></dd></dl>
-
-<a name="swap"></a><dl>
-<dt><a name="index-swap"></a>MGL command: <em></em> <strong>swap</strong> <em>dat 'dir'</em></dt>
-<dd><p>Swaps the left and right part of the data in given direction (useful for Fourier spectrum).
-</p></dd></dl>
-
-<a name="roll"></a><dl>
-<dt><a name="index-roll"></a>MGL command: <em></em> <strong>roll</strong> <em>dat 'dir' num</em></dt>
-<dd><p>Rolls the data along direction <var>dir</var>. Resulting array will be out[i] = ini[(i+<var>num</var>)%nx] if <code>dir='x'</code>.
-</p></dd></dl>
-
-<a name="mirror"></a><dl>
-<dt><a name="index-mirror"></a>MGL command: <em></em> <strong>mirror</strong> <em>dat 'dir'</em></dt>
-<dd><p>Mirror the left-to-right part of the data in given direction. Looks like change the value index <var>i</var>-><var>n-i</var>. Note, that the similar effect in graphics you can reach by using options (see <a href="#Command-options">Command options</a>), for example, <code>surf dat; xrange 1 -1</code>.
-</p></dd></dl>
-
-<a name="sew"></a><dl>
-<dt><a name="index-sew"></a>MGL command: <em></em> <strong>sew</strong> <em>dat ['dir'='xyz' <code>da=2*pi</code>]</em></dt>
-<dd><p>Remove value steps (like phase jumps after inverse trigonometric functions) with period <var>da</var> in given direction.
-</p></dd></dl>
-
-<a name="smooth"></a><dl>
-<dt><a name="index-smooth"></a>MGL command: <em></em> <strong>smooth</strong> <em>data ['dir'='xyz']</em></dt>
-<dd><p>Smooths the data on specified direction or directions. String <var>dirs</var> specifies the dimensions which will be smoothed. It may contain characters:
-</p><ul>
-<li> `<samp>xyz</samp>` for smoothing along x-,y-,z-directions correspondingly,
-</li><li> `<samp>0</samp>` does nothing,
-</li><li> `<samp>3</samp>` for linear averaging over 3 points,
-</li><li> `<samp>5</samp>` for linear averaging over 5 points,
-</li><li> `<samp>d1</samp>`...`<samp>d9</samp>` for linear averaging over (2*N+1)-th points.
-</li></ul>
-<p>By default quadratic averaging over 5 points is used.
-</p></dd></dl>
-
-<a name="envelop"></a><dl>
-<dt><a name="index-envelop"></a>MGL command: <em></em> <strong>envelop</strong> <em>dat ['dir'='x']</em></dt>
-<dd><p>Find envelop for data values along direction <var>dir</var>.
-</p></dd></dl>
-
-<a name="diffract"></a><dl>
-<dt><a name="index-diffract"></a>MGL command: <em></em> <strong>diffract</strong> <em>dat 'how' <code>q</code></em></dt>
-<dd><p>Calculates one step of diffraction by finite-difference method with parameter <var>q</var>=<em>\delta t/\delta x^2</em> using method with 3-d order of accuracy. Parameter <var>how</var> may contain:
-</p><ul>
-<li> `<samp>xyz</samp>` for calculations along x-,y-,z-directions correspondingly;
-</li><li> `<samp>r</samp>` for using axial symmetric Laplace operator for x-direction;
-</li><li> `<samp>0</samp>` for zero boundary conditions;
-</li><li> `<samp>1</samp>` for constant boundary conditions;
-</li><li> `<samp>2</samp>` for linear boundary conditions;
-</li><li> `<samp>3</samp>` for parabolic boundary conditions;
-</li><li> `<samp>4</samp>` for exponential boundary conditions;
-</li><li> `<samp>5</samp>` for gaussian boundary conditions.
-</li></ul>
-</dd></dl>
-
-<a name="norm"></a><dl>
-<dt><a name="index-norm"></a>MGL command: <em></em> <strong>norm</strong> <em>dat <code>v1 v2 [sym=off dim=0]</code></em></dt>
-<dd><p>Normalizes the data to range [<var>v1</var>,<var>v2</var>]. If flag <var>sym</var>=<code>true</code> then symmetrical interval [-max(|v1|,|v2|), max(|v1|,|v2|)] is used. Modification will be applied only for slices >=<var>dim</var>.
-</p></dd></dl>
-
-<a name="normsl"></a><dl>
-<dt><a name="index-normsl"></a>MGL command: <em></em> <strong>normsl</strong> <em>dat <code>v1 v2</code> ['dir'='z' <code>keep=on sym=off</code>]</em></dt>
-<dd><p>Normalizes data slice-by-slice along direction <var>dir</var> the data in slices to range [<var>v1</var>,<var>v2</var>]. If flag <var>sym</var>=<code>true</code> then symmetrical interval [-max(|v1|,|v2|), max(|v1|,|v2|)] is used. If <var>keep</var> is set then maximal value of k-th slice will be limited by
-<em>\sqrt{\sum a_ij(k)/\sum a_ij(0)}</em>.
-</p></dd></dl>
-
-<a name="limit"></a><dl>
-<dt><a name="index-limit"></a>MGL command: <em></em> <strong>limit</strong> <em>dat <code>val</code></em></dt>
-<dd><p>Limits the data values to be inside the range [-<var>val</var>,<var>val</var>], keeping the original sign of the value (phase for complex numbers). This is equivalent to operation <code>a[i] *= abs(a[i])<val?1.:val/abs(a[i]);</code>.
-</p></dd></dl>
-
-<a name="coil"></a><dl>
-<dt><a name="index-coil"></a>MGL command: <em></em> <strong>coil</strong> <em>dat <code>v1 v2 [sep=on]</code></em></dt>
-<dd><p>Project the periodical data to range [<var>v1</var>,<var>v2</var>] (like <code>mod()</code> function). Separate branches by <code>NAN</code> if <var>sep</var>=<code>true</code>.
-</p></dd></dl>
-
-
-<a name="dilate"></a><dl>
-<dt><a name="index-dilate"></a>MGL command: <em></em> <strong>dilate</strong> <em>dat <code>[val=1 step=1]</code></em></dt>
-<dd><p>Return dilated by <var>step</var> cells array of 0 or 1 for data values larger <var>val</var>. </p></dd></dl>
-
-<a name="erode"></a><dl>
-<dt><a name="index-erode"></a>MGL command: <em></em> <strong>erode</strong> <em>dat <code>[val=1 step=1]</code></em></dt>
-<dd><p>Return eroded by <var>step</var> cells array of 0 or 1 for data values larger <var>val</var>. </p></dd></dl>
-
-
-
-<hr>
-<a name="Interpolation"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-information" accesskey="n" rel="next">Data information</a>, Previous: <a href="#Data-changing" accesskey="p" rel="prev">Data changing</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Interpolation-1"></a>
-<h3 class="section">4.8 Interpolation</h3>
-
-
-<p>MGL scripts can use spline interpolation by <a href="#evaluate">evaluate</a> or <a href="#refill">refill</a> commands. Also you can use <a href="#resize">resize</a> for obtaining a data array with new sizes.
-</p>
-
-
-<hr>
-<a name="Data-information"></a>
-<div class="header">
-<p>
-Next: <a href="#Operators" accesskey="n" rel="next">Operators</a>, Previous: <a href="#Interpolation" accesskey="p" rel="prev">Interpolation</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-information-1"></a>
-<h3 class="section">4.9 Data information</h3>
-
-
-<p>There are a set of functions for obtaining data properties in MGL language. However most of them can be found using "suffixes". Suffix can get some numerical value of the data array (like its size, maximal or minimal value, the sum of elements and so on) as number. Later it can be used as usual number in command arguments. The suffixes start from point `<samp>.</samp>` right after (without spaces) variable name or its sub-array. For example, <code>a.nx</code> give the x-size of data <var>a</var>, <code>b(1).max</code> give maximal value of second row of variable <var>b</var>, <code>(c(:,0)^2).sum</code> give the sum of squares of elements in the first column of <var>c</var> and so on.
-</p>
-
-<a name="index-PrintInfo"></a>
-<a name="info"></a><dl>
-<dt><a name="index-info"></a>MGL command: <em></em> <strong>info</strong> <em>dat</em></dt>
-<dd><p>Gets or prints to file <var>fp</var> or as message (in MGL) information about the data (sizes, maximum/minimum, momentums and so on).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-info-1"></a>MGL command: <em></em> <strong>info</strong> <em>'txt'</em></dt>
-<dd><p>Prints string <var>txt</var> as message.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-info-2"></a>MGL command: <em></em> <strong>info</strong> <em>val</em></dt>
-<dd><p>Prints value of number <var>val</var> as message.
-</p></dd></dl>
-
-<a name="print"></a><dl>
-<dt><a name="index-print"></a>MGL command: <em></em> <strong>print</strong> <em>dat</em></dt>
-<dt><a name="index-print-1"></a>MGL command: <em></em> <strong>print</strong> <em>'txt'</em></dt>
-<dt><a name="index-print-2"></a>MGL command: <em></em> <strong>print</strong> <em>val</em></dt>
-<dd><p>The same as <a href="#info">info</a> but immediately print to stdout.
-</p></dd></dl>
-
-<a name="echo"></a><dl>
-<dt><a name="index-echo"></a>MGL command: <em></em> <strong>echo</strong> <em>dat</em></dt>
-<dd><p>Prints all values of the data array <var>dat</var> as message.
-</p></dd></dl>
-
-<a name="progress"></a><dl>
-<dt><a name="index-progress"></a>MGL command: <em></em> <strong>progress</strong> <em><code>val max</code></em></dt>
-<dd><p>Display progress of something as filled horizontal bar with relative length <var>val</var>/<var>max</var>. Note, it work now only in console and in FLTK-based applications, including <code>mgllab</code> and <code>mglview</code>.
-</p></dd></dl>
-
-
-<a name="index-GetNx"></a>
-<a name="index-GetNy"></a>
-<a name="index-GetNz"></a>
-<a name="g_t_002enx"></a><a name="g_t_002eny"></a><a name="g_t_002enz"></a><dl>
-<dt><a name="index-_002enx"></a>MGL suffix: <em>(dat)</em> <strong>.nx</strong></dt>
-<dt><a name="index-_002eny"></a>MGL suffix: <em>(dat)</em> <strong>.ny</strong></dt>
-<dt><a name="index-_002enz"></a>MGL suffix: <em>(dat)</em> <strong>.nz</strong></dt>
-<dd><p>Gets the x-, y-, z-size of the data.
-</p></dd></dl>
-
-
-
-<a name="index-Maximal"></a>
-<a name="g_t_002emax"></a><dl>
-<dt><a name="index-_002emax"></a>MGL suffix: <em>(dat)</em> <strong>.max</strong></dt>
-<dd><p>Gets maximal value of the data.
-</p></dd></dl>
-
-<a name="index-Minimal"></a>
-<a name="g_t_002emin"></a><dl>
-<dt><a name="index-_002emin"></a>MGL suffix: <em>(dat)</em> <strong>.min</strong></dt>
-<dd><p>Gets minimal value of the data.
-</p></dd></dl>
-
-
-<a name="g_t_002emx"></a><a name="g_t_002emy"></a><a name="g_t_002emz"></a><dl>
-<dt><a name="index-_002emx"></a>MGL suffix: <em>(dat)</em> <strong>.mx</strong></dt>
-<dt><a name="index-_002emy"></a>MGL suffix: <em>(dat)</em> <strong>.my</strong></dt>
-<dt><a name="index-_002emz"></a>MGL suffix: <em>(dat)</em> <strong>.mz</strong></dt>
-<dd><p>Gets approximated (interpolated) position of maximum to variables <var>x</var>, <var>y</var>, <var>z</var> and returns the maximal value.
-</p></dd></dl>
-
-
-<a name="g_t_002emxf"></a><a name="g_t_002emyf"></a><a name="g_t_002emzf"></a><a name="g_t_002emxl"></a><a name="g_t_002emyl"></a><a name="g_t_002emzl"></a><dl>
-<dt><a name="index-_002emxf"></a>MGL suffix: <em>(dat)</em> <strong>.mxf</strong></dt>
-<dt><a name="index-_002emyf"></a>MGL suffix: <em>(dat)</em> <strong>.myf</strong></dt>
-<dt><a name="index-_002emzf"></a>MGL suffix: <em>(dat)</em> <strong>.mzf</strong></dt>
-<dt><a name="index-_002emxl"></a>MGL suffix: <em>(dat)</em> <strong>.mxl</strong></dt>
-<dt><a name="index-_002emyl"></a>MGL suffix: <em>(dat)</em> <strong>.myl</strong></dt>
-<dt><a name="index-_002emzl"></a>MGL suffix: <em>(dat)</em> <strong>.mzl</strong></dt>
-<dd><p>Get first starting <var>from</var> give position (or last one if <var>from</var><0) maximum along direction <var>dir</var>, and save its orthogonal coordinates in <var>p1</var>, <var>p2</var>.
-</p></dd></dl>
-
-
-<a name="index-Momentum-1"></a>
-<a name="g_t_002eax"></a><a name="g_t_002eay"></a><a name="g_t_002eaz"></a><a name="g_t_002eaa"></a><a name="g_t_002esum"></a><a name="g_t_002ewx"></a><a name="g_t_002ewy"></a><a name="g_t_002ewz"></a><a name="g_t_002ewa"></a><a name="g_t_002esx"></a><a name="g_t_002esy"></a><a name="g_t_002esz"></a><a name="g_t_002esa"></a><a name="g_t_002ekx"></a><a name="g_t_002eky"></a><a name="g_t_002ekz"></a><a name="g_t_002eka"></a><dl>
-<dt><a name="index-_002esum"></a>MGL suffix: <em>(dat)</em> <strong>.sum</strong></dt>
-<dt><a name="index-_002eax"></a>MGL suffix: <em>(dat)</em> <strong>.ax</strong></dt>
-<dt><a name="index-_002eay"></a>MGL suffix: <em>(dat)</em> <strong>.ay</strong></dt>
-<dt><a name="index-_002eaz"></a>MGL suffix: <em>(dat)</em> <strong>.az</strong></dt>
-<dt><a name="index-_002eaa"></a>MGL suffix: <em>(dat)</em> <strong>.aa</strong></dt>
-<dt><a name="index-_002ewx"></a>MGL suffix: <em>(dat)</em> <strong>.wx</strong></dt>
-<dt><a name="index-_002ewy"></a>MGL suffix: <em>(dat)</em> <strong>.wy</strong></dt>
-<dt><a name="index-_002ewz"></a>MGL suffix: <em>(dat)</em> <strong>.wz</strong></dt>
-<dt><a name="index-_002ewa"></a>MGL suffix: <em>(dat)</em> <strong>.wa</strong></dt>
-<dt><a name="index-_002esx"></a>MGL suffix: <em>(dat)</em> <strong>.sx</strong></dt>
-<dt><a name="index-_002esy"></a>MGL suffix: <em>(dat)</em> <strong>.sy</strong></dt>
-<dt><a name="index-_002esz"></a>MGL suffix: <em>(dat)</em> <strong>.sz</strong></dt>
-<dt><a name="index-_002esa"></a>MGL suffix: <em>(dat)</em> <strong>.sa</strong></dt>
-<dt><a name="index-_002ekx"></a>MGL suffix: <em>(dat)</em> <strong>.kx</strong></dt>
-<dt><a name="index-_002eky"></a>MGL suffix: <em>(dat)</em> <strong>.ky</strong></dt>
-<dt><a name="index-_002ekz"></a>MGL suffix: <em>(dat)</em> <strong>.kz</strong></dt>
-<dt><a name="index-_002eka"></a>MGL suffix: <em>(dat)</em> <strong>.ka</strong></dt>
-<dd><p>Gets zero-momentum (energy, <em>I=\sum dat_i</em>) and write first momentum (median, <em>a = \sum \xi_i dat_i/I</em>), second momentum (width, <em>w^2 = \sum (\xi_i-a)^2 dat_i/I</em>), third momentum (skewness, <em>s = \sum (\xi_i-a)^3 dat_i/ I w^3</em>) and fourth momentum (kurtosis, <em>k = \sum (\xi_i-a)^4 dat_i / 3 I w^4</em>) to variables. Here <em>\xi</em> is corresponding coordinate if <var>dir</var> is `<samp>'x'</samp>`, `<samp>'y'</samp>` or `<samp>'z'</samp>`. Otherwise median is <em>a = \sum dat_i/N</em>, width is <em>w^2 = \sum (dat_i-a)^2/N</em> and so on.
-</p></dd></dl>
-
-<a name="g_t_002efst"></a><dl>
-<dt><a name="index-_002efst"></a>MGL suffix: <em>(dat)</em> <strong>.fst</strong></dt>
-<dd><p>Find position (after specified in <var>i</var>, <var>j</var>, <var>k</var>) of first nonzero value of formula <var>cond</var>. Function return the data value at found position.
-</p></dd></dl>
-
-<a name="g_t_002elst"></a><dl>
-<dt><a name="index-_002elst"></a>MGL suffix: <em>(dat)</em> <strong>.lst</strong></dt>
-<dd><p>Find position (before specified in <var>i</var>, <var>j</var>, <var>k</var>) of last nonzero value of formula <var>cond</var>. Function return the data value at found position.
-</p></dd></dl>
-
-
-<a name="g_t_002ea"></a><dl>
-<dt><a name="index-_002ea"></a>MGL suffix: <em>(dat)</em> <strong>.a</strong></dt>
-<dd><p>Give first (for <code>.a</code>, i.e. <code>dat->a[0]</code>).
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Operators"></a>
-<div class="header">
-<p>
-Next: <a href="#Global-functions" accesskey="n" rel="next">Global functions</a>, Previous: <a href="#Data-information" accesskey="p" rel="prev">Data information</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Operators-1"></a>
-<h3 class="section">4.10 Operators</h3>
-
-
-<dl>
-<dt><a name="index-copy-4"></a>MGL command: <em></em> <strong>copy</strong> <em><small>DAT</small> dat2 ['eq'='']</em></dt>
-<dd><p>Copies data from other variable.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-copy-5"></a>MGL command: <em></em> <strong>copy</strong> <em>dat <code>val</code></em></dt>
-<dd><p>Set all data values equal to <var>val</var>.
-</p></dd></dl>
-
-<a name="multo"></a><dl>
-<dt><a name="index-multo"></a>MGL command: <em></em> <strong>multo</strong> <em>dat dat2</em></dt>
-<dt><a name="index-multo-1"></a>MGL command: <em></em> <strong>multo</strong> <em>dat <code>val</code></em></dt>
-<dd><p>Multiplies data element by the other one or by value.
-</p></dd></dl>
-
-<a name="divto"></a><dl>
-<dt><a name="index-divto"></a>MGL command: <em></em> <strong>divto</strong> <em>dat dat2</em></dt>
-<dt><a name="index-divto-1"></a>MGL command: <em></em> <strong>divto</strong> <em>dat <code>val</code></em></dt>
-<dd><p>Divides each data element by the other one or by value.
-</p></dd></dl>
-
-<a name="addto"></a><dl>
-<dt><a name="index-addto"></a>MGL command: <em></em> <strong>addto</strong> <em>dat dat2</em></dt>
-<dt><a name="index-addto-1"></a>MGL command: <em></em> <strong>addto</strong> <em>dat <code>val</code></em></dt>
-<dd><p>Adds to each data element the other one or the value.
-</p></dd></dl>
-
-<a name="subto"></a><dl>
-<dt><a name="index-subto"></a>MGL command: <em></em> <strong>subto</strong> <em>dat dat2</em></dt>
-<dt><a name="index-subto-1"></a>MGL command: <em></em> <strong>subto</strong> <em>dat <code>val</code></em></dt>
-<dd><p>Subtracts from each data element the other one or the value.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Global-functions"></a>
-<div class="header">
-<p>
-Next: <a href="#Evaluate-expression" accesskey="n" rel="next">Evaluate expression</a>, Previous: <a href="#Operators" accesskey="p" rel="prev">Operators</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Global-functions-1"></a>
-<h3 class="section">4.11 Global functions</h3>
-
-
-
-<a name="transform"></a><dl>
-<dt><a name="index-transform"></a>MGL command: <em></em> <strong>transform</strong> <em><small>DAT</small> 'type' real imag</em></dt>
-<dd><p>Does integral transformation of complex data <var>real</var>, <var>imag</var> on specified direction. The order of transformations is specified in string <var>type</var>: first character for x-dimension, second one for y-dimension, third one for z-dimension. The possible character are: `<samp>f</samp>` is forward Fourier transformation, `<samp>i</samp>` is inverse Fourier transformation, `<samp>s</samp>` is Sine transform, `<samp>c</samp>` is Cosine transform, `<samp>h</samp>` is Hankel transform, `<samp>n</samp>` or `<samp> </samp>` is no transformation.
-</p></dd></dl>
-
-<a name="transforma"></a><dl>
-<dt><a name="index-transforma"></a>MGL command: <em></em> <strong>transforma</strong> <em><small>DAT</small> 'type' ampl phase</em></dt>
-<dd><p>The same as previous but with specified amplitude <var>ampl</var> and phase <var>phase</var> of complex numbers.
-</p></dd></dl>
-
-<a name="fourier"></a><dl>
-<dt><a name="index-fourier"></a>MGL command: <em></em> <strong>fourier</strong> <em>reDat imDat 'dir'</em></dt>
-<dt><a name="index-fourier-1"></a>MGL command: <em></em> <strong>fourier</strong> <em>complexDat 'dir'</em></dt>
-<dd><p>Does Fourier transform of complex data <var>re</var>+i*<var>im</var> in directions <var>dir</var>. Result is placed back into <var>re</var> and <var>im</var> data arrays. If <var>dir</var> contain `<samp>i</samp>` then inverse Fourier is used.
-</p></dd></dl>
-
-<a name="stfad"></a><dl>
-<dt><a name="index-stfad"></a>MGL command: <em></em> <strong>stfad</strong> <em><small>RES</small> real imag <code>dn</code> ['dir'='x']</em></dt>
-<dd><p>Short time Fourier transformation for real and imaginary parts. Output is amplitude of partial Fourier of length <var>dn</var>. For example if <var>dir</var>=`<samp>x</samp>`, result will have size {int(nx/dn), dn, ny} and it will contain <em>res[i,j,k]=|\sum_d^dn exp(I*j*d)*(real[i*dn+d,k]+I*imag[i*dn+d,k])|/dn</em>.
-</p></dd></dl>
-
-<a name="triangulate"></a><dl>
-<dt><a name="index-triangulate"></a>MGL command: <em></em> <strong>triangulate</strong> <em>dat xdat ydat</em></dt>
-<dd><p>Do Delone triangulation for 2d points and return result suitable for <a href="#triplot">triplot</a> and <a href="#tricont">tricont</a>. See <a href="#Making-regular-data">Making regular data</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="tridmat"></a><dl>
-<dt><a name="index-tridmat"></a>MGL command: <em></em> <strong>tridmat</strong> <em><small>RES ADAT BDAT CDAT DDAT</small> 'how'</em></dt>
-<dd><p>Get array as solution of tridiagonal system of equations <var>A</var>[i]*x[i-1]+<var>B</var>[i]*x[i]+<var>C</var>[i]*x[i+1]=<var>D</var>[i]. String <var>how</var> may contain:
-</p><ul>
-<li> `<samp>xyz</samp>` for solving along x-,y-,z-directions correspondingly;
-</li><li> `<samp>h</samp>` for solving along hexagonal direction at x-y plain (require square matrix);
-</li><li> `<samp>c</samp>` for using periodical boundary conditions;
-</li><li> `<samp>d</samp>` for for diffraction/diffuse calculation (i.e. for using -<var>A</var>[i]*<var>D</var>[i-1]+(2-<var>B</var>[i])*<var>D</var>[i]-<var>C</var>[i]*<var>D</var>[i+1] at right part instead of <var>D</var>[i]).
-</li></ul>
-<p>Data dimensions of arrays <var>A</var>, <var>B</var>, <var>C</var> should be equal. Also their dimensions need to be equal to all or to minor dimension(s) of array <var>D</var>. See <a href="#PDE-solving-hints">PDE solving hints</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="pde"></a><dl>
-<dt><a name="index-pde-1"></a>MGL command: <em></em> <strong>pde</strong> <em><small>RES</small> 'ham' ini_re ini_im [<code>dz=0.1 k0=100</code>]</em></dt>
-<dd><p>Solves equation du/dz = i*k0*<var>ham</var>(p,q,x,y,z,|u|)[u], where p=-i/k0*d/dx, q=-i/k0*d/dy are pseudo-differential operators. Parameters <var>ini_re</var>, <var>ini_im</var> specify real and imaginary part of initial field distribution. Parameters <var>Min</var>, <var>Max</var> set the bounding box for the solution. Note, that really this ranges are increased by factor 3/2 for purpose of reducing reflection from boundaries. Parameter <var>dz</var> set the step along evolutionary coordinate z. At this moment, simplified form of function <var>ham</var> is supported - all “mixed” terms (like `<samp>x*p</samp>`->x*d/dx) are excluded. For example, in 2D case this function is effectively <em>ham = f(p,z) + g(x,z,u)</em>. However commutable combinations (like `<samp>x*q</samp>`->x*d/dy) are allowed. Here variable `<samp>u</samp>` is used for field amplitude |u|. This allow one solve nonlinear problems - for example, for nonlinear Shrodinger equation you may set <code>ham="p^2 + q^2 - u^2"</code>. You may specify imaginary part for wave absorption, like <code>ham = "p^2 + i*x*(x>0)"</code>. See also <a href="#apde">apde</a>, <a href="#qo2d">qo2d</a>, <a href="#qo3d">qo3d</a>. See <a href="#PDE-solving-hints">PDE solving hints</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="apde"></a><dl>
-<dt><a name="index-apde"></a>MGL command: <em></em> <strong>apde</strong> <em><small>RES</small> 'ham' ini_re ini_im [<code>dz=0.1 k0=100</code>]</em></dt>
-<dd><p>Solves equation du/dz = i*k0*<var>ham</var>(p,q,x,y,z,|u|)[u], where p=-i/k0*d/dx, q=-i/k0*d/dy are pseudo-differential operators. Parameters <var>ini_re</var>, <var>ini_im</var> specify real and imaginary part of initial field distribution. Parameters <var>Min</var>, <var>Max</var> set the bounding box for the solution. Note, that really this ranges are increased by factor 3/2 for purpose of reducing reflection from boundaries. Parameter <var>dz</var> set the step along evolutionary coordinate z. The advanced and rather slow algorithm is used for taking into account both spatial dispersion and inhomogeneities of media [see A.A. Balakin, E.D. Gospodchikov, A.G. Shalashov, JETP letters v.104, p.690-695 (2016)]. Variable `<samp>u</samp>` is used for field amplitude |u|. This allow one solve nonlinear problems - for example, for nonlinear Shrodinger equation you may set <code>ham="p^2 + q^2 - u^2"</code>. You may specify imaginary part for wave absorption, like <code>ham = "p^2 + i*x*(x>0)"</code>. See also <a href="#pde">pde</a>. See <a href="#PDE-solving-hints">PDE solving hints</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="ray"></a><dl>
-<dt><a name="index-ray"></a>MGL command: <em></em> <strong>ray</strong> <em><small>RES</small> 'ham' <code>x0 y0 z0 p0 q0 v0 [dt=0.1 tmax=10]</code></em></dt>
-<dd><p>Solves GO ray equation like dr/dt = d <var>ham</var>/dp, dp/dt = -d <var>ham</var>/dr. This is Hamiltonian equations for particle trajectory in 3D case. Here <var>ham</var> is Hamiltonian which may depend on coordinates `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`, momentums `<samp>p</samp>`=px, `<samp>q</samp>`=py, `<samp>v</samp>`=pz and time `<samp>t</samp>`: <em>ham = H(x,y,z,p,q,v,t)</em>. The starting point (at <code>t=0</code>) is defined by variables <var>r0</var>, <var>p0</var>. Parameters <var>dt</var> and <var>tmax</var> specify the integration step and maximal time for ray tracing. Result is array of {x,y,z,p,q,v,t} with dimensions {7 * int(<var>tmax</var>/<var>dt</var>+1) }.
-</p></dd></dl>
-
-<a name="ode"></a><dl>
-<dt><a name="index-ode"></a>MGL command: <em></em> <strong>ode</strong> <em><small>RES</small> 'df' 'var' ini [<code>dt=0.1 tmax=10</code>]</em></dt>
-<dd><p>Solves ODE equations dx/dt = df(x). The functions <var>df</var> can be specified as string of `;`-separated textual formulas (argument <var>var</var> set the character ids of variables x[i]) or as callback function, which fill <code>dx</code> array for give <code>x</code>`s. Parameters <var>ini</var>, <var>dt</var>, <var>tmax</var> set initial values, time step and maximal time of the calculation. Function stop execution if <code>NAN</code> or <code>INF</code> values appears. Result is data array with dimensions {<var>n</var> * <var>Nt</var>}, where <var>Nt</var> <= int(<var>tmax</var>/<var>dt</var>+1)
-</p></dd></dl>
-
-<a name="qo2d"></a><dl>
-<dt><a name="index-qo2d"></a>MGL command: <em></em> <strong>qo2d</strong> <em><small>RES</small> 'ham' ini_re ini_im ray [<code>r=1 k0=100</code> xx yy]</em></dt>
-<dd><p>Solves equation du/dt = i*k0*<var>ham</var>(p,q,x,y,|u|)[u], where p=-i/k0*d/dx, q=-i/k0*d/dy are pseudo-differential operators (see <code>mglPDE()</code> for details). Parameters <var>ini_re</var>, <var>ini_im</var> specify real and imaginary part of initial field distribution. Parameters <var>ray</var> set the reference ray, i.e. the ray around which the accompanied coordinate system will be maked. You may use, for example, the array created by <a href="#ray">ray</a> function. Note, that the reference ray <strong>must be</strong> smooth enough to make accompanied coodrinates unambiguity. Otherwise errors in the solution may appear. If <var>xx</var> and <var>yy</var> are non-zero then Cartesian coordinates for each point will be written into them. See also <a href="#pde">pde</a>, <a href="#qo3d">qo3d</a>. See <a href="#PDE-solving-hints">PDE solving hints</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="qo3d"></a><dl>
-<dt><a name="index-qo3d"></a>MGL command: <em></em> <strong>qo3d</strong> <em><small>RES</small> 'ham' ini_re ini_im ray [<code>r=1 k0=100</code> xx yy zz]</em></dt>
-<dd><p>Solves equation du/dt = i*k0*<var>ham</var>(p,q,v,x,y,z,|u|)[u], where p=-i/k0*d/dx, q=-i/k0*d/dy, v=-i/k0*d/dz are pseudo-differential operators (see <code>mglPDE()</code> for details). Parameters <var>ini_re</var>, <var>ini_im</var> specify real and imaginary part of initial field distribution. Parameters <var>ray</var> set the reference ray, i.e. the ray around which the accompanied coordinate system will be maked. You may use, for example, the array created by <a href="#ray">ray</a> function. Note, that the reference ray <strong>must be</strong> smooth enough to make accompanied coodrinates unambiguity. Otherwise errors in the solution may appear. If <var>xx</var> and <var>yy</var> and <var>zz</var> are non-zero then Cartesian coordinates for each point will be written into them. See also <a href="#pde">pde</a>, <a href="#qo2d">qo2d</a>. See <a href="#PDE-solving-hints">PDE solving hints</a>, for sample code and picture.
-</p></dd></dl>
-
-
-<a name="jacobian"></a><dl>
-<dt><a name="index-jacobian"></a>MGL command: <em></em> <strong>jacobian</strong> <em><small>RES</small> xdat ydat [zdat]</em></dt>
-<dd><p>Computes the Jacobian for transformation {i,j,k} to {<var>x</var>,<var>y</var>,<var>z</var>} where initial coordinates {i,j,k} are data indexes normalized in range [0,1]. The Jacobian is determined by formula det||<em>dr_\alpha/d\xi_\beta</em>|| where <em>r</em>={<var>x</var>,<var>y</var>,<var>z</var>} and <em>\xi</em>={i,j,k}. All dimensions must be the same for all data arrays. Data must be 3D if all 3 arrays {<var>x</var>,<var>y</var>,<var>z</var>} are specified or 2D if only 2 arrays {<var>x</var>,<var>y</var>} are specified.
-</p></dd></dl>
-
-<a name="triangulation"></a><dl>
-<dt><a name="index-triangulation"></a>MGL command: <em></em> <strong>triangulation</strong> <em><small>RES</small> xdat ydat</em></dt>
-<dd><p>Computes triangulation for arbitrary placed points with coordinates {<var>x</var>,<var>y</var>} (i.e. finds triangles which connect points). MathGL use <a href="http://www.s-hull.org/">s-hull</a> code for triangulation. The sizes of 1st dimension <strong>must be equal</strong> for all arrays <code>x.nx=y.nx</code>. Resulting array can be used in <a href="#triplot">triplot</a> or <a href="#tricont">tricont</a> functions for visualization of reconstructed surface. See <a href="#Making-regular-data">Making regular data</a>, for sample code and picture.
-</p></dd></dl>
-
-
-
-<a name="ifs2d"></a><dl>
-<dt><a name="index-ifs2d"></a>MGL command: <em></em> <strong>ifs2d</strong> <em><small>RES</small> dat <code>num</code> [<code>skip=20</code>]</em></dt>
-<dd><p>Computes <var>num</var> points {x[i]=res[0,i], y[i]=res[1,i]} for fractal using iterated function system. Matrix <var>dat</var> is used for generation according the formulas
-</p><pre class="verbatim">x[i+1] = dat[0,i]*x[i] + dat[1,i]*y[i] + dat[4,i];
-y[i+1] = dat[2,i]*x[i] + dat[3,i]*y[i] + dat[5,i];
-</pre><p>Value <code>dat[6,i]</code> is used as weight factor for i-th row of matrix <var>dat</var>. At this first <var>skip</var> iterations will be omitted. Data array <var>dat</var> must have x-size greater or equal to 7. See also <a href="#ifs3d">ifs3d</a>, <a href="#flame2d">flame2d</a>. See <a href="#ifs2d-sample">ifs2d sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="ifs3d"></a><dl>
-<dt><a name="index-ifs3d"></a>MGL command: <em></em> <strong>ifs3d</strong> <em><small>RES</small> dat <code>num</code> [<code>skip=20</code>]</em></dt>
-<dd><p>Computes <var>num</var> points {x[i]=res[0,i], y[i]=res[1,i], z[i]=res[2,i]} for fractal using iterated function system. Matrix <var>dat</var> is used for generation according the formulas
-</p><pre class="verbatim">x[i+1] = dat[0,i]*x[i] + dat[1,i]*y[i] + dat[2,i]*z[i] + dat[9,i];
-y[i+1] = dat[3,i]*x[i] + dat[4,i]*y[i] + dat[5,i]*z[i] + dat[10,i];
-z[i+1] = dat[6,i]*x[i] + dat[7,i]*y[i] + dat[8,i]*z[i] + dat[11,i];
-</pre><p>Value <code>dat[12,i]</code> is used as weight factor for i-th row of matrix <var>dat</var>. At this first <var>skip</var> iterations will be omitted. Data array <var>dat</var> must have x-size greater or equal to 13. See also <a href="#ifs2d">ifs2d</a>. See <a href="#ifs3d-sample">ifs3d sample</a>, for sample code and picture.
-</p></dd></dl>
-
-<a name="ifsfile"></a><dl>
-<dt><a name="index-ifsfile"></a>MGL command: <em></em> <strong>ifsfile</strong> <em><small>RES</small> 'fname' 'name' <code>num</code> [<code>skip=20</code>]</em></dt>
-<dd><p>Reads parameters of IFS fractal named <var>name</var> from file <var>fname</var> and computes <var>num</var> points for this fractal. At this first <var>skip</var> iterations will be omitted. See also <a href="#ifs2d">ifs2d</a>, <a href="#ifs3d">ifs3d</a>.
-</p>
-<p>IFS file may contain several records. Each record contain the name of fractal (`<samp>binary</samp>` in the example below) and the body of fractal, which is enclosed in curly braces {}. Symbol `<samp>;</samp>` start the comment. If the name of fractal contain `<samp>(3D)</samp>` or `<samp>(3d)</samp>` then the 3d IFS fractal is specified. The sample below contain two fractals: `<samp>binary</samp>` - usual 2d fractal, and `<samp>3dfern (3D)</samp>` - 3d fractal. See also <a href="#ifs2d">ifs2d</a>, <a href="#ifs3d">ifs3d</a>.
-</p>
-<pre class="verbatim"> binary
- { ; comment allowed here
- ; and here
- .5 .0 .0 .5 -2.563477 -0.000003 .333333 ; also comment allowed here
- .5 .0 .0 .5 2.436544 -0.000003 .333333
- .0 -.5 .5 .0 4.873085 7.563492 .333333
- }
-
- 3dfern (3D) {
- .00 .00 0 .0 .18 .0 0 0.0 0.00 0 0.0 0 .01
- .85 .00 0 .0 .85 .1 0 -0.1 0.85 0 1.6 0 .85
- .20 -.20 0 .2 .20 .0 0 0.0 0.30 0 0.8 0 .07
- -.20 .20 0 .2 .20 .0 0 0.0 0.30 0 0.8 0 .07
- }
-</pre></dd></dl>
-
-<a name="flame2d"></a><dl>
-<dt><a name="index-flame2d"></a>MGL command: <em></em> <strong>flame2d</strong> <em><small>RES</small> dat func <code>num</code> [<code>skip=20</code>]</em></dt>
-<dd><p>Computes <var>num</var> points {x[i]=res[0,i], y[i]=res[1,i]} for "flame" fractal using iterated function system. Array <var>func</var> define "flame" function identificator (<var>func</var>[0,i,j]), its weight (<var>func</var>[0,i,j]) and arguments (<var>func</var>[2 ... 5,i,j]). Matrix <var>dat</var> set linear transformation of coordinates before applying the function. The resulting coordinates are
-</p><pre class="verbatim">xx = dat[0,i]*x[j] + dat[1,j]*y[i] + dat[4,j];
-yy = dat[2,i]*x[j] + dat[3,j]*y[i] + dat[5,j];
-x[j+1] = sum_i @var{func}[1,i,j]*@var{func}[0,i,j]_x(xx, yy; @var{func}[2,i,j],...,@var{func}[5,i,j]);
-y[j+1] = sum_i @var{func}[1,i,j]*@var{func}[0,i,j]_y(xx, yy; @var{func}[2,i,j],...,@var{func}[5,i,j]);
-</pre><p>The possible function ids are: <code>mglFlame2d_linear=0, mglFlame2d_sinusoidal, mglFlame2d_spherical, mglFlame2d_swirl, mglFlame2d_horseshoe,
- mglFlame2d_polar, mglFlame2d_handkerchief,mglFlame2d_heart, mglFlame2d_disc, mglFlame2d_spiral,
- mglFlame2d_hyperbolic, mglFlame2d_diamond, mglFlame2d_ex, mglFlame2d_julia, mglFlame2d_bent,
- mglFlame2d_waves, mglFlame2d_fisheye, mglFlame2d_popcorn, mglFlame2d_exponential, mglFlame2d_power,
- mglFlame2d_cosine, mglFlame2d_rings, mglFlame2d_fan, mglFlame2d_blob, mglFlame2d_pdj,
- mglFlame2d_fan2, mglFlame2d_rings2, mglFlame2d_eyefish, mglFlame2d_bubble, mglFlame2d_cylinder,
- mglFlame2d_perspective, mglFlame2d_noise, mglFlame2d_juliaN, mglFlame2d_juliaScope, mglFlame2d_blur,
- mglFlame2d_gaussian, mglFlame2d_radialBlur, mglFlame2d_pie, mglFlame2d_ngon, mglFlame2d_curl,
- mglFlame2d_rectangles, mglFlame2d_arch, mglFlame2d_tangent, mglFlame2d_square, mglFlame2d_blade,
- mglFlame2d_secant, mglFlame2d_rays, mglFlame2d_twintrian, mglFlame2d_cross, mglFlame2d_disc2,
- mglFlame2d_supershape, mglFlame2d_flower, mglFlame2d_conic, mglFlame2d_parabola, mglFlame2d_bent2,
- mglFlame2d_bipolar, mglFlame2d_boarders, mglFlame2d_butterfly, mglFlame2d_cell, mglFlame2d_cpow,
- mglFlame2d_curve, mglFlame2d_edisc, mglFlame2d_elliptic, mglFlame2d_escher, mglFlame2d_foci,
- mglFlame2d_lazySusan, mglFlame2d_loonie, mglFlame2d_preBlur, mglFlame2d_modulus, mglFlame2d_oscope,
- mglFlame2d_polar2, mglFlame2d_popcorn2, mglFlame2d_scry, mglFlame2d_separation, mglFlame2d_split,
- mglFlame2d_splits, mglFlame2d_stripes, mglFlame2d_wedge, mglFlame2d_wedgeJulia, mglFlame2d_wedgeSph,
- mglFlame2d_whorl, mglFlame2d_waves2, mglFlame2d_exp, mglFlame2d_log, mglFlame2d_sin,
- mglFlame2d_cos, mglFlame2d_tan, mglFlame2d_sec, mglFlame2d_csc, mglFlame2d_cot,
- mglFlame2d_sinh, mglFlame2d_cosh, mglFlame2d_tanh, mglFlame2d_sech, mglFlame2d_csch,
- mglFlame2d_coth, mglFlame2d_auger, mglFlame2d_flux.</code>
-Value <code>dat[6,i]</code> is used as weight factor for i-th row of matrix <var>dat</var>. At this first <var>skip</var> iterations will be omitted. Sizes of data arrays must be: <var>dat</var>.nx>=7, <var>func</var>.nx>=2 and <var>func</var>.nz=<var>dat</var>.ny. See also <a href="#ifs2d">ifs2d</a>, <a href="#ifs3d">ifs3d</a>. See <a href="#flame2d-sample">flame2d sample</a>, for sample code and picture.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Evaluate-expression"></a>
-<div class="header">
-<p>
-Next: <a href="#Special-data-classes" accesskey="n" rel="next">Special data classes</a>, Previous: <a href="#Global-functions" accesskey="p" rel="prev">Global functions</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Evaluate-expression-1"></a>
-<h3 class="section">4.12 Evaluate expression</h3>
-
-
-<p>You can use arbitrary formulas of existed data arrays or constants as any argument of data processing or data plotting commands. There are only 2 limitations: formula shouldn`t contain spaces (to be recognized as single argument), and formula cannot be used as argument which will be (re)created by MGL command.
-</p>
-
-
-<hr>
-<a name="Special-data-classes"></a>
-<div class="header">
-<p>
-Previous: <a href="#Evaluate-expression" accesskey="p" rel="prev">Evaluate expression</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Special-data-classes-1"></a>
-<h3 class="section">4.13 Special data classes</h3>
-
-
-
-<p>MGL use these special classes automatically.
-</p>
-
-
-
-<hr>
-<a name="Examples"></a>
-<div class="header">
-<p>
-Next: <a href="#All-samples" accesskey="n" rel="next">All samples</a>, Previous: <a href="#Data-processing" accesskey="p" rel="prev">Data processing</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="MathGL-examples"></a>
-<h2 class="chapter">5 MathGL examples</h2>
-
-
-<p>This chapter contain information about basic and advanced MathGL, hints and samples for all types of graphics. I recommend you read first 2 sections one after another and at least look on <a href="#Hints">Hints</a> section. Also I recommend you to look at <a href="#General-concepts">General concepts</a> and <a href="#FAQ">FAQ</a>.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Basic-usage" accesskey="1">Basic usage</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Advanced-usage" accesskey="2">Advanced usage</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-handling" accesskey="3">Data handling</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-plotting" accesskey="4">Data plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Hints" accesskey="5">Hints</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#FAQ" accesskey="6">FAQ</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Basic-usage"></a>
-<div class="header">
-<p>
-Next: <a href="#Advanced-usage" accesskey="n" rel="next">Advanced usage</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Basic-usage-1"></a>
-<h3 class="section">5.1 Basic usage</h3>
-
-
-<p>MGL script can be used by several manners. Each has positive and negative sides:
-</p><ul>
-<li> <em>Using UDAV.</em>
-
-<p>Positive sides are possibilities to view the plot at once and to modify it, rotate, zoom or switch on transparency or lighting by hands or by mouse. Negative side is the needness of the X-terminal. </p>
-</li><li> <em>Using command line tools.</em>
-
-<p>Positive aspects are: batch processing of similar data set, for example, a set of resulting data files for different calculation parameters), running from the console program, including the cluster calculation), fast and automated drawing, saving pictures for further analysis, or demonstration). Negative sides are: the usage of the external program for picture viewing. Also, the data plotting is non-visual. So, you have to imagine the picture, view angles, lighting and so on) before the plotting. I recommend to use graphical window for determining the optimal parameters of plotting on the base of some typical data set. And later use these parameters for batch processing in console program.
-</p>
-<p>In this case you can use the program: <code>mglconv</code> or <code>mglview</code> for viewing.
-</p>
-</li><li> <em>Using C/C++/... code.</em>
-
-<p>You can easily execute MGL script within C/C++/Fortan code. This can be useful for fast data plotting, for example, in web applications, where textual string (MGL script) may contain all necessary information for plot. The basic C++ code may look as following
-</p><pre class="verbatim">const char *mgl_script; // script itself, can be of type const wchar_t*
-mglGraph gr;
-mglParse pr;
-pr.Execute(&gr, mgl_script);
-</pre></li></ul>
-
-<p>The simplest script is
-</p><pre class="verbatim">box # draw bounding box
-axis # draw axis
-fplot 'x^3' # draw some function
-</pre>
-<p>Just type it in UDAV and press F5. Also you can save it in text file `<samp>test.mgl</samp>` and type in the console <code>mglconv test.mgl</code> what produce file `<samp>test.mgl.png</samp>` with resulting picture.
-</p>
-
-<hr>
-<a name="Advanced-usage"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-handling" accesskey="n" rel="next">Data handling</a>, Previous: <a href="#Basic-usage" accesskey="p" rel="prev">Basic usage</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Advanced-usage-1"></a>
-<h3 class="section">5.2 Advanced usage</h3>
-
-
-<p>Now I show several non-obvious features of MGL: several subplots in a single picture, curvilinear coordinates, text printing and so on. Generally you may miss this section at first reading, but I don`t recommend it.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Subplots" accesskey="1">Subplots</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Axis-and-ticks" accesskey="2">Axis and ticks</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Curvilinear-coordinates" accesskey="3">Curvilinear coordinates</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Colorbars" accesskey="4">Colorbars</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Bounding-box" accesskey="5">Bounding box</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Ternary-axis" accesskey="6">Ternary axis</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Text-features" accesskey="7">Text features</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Legend-sample" accesskey="8">Legend sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Cutting-sample" accesskey="9">Cutting sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Subplots"></a>
-<div class="header">
-<p>
-Next: <a href="#Axis-and-ticks" accesskey="n" rel="next">Axis and ticks</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Subplots-1"></a>
-<h4 class="subsection">5.2.1 Subplots</h4>
-
-
-<p>Let me demonstrate possibilities of plot positioning and rotation. MathGL has a set of functions: <a href="#subplot">subplot</a>, <a href="#inplot">inplot</a>, <a href="#title">title</a>, <a href="#aspect">aspect</a> and <a href="#rotate">rotate</a> and so on (see <a href="#Subplots-and-rotation">Subplots and rotation</a>). The order of their calling is strictly determined. First, one changes the position of plot in image area (functions <a href="#subplot">subplot</a>, <a href="#inplot">inplot</a> and <a href="#multiplot">multiplot</a>). Secondly, you can add the title of plot by <a href="#title">title</a> function. After that one may rotate the plot (command <a href="#rotate">rotate</a>). Finally, one may change aspects of axes (command <a href="#aspect">aspect</a>). The following code illustrates the aforesaid it:
-</p><pre class="verbatim">subplot 2 2 0
-box:text -1 1.1 'Just box' ':L'
-inplot 0.2 0.5 0.7 1 off
-box:text 0 1.2 'InPlot example'
-
-subplot 2 2 1:title 'Rotate only'
-rotate 50 60:box
-
-subplot 2 2 2:title 'Rotate and Aspect'
-rotate 50 60:aspect 1 1 2:box
-
-subplot 2 2 3:title 'Shear'
-box 'c':shear 0.2 0.1:box
-</pre><p>Here I used function <code>Puts</code> for printing the text in arbitrary position of picture (see <a href="#Text-printing">Text printing</a>). Text coordinates and size are connected with axes. However, text coordinates may be everywhere, including the outside the bounding box. I`ll show its features later in <a href="#Text-features">Text features</a>.
-</p>
-<p>Note that several commands can be placed in a string if they are separated by `<samp>:</samp>` symbol.
-</p>
-<div align="center"><img src="png/aspect.png" alt="Example of several subplots on the single picture.">
-</div>
-<p>More complicated sample show how to use most of positioning functions:
-</p><pre class="verbatim">subplot 3 2 0:title 'StickPlot'
-stickplot 3 0 20 30:box 'r':text 0 0 0 '0' 'r'
-stickplot 3 1 20 30:box 'g':text 0 0 0 '1' 'g'
-stickplot 3 2 20 30:box 'b':text 0 0 0 '2' 'b'
-
-subplot 3 2 3 '':title 'ColumnPlot'
-columnplot 3 0:box 'r':text 0 0 '0' 'r'
-columnplot 3 1:box 'g':text 0 0 '1' 'g'
-columnplot 3 2:box 'b':text 0 0 '2' 'b'
-
-subplot 3 2 4 '':title 'GridPlot'
-gridplot 2 2 0:box 'r':text 0 0 '0' 'r'
-gridplot 2 2 1:box 'g':text 0 0 '1' 'g'
-gridplot 2 2 2:box 'b':text 0 0 '2' 'b'
-gridplot 2 2 3:box 'm':text 0 0 '3' 'm'
-
-subplot 3 2 5 '':title 'InPlot':box
-inplot 0.4 1 0.6 1 on:box 'r'
-
-multiplot 3 2 1 2 1 '':title 'MultiPlot and ShearPlot':box
-shearplot 3 0 0.2 0.1:box 'r':text 0 0 '0' 'r'
-shearplot 3 1 0.2 0.1:box 'g':text 0 0 '1' 'g'
-shearplot 3 2 0.2 0.1:box 'b':text 0 0 '2' 'b'
-</pre>
-<div align="center"><img src="png/inplot.png" alt="Example for most of positioning functions.">
-</div>
-
-<hr>
-<a name="Axis-and-ticks"></a>
-<div class="header">
-<p>
-Next: <a href="#Curvilinear-coordinates" accesskey="n" rel="next">Curvilinear coordinates</a>, Previous: <a href="#Subplots" accesskey="p" rel="prev">Subplots</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Axis-and-ticks-1"></a>
-<h4 class="subsection">5.2.2 Axis and ticks</h4>
-
-
-<p>MathGL library can draw not only the bounding box but also the axes, grids, labels and so on. The ranges of axes and their origin (the point of intersection) are determined by functions <code>SetRange()</code>, <code>SetRanges()</code>, <code>SetOrigin()</code> (see <a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a>). Ticks on axis are specified by function <code>SetTicks</code>, <code>SetTicksVal</code>, <code>SetTicksTime</code> (see <a href="#Ticks">Ticks</a>). But usually
-</p>
-<p>Command <a href="#axis">axis</a> draws axes. Its textual string shows in which directions the axis or axes will be drawn (by default <code>"xyz"</code>, function draws axes in all directions). Command <a href="#grid">grid</a> draws grid perpendicularly to specified directions. Example of axes and grid drawing is:
-</p><pre class="verbatim">subplot 2 2 0:title 'Axis origin, Grid'
-origin 0 0:axis:grid:fplot 'x^3'
-
-subplot 2 2 1:title '2 axis'
-ranges -1 1 -1 1:origin -1 -1:axis
-ylabel 'axis_1':fplot 'sin(pi*x)' 'r2'
-ranges 0 1 0 1:origin 1 1:axis
-ylabel 'axis_2':fplot 'cos(pi*x)'
-
-subplot 2 2 3:title 'More axis'
-origin nan nan:xrange -1 1:axis
-xlabel 'x' 0:ylabel 'y_1' 0:fplot 'x^2' 'k'
-yrange -1 1:origin -1.3 -1:axis 'y' 'r'
-ylabel '#r{y_2}' 0.2:fplot 'x^3' 'r'
-
-subplot 2 2 2:title '4 segments, inverted axis':origin 0 0:
-inplot 0.5 1 0.5 1 on:ranges 0 10 0 2:axis
-fplot 'sqrt(x/2)':xlabel 'W' 1:ylabel 'U' 1
-inplot 0 0.5 0.5 1 on:ranges 1 0 0 2:axis 'x'
-fplot 'sqrt(x)+x^3':xlabel '\tau' 1
-inplot 0.5 1 0 0.5 on:ranges 0 10 4 0:axis 'y'
-fplot 'x/4':ylabel 'L' -1
-inplot 0 0.5 0 0.5 on:ranges 1 0 4 0:fplot '4*x^2'
-</pre>
-<p>Note, that MathGL can draw not only single axis (which is default). But also several axis on the plot (see right plots). The idea is that the change of settings does not influence on the already drawn graphics. So, for 2-axes I setup the first axis and draw everything concerning it. Then I setup the second axis and draw things for the second axis. Generally, the similar idea allows one to draw rather complicated plot of 4 axis with different ranges (see bottom left plot).
-</p>
-<p>At this inverted axis can be created by 2 methods. First one is used in this sample - just specify minimal axis value to be large than maximal one. This method work well for 2D axis, but can wrongly place labels in 3D case. Second method is more general and work in 3D case too - just use <a href="#aspect">aspect</a> function with negative arguments. For example, following code will produce exactly the same result for 2D case, but 2nd variant will look better in 3D.
-</p><pre class="verbatim"># variant 1
-ranges 0 10 4 0:axis
-
-# variant 2
-ranges 0 10 0 4:aspect 1 -1:axis
-</pre>
-<div align="center"><img src="png/axis.png" alt="Example of axis.">
-</div>
-<p>Another MathGL feature is fine ticks tunning. By default (if it is not changed by <code>SetTicks</code> function), MathGL try to adjust ticks positioning, so that they looks most human readable. At this, MathGL try to extract common factor for too large or too small axis ranges, as well as for too narrow ranges. Last one is non-common notation and can be disabled by <code>SetTuneTicks</code> function.
-</p>
-<p>Also, one can specify its own ticks with arbitrary labels by help of <code>SetTicksVal</code> function. Or one can set ticks in time format. In last case MathGL will try to select optimal format for labels with automatic switching between years, months/days, hours/minutes/seconds or microseconds. However, you can specify its own time representation using formats described in <a href="http://www.manpagez.com/man/3/strftime/">http://www.manpagez.com/man/3/strftime/</a>. Most common variants are `<samp>%X</samp>` for national representation of time, `<samp>%x</samp>` for national representation of date, `<samp>%Y</samp>` for year with century.
-</p>
-<p>The sample code, demonstrated ticks feature is
-</p><pre class="verbatim">subplot 3 3 0:title 'Usual axis'
-axis
-
-subplot 3 3 1:title 'Too big/small range'
-ranges -1000 1000 0 0.001:axis
-
-subplot 3 3 2:title 'LaTeX-like labels'
-axis 'F!'
-
-subplot 3 3 3:title 'Too narrow range'
-ranges 100 100.1 10 10.01:axis
-
-subplot 3 3 4:title 'No tuning, manual "+"'
-axis '+!'
-# for version <2.3 you can use
-#tuneticks off:axis
-
-subplot 3 3 5:title 'Template for ticks'
-xtick 'xxx:%g':ytick 'y:%g'
-axis
-
-xtick '':ytick '' # switch it off for other plots
-
-subplot 3 3 6:title 'No tuning, higher precision'
-axis '!4'
-
-subplot 3 3 7:title 'Manual ticks'
-ranges -pi pi 0 2
-xtick pi 3 '\pi'
-xtick 0.886 'x^*' on # note this will disable subticks drawing
-# or you can use
-#xtick -pi '\pi' -pi/2 '-\pi/2' 0 '0' 0.886 'x^*' pi/2 '\pi/2' pi 'pi'
-# or you can use
-#list v -pi -pi/2 0 0.886 pi/2 pi:xtick v '-\pi\n-\pi/2\n{}0\n{}x^*\n\pi/2\n\pi'
-axis:grid:fplot '2*cos(x^2)^2' 'r2'
-
-subplot 3 3 8:title 'Time ticks'
-xrange 0 3e5:ticktime 'x':axis
-</pre>
-<div align="center"><img src="png/ticks.png" alt="Features of axis ticks.">
-</div>
-<p>The last sample I want to show in this subsection is Log-axis. From MathGL`s point of view, the log-axis is particular case of general curvilinear coordinates. So, we need first define new coordinates (see also <a href="#Curvilinear-coordinates">Curvilinear coordinates</a>) by help of <code>SetFunc</code> or <code>SetCoor</code> functions. At this one should wary about proper axis range. So the code looks as following:
-</p><pre class="verbatim">subplot 2 2 0 '<_':title 'Semi-log axis'
-ranges 0.01 100 -1 1:axis 'lg(x)' '' ''
-axis:grid 'xy' 'g':fplot 'sin(1/x)'
-xlabel 'x' 0:ylabel 'y = sin 1/x' 0
-
-subplot 2 2 1 '<_':title 'Log-log axis'
-ranges 0.01 100 0.1 100:axis 'lg(x)' 'lg(y)' ''
-axis:grid '!' 'h=':grid:fplot 'sqrt(1+x^2)'
-xlabel 'x' 0:ylabel 'y = \sqrt{1+x^2}' 0
-
-subplot 2 2 2 '<_':title 'Minus-log axis'
-ranges -100 -0.01 -100 -0.1:axis '-lg(-x)' '-lg(-y)' ''
-axis:fplot '-sqrt(1+x^2)'
-xlabel 'x' 0:ylabel 'y = -\sqrt{1+x^2}' 0
-
-subplot 2 2 3 '<_':title 'Log-ticks'
-ranges 0.01 100 0 100:axis 'sqrt(x)' '' ''
-axis:fplot 'x'
-xlabel 'x' 1:ylabel 'y = x' 0
-</pre>
-<div align="center"><img src="png/loglog.png" alt="Features of axis ticks.">
-</div>
-<p>You can see that MathGL automatically switch to log-ticks as we define log-axis formula (in difference from v.1.*). Moreover, it switch to log-ticks for any formula if axis range will be large enough (see right bottom plot). Another interesting feature is that you not necessary define usual log-axis (i.e. when coordinates are positive), but you can define “minus-log” axis when coordinate is negative (see left bottom plot).
-</p>
-
-<hr>
-<a name="Curvilinear-coordinates"></a>
-<div class="header">
-<p>
-Next: <a href="#Colorbars" accesskey="n" rel="next">Colorbars</a>, Previous: <a href="#Axis-and-ticks" accesskey="p" rel="prev">Axis and ticks</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Curvilinear-coordinates-1"></a>
-<h4 class="subsection">5.2.3 Curvilinear coordinates</h4>
-
-
-<p>As I noted in previous subsection, MathGL support curvilinear coordinates. In difference from other plotting programs and libraries, MathGL uses textual formulas for connection of the old (data) and new (output) coordinates. This allows one to plot in arbitrary coordinates. The following code plots the line <var>y</var>=0, <var>z</var>=0 in Cartesian, polar, parabolic and spiral coordinates:
-</p><pre class="verbatim">origin -1 1 -1
-subplot 2 2 0:title 'Cartesian':rotate 50 60
-fplot '2*t-1' '0.5' '0' '2r':axis:grid
-
-axis 'y*sin(pi*x)' 'y*cos(pi*x)' '':
-subplot 2 2 1:title 'Cylindrical':rotate 50 60
-fplot '2*t-1' '0.5' '0' '2r':axis:grid
-
-axis '2*y*x' 'y*y - x*x' ''
-subplot 2 2 2:title 'Parabolic':rotate 50 60
-fplot '2*t-1' '0.5' '0' '2r':axis:grid
-
-axis 'y*sin(pi*x)' 'y*cos(pi*x)' 'x+z'
-subplot 2 2 3:title 'Spiral':rotate 50 60
-fplot '2*t-1' '0.5' '0' '2r':axis:grid
-</pre>
-<div align="center"><img src="png/curvcoor.png" alt="Example of curvilinear coordinates">
-</div>
-
-
-<hr>
-<a name="Colorbars"></a>
-<div class="header">
-<p>
-Next: <a href="#Bounding-box" accesskey="n" rel="next">Bounding box</a>, Previous: <a href="#Curvilinear-coordinates" accesskey="p" rel="prev">Curvilinear coordinates</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Colorbars-1"></a>
-<h4 class="subsection">5.2.4 Colorbars</h4>
-
-
-<p>MathGL handle <a href="#colorbar">colorbar</a> as special kind of axis. So, most of functions for axis and ticks setup will work for colorbar too. Colorbars can be in log-scale, and generally as arbitrary function scale; common factor of colorbar labels can be separated; and so on.
-</p>
-<p>But of course, there are differences - colorbars usually located out of bounding box. At this, colorbars can be at subplot boundaries (by default), or at bounding box (if symbol `<samp>I</samp>` is specified). Colorbars can handle sharp colors. And they can be located at arbitrary position too. The sample code, which demonstrate colorbar features is:
-</p><pre class="verbatim">call 'prepare2d'
-new v 9 'x'
-
-subplot 2 2 0:title 'Colorbar out of box':box
-colorbar '<':colorbar '>':colorbar '_':colorbar '^'
-
-subplot 2 2 1:title 'Colorbar near box':box
-colorbar '<I':colorbar '>I':colorbar '_I':colorbar '^I'
-
-subplot 2 2 2:title 'manual colors':box:contd v a
-colorbar v '<':colorbar v '>':colorbar v '_':colorbar v '^'
-
-subplot 2 2 3:title '':text -0.5 1.55 'Color positions' ':C' -2
-
-colorbar 'bwr>' 0.25 0:text -0.9 1.2 'Default'
-colorbar 'b{w,0.3}r>' 0.5 0:text -0.1 1.2 'Manual'
-
-crange 0.01 1e3
-colorbar '>' 0.75 0:text 0.65 1.2 'Normal scale'
-colorbar '>':text 1.35 1.2 'Log scale'
-</pre>
-<div align="center"><img src="png/colorbar.png" alt="Example of colorbars">
-</div>
-
-
-<hr>
-<a name="Bounding-box"></a>
-<div class="header">
-<p>
-Next: <a href="#Ternary-axis" accesskey="n" rel="next">Ternary axis</a>, Previous: <a href="#Colorbars" accesskey="p" rel="prev">Colorbars</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Bounding-box-1"></a>
-<h4 class="subsection">5.2.5 Bounding box</h4>
-
-
-<p>Box around the plot is rather useful thing because it allows one to: see the plot boundaries, and better estimate points position since box contain another set of ticks. MathGL provide special function for drawing such box - <a href="#box">box</a> function. By default, it draw black or white box with ticks (color depend on transparency type, see <a href="#Types-of-transparency">Types of transparency</a>). However, you can change the color of box, or add drawing of rectangles at rear faces of box. Also you can disable ticks drawing, but I don`t know why anybody will want it. The sample code, which demonstrate <a href="#box">box</a> features is:
-</p><pre class="verbatim">subplot 2 2 0:title 'Box (default)':rotate 50 60:box
-
-subplot 2 2 1:title 'colored':rotate 50 60:box 'r'
-
-subplot 2 2 2:title 'with faces':rotate 50 60:box '@'
-
-subplot 2 2 3:title 'both':rotate 50 60:box '@cm'
-</pre>
-<div align="center"><img src="png/box.png" alt="Example of Box()">
-</div>
-
-
-<hr>
-<a name="Ternary-axis"></a>
-<div class="header">
-<p>
-Next: <a href="#Text-features" accesskey="n" rel="next">Text features</a>, Previous: <a href="#Bounding-box" accesskey="p" rel="prev">Bounding box</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Ternary-axis-1"></a>
-<h4 class="subsection">5.2.6 Ternary axis</h4>
-
-
-<p>There are another unusual axis types which are supported by MathGL. These are ternary and quaternary axis. Ternary axis is special axis of 3 coordinates <var>a</var>, <var>b</var>, <var>c</var> which satisfy relation <var>a</var>+<var>b</var>+<var>c</var>=1. Correspondingly, quaternary axis is special axis of 4 coordinates <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> which satisfy relation <var>a</var>+<var>b</var>+<var>c</var>+<var>d</var>=1.
-</p>
-<p>Generally speaking, only 2 of coordinates (3 for quaternary) are independent. So, MathGL just introduce some special transformation formulas which treat <var>a</var> as `<samp>x</samp>`, <var>b</var> as `<samp>y</samp>` (and <var>c</var> as `<samp>z</samp>` for quaternary). As result, all plotting functions (curves, surfaces, contours and so on) work as usual, but in new axis. You should use <a href="#ternary">ternary</a> function for switching to ternary/quaternary coordinates. The sample code is:
-</p><pre class="verbatim">ranges 0 1 0 1 0 1
-new x 50 '0.25*(1+cos(2*pi*x))'
-new y 50 '0.25*(1+sin(2*pi*x))'
-new z 50 'x'
-new a 20 30 '30*x*y*(1-x-y)^2*(x+y<1)'
-new rx 10 'rnd':copy ry (1-rx)*rnd
-light on
-
-subplot 2 2 0:title 'Ordinary axis 3D':rotate 50 60
-box:axis:grid
-plot x y z 'r2':surf a '#'
-xlabel 'B':ylabel 'C':zlabel 'Z'
-
-subplot 2 2 1:title 'Ternary axis (x+y+t=1)':ternary 1
-box:axis:grid 'xyz' 'B;'
-plot x y 'r2':plot rx ry 'q^ ':cont a:line 0.5 0 0 0.75 'g2'
-xlabel 'B':ylabel 'C':tlabel 'A'
-
-subplot 2 2 2:title 'Quaternary axis 3D':rotate 50 60:ternary 2
-box:axis:grid 'xyz' 'B;'
-plot x y z 'r2':surf a '#'
-xlabel 'B':ylabel 'C':tlabel 'A':zlabel 'D'
-
-subplot 2 2 3:title 'Ternary axis 3D':rotate 50 60:ternary 1
-box:axis:grid 'xyz' 'B;'
-plot x y z 'r2':surf a '#'
-xlabel 'B':ylabel 'C':tlabel 'A':zlabel 'Z'
-</pre>
-<div align="center"><img src="png/ternary.png" alt="Ternary and Quaternary axis">
-</div>
-
-<hr>
-<a name="Text-features"></a>
-<div class="header">
-<p>
-Next: <a href="#Legend-sample" accesskey="n" rel="next">Legend sample</a>, Previous: <a href="#Ternary-axis" accesskey="p" rel="prev">Ternary axis</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Text-features-1"></a>
-<h4 class="subsection">5.2.7 Text features</h4>
-
-
-<p>MathGL prints text by vector font. There are functions for manual specifying of text position (like <code>Puts</code>) and for its automatic selection (like <code>Label</code>, <code>Legend</code> and so on). MathGL prints text always in specified position even if it lies outside the bounding box. The default size of font is specified by functions <var>SetFontSize*</var> (see <a href="#Font-settings">Font settings</a>). However, the actual size of output string depends on subplot size (depends on functions <code>SubPlot</code>, <code>InPlot</code>). The switching of the font style (italic, bold, wire and so on) can be done for the whole string (by function parameter) or inside the string. By default MathGL parses TeX-like commands for symbols and indexes (see <a href="#Font-styles">Font styles</a>).
-</p>
-<p>Text can be printed as usual one (from left to right), along some direction (rotated text), or along a curve. Text can be printed on several lines, divided by new line symbol `<samp>\n</samp>`.
-</p>
-<p>Example of MathGL font drawing is:
-</p><pre class="verbatim">call 'prepare1d'
-
-subplot 2 2 0 ''
-text 0 1 'Text can be in ASCII and in Unicode'
-text 0 0.6 'It can be \wire{wire}, \big{big} or #r{colored}'
-text 0 0.2 'One can change style in string: \b{bold}, \i{italic, \b{both}}'
-text 0 -0.2 'Easy to \a{overline} or \u{underline}'
-text 0 -0.6 'Easy to change indexes ^{up} _{down} @{center}'
-text 0 -1 'It parse TeX: \int \alpha \cdot \
-\sqrt3{sin(\pi x)^2 + \gamma_{i_k}} dx'
-
-subplot 2 2 1 ''
- text 0 0.5 '\sqrt{\frac{\alpha^{\gamma^2}+\overset 1{\big\infty}}{\sqrt3{2+b}}}' '@' -2
-text 0 -0.5 'Text can be printed\n{}on several lines'
-
-subplot 2 2 2 '':box:plot y(:,0)
-text y 'This is very very long string drawn along a curve' 'k'
-text y 'Another string drawn under a curve' 'Tr'
-
-subplot 2 2 3 '':line -1 -1 1 -1 'rA':text 0 -1 1 -1 'Horizontal'
-line -1 -1 1 1 'rA':text 0 0 1 1 'At angle' '@'
-line -1 -1 -1 1 'rA':text -1 0 -1 1 'Vertical'
-</pre>
-<div align="center"><img src="png/text.png" alt="Example of text printing">
-</div>
-<p>You can change font faces by loading font files by function <a href="#loadfont">loadfont</a>. Note, that this is long-run procedure. Font faces can be downloaded from <a href="http://mathgl.sourceforge.net/download.html">MathGL website</a> or from <a href="http://sourceforge.net/project/showfiles.php?group_id=152187&package_id=267177">here</a>. The sample code is:
-</p><pre class="verbatim">define d 0.25
-loadfont 'STIX':text 0 1.1 'default font (STIX)'
-loadfont 'adventor':text 0 1.1-d 'adventor font'
-loadfont 'bonum':text 0 1.1-2*d 'bonum font'
-loadfont 'chorus':text 0 1.1-3*d 'chorus font'
-loadfont 'cursor':text 0 1.1-4*d 'cursor font'
-loadfont 'heros':text 0 1.1-5*d 'heros font'
-loadfont 'heroscn':text 0 1.1-6*d 'heroscn font'
-loadfont 'pagella':text 0 1.1-7*d 'pagella font'
-loadfont 'schola':text 0 1.1-8*d 'schola font'
-loadfont 'termes':text 0 1.1-9*d 'termes font'
-</pre>
-<div align="center"><img src="png/fonts.png" alt="Example of font faces">
-</div>
-
-<hr>
-<a name="Legend-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#Cutting-sample" accesskey="n" rel="next">Cutting sample</a>, Previous: <a href="#Text-features" accesskey="p" rel="prev">Text features</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Legend-sample-1"></a>
-<h4 class="subsection">5.2.8 Legend sample</h4>
-
-
-<p>Legend is one of standard ways to show plot annotations. Basically you need to connect the plot style (line style, marker and color) with some text. In MathGL, you can do it by 2 methods: manually using <a href="#addlegend">addlegend</a> function; or use `<samp>legend</samp>` option (see <a href="#Command-options">Command options</a>), which will use last plot style. In both cases, legend entries will be added into internal accumulator, which later used for legend drawing itself. <a href="#clearlegend">clearlegend</a> function allow you to remove all saved legend entries.
-</p>
-<p>There are 2 features. If plot style is empty then text will be printed without indent. If you want to plot the text with indent but without plot sample then you need to use space `<samp> </samp>` as plot style. Such style `<samp> </samp>` will draw a plot sample (line with marker(s)) which is invisible line (i.e. nothing) and print the text with indent as usual one.
-</p>
-<p>Command <a href="#legend">legend</a> draw legend on the plot. The position of the legend can be selected automatic or manually. You can change the size and style of text labels, as well as setup the plot sample. The sample code demonstrating legend features is:
-</p><pre class="verbatim">addlegend 'sin(\pi {x^2})' 'b'
-addlegend 'sin(\pi x)' 'g*'
-addlegend 'sin(\pi \sqrt{x})' 'rd'
-addlegend 'jsut text' ' '
-addlegend 'no indent for this' ''
-
-subplot 2 2 0 '':title 'Legend (default)':box
-legend
-
-text 0.75 0.65 'Absolute position' 'A'
-legend 3 'A#'
-
-subplot 2 2 2 '':title 'coloring':box
-legend 0 'r#':legend 1 'Wb#':legend 2 'ygr#'
-
-subplot 2 2 3 '':title 'manual position':box
-legend 0.5 1:text 0.5 0.55 'at x=0.5, y=1' 'a'
-legend 1 '#-':text 0.75 0.25 'Horizontal legend' 'a'
-</pre>
-<div align="center"><img src="png/legend.png" alt="Example of legend">
-</div>
-
-<hr>
-<a name="Cutting-sample"></a>
-<div class="header">
-<p>
-Previous: <a href="#Legend-sample" accesskey="p" rel="prev">Legend sample</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Cutting-sample-1"></a>
-<h4 class="subsection">5.2.9 Cutting sample</h4>
-
-
-<p>The last common thing which I want to show in this section is how one can cut off points from plot. There are 4 mechanism for that.
-</p><ul>
-<li> You can set one of coordinate to NAN value. All points with NAN values will be omitted.
-
-</li><li> You can enable cutting at edges by <code>SetCut</code> function. As result all points out of bounding box will be omitted.
-
-</li><li> You can set cutting box by <code>SetCutBox</code> function. All points inside this box will be omitted.
-
-</li><li> You can define cutting formula by <code>SetCutOff</code> function. All points for which the value of formula is nonzero will be omitted. Note, that this is the slowest variant.
-</li></ul>
-
-<p>Below I place the code which demonstrate last 3 possibilities:
-</p><pre class="verbatim">call 'prepare2d'
-call 'prepare3d'
-
-subplot 2 2 0:title 'Cut on (default)':rotate 50 60
-light on:box:surf a; zrange -1 0.5
-
-subplot 2 2 1:title 'Cut off':rotate 50 60
-box:surf a; zrange -1 0.5; cut off
-
-subplot 2 2 2:title 'Cut in box':rotate 50 60:box:alpha on
-cut 0 -1 -1 1 0 1.1:surf3 c
-cut 0 0 0 0 0 0 # restore back
-
-subplot 2 2 3:title 'Cut by formula':rotate 50 60:box
-cut '(z>(x+0.5*y-1)^2-1) & (z>(x-0.5*y-1)^2-1)':surf3 c
-</pre>
-<div align="center"><img src="png/cut.png" alt="Example of point cutting">
-</div>
-
-
-
-<hr>
-<a name="Data-handling"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-plotting" accesskey="n" rel="next">Data plotting</a>, Previous: <a href="#Advanced-usage" accesskey="p" rel="prev">Advanced usage</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-handling-1"></a>
-<h3 class="section">5.3 Data handling</h3>
-
-
-<p>Class <code>mglData</code> contains all functions for the data handling in MathGL (see <a href="#Data-processing">Data processing</a>). There are several matters why I use class <code>mglData</code> but not a single array: it does not depend on type of data (mreal or double), sizes of data arrays are kept with data, memory working is simpler and safer.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Array-creation" accesskey="1">Array creation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Change-data" accesskey="2">Change data</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Array-creation"></a>
-<div class="header">
-<p>
-Next: <a href="#Change-data" accesskey="n" rel="next">Change data</a>, Up: <a href="#Data-handling" accesskey="u" rel="up">Data handling</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Array-creation-1"></a>
-<h4 class="subsection">5.3.1 Array creation</h4>
-
-
-<p>One can put numbers into the data instance by several ways. Let us do it for square function:
-</p><ul>
-<li> one can create array by <code>list</code> command
-<pre class="verbatim">list a 0 0.04 0.16 0.36 0.64 1
-</pre>
-</li><li> another way is to copy from “inline” array
-<pre class="verbatim">copy a [0,0.04,0.16,0.36,0.64,1]
-</pre>
-</li><li> next way is to fill the data by textual formula with the help of <code>modify</code> function
-<pre class="verbatim">new a 6
-modify a 'x^2'
-</pre>
-</li><li> or one may fill the array in some interval and modify it later
-<pre class="verbatim">new a 6
-fill a 0 1
-modify a 'u^2'
-</pre>
-</li><li> or fill the array using current axis range
-<pre class="verbatim">new a 6
-fill a '(x+1)^2/4'
-</pre><p>or use single line
-</p><pre class="verbatim">new a 6 '(x+1)^2/4'
-</pre>
-</li><li> finally it can be loaded from file
-<pre class="verbatim">new s 6 '(x+1)^2/4'
-save s 'sqr.dat' # create file first
-read a 'sqr.dat' # load it
-</pre>
-</li><li> at this one can read only part of data
-<pre class="verbatim">new s 6 '(x+1)^2/4'
-save s 'sqr.dat' # create file first
-read a 'sqr.dat' 5 # load it
-</pre></li></ul>
-
-<p>Creation of 2d- and 3d-arrays is mostly the same. One can use direct data filling by <code>list</code> command
-</p><pre class="verbatim">list a 11 12 13 | 21 22 23 | 31 32 33
-</pre><p>or by inline arrays
-</p><pre class="verbatim">copy a [[11,12,13],[21,22,23],[31,32,33]]
-</pre><p>Also data can be filled by formula
-</p><pre class="verbatim">new z 30 40 'sin(pi*x)*cos(pi*y)'
-</pre><p>or loaded from a file.
-</p>
-
-<hr>
-<a name="Change-data"></a>
-<div class="header">
-<p>
-Previous: <a href="#Array-creation" accesskey="p" rel="prev">Array creation</a>, Up: <a href="#Data-handling" accesskey="u" rel="up">Data handling</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Change-data-1"></a>
-<h4 class="subsection">5.3.2 Change data</h4>
-
-
-<p>MathGL has functions for data processing: differentiating, integrating, smoothing and so on (for more detail, see <a href="#Data-processing">Data processing</a>). Let us consider some examples. The simplest ones are integration and differentiation. The direction in which operation will be performed is specified by textual string, which may contain symbols `<samp>x</samp>`, `<samp>y</samp>` or `<samp>z</samp>`. For example, the call of <code>diff 'x'</code> will differentiate data along `<samp>x</samp>` direction; the call of <code>integrate 'xy'</code> perform the double integration of data along `<samp>x</samp>` and `<samp>y</samp>` directions; the call of <code>diff2 'xyz'</code> will apply 3d Laplace operator to data and so on. Example of this operations on 2d array a=x*y is presented in code:
-</p><pre class="verbatim">ranges 0 1 0 1 0 1:new a 30 40 'x*y'
-subplot 2 2 0:title 'a(x,y)':rotate 60 40
-surf a:box
-
-subplot 2 2 1:title 'da/dx':rotate 60 40
-diff a 'x':surf a:box
-
-subplot 2 2 2:title '\int da/dx dxdy':rotate 60 40
-integrate a 'xy':surf a:box
-
-subplot 2 2 3:title '\int {d^2}a/dxdy dx':rotate 60 40
-diff2 a 'y':surf a:box
-</pre>
-<div align="center"><img src="png/dat_diff.png" alt="Example of data differentiation and integration">
-</div>
-<p>Data smoothing (command <a href="#smooth">smooth</a>) is more interesting and important. This function has single argument which define type of smoothing and its direction. Now 3 methods are supported: `<samp>3</samp>` - linear averaging by 3 points, `<samp>5</samp>` - linear averaging by 5 points, and default one - quadratic averaging by 5 points.
-</p>
-<p>MathGL also have some amazing functions which is not so important for data processing as useful for data plotting. There are functions for finding envelope (useful for plotting rapidly oscillating data), for data sewing (useful to removing jumps on the phase), for data resizing (interpolation). Let me demonstrate it:
-</p><pre class="verbatim">subplot 2 2 0 '':title 'Envelop sample'
-new d1 1000 'exp(-8*x^2)*sin(10*pi*x)'
-axis:plot d1 'b'
-envelop d1 'x'
-plot d1 'r'
-
-subplot 2 2 1 '':title 'Smooth sample':ranges 0 1 0 1
-new y0 30 '0.4*sin(pi*x) + 0.3*cos(1.5*pi*x) - 0.4*sin(2*pi*x)+0.5*rnd'
-copy y1 y0:smooth y1 'x3':plot y1 'r';legend '"3" style'
-copy y2 y0:smooth y2 'x5':plot y2 'g';legend '"5" style'
-copy y3 y0:smooth y3 'x':plot y3 'b';legend 'default'
-plot y0 '{m7}:s';legend 'none':legend:box
-
-subplot 2 2 2:title 'Sew sample':rotate 50 60:light on:alpha on
-new d2 100 100 'mod((y^2-(1-x)^2)/2,0.1)'
-box:surf d2 'b'
-sew d2 'xy' 0.1
-surf d2 'r'
-
-subplot 2 2 3:title 'Resize sample (interpolation)'
-new x0 10 'rnd':new v0 10 'rnd'
-resize x1 x0 100:resize v1 v0 100
-plot x0 v0 'b+ ':plot x1 v1 'r-':label x0 v0 '%n'
-</pre>
-<div align="center"><img src="png/dat_extra.png" alt="Example of data smoothing">
-</div>
-<p>Finally one can create new data arrays on base of the existing one: extract slice, row or column of data (<a href="#subdata">subdata</a>), summarize along a direction(s) (<a href="#sum">sum</a>), find distribution of data elements (<a href="#hist">hist</a>) and so on.
-</p>
-<a name="Solve-sample"></a><p>Another interesting feature of MathGL is interpolation and root-finding. There are several functions for linear and cubic spline interpolation (see <a href="#Interpolation">Interpolation</a>). Also there is a function <a href="#evaluate">evaluate</a> which do interpolation of data array for values of each data element of index data. It look as indirect access to the data elements.
-</p>
-<p>This function have inverse function <a href="#solve">solve</a> which find array of indexes at which data array is equal to given value (i.e. work as root finding). But <a href="#solve">solve</a> function have the issue - usually multidimensional data (2d and 3d ones) have an infinite number of indexes which give some value. This is contour lines for 2d data, or isosurface(s) for 3d data. So, <a href="#solve">solve</a> function will return index only in given direction, assuming that other index(es) are the same as equidistant index(es) of original data. Let me demonstrate this on the following sample.
-</p>
-<pre class="verbatim">zrange 0 1
-new x 20 30 '(x+2)/3*cos(pi*y)'
-new y 20 30 '(x+2)/3*sin(pi*y)'
-new z 20 30 'exp(-6*x^2-2*sin(pi*y)^2)'
-
-subplot 2 1 0:title 'Cartesian space':rotate 30 -40
-axis 'xyzU':box
-xlabel 'x':ylabel 'y'origin 1 1:grid 'xy'
-mesh x y z
-
-# section along 'x' direction
-solve u x 0.5 'x'
-var v u.nx 0 1
-evaluate yy y u v
-evaluate xx x u v
-evaluate zz z u v
-plot xx yy zz 'k2o'
-
-# 1st section along 'y' direction
-solve u1 x -0.5 'y'
-var v1 u1.nx 0 1
-evaluate yy y v1 u1
-evaluate xx x v1 u1
-evaluate zz z v1 u1
-plot xx yy zz 'b2^'
-
-# 2nd section along 'y' direction
-solve u2 x -0.5 'y' u1
-evaluate yy y v1 u2
-evaluate xx x v1 u2
-evaluate zz z v1 u2
-plot xx yy zz 'r2v'
-
-subplot 2 1 1:title 'Accompanied space'
-ranges 0 1 0 1:origin 0 0
-axis:box:xlabel 'i':ylabel 'j':grid2 z 'h'
-
-plot u v 'k2o':line 0.4 0.5 0.8 0.5 'kA'
-plot v1 u1 'b2^':line 0.5 0.15 0.5 0.3 'bA'
-plot v1 u2 'r2v':line 0.5 0.7 0.5 0.85 'rA'
-</pre>
-<div align="center"><img src="png/solve.png" alt="Example of data interpolation and root finding">
-</div>
-
-<hr>
-<a name="Data-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#Hints" accesskey="n" rel="next">Hints</a>, Previous: <a href="#Data-handling" accesskey="p" rel="prev">Data handling</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-plotting-1"></a>
-<h3 class="section">5.4 Data plotting</h3>
-
-
-<p>Let me now show how to plot the data. Next section will give much more examples for all plotting functions. Here I just show some basics. MathGL generally has 2 types of plotting functions. Simple variant requires a single data array for plotting, other data (coordinates) are considered uniformly distributed in axis range. Second variant requires data arrays for all coordinates. It allows one to plot rather complex multivalent curves and surfaces (in case of parametric dependencies). Usually each function have one textual argument for plot style and accept options (see <a href="#Command-options">Command options</a>).
-</p>
-<p>Note, that the call of drawing function adds something to picture but does not clear the previous plots (as it does in Matlab). Another difference from Matlab is that all setup (like transparency, lightning, axis borders and so on) must be specified <strong>before</strong> plotting functions.
-</p>
-<p>Let start for plots for 1D data. Term “1D data” means that data depend on single index (parameter) like curve in parametric form {x(i),y(i),z(i)}, i=1...n. The textual argument allow you specify styles of line and marks (see <a href="#Line-styles">Line styles</a>). If this parameter is empty <code>''</code> then solid line with color from palette is used (see <a href="#Palette-and-colors">Palette and colors</a>).
-</p>
-<p>Below I shall show the features of 1D plotting on base of <a href="#plot">plot</a> function. Let us start from sinus plot:
-</p><pre class="verbatim">new y0 50 'sin(pi*x)'
-subplot 2 2 0
-plot y0:box
-</pre><p>Style of line is not specified in <a href="#plot">plot</a> function. So MathGL uses the solid line with first color of palette (this is blue). Next subplot shows array <var>y1</var> with 2 rows:
-</p><pre class="verbatim">subplot 2 2 1
-new y1 50 2
-fill y1 'cos(pi*(x+y/4))*2/(y+3)'
-plot y1:box
-</pre><p>As previously I did not specify the style of lines. As a result, MathGL again uses solid line with next colors in palette (there are green and red). Now let us plot a circle on the same subplot. The circle is parametric curve <em>x=cos(\pi t), y=sin(\pi t)</em>. I will set the color of the circle (dark yellow, `<samp>Y</samp>`) and put marks `<samp>+</samp>` at point position:
-</p><pre class="verbatim">new x 50 'cos(pi*x)'
-plot x y0 'Y+'
-</pre><p>Note that solid line is used because I did not specify the type of line. The same picture can be achieved by <a href="#plot">plot</a> and <a href="#subdata">subdata</a> functions. Let us draw ellipse by orange dash line:
-</p><pre class="verbatim">plot y1(:,0) y1(:,1) 'q|'
-</pre>
-<p>Drawing in 3D space is mostly the same. Let us draw spiral with default line style. Now its color is 4-th color from palette (this is cyan):
-</p><pre class="verbatim">subplot 2 2 2:rotate 60 40
-new z 50 'x'
-plot x y0 z:box
-</pre><p>Functions <a href="#plot">plot</a> and <a href="#subdata">subdata</a> make 3D curve plot but for single array. Use it to put circle marks on the previous plot:
-</p><pre class="verbatim">new y2 10 3 'cos(pi*(x+y/2))'
-modify y2 '2*x-1' 2
-plot y2(:,0) y2(:,1) y2(:,2) 'bo '
-</pre><p>Note that line style is empty `<samp> </samp>` here. Usage of other 1D plotting functions looks similar:
-</p><pre class="verbatim">subplot 2 2 3:rotate 60 40
-bars x y0 z 'r':box
-</pre>
-<p>Surfaces <a href="#surf">surf</a> and other 2D plots (see <a href="#g_t2D-plotting">2D plotting</a>) are drown the same simpler as 1D one. The difference is that the string parameter specifies not the line style but the color scheme of the plot (see <a href="#Color-scheme">Color scheme</a>). Here I draw attention on 4 most interesting color schemes. There is gray scheme where color is changed from black to white (string `<samp>kw</samp>`) or from white to black (string `<samp>wk</samp>`). Another scheme is useful for accentuation of negative (by blue color) and positive (by red color) regions on plot (string `<samp>"BbwrR"</samp>`). Last one is the popular “jet” scheme (string `<samp>"BbcyrR"</samp>`).
-</p>
-<p>Now I shall show the example of a surface drawing. At first let us switch lightning on
-</p><pre class="verbatim">light on
-</pre><p>and draw the surface, considering coordinates x,y to be uniformly distributed in axis range
-</p><pre class="verbatim">new a0 50 40 '0.6*sin(pi*(x+1))*sin(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-subplot 2 2 0:rotate 60 40
-surf a0:box
-</pre><p>Color scheme was not specified. So previous color scheme is used. In this case it is default color scheme (“jet”) for the first plot. Next example is a sphere. The sphere is parametrically specified surface:
-</p><pre class="verbatim">new x 50 40 '0.8*sin(pi*x)*cos(pi*y/2)'
-new y 50 40 '0.8*cos(pi*x)*cos(pi*y/2)'
-new z 50 40 '0.8*sin(pi*y/2)'
-subplot 2 2 1:rotate 60 40
-surf x y z 'BbwrR':box
-</pre><p>I set color scheme to <code>"BbwrR"</code> that corresponds to red top and blue bottom of the sphere.
-</p>
-<p>Surfaces will be plotted for each of slice of the data if <var>nz</var>>1. Next example draws surfaces for data arrays with <var>nz</var>=3:
-</p><pre class="verbatim">new a1 50 40 3
-modify a1 '0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))'
-modify a1 '0.6*cos(2*pi*x)*cos(3*pi*y)+0.4*sin(3*pi*(x*y))' 1
-modify a1 '0.6*cos(2*pi*x)*cos(3*pi*y)+0.4*cos(3*pi*(x*y))' 2
-subplot 2 2 2:rotate 60 40
-alpha on
-surf a1:box
-</pre><p>Note, that it may entail a confusion. However, if one will use density plot then the picture will look better:
-</p><pre class="verbatim">subplot 2 2 3:rotate 60 40
-dens a1:box
-</pre>
-<p>Drawing of other 2D plots is analogous. The only peculiarity is the usage of flag `<samp>#</samp>`. By default this flag switches on the drawing of a grid on plot (<a href="#grid">grid</a> or <a href="#mesh">mesh</a> for plots in plain or in volume). However, for isosurfaces (including surfaces of rotation <a href="#axial">axial</a>) this flag switches the face drawing off and figure becomes wired.
-</p>
-
-<hr>
-<a name="Hints"></a>
-<div class="header">
-<p>
-Next: <a href="#FAQ" accesskey="n" rel="next">FAQ</a>, Previous: <a href="#Data-plotting" accesskey="p" rel="prev">Data plotting</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Hints-1"></a>
-<h3 class="section">5.5 Hints</h3>
-
-
-<p>In this section I`ve included some small hints and advices for the improving of the quality of plots and for the demonstration of some non-trivial features of MathGL library. In contrast to previous examples I showed mostly the idea but not the whole drawing function.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#g_t_0060_0060Compound_0027_0027-graphics" accesskey="1">``Compound'' graphics</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Transparency-and-lighting" accesskey="2">Transparency and lighting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Types-of-transparency" accesskey="3">Types of transparency</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Axis-projection" accesskey="4">Axis projection</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Adding-fog" accesskey="5">Adding fog</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Lighting-sample" accesskey="6">Lighting sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Using-primitives" accesskey="7">Using primitives</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#STFA-sample" accesskey="8">STFA sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Mapping-visualization" accesskey="9">Mapping visualization</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-interpolation">Data interpolation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Making-regular-data">Making regular data</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Making-histogram">Making histogram</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Nonlinear-fitting-hints">Nonlinear fitting hints</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#PDE-solving-hints">PDE solving hints</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Drawing-phase-plain">Drawing phase plain</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Pulse-properties">Pulse properties</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Using-MGL-parser">Using MGL parser</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Using-options">Using options</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#g_t_0060_0060Templates_0027_0027">``Templates''</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Stereo-image">Stereo image</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Reduce-memory-usage">Reduce memory usage</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Saving-and-scanning-file">Saving and scanning file</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Mixing-bitmap-and-vector-output">Mixing bitmap and vector output</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="g_t_0060_0060Compound_0027_0027-graphics"></a>
-<div class="header">
-<p>
-Next: <a href="#Transparency-and-lighting" accesskey="n" rel="next">Transparency and lighting</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="g_t_0060_0060Compound_0027_0027-graphics-1"></a>
-<h4 class="subsection">5.5.1 “Compound” graphics</h4>
-
-
-<p>As I noted above, MathGL functions (except the special one, like Clf()) do not erase the previous plotting but just add the new one. It allows one to draw “compound” plots easily. For example, popular Matlab command <code>surfc</code> can be emulated in MathGL by 2 calls:
-</p><pre class="verbatim"> Surf(a);
- Cont(a, "_"); // draw contours at bottom
-</pre><p>Here <var>a</var> is 2-dimensional data for the plotting, <code>-1</code> is the value of z-coordinate at which the contour should be plotted (at the bottom in this example). Analogously, one can draw density plot instead of contour lines and so on.
-</p>
-<p>Another nice plot is contour lines plotted directly on the surface:
-</p><pre class="verbatim"> Light(true); // switch on light for the surface
- Surf(a, "BbcyrR"); // select 'jet' colormap for the surface
- Cont(a, "y"); // and yellow color for contours
-</pre><p>The possible difficulties arise in black&white case, when the color of the surface can be close to the color of a contour line. In that case I may suggest the following code:
-</p><pre class="verbatim"> Light(true); // switch on light for the surface
- Surf(a, "kw"); // select 'gray' colormap for the surface
- CAxis(-1,0); // first draw for darker surface colors
- Cont(a, "w"); // white contours
- CAxis(0,1); // now draw for brighter surface colors
- Cont(a, "k"); // black contours
- CAxis(-1,1); // return color range to original state
-</pre><p>The idea is to divide the color range on 2 parts (dark and bright) and to select the contrasting color for contour lines for each of part.
-</p>
-<p>Similarly, one can plot flow thread over density plot of vector field amplitude (this is another amusing plot from Matlab) and so on. The list of compound graphics can be prolonged but I hope that the general idea is clear.
-</p>
-<p>Just for illustration I put here following sample code:
-</p><pre class="verbatim">call 'prepare2v'
-call 'prepare3d'
-new v 10:fill v -0.5 1:copy d sqrt(a^2+b^2)
-subplot 2 2 0:title 'Surf + Cont':rotate 50 60:light on:box
-surf a:cont a 'y'
-
-subplot 2 2 1 '':title 'Flow + Dens':light off:box
-flow a b 'br':dens d
-
-subplot 2 2 2:title 'Mesh + Cont':rotate 50 60:box
-mesh a:cont a '_'
-
-subplot 2 2 3:title 'Surf3 + ContF3':rotate 50 60:light on
-box:contf3 v c 'z' 0:contf3 v c 'x':contf3 v c
-cut 0 -1 -1 1 0 1.1
-contf3 v c 'z' c.nz-1:surf3 c -0.5
-</pre>
-<div align="center"><img src="png/combined.png" alt="Example of “combined” plots">
-</div>
-
-<hr>
-<a name="Transparency-and-lighting"></a>
-<div class="header">
-<p>
-Next: <a href="#Types-of-transparency" accesskey="n" rel="next">Types of transparency</a>, Previous: <a href="#g_t_0060_0060Compound_0027_0027-graphics" accesskey="p" rel="prev">``Compound'' graphics</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Transparency-and-lighting-1"></a>
-<h4 class="subsection">5.5.2 Transparency and lighting</h4>
-
-
-<p>Here I want to show how transparency and lighting both and separately change the look of a surface. So, there is code and picture for that:
-</p><pre class="verbatim">call 'prepare2d'
-subplot 2 2 0:title 'default':rotate 50 60:box
-surf a
-
-subplot 2 2 1:title 'light on':rotate 50 60:box
-light on:surf a
-
-subplot 2 2 3:title 'light on; alpha on':rotate 50 60:box
-alpha on:surf a
-
-subplot 2 2 2:title 'alpha on':rotate 50 60:box
-light off:surf a
-</pre>
-<div align="center"><img src="png/alpha.png" alt="Example of transparency and lightings">
-</div>
-
-<hr>
-<a name="Types-of-transparency"></a>
-<div class="header">
-<p>
-Next: <a href="#Axis-projection" accesskey="n" rel="next">Axis projection</a>, Previous: <a href="#Transparency-and-lighting" accesskey="p" rel="prev">Transparency and lighting</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Types-of-transparency-1"></a>
-<h4 class="subsection">5.5.3 Types of transparency</h4>
-
-
-<p>MathGL library has advanced features for setting and handling the surface transparency. The simplest way to add transparency is the using of command <a href="#alpha">alpha</a>. As a result, all further surfaces (and isosurfaces, density plots and so on) become transparent. However, their look can be additionally improved.
-</p>
-<p>The value of transparency can be different from surface to surface. To do it just use <code>SetAlphaDef</code> before the drawing of the surface, or use option <code>alpha</code> (see <a href="#Command-options">Command options</a>). If its value is close to 0 then the surface becomes more and more transparent. Contrary, if its value is close to 1 then the surface becomes practically non-transparent.
-</p>
-<p>Also you can change the way how the light goes through overlapped surfaces. The function <code>SetTranspType</code> defines it. By default the usual transparency is used (`<samp>0</samp>`) - surfaces below is less visible than the upper ones. A “glass-like” transparency (`<samp>1</samp>`) has a different look - each surface just decreases the background light (the surfaces are commutable in this case).
-</p>
-<p>A “neon-like” transparency (`<samp>2</samp>`) has more interesting look. In this case a surface is the light source (like a lamp on the dark background) and just adds some intensity to the color. At this, the library sets automatically the black color for the background and changes the default line color to white.
-</p>
-<p>As example I shall show several plots for different types of transparency. The code is the same except the values of <code>SetTranspType</code> function:
-</p><pre class="verbatim">call 'prepare2d'
-alpha on:light on
-transptype 0:clf
-subplot 2 2 0:rotate 50 60:surf a:box
-subplot 2 2 1:rotate 50 60:dens a:box
-subplot 2 2 2:rotate 50 60:cont a:box
-subplot 2 2 3:rotate 50 60:axial a:box
-</pre>
-<div align="center"><img src="png/type0.png" alt="Example of SetTranspType(0).">
-</div><div align="center"><img src="png/type1.png" alt="Example of SetTranspType(1).">
-</div><div align="center"><img src="png/type2.png" alt="Example of SetTranspType(2).">
-</div>
-
-
-<hr>
-<a name="Axis-projection"></a>
-<div class="header">
-<p>
-Next: <a href="#Adding-fog" accesskey="n" rel="next">Adding fog</a>, Previous: <a href="#Ternary-axis" accesskey="p" rel="prev">Ternary axis</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Axis-projection-1"></a>
-<h4 class="subsection">5.5.4 Axis projection</h4>
-
-
-<p>You can easily make 3D plot and draw its x-,y-,z-projections (like in CAD) by using <a href="#ternary">ternary</a> function with arguments: 4 for Cartesian, 5 for Ternary and 6 for Quaternary coordinates. The sample code is:
-</p><pre class="verbatim">ranges 0 1 0 1 0 1
-new x 50 '0.25*(1+cos(2*pi*x))'
-new y 50 '0.25*(1+sin(2*pi*x))'
-new z 50 'x'
-new a 20 30 '30*x*y*(1-x-y)^2*(x+y<1)'
-new rx 10 'rnd':new ry 10:fill ry '(1-v)*rnd' rx
-light on
-
-title 'Projection sample':ternary 4:rotate 50 60
-box:axis:grid
-plot x y z 'r2':surf a '#'
-xlabel 'X':ylabel 'Y':zlabel 'Z'
-</pre>
-<div align="center"><img src="png/projection.png" alt="Example of axis projections">
-</div>
-
-<hr>
-<a name="Adding-fog"></a>
-<div class="header">
-<p>
-Next: <a href="#Lighting-sample" accesskey="n" rel="next">Lighting sample</a>, Previous: <a href="#Axis-projection" accesskey="p" rel="prev">Axis projection</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Adding-fog-1"></a>
-<h4 class="subsection">5.5.5 Adding fog</h4>
-
-
-<p>MathGL can add a fog to the image. Its switching on is rather simple - just use <a href="#fog">fog</a> function. There is the only feature - fog is applied for whole image. Not to particular subplot. The sample code is:
-</p><pre class="verbatim">call 'prepare2d'
-title 'Fog sample':rotate 50 60:light on
-fog 1
-box:surf a:cont a 'y'
-</pre>
-<div align="center"><img src="png/fog.png" alt="Example of Fog().">
-</div>
-
-<hr>
-<a name="Lighting-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#Using-primitives" accesskey="n" rel="next">Using primitives</a>, Previous: <a href="#Adding-fog" accesskey="p" rel="prev">Adding fog</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Lighting-sample-1"></a>
-<h4 class="subsection">5.5.6 Lighting sample</h4>
-
-
-<p>In contrast to the most of other programs, MathGL supports several (up to 10) light sources. Moreover, the color each of them can be different: white (this is usual), yellow, red, cyan, green and so on. The use of several light sources may be interesting for the highlighting of some peculiarities of the plot or just to make an amusing picture. Note, each light source can be switched on/off individually. The sample code is:
-</p><pre class="verbatim">call 'prepare2d'
-title 'Several light sources':rotate 50 60:light on
-light 1 0 1 0 'c':light 2 1 0 0 'y':light 3 0 -1 0 'm'
-box:surf a 'h'
-</pre>
-<div align="center"><img src="png/several_light.png" alt="Example of several light sources.">
-</div>
-<p>Additionally, you can use local light sources and set to use <a href="#diffuse">diffuse</a> reflection instead of specular one (by default) or both kinds. Note, I use <a href="#attachlight">attachlight</a> command to keep light settings relative to subplot.
-</p><pre class="verbatim">light on: attachlight on
-call 'prepare2d'
-subplot 2 2 0:title 'Default':rotate 50 60:box:surf a
-line -1 -0.7 1.7 -1 -0.7 0.7 'BA'
-
-subplot 2 2 1:title 'Local':rotate 50 60
-light 0 1 0 1 -2 -1 -1
-line 1 0 1 -1 -1 0 'BAO':box:surf a
-
-subplot 2 2 2:title 'no diffuse':rotate 50 60
-diffuse 0
-line 1 0 1 -1 -1 0 'BAO':box:surf a
-
-subplot 2 2 3:title 'diffusive only':rotate 50 60
-diffuse 0.5:light 0 1 0 1 -2 -1 -1 'w' 0
-line 1 0 1 -1 -1 0 'BAO':box:surf a
-</pre>
-<div align="center"><img src="png/light.png" alt="Example of different types of lighting.">
-</div>
-
-<hr>
-<a name="Using-primitives"></a>
-<div class="header">
-<p>
-Next: <a href="#STFA-sample" accesskey="n" rel="next">STFA sample</a>, Previous: <a href="#Lighting-sample" accesskey="p" rel="prev">Lighting sample</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Using-primitives-1"></a>
-<h4 class="subsection">5.5.7 Using primitives</h4>
-
-
-<p>MathGL provide a set of functions for drawing primitives (see <a href="#Primitives">Primitives</a>). Primitives are low level object, which used by most of plotting functions. Picture below demonstrate some of commonly used primitives.
-</p><pre class="verbatim">subplot 2 2 0 '':title 'Line, Curve, Rhomb, Ellipse' '' -1.5
-line -1 -1 -0.5 1 'qAI'
-curve -0.6 -1 1 1 0 1 1 1 'rA'
-ball 0 -0.5 '*':ball 1 -0.1 '*'
-rhomb 0 0.4 1 0.9 0.2 'b#'
-rhomb 0 0 1 0.4 0.2 'cg@'
-ellipse 0 -0.5 1 -0.1 0.2 'u#'
-ellipse 0 -1 1 -0.6 0.2 'm@'
-
-light on
-subplot 2 2 1:title 'Face[xyz]':rotate 50 60:box
-facex 1 0 -1 1 1 'r':facey -1 -1 -1 1 1 'g':facez 1 -1 -1 -1 1 'b'
-face -1 -1 1 -1 1 1 1 -1 0 1 1 1 'bmgr'
-
-subplot 2 2 3 '':title 'Cone'
-cone -0.7 -0.3 0 -0.7 0.7 0.5 0.2 0.1 'b':text -0.7 -0.7 'no edges\n(default)'
-cone 0 -0.3 0 0 0.7 0.5 0.2 0.1 'g@':text 0 -0.7 'with edges\n('\@' style)'
-cone 0.7 -0.3 0 0.7 0.7 0.5 0.2 0.1 'ry':text 0.7 -0.7 '"arrow" with\n{}gradient'
-
-subplot 2 2 2 '':title 'Sphere and Drop'
-line -0.9 0 1 0.9 0 1
-text -0.9 -0.7 'sh=0':drop -0.9 0 0 1 0.5 'r' 0:ball -0.9 0 1 'k'
-text -0.3 -0.7 'sh=0.33':drop -0.3 0 0 1 0.5 'r' 0.33:ball -0.3 0 1 'k'
-text 0.3 -0.7 'sh=0.67':drop 0.3 0 0 1 0.5 'r' 0.67:ball 0.3 0 1 'k'
-text 0.9 -0.7 'sh=1':drop 0.9 0 0 1 0.5 'r' 1:ball 0.9 0 1 'k'
-</pre>
-<div align="center"><img src="png/primitives.png" alt="Primitives in MathGL.">
-</div>
-<p>Generally, you can create arbitrary new kind of plot using primitives. For example, MathGL don`t provide any special functions for drawing molecules. However, you can do it using only one type of primitives <a href="#drop">drop</a>. The sample code is:
-</p><pre class="verbatim">alpha on:light on
-subplot 2 2 0 '':title 'Methane, CH_4':rotate 60 120
-sphere 0 0 0 0.25 'k':drop 0 0 0 0 0 1 0.35 'h' 1 2:sphere 0 0 0.7 0.25 'g'
-drop 0 0 0 -0.94 0 -0.33 0.35 'h' 1 2:sphere -0.66 0 -0.23 0.25 'g'
-drop 0 0 0 0.47 0.82 -0.33 0.35 'h' 1 2:sphere 0.33 0.57 -0.23 0.25 'g'
-drop 0 0 0 0.47 -0.82 -0.33 0.35 'h' 1 2:sphere 0.33 -0.57 -0.23 0.25 'g'
-
-subplot 2 2 1 '':title 'Water, H{_2}O':rotate 60 100
-sphere 0 0 0 0.25 'r':drop 0 0 0 0.3 0.5 0 0.3 'm' 1 2:sphere 0.3 0.5 0 0.25 'g'
-drop 0 0 0 0.3 -0.5 0 0.3 'm' 1 2:sphere 0.3 -0.5 0 0.25 'g'
-
-subplot 2 2 2 '':title 'Oxygen, O_2':rotate 60 120
-drop 0 0.5 0 0 -0.3 0 0.3 'm' 1 2:sphere 0 0.5 0 0.25 'r'
-drop 0 -0.5 0 0 0.3 0 0.3 'm' 1 2:sphere 0 -0.5 0 0.25 'r'
-
-subplot 2 2 3 '':title 'Ammonia, NH_3':rotate 60 120
-sphere 0 0 0 0.25 'b':drop 0 0 0 0.33 0.57 0 0.32 'n' 1 2
-sphere 0.33 0.57 0 0.25 'g':drop 0 0 0 0.33 -0.57 0 0.32 'n' 1 2
-sphere 0.33 -0.57 0 0.25 'g':drop 0 0 0 -0.65 0 0 0.32 'n' 1 2
-sphere -0.65 0 0 0.25 'g'
-</pre>
-<div align="center"><img src="png/molecule.png" alt="Example of molecules drawing.">
-</div>
-<p>Moreover, some of special plots can be more easily produced by primitives rather than by specialized function. For example, Venn diagram can be produced by <code>Error</code> plot:
-</p><pre class="verbatim">list x -0.3 0 0.3:list y 0.3 -0.3 0.3:list e 0.7 0.7 0.7
-title 'Venn-like diagram':alpha on
-error x y e e '!rgb@#o'
-</pre><p>You see that you have to specify and fill 3 data arrays. The same picture can be produced by just 3 calls of <a href="#circle">circle</a> function:
-</p><pre class="verbatim">title 'Venn-like diagram':alpha on
-circle -0.3 0.3 0.7 'rr@'
-circle 0 -0.3 0.7 'gg@'
-circle 0.3 0.3 0.7 'bb@'
-</pre><p>Of course, the first variant is more suitable if you need to plot a lot of circles. But for few ones the usage of primitives looks easy.
-</p>
-<div align="center"><img src="png/venn.png" alt="Example of Venn diagram.">
-</div>
-
-<hr>
-<a name="STFA-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#Mapping-visualization" accesskey="n" rel="next">Mapping visualization</a>, Previous: <a href="#Using-primitives" accesskey="p" rel="prev">Using primitives</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="STFA-sample-1"></a>
-<h4 class="subsection">5.5.8 STFA sample</h4>
-
-
-<p>Short-time Fourier Analysis (<a href="#stfa">stfa</a>) is one of informative method for analyzing long rapidly oscillating 1D data arrays. It is used to determine the sinusoidal frequency and phase content of local sections of a signal as it changes over time.
-</p>
-<p>MathGL can find and draw STFA result. Just to show this feature I give following sample. Initial data arrays is 1D arrays with step-like frequency. Exactly this you can see at bottom on the STFA plot. The sample code is:
-</p><pre class="verbatim">new a 2000:new b 2000
-fill a 'cos(50*pi*x)*(x<-.5)+cos(100*pi*x)*(x<0)*(x>-.5)+\
-cos(200*pi*x)*(x<.5)*(x>0)+cos(400*pi*x)*(x>.5)'
-
-subplot 1 2 0 '<_':title 'Initial signal'
-plot a:axis:xlabel '\i t'
-
-subplot 1 2 1 '<_':title 'STFA plot'
-stfa a b 64:axis:ylabel '\omega' 0:xlabel '\i t'
-</pre>
-<div align="center"><img src="png/stfa.png" alt="Example of STFA().">
-</div>
-
-<hr>
-<a name="Mapping-visualization"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-interpolation" accesskey="n" rel="next">Data interpolation</a>, Previous: <a href="#STFA-sample" accesskey="p" rel="prev">STFA sample</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Mapping-visualization-1"></a>
-<h4 class="subsection">5.5.9 Mapping visualization</h4>
-
-
-<p>Sometime ago I worked with mapping and have a question about its visualization. Let me remember you that mapping is some transformation rule for one set of number to another one. The 1d mapping is just an ordinary function - it takes a number and transforms it to another one. The 2d mapping (which I used) is a pair of functions which take 2 numbers and transform them to another 2 ones. Except general plots (like <a href="#surfc">surfc</a>, <a href="#surfa">surfa</a>) there is a special plot - Arnold diagram. It shows the area which is the result of mapping of some initial area (usually square).
-</p>
-<p>I tried to make such plot in <a href="#map">map</a>. It shows the set of points or set of faces, which final position is the result of mapping. At this, the color gives information about their initial position and the height describes Jacobian value of the transformation. Unfortunately, it looks good only for the simplest mapping but for the real multivalent quasi-chaotic mapping it produces a confusion. So, use it if you like :).
-</p>
-<p>The sample code for mapping visualization is:
-</p><pre class="verbatim">new a 50 40 'x':new b 50 40 'y':zrange -2 2:text 0 0 '\to'
-subplot 2 1 0:text 0 1.1 '\{x, y\}' '' -2:box
-map a b 'brgk'
-
-subplot 2 1 1:box
-text 0 1.1 '\{\frac{x^3+y^3}{2}, \frac{x-y}{2}\}' '' -2
-fill a '(x^3+y^3)/2':fill b '(x-y)/2':map a b 'brgk'
-</pre>
-<div align="center"><img src="png/map.png" alt="Example of Map().">
-</div>
-
-<hr>
-<a name="Data-interpolation"></a>
-<div class="header">
-<p>
-Next: <a href="#Making-regular-data" accesskey="n" rel="next">Making regular data</a>, Previous: <a href="#Mapping-visualization" accesskey="p" rel="prev">Mapping visualization</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-interpolation-1"></a>
-<h4 class="subsection">5.5.10 Data interpolation</h4>
-
-
-<p>There are many functions to get interpolated values of a data array. Basically all of them can be divided by 3 categories:
-</p><ol>
-<li> functions which return single value at given point (see <a href="#Interpolation">Interpolation</a> and <code>mglGSpline()</code> in <a href="#Global-functions">Global functions</a>);
-</li><li> functions <a href="#subdata">subdata</a> and <a href="#evaluate">evaluate</a> for indirect access to data elements;
-</li><li> functions <a href="#refill">refill</a>, <a href="#gspline">gspline</a> and <a href="#datagrid">datagrid</a> which fill regular (rectangular) data array by interpolated values.
-</li></ol>
-
-<p>The usage of first category is rather straightforward and don`t need any special comments.
-</p>
-<p>There is difference in indirect access functions. Function <a href="#subdata">subdata</a> use use step-like interpolation to handle correctly single <code>nan</code> values in the data array. Contrary, function <a href="#evaluate">evaluate</a> use local spline interpolation, which give smoother output but spread <code>nan</code> values. So, <a href="#subdata">subdata</a> should be used for specific data elements (for example, for given column), and <a href="#evaluate">evaluate</a> should be used for distributed elements (i.e. consider data array as some field). Following sample illustrates this difference:
-</p><pre class="verbatim">subplot 1 1 0 '':title 'SubData vs Evaluate'
-new in 9 'x^3/1.1':plot in 'ko ':box
-new arg 99 '4*x+4'
-evaluate e in arg off:plot e 'b.'; legend 'Evaluate'
-subdata s in arg:plot s 'r.';legend 'SubData'
-legend 2
-</pre>
-<div align="center"><img src="png/indirect.png" alt="Example of indirect data access.">
-</div>
-<p>Example of <a href="#datagrid">datagrid</a> usage is done in <a href="#Making-regular-data">Making regular data</a>. Here I want to show the peculiarities of <a href="#refill">refill</a> and <a href="#gspline">gspline</a> functions. Both functions require argument(s) which provide coordinates of the data values, and return rectangular data array which equidistantly distributed in axis range. So, in opposite to <a href="#evaluate">evaluate</a> function, <a href="#refill">refill</a> and <a href="#gspline">gspline</a> can interpolate non-equidistantly distributed data. At this both functions <a href="#refill">refill</a> and <a href="#gspline">gspline</a> provide continuity of 2nd derivatives along coordinate(s). However, <a href="#refill">refill</a> is slower but give better (from human point of view) result than global spline <a href="#gspline">gspline</a> due to more advanced algorithm. Following sample illustrates this difference:
-</p><pre class="verbatim">new x 10 '0.5+rnd':cumsum x 'x':norm x -1 1
-copy y sin(pi*x)/1.5
-subplot 2 2 0 '<_':title 'Refill sample'
-box:axis:plot x y 'o ':fplot 'sin(pi*x)/1.5' 'B:'
-new r 100:refill r x y:plot r 'r'
-
-subplot 2 2 1 '<_':title 'Global spline'
-box:axis:plot x y 'o ':fplot 'sin(pi*x)/1.5' 'B:'
-new r 100:gspline r x y:plot r 'r'
-
-new y 10 '0.5+rnd':cumsum y 'x':norm y -1 1
-copy xx x:extend xx 10
-copy yy y:extend yy 10:transpose yy
-copy z sin(pi*xx*yy)/1.5
-alpha on:light on
-subplot 2 2 2:title '2d regular':rotate 40 60
-box:axis:mesh xx yy z 'k'
-new rr 100 100:refill rr x y z:surf rr
-
-new xx 10 10 '(x+1)/2*cos(y*pi/2-1)'
-new yy 10 10 '(x+1)/2*sin(y*pi/2-1)'
-copy z sin(pi*xx*yy)/1.5
-subplot 2 2 3:title '2d non-regular':rotate 40 60
-box:axis:plot xx yy z 'ko '
-new rr 100 100:refill rr xx yy z:surf rr
-</pre>
-<div align="center"><img src="png/refill.png" alt="Example of non-equidistant data interpolation.">
-</div>
-
-<hr>
-<a name="Making-regular-data"></a>
-<div class="header">
-<p>
-Next: <a href="#Making-histogram" accesskey="n" rel="next">Making histogram</a>, Previous: <a href="#Data-interpolation" accesskey="p" rel="prev">Data interpolation</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Making-regular-data-1"></a>
-<h4 class="subsection">5.5.11 Making regular data</h4>
-
-
-<p>Sometimes, one have only unregular data, like as data on triangular grids, or experimental results and so on. Such kind of data cannot be used as simple as regular data (like matrices). Only few functions, like <a href="#dots">dots</a>, can handle unregular data as is.
-</p>
-<p>However, one can use built in triangulation functions for interpolating unregular data points to a regular data grids. There are 2 ways. First way, one can use <a href="#triangulation">triangulation</a> function to obtain list of vertexes for triangles. Later this list can be used in functions like <a href="#triplot">triplot</a> or <a href="#tricont">tricont</a>. Second way consist in usage of <a href="#datagrid">datagrid</a> function, which fill regular data grid by interpolated values, assuming that coordinates of the data grid is equidistantly distributed in axis range. Note, you can use options (see <a href="#Command-options">Command options</a>) to change default axis range as well as in other plotting functions.
-</p><pre class="verbatim">new x 100 '2*rnd-1':new y 100 '2*rnd-1':copy z x^2-y^2
-# first way - plot triangular surface for points
-triangulate d x y
-title 'Triangulation'
-rotate 50 60:box:light on
-triplot d x y z:triplot d x y z '#k'
-# second way - make regular data and plot it
-new g 30 30:datagrid g x y z:mesh g 'm'
-</pre>
-<div align="center"><img src="png/triangulation.png" alt="Example of triangulation.">
-</div>
-
-<hr>
-<a name="Making-histogram"></a>
-<div class="header">
-<p>
-Next: <a href="#Nonlinear-fitting-hints" accesskey="n" rel="next">Nonlinear fitting hints</a>, Previous: <a href="#Making-regular-data" accesskey="p" rel="prev">Making regular data</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Making-histogram-1"></a>
-<h4 class="subsection">5.5.12 Making histogram</h4>
-
-
-<p>Using the <a href="#hist">hist</a> function(s) for making regular distributions is one of useful fast methods to process and plot irregular data. <code>Hist</code> can be used to find some momentum of set of points by specifying weight function. It is possible to create not only 1D distributions but also 2D and 3D ones. Below I place the simplest sample code which demonstrate <a href="#hist">hist</a> usage:
-</p><pre class="verbatim">new x 10000 '2*rnd-1':new y 10000 '2*rnd-1':copy z exp(-6*(x^2+y^2))
-hist xx x z:norm xx 0 1:hist yy y z:norm yy 0 1
-multiplot 3 3 3 2 2 '':ranges -1 1 -1 1 0 1:box:dots x y z 'wyrRk'
-multiplot 3 3 0 2 1 '':ranges -1 1 0 1:box:bars xx
-multiplot 3 3 5 1 2 '':ranges 0 1 -1 1:box:barh yy
-subplot 3 3 2:text 0.5 0.5 'Hist and\n{}MultiPlot\n{}sample' 'a' -3
-</pre>
-<div align="center"><img src="png/hist.png" alt="Example of Hist().">
-</div>
-
-
-<hr>
-<a name="Nonlinear-fitting-hints"></a>
-<div class="header">
-<p>
-Next: <a href="#PDE-solving-hints" accesskey="n" rel="next">PDE solving hints</a>, Previous: <a href="#Making-histogram" accesskey="p" rel="prev">Making histogram</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Nonlinear-fitting-hints-1"></a>
-<h4 class="subsection">5.5.13 Nonlinear fitting hints</h4>
-
-
-<p>Nonlinear fitting is rather simple. All that you need is the data to fit, the approximation formula and the list of coefficients to fit (better with its initial guess values). Let me demonstrate it on the following simple example. First, let us use sin function with some random noise:
-</p><pre class="verbatim">new dat 100 '0.4*rnd+0.1+sin(2*pi*x)'
-new in 100 '0.3+sin(2*pi*x)'
-</pre><p>and plot it to see that data we will fit
-</p><pre class="verbatim">title 'Fitting sample':yrange -2 2:box:axis:plot dat 'k. '
-</pre>
-<p>The next step is the fitting itself. For that let me specify an initial values <var>ini</var> for coefficients `<samp>abc</samp>` and do the fitting for approximation formula `<samp>a+b*sin(c*x)</samp>`
-</p><pre class="verbatim">list ini 1 1 3:fit res dat 'a+b*sin(c*x)' 'abc' ini
-</pre><p>Now display it
-</p><pre class="verbatim">plot res 'r':plot in 'b'
-text -0.9 -1.3 'fitted:' 'r:L'
-putsfit 0 -1.8 'y = ' 'r'
-text 0 2.2 'initial: y = 0.3+sin(2\pi x)' 'b'
-</pre>
-<p>NOTE! the fitting results may have strong dependence on initial values for coefficients due to algorithm features. The problem is that in general case there are several local "optimums" for coefficients and the program returns only first found one! There are no guaranties that it will be the best. Try for example to set <code>ini[3] = {0, 0, 0}</code> in the code above.
-</p>
-<p>The full sample code for nonlinear fitting is:
-</p><pre class="verbatim">new dat 100 '0.4*rnd+0.1+sin(2*pi*x)'
-new in 100 '0.3+sin(2*pi*x)'
-list ini 1 1 3:fit res dat 'a+b*sin(c*x)' 'abc' ini
-title 'Fitting sample':yrange -2 2:box:axis:plot dat 'k. '
-plot res 'r':plot in 'b'
-text -0.9 -1.3 'fitted:' 'r:L'
-putsfit 0 -1.8 'y = ' 'r'
-text 0 2.2 'initial: y = 0.3+sin(2\pi x)' 'b'
-</pre>
-<div align="center"><img src="png/fit.png" alt="Example of nonlinear fitting.">
-</div>
-
-<hr>
-<a name="PDE-solving-hints"></a>
-<div class="header">
-<p>
-Next: <a href="#Drawing-phase-plain" accesskey="n" rel="next">Drawing phase plain</a>, Previous: <a href="#Nonlinear-fitting-hints" accesskey="p" rel="prev">Nonlinear fitting hints</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="PDE-solving-hints-1"></a>
-<h4 class="subsection">5.5.14 PDE solving hints</h4>
-
-
-<p>Solving of Partial Differential Equations (PDE, including beam tracing) and ray tracing (or finding particle trajectory) are more or less common task. So, MathGL have several functions for that. There are <a href="#ray">ray</a> for ray tracing, <a href="#pde">pde</a> for PDE solving, <a href="#qo2d">qo2d</a> for beam tracing in 2D case (see <a href="#Global-functions">Global functions</a>). Note, that these functions take “Hamiltonian” or equations as string values. And I don`t plan now to allow one to use user-defined functions. There are 2 reasons: the complexity of corresponding interface; and the basic nature of used methods which are good for samples but may not good for serious scientific calculations.
-</p>
-<p>The ray tracing can be done by <a href="#ray">ray</a> function. Really ray tracing equation is Hamiltonian equation for 3D space. So, the function can be also used for finding a particle trajectory (i.e. solve Hamiltonian ODE) for 1D, 2D or 3D cases. The function have a set of arguments. First of all, it is Hamiltonian which defined the media (or the equation) you are planning to use. The Hamiltonian is defined by string which may depend on coordinates `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`, time `<samp>t</samp>` (for particle dynamics) and momentums `<samp>p</samp>`=<em>p_x</em>, `<samp>q</samp>`=<em>p_y</em>, `<samp>v</samp>`=<em>p_z</em>. Next, you have to define the initial conditions for coordinates and momentums at `<samp>t</samp>`=0 and set the integrations step (default is 0.1) and its duration (default is 10). The Runge-Kutta method of 4-th order is used for integration.
-</p><pre class="verbatim"> const char *ham = "p^2+q^2-x-1+i*0.5*(y+x)*(y>-x)";
- mglData r = mglRay(ham, mglPoint(-0.7, -1), mglPoint(0, 0.5), 0.02, 2);
-</pre><p>This example calculate the reflection from linear layer (media with Hamiltonian `<samp>p^2+q^2-x-1</samp>`=<em>p_x^2+p_y^2-x-1</em>). This is parabolic curve. The resulting array have 7 columns which contain data for {x,y,z,p,q,v,t}.
-</p>
-<p>The solution of PDE is a bit more complicated. As previous you have to specify the equation as pseudo-differential operator <em>\hat H(x, \nabla)</em> which is called sometime as “Hamiltonian” (for example, in beam tracing). As previously, it is defined by string which may depend on coordinates `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>` (but not time!), momentums `<samp>p</samp>`=<em>(d/dx)/i k_0</em>, `<samp>q</samp>`=<em>(d/dy)/i k_0</em> and field amplitude `<samp>u</samp>`=<em>|u|</em>. The evolutionary coordinate is `<samp>z</samp>` in all cases. So that, the equation look like <em>du/dz = ik_0 H(x,y,\hat p, \hat q, |u|)[u]</em>. Dependence on field amplitude `<samp>u</samp>`=<em>|u|</em> allows one to solve nonlinear problems too. For example, for nonlinear Shrodinger equation you may set <code>ham="p^2 + q^2 - u^2"</code>. Also you may specify imaginary part for wave absorption, like <code>ham = "p^2 + i*x*(x>0)"</code> or <code>ham = "p^2 + i1*x*(x>0)"</code>.
-</p>
-<p>Next step is specifying the initial conditions at `<samp>z</samp>` equal to minimal z-axis value. The function need 2 arrays for real and for imaginary part. Note, that coordinates x,y,z are supposed to be in specified axis range. So, the data arrays should have corresponding scales. Finally, you may set the integration step and parameter k0=<em>k_0</em>. Also keep in mind, that internally the 2 times large box is used (for suppressing numerical reflection from boundaries) and the equation should well defined even in this extended range.
-</p>
-<p>Final comment is concerning the possible form of pseudo-differential operator <em>H</em>. At this moment, simplified form of operator <em>H</em> is supported - all “mixed” terms (like `<samp>x*p</samp>`->x*d/dx) are excluded. For example, in 2D case this operator is effectively <em>H = f(p,z) + g(x,z,u)</em>. However commutable combinations (like `<samp>x*q</samp>`->x*d/dy) are allowed for 3D case.
-</p>
-<p>So, for example let solve the equation for beam deflected from linear layer and absorbed later. The operator will have the form `<samp>"p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)"</samp>` that correspond to equation <em>1/ik_0 * du/dz + d^2 u/dx^2 + d^2 u/dy^2 + x * u + i (x+z)/2 * u = 0</em>. This is typical equation for Electron Cyclotron (EC) absorption in magnetized plasmas. For initial conditions let me select the beam with plane phase front <em>exp(-48*(x+0.7)^2)</em>. The corresponding code looks like this:
-</p><pre class="verbatim">new re 128 'exp(-48*(x+0.7)^2)':new im 128
-pde a 'p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)' re im 0.01 30
-transpose a
-subplot 1 1 0 '<_':title 'PDE solver'
-axis:xlabel '\i x':ylabel '\i z'
-crange 0 1:dens a 'wyrRk'
-fplot '-x' 'k|'
-text 0 0.95 'Equation: ik_0\partial_zu + \Delta u + x\cdot u +\
- i \frac{x+z}{2}\cdot u = 0\n{}absorption: (x+z)/2 for x+z>0'
-</pre>
-<div align="center"><img src="png/pde.png" alt="Example of PDE solving.">
-</div>
-<p>The next example is example of beam tracing. Beam tracing equation is special kind of PDE equation written in coordinates accompanied to a ray. Generally this is the same parameters and limitation as for PDE solving but the coordinates are defined by the ray and by parameter of grid width <var>w</var> in direction transverse the ray. So, you don`t need to specify the range of coordinates. <strong>BUT</strong> there is limitation. The accompanied coordinates are well defined only for smooth enough rays, i.e. then the ray curvature <em>K</em> (which is defined as <em>1/K^2 = (|r''|^2 |r'|^2 - (r'', r'')^2)/|r'|^6</em>) is much large then the grid width: <em>K>>w</em>. So, you may receive incorrect results if this condition will be broken.
-</p>
-<p>You may use following code for obtaining the same solution as in previous example:
-</p><pre class="verbatim">define $1 'p^2+q^2-x-1+i*0.5*(y+x)*(y>-x)'
-subplot 1 1 0 '<_':title 'Beam and ray tracing'
-ray r $1 -0.7 -1 0 0 0.5 0 0.02 2:plot r(0) r(1) 'k'
-axis:xlabel '\i x':ylabel '\i z'
-new re 128 'exp(-48*x^2)':new im 128
-new xx 1:new yy 1
-qo2d a $1 re im r 1 30 xx yy
-crange 0 1:dens xx yy a 'wyrRk':fplot '-x' 'k|'
-text 0 0.85 'absorption: (x+y)/2 for x+y>0'
-text 0.7 -0.05 'central ray'
-</pre>
-<div align="center"><img src="png/qo2d.png" alt="Example of beam tracing.">
-</div>
-<p>Note, the <a href="#pde">pde</a> is fast enough and suitable for many cases routine. However, there is situations then media have both together: strong spatial dispersion and spatial inhomogeneity. In this, case the <a href="#pde">pde</a> will produce incorrect result and you need to use advanced PDE solver <a href="#apde">apde</a>. For example, a wave beam, propagated in plasma, described by Hamiltonian <em>exp(-x^2-p^2)</em>, will have different solution for using of simplification and advanced PDE solver:
-</p><pre class="verbatim">ranges -1 1 0 2 0 2
-new ar 256 'exp(-2*(x+0.0)^2)':new ai 256
-
-apde res1 'exp(-x^2-p^2)' ar ai 0.01:transpose res1
-subplot 1 2 0 '_':title 'Advanced PDE solver'
-ranges 0 2 -1 1:crange res1
-dens res1:box
-axis:xlabel '\i z':ylabel '\i x'
-text -0.5 0.2 'i\partial_z\i u = exp(-\i x^2+\partial_x^2)[\i u]' 'y'
-
-pde res2 'exp(-x^2-p^2)' ar ai 0.01
-subplot 1 2 1 '_':title 'Simplified PDE solver'
-dens res2:box
-axis:xlabel '\i z':ylabel '\i x'
-text -0.5 0.2 'i\partial_z\i u \approx\ exp(-\i x^2)\i u+exp(\partial_x^2)[\i u]' 'y'
-</pre>
-<div align="center"><img src="png/apde.png" alt="Comparison of simplified and advanced PDE solvers.">
-</div>
-
-<hr>
-<a name="Drawing-phase-plain"></a>
-<div class="header">
-<p>
-Next: <a href="#Pulse-properties" accesskey="n" rel="next">Pulse properties</a>, Previous: <a href="#PDE-solving-hints" accesskey="p" rel="prev">PDE solving hints</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Drawing-phase-plain-1"></a>
-<h4 class="subsection">5.5.15 Drawing phase plain</h4>
-
-
-<p>Here I want say a few words of plotting phase plains. Phase plain is name for system of coordinates <em>x</em>, <em>x'</em>, i.e. a variable and its time derivative. Plot in phase plain is very useful for qualitative analysis of an ODE, because such plot is rude (it topologically the same for a range of ODE parameters). Most often the phase plain {<em>x</em>, <em>x'</em>} is used (due to its simplicity), that allows to analyze up to the 2nd order ODE (i.e. <em>x''+f(x,x')=0</em>).
-</p>
-<p>The simplest way to draw phase plain in MathGL is using <a href="#flow">flow</a> function(s), which automatically select several points and draw flow threads. If the ODE have an integral of motion (like Hamiltonian <em>H(x,x')=const</em> for dissipation-free case) then you can use <a href="#cont">cont</a> function for plotting isolines (contours). In fact. isolines are the same as flow threads, but without arrows on it. Finally, you can directly solve ODE using <a href="#ode">ode</a> function and plot its numerical solution.
-</p>
-<p>Let demonstrate this for ODE equation <em>x''-x+3*x^2=0</em>. This is nonlinear oscillator with square nonlinearity. It has integral <em>H=y^2+2*x^3-x^2=Const</em>. Also it have 2 typical stationary points: saddle at {x=0, y=0} and center at {x=1/3, y=0}. Motion at vicinity of center is just simple oscillations, and is stable to small variation of parameters. In opposite, motion around saddle point is non-stable to small variation of parameters, and is very slow. So, calculation around saddle points are more difficult, but more important. Saddle points are responsible for solitons, stochasticity and so on.
-</p>
-<p>So, let draw this phase plain by 3 different methods. First, draw isolines for <em>H=y^2+2*x^3-x^2=Const</em> - this is simplest for ODE without dissipation. Next, draw flow threads - this is straightforward way, but the automatic choice of starting points is not always optimal. Finally, use <a href="#ode">ode</a> to check the above plots. At this we need to run <a href="#ode">ode</a> in both direction of time (in future and in the past) to draw whole plain. Alternatively, one can put starting points far from (or at the bounding box as done in <a href="#flow">flow</a>) the plot, but this is a more complicated. The sample code is:
-</p><pre class="verbatim">subplot 2 2 0 '<_':title 'Cont':box
-axis:xlabel 'x':ylabel '\dot{x}'
-new f 100 100 'y^2+2*x^3-x^2-0.5':cont f
-
-subplot 2 2 1 '<_':title 'Flow':box
-axis:xlabel 'x':ylabel '\dot{x}'
-new fx 100 100 'x-3*x^2'
-new fy 100 100 'y'
-flow fy fx 'v';value 7
-
-subplot 2 2 2 '<_':title 'ODE':box
-axis:xlabel 'x':ylabel '\dot{x}'
-for $x -1 1 0.1
- ode r 'y;x-3*x^2' 'xy' [$x,0]
- plot r(0) r(1)
- ode r '-y;-x+3*x^2' 'xy' [$x,0]
- plot r(0) r(1)
-next
-</pre>
-<div align="center"><img src="png/ode.png" alt="Example of ODE solving and phase plain drawing.">
-</div>
-
-
-<hr>
-<a name="Pulse-properties"></a>
-<div class="header">
-<p>
-Next: <a href="#Using-MGL-parser" accesskey="n" rel="next">Using MGL parser</a>, Previous: <a href="#Drawing-phase-plain" accesskey="p" rel="prev">Drawing phase plain</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Pulse-properties-1"></a>
-<h4 class="subsection">5.5.16 Pulse properties</h4>
-
-
-<p>There is common task in optics to determine properties of wave pulses or wave beams. MathGL provide special function <a href="#pulse">pulse</a> which return the pulse properties (maximal value, center of mass, width and so on). Its usage is rather simple. Here I just illustrate it on the example of Gaussian pulse, where all parameters are obvious.
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Pulse sample'
-# first prepare pulse itself
-new a 100 'exp(-6*x^2)'
-
-# get pulse parameters
-pulse b a 'x'
-
-# positions and widths are normalized on the number of points. So, set proper axis scale.
-ranges 0 a.nx-1 0 1
-axis:plot a # draw pulse and axis
-
-# now visualize found pulse properties
-define m a.max # maximal amplitude
-# approximate position of maximum
-line b(1) 0 b(1) m 'r='
-# width at half-maximum (so called FWHM)
-line b(1)-b(3)/2 0 b(1)-b(3)/2 m 'm|'
-line b(1)+b(3)/2 0 b(1)+b(3)/2 m 'm|'
-line 0 0.5*m a.nx-1 0.5*m 'h'
-# parabolic approximation near maximum
-new x 100 'x'
-plot b(0)*(1-((x-b(1))/b(2))^2) 'g'
-</pre>
-<div align="center"><img src="png/pulse.png" alt="Example of determining of pulse properties.">
-</div>
-
-
-<hr>
-<a name="Using-MGL-parser"></a>
-<div class="header">
-<p>
-Next: <a href="#Using-options" accesskey="n" rel="next">Using options</a>, Previous: <a href="#Pulse-properties" accesskey="p" rel="prev">Pulse properties</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Using-MGL-parser-1"></a>
-<h4 class="subsection">5.5.17 Using MGL parser</h4>
-
-
-<p>MGL scripts can contain loops, conditions and user-defined functions. Below I show very simple example of its usage:
-</p><pre class="verbatim">title 'MGL parser sample'
-call 'sample'
-stop
-
-func 'sample'
-new dat 100 'sin(2*pi*(x+1))'
-plot dat; xrange 0 1
-box:axis:xlabel 'x':ylabel 'y'
-for $0 -1 1 0.1
-if $0<0
-line 0 0 -1 $0 'r'
-else
-line 0 0 -1 $0 'r'
-endif
-next
-</pre>
-<div align="center"><img src="png/parser.png" alt="Example of MGL script parsing.">
-</div>
-
-<hr>
-<a name="Using-options"></a>
-<div class="header">
-<p>
-Next: <a href="#g_t_0060_0060Templates_0027_0027" accesskey="n" rel="next">``Templates''</a>, Previous: <a href="#Using-MGL-parser" accesskey="p" rel="prev">Using MGL parser</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Using-options-1"></a>
-<h4 class="subsection">5.5.18 Using options</h4>
-
-
-<p><a href="#Command-options">Command options</a> allow the easy setup of the selected plot by changing global settings only for this plot. Often, options are used for specifying the range of automatic variables (coordinates). However, options allows easily change plot transparency, numbers of line or faces to be drawn, or add legend entries. The sample function for options usage is:
-</p><pre class="verbatim">new a 31 41 '-pi*x*exp(-(y+1)^2-4*x^2)'
-alpha on:light on
-subplot 2 2 0:title 'Options for coordinates':rotate 40 60:box
-surf a 'r';yrange 0 1
-surf a 'b';yrange 0 -1
-
-subplot 2 2 1:title 'Option "meshnum"':rotate 40 60:box
-mesh a 'r'; yrange 0 1
-mesh a 'b';yrange 0 -1; meshnum 5
-
-subplot 2 2 2:title 'Option "alpha"':rotate 40 60:box
-surf a 'r';yrange 0 1; alpha 0.7
-surf a 'b';yrange 0 -1; alpha 0.3
-
-subplot 2 2 3 '<_':title 'Option "legend"'
-fplot 'x^3' 'r'; legend 'y = x^3'
-fplot 'cos(pi*x)' 'b'; legend 'y = cos \pi x'
-box:axis:legend 2
-</pre>
-<div align="center"><img src="png/mirror.png" alt="Example of options usage.">
-</div>
-
-<hr>
-<a name="g_t_0060_0060Templates_0027_0027"></a>
-<div class="header">
-<p>
-Next: <a href="#Nonlinear-fitting-hints" accesskey="n" rel="next">Nonlinear fitting hints</a>, Previous: <a href="#Using-options" accesskey="p" rel="prev">Using options</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="g_t_0060_0060Templates_0027_0027-1"></a>
-<h4 class="subsection">5.5.19 “Templates”</h4>
-
-
-<p>As I have noted before, the change of settings will influence only for the further plotting commands. This allows one to create “template” function which will contain settings and primitive drawing for often used plots. Correspondingly one may call this template-function for drawing simplification.
-</p>
-<p>For example, let one has a set of points (experimental or numerical) and wants to compare it with theoretical law (for example, with exponent law <em>\exp(-x/2), x \in [0, 20]</em>). The template-function for this task is:
-</p><pre class="verbatim">void template(mglGraph *gr)
-{
- mglData law(100); // create the law
- law.Modify("exp(-10*x)");
- gr->SetRanges(0,20, 0.0001,1);
- gr->SetFunc(0,"lg(y)",0);
- gr->Plot(law,"r2");
- gr->Puts(mglPoint(10,0.2),"Theoretical law: e^x","r:L");
- gr->Label('x',"x val."); gr->Label('y',"y val.");
- gr->Axis(); gr->Grid("xy","g;"); gr->Box();
-}
-</pre><p>At this, one will only write a few lines for data drawing:
-</p><pre class="verbatim"> template(gr); // apply settings and default drawing from template
- mglData dat("fname.dat"); // load the data
- // and draw it (suppose that data file have 2 columns)
- gr->Plot(dat.SubData(0),dat.SubData(1),"bx ");
-</pre><p>A template-function can also contain settings for font, transparency, lightning, color scheme and so on.
-</p>
-<p>I understand that this is obvious thing for any professional programmer, but I several times receive suggestion about “templates” ... So, I decide to point out it here.
-</p>
-
-<hr>
-<a name="Stereo-image"></a>
-<div class="header">
-<p>
-Next: <a href="#Reduce-memory-usage" accesskey="n" rel="next">Reduce memory usage</a>, Previous: <a href="#g_t_0060_0060Templates_0027_0027" accesskey="p" rel="prev">``Templates''</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Stereo-image-1"></a>
-<h4 class="subsection">5.5.20 Stereo image</h4>
-
-
-<p>One can easily create stereo image in MathGL. Stereo image can be produced by making two subplots with slightly different rotation angles. The corresponding code looks like this:
-</p><pre class="verbatim">call 'prepare2d'
-light on
-subplot 2 1 0:rotate 50 60+1:box:surf a
-subplot 2 1 1:rotate 50 60-1:box:surf a
-</pre>
-<div align="center"><img src="png/stereo.png" alt="Example of stereo image.">
-</div>
-
-<hr>
-<a name="Reduce-memory-usage"></a>
-<div class="header">
-<p>
-Next: <a href="#Saving-and-scanning-file" accesskey="n" rel="next">Saving and scanning file</a>, Previous: <a href="#Stereo-image" accesskey="p" rel="prev">Stereo image</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Reduce-memory-usage-1"></a>
-<h4 class="subsection">5.5.21 Reduce memory usage</h4>
-
-
-<p>By default MathGL save all primitives in memory, rearrange it and only later draw them on bitmaps. Usually, this speed up drawing, but may require a lot of memory for plots which contain a lot of faces (like <a href="#cloud">cloud</a>, <a href="#dew">dew</a>). You can use <a href="#quality">quality</a> function for setting to use direct drawing on bitmap and bypassing keeping any primitives in memory. This function also allow you to decrease the quality of the resulting image but increase the speed of the drawing.
-</p>
-<p>The code for lower memory usage looks like this:
-</p><pre class="verbatim">quality 6 # firstly, set to draw directly on bitmap
-for $1 0 1000
- sphere 2*rnd-1 2*rnd-1 0.05
-next
-</pre>
-
-<hr>
-<a name="Saving-and-scanning-file"></a>
-<div class="header">
-<p>
-Next: <a href="#Mixing-bitmap-and-vector-output" accesskey="n" rel="next">Mixing bitmap and vector output</a>, Previous: <a href="#Reduce-memory-usage" accesskey="p" rel="prev">Reduce memory usage</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Scanning-file"></a>
-<h4 class="subsection">5.5.22 Scanning file</h4>
-
-
-<p>MathGL have possibilities to write textual information into file with variable values by help of <a href="#save">save</a> command. This is rather useful for generating an ini-files or preparing human-readable textual files. For example, lets create some textual file
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Save and scanfile sample'
-list a 1 -1 0
-save 'This is test: 0 -> ',a(0),' q' 'test.txt' 'w'
-save 'This is test: 1 -> ',a(1),' q' 'test.txt'
-save 'This is test: 2 -> ',a(2),' q' 'test.txt'
-</pre><p>It contents look like
-</p><pre class="verbatim">This is test: 0 -> 1 q
-This is test: 1 -> -1 q
-This is test: 2 -> 0 q
-</pre><p>Note, that I use option `<samp>w</samp>` at first call of <code>save</code> to overwrite the contents of the file.
-</p>
-<p>Let assume now that you want to read this values (i.e. [[0,1],[1,-1],[2,0]]) from the file. You can use <a href="#scanfile">scanfile</a> for that. The desired values was written using template `<samp>This is test: %g -> %g q</samp>`. So, just use
-</p><pre class="verbatim">scanfile a 'test.txt' 'This is test: %g -> %g'
-</pre><p>and plot it to for assurance
-</p><pre class="verbatim">ranges a(0) a(1):axis:plot a(0) a(1) 'o'
-</pre>
-<p>Note, I keep only the leading part of template (i.e. `<samp>This is test: %g -> %g</samp>` instead of `<samp>This is test: %g -> %g q</samp>`), because there is no important for us information after the second number in the line.
-</p>
-
-<hr>
-<a name="Mixing-bitmap-and-vector-output"></a>
-<div class="header">
-<p>
-Previous: <a href="#Saving-and-scanning-file" accesskey="p" rel="prev">Saving and scanning file</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Mixing-bitmap-and-vector-output-1"></a>
-<h4 class="subsection">5.5.23 Mixing bitmap and vector output</h4>
-
-
-<p>Sometimes output plots contain surfaces with a lot of points, and some vector primitives (like axis, text, curves, etc.). Using vector output formats (like EPS or SVG) will produce huge files with possible loss of smoothed lighting. Contrary, the bitmap output may cause the roughness of text and curves. Hopefully, MathGL have a possibility to combine bitmap output for surfaces and vector one for other primitives in the same EPS file, by using <a href="#rasterize">rasterize</a> command.
-</p>
-<p>The idea is to prepare part of picture with surfaces or other "heavy" plots and produce the background image from them by help of <a href="#rasterize">rasterize</a> command. Next, we draw everything to be saved in vector form (text, curves, axis and etc.). Note, that you need to clear primitives (use <a href="#clf">clf</a> command) after <a href="#rasterize">rasterize</a> if you want to disable duplication of surfaces in output files (like EPS). Note, that some of output formats (like 3D ones, and TeX) don`t support the background bitmap, and use <a href="#clf">clf</a> for them will cause the loss of part of picture.
-</p>
-<p>The sample code is:
-</p><pre class="verbatim"># first draw everything to be in bitmap output
-fsurf 'x^2+y^2' '#';value 10
-
-rasterize # set above plots as bitmap background
-clf # clear primitives, to exclude them from file
-
-# now draw everything to be in vector output
-axis:box
-
-# and save file
-write 'fname.eps'
-</pre>
-
-
-<hr>
-<a name="FAQ"></a>
-<div class="header">
-<p>
-Previous: <a href="#Hints" accesskey="p" rel="prev">Hints</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="FAQ-1"></a>
-<h3 class="section">5.6 FAQ</h3>
-
-
-<dl compact="compact">
-<dt><strong>The plot does not appear</strong></dt>
-<dd><p>Check that points of the plot are located inside the bounding box and resize the bounding box using <a href="#ranges">ranges</a> function. Check that the data have correct dimensions for selected type of plot. Sometimes the light reflection from flat surfaces (like, <a href="#dens">dens</a>) can look as if the plot were absent.
-</p>
-</dd>
-<dt><strong>I can not find some special kind of plot.</strong></dt>
-<dd><p>Most “new” types of plots can be created by using the existing drawing functions. For example, the surface of curve rotation can be created by a special function <a href="#torus">torus</a>, or as a parametrically specified surface by <a href="#surf">surf</a>. See also, <a href="#Hints">Hints</a>. If you can not find a specific type of plot, please e-mail me and this plot will appear in the next version of MathGL library.
-</p>
-</dd>
-<dt><strong>How can I print in Russian/Spanish/Arabic/Japanese, and so on?</strong></dt>
-<dd><p>The standard way is to use Unicode encoding for the text output. But the MathGL library also has interface for 8-bit (char *) strings with internal conversion to Unicode. This conversion depends on the current locale OS.
-</p>
-</dd>
-<dt><strong>How can I exclude a point or a region of plot from the drawing?</strong></dt>
-<dd><p>There are 3 general ways. First, the point with <code>nan</code> value as one of the coordinates (including color/alpha range) will never be plotted. Second, special functions define the condition when the points should be omitted (see <a href="#Cutting">Cutting</a>). Last, you may change the transparency of a part of the plot by the help of functions <a href="#surfa">surfa</a>, <a href="#surf3a">surf3a</a> (see <a href="#Dual-plotting">Dual plotting</a>). In last case the transparency is switched on smoothly.
-</p>
-</dd>
-<dt><strong>How many people write this library?</strong></dt>
-<dd><p>Most of the library was written by one person. This is a result of nearly a year of work (mostly in the evening and on holidays): I spent half a year to write the kernel and half a year to a year on extending, improving the library and writing documentation. This process continues now :). The build system (cmake files) was written mostly by D.Kulagin, and the export to PRC/PDF was written mostly by M.Vidassov.
-</p>
-</dd>
-<dt><strong>How can I display a bitmap on the figure?</strong></dt>
-<dd><p>You can import data by command <a href="#import">import</a> and display it by <a href="#dens">dens</a> function. For example, for black-and-white bitmap you can use the code: <code>import bmp 'fname.png' 'wk':dens bmp 'wk'</code>.
-</p>
-
-</dd>
-<dt><strong>How can I create 3D in PDF?</strong></dt>
-<dd><p>Just use command <code>write fname.pdf</code>, which create PDF file if enable-pdf=ON at MathGL configure.
-</p>
-</dd>
-<dt><strong>How can I create TeX figure?</strong></dt>
-<dd><p>Just use command <code>write fname.tex</code>, which create LaTeX files with figure itself `<samp><var>fname</var>.tex</samp>`, with MathGL colors `<samp>mglcolors.tex</samp>` and main file `<samp>mglmain.tex</samp>`. Last one can be used for viewing image by command like <code>pdflatex mglmain.tex</code>.
-</p>
-
-</dd>
-<dt><strong>How I can change the font family?</strong></dt>
-<dd><p>First, you should download new font files from <a href="http://mathgl.sourceforge.net/download.html">here</a> or from <a href="http://sourceforge.net/project/showfiles.php?group_id=152187&package_id=267177">here</a>. Next, you should load the font files into by the following command: <code>loadfont 'fontname'</code>. Here <var>fontname</var> is the base font name like `<samp>STIX</samp>`. Use <code>loadfont ''</code> to start using the default font.
-</p>
-</dd>
-<dt><strong>How can I draw tick out of a bounding box?</strong></dt>
-<dd><p>Just set a negative value in <a href="#ticklen">ticklen</a>. For example, use <code>ticklen -0.1</code>.
-</p>
-</dd>
-<dt><strong>How can I prevent text rotation?</strong></dt>
-<dd><p>Just use <code>rotatetext off</code>. Also you can use axis style `<samp>U</samp>` for disable only tick labels rotation.
-</p>
-</dd>
-<dt><strong>How can I draw equal axis range even for rectangular image?</strong></dt>
-<dd><p>Just use <code>aspect nan nan</code> for each subplot, or at the beginning of the drawing.
-</p>
-</dd>
-<dt><strong>How I can set transparent background?</strong></dt>
-<dd><p>Just use code like <code>clf 'r{A5}'</code> or prepare PNG file and set it as background image by call <code>background 'fname.png'</code>.
-</p>
-</dd>
-<dt><strong>How I can reduce "white" edges around bounding box?</strong></dt>
-<dd><p>The simplest way is to use <a href="#subplot">subplot</a> style. However, you should be careful if you plan to add <a href="#colorbar">colorbar</a> or rotate plot - part of plot can be invisible if you will use non-default <a href="#subplot">subplot</a> style.
-</p>
-</dd>
-<dt><strong>Can I combine bitmap and vector output in EPS?</strong></dt>
-<dd><p>Yes. Sometimes you may have huge surface and a small set of curves and/or text on the plot. You can use function <a href="#rasterize">rasterize</a> just after making surface plot. This will put all plot to bitmap background. At this later plotting will be in vector format. For example, you can do something like following:
-</p><pre class="verbatim">surf x y z
-rasterize # make surface as bitmap
-axis
-write 'fname.eps'
-</pre>
-</dd>
-</dl>
-
-
-
-<hr>
-<a name="All-samples"></a>
-<div class="header">
-<p>
-Next: <a href="#Symbols-and-hot_002dkeys" accesskey="n" rel="next">Symbols and hot-keys</a>, Previous: <a href="#Examples" accesskey="p" rel="prev">Examples</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="All-samples-1"></a>
-<h2 class="chapter">6 All samples</h2>
-
-
-<p>This chapter contain alphabetical list of MGL and C++ samples for most of MathGL graphics and features.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#initialization-sample" accesskey="1">initialization sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#g_t3wave-sample" accesskey="2">3wave sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#alpha-sample" accesskey="3">alpha sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#apde-sample" accesskey="4">apde sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#area-sample" accesskey="5">area sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#aspect-sample" accesskey="6">aspect sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#axial-sample" accesskey="7">axial sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#axis-sample" accesskey="8">axis sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#barh-sample" accesskey="9">barh sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#bars-sample">bars sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#belt-sample">belt sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#bifurcation-sample">bifurcation sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#box-sample">box sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#boxplot-sample">boxplot sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#boxs-sample">boxs sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#candle-sample">candle sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#chart-sample">chart sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cloud-sample">cloud sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#colorbar-sample">colorbar sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#combined-sample">combined sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cones-sample">cones sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cont-sample">cont sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cont3-sample">cont3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cont_005fxyz-sample">cont_xyz sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#contd-sample">contd sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#contf-sample">contf sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#contf3-sample">contf3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#contf_005fxyz-sample">contf_xyz sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#contv-sample">contv sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#correl-sample">correl sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#curvcoor-sample">curvcoor sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cut-sample">cut sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dat_005fdiff-sample">dat_diff sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dat_005fextra-sample">dat_extra sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#data1-sample">data1 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#data2-sample">data2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dens-sample">dens sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dens3-sample">dens3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dens_005fxyz-sample">dens_xyz sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#detect-sample">detect sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dew-sample">dew sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#diffract-sample">diffract sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dilate-sample">dilate sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dots-sample">dots sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#earth-sample">earth sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#error-sample">error sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#error2-sample">error2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#export-sample">export sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#fall-sample">fall sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#fexport-sample">fexport sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#fit-sample">fit sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#flame2d-sample">flame2d sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#flow-sample">flow sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#flow3-sample">flow3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#fog-sample">fog sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#fonts-sample">fonts sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#grad-sample">grad sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#hist-sample">hist sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ifs2d-sample">ifs2d sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ifs3d-sample">ifs3d sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#indirect-sample">indirect sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#inplot-sample">inplot sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#iris-sample">iris sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#label-sample">label sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#lamerey-sample">lamerey sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#legend-sample">legend sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#light-sample">light sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#loglog-sample">loglog sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#map-sample">map sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mark-sample">mark sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mask-sample">mask sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mesh-sample">mesh sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mirror-sample">mirror sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#molecule-sample">molecule sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ode-sample">ode sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ohlc-sample">ohlc sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#param1-sample">param1 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#param2-sample">param2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#param3-sample">param3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#paramv-sample">paramv sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#parser-sample">parser sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#pde-sample">pde sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#pendelta-sample">pendelta sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#pipe-sample">pipe sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#plot-sample">plot sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#pmap-sample">pmap sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#primitives-sample">primitives sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#projection-sample">projection sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#projection5-sample">projection5 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#pulse-sample">pulse sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#qo2d-sample">qo2d sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality0-sample">quality0 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality1-sample">quality1 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality2-sample">quality2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality4-sample">quality4 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality5-sample">quality5 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality6-sample">quality6 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality8-sample">quality8 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#radar-sample">radar sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#refill-sample">refill sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#region-sample">region sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#scanfile-sample">scanfile sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#schemes-sample">schemes sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#section-sample">section sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#several_005flight-sample">several_light sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#solve-sample">solve sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#stem-sample">stem sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#step-sample">step sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#stereo-sample">stereo sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#stfa-sample">stfa sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#style-sample">style sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surf-sample">surf sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surf3-sample">surf3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surf3a-sample">surf3a sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surf3c-sample">surf3c sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surf3ca-sample">surf3ca sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surfa-sample">surfa sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surfc-sample">surfc sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surfca-sample">surfca sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#table-sample">table sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#tape-sample">tape sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#tens-sample">tens sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ternary-sample">ternary sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#text-sample">text sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#text2-sample">text2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#textmark-sample">textmark sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ticks-sample">ticks sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#tile-sample">tile sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#tiles-sample">tiles sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#torus-sample">torus sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#traj-sample">traj sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#triangulation-sample">triangulation sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#triplot-sample">triplot sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#tube-sample">tube sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#type0-sample">type0 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#type1-sample">type1 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#type2-sample">type2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#vect-sample">vect sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#vect3-sample">vect3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#venn-sample">venn sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-<hr>
-<a name="initialization-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#g_t3wave-sample" accesskey="n" rel="next">3wave sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Functions-for-initialization"></a>
-<h3 class="section">6.1 Functions for initialization</h3>
-
-
-<p>This section contain functions for input data for most of further samples.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">
-func 'prepare1d'
-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 x1 50 'x'
-new x2 50 '0.05-0.03*cos(pi*x)'
-new y1 50 '0.5-0.3*cos(pi*x)'
-new y2 50 '-0.3*sin(pi*x)'
-return
-
-func 'prepare2d'
-new a 50 40 '0.6*sin(pi*(x+1))*sin(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-new b 50 40 '0.6*cos(pi*(x+1))*cos(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-return
-
-func 'prepare3d'
-new c 61 50 40 '-2*(x^2+y^2+z^4-z^2)+0.2'
-new d 61 50 40 '1-2*tanh((x+y)*(x+y))'
-return
-
-func 'prepare2v'
-new a 20 30 '0.6*sin(pi*(x+1))*sin(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-new b 20 30 '0.6*cos(pi*(x+1))*cos(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-return
-
-func 'prepare3v'
-define $1 pow(x*x+y*y+(z-0.3)*(z-0.3)+0.03,1.5)
-define $2 pow(x*x+y*y+(z+0.3)*(z+0.3)+0.03,1.5)
-new ex 10 10 10 '0.2*x/$1-0.2*x/$2'
-new ey 10 10 10 '0.2*y/$1-0.2*y/$2'
-new ez 10 10 10 '0.2*(z-0.3)/$1-0.2*(z+0.3)/$2'
-return
-</pre>
-
-
-<hr>
-<a name="g_t3wave-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#alpha-sample" accesskey="n" rel="next">alpha sample</a>, Previous: <a href="#initialization-sample" accesskey="p" rel="prev">initialization sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-3wave"></a>
-<h3 class="section">6.2 Sample `<samp>3wave</samp>`</h3>
-
-
-<p>Example of complex <a href="#ode">ode</a> on basis of 3-wave decay.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">define t 50
-ode !r '-b*f;a*conj(f);a*conj(b)-0.1*f' 'abf' [1,1e-3,0] 0.1 t
-ranges 0 t 0 r.max
-plot r(0) 'b';legend 'a'
-plot r(1) 'g';legend 'b'
-plot r(2) 'r';legend 'f'
-axis:box:legend
-</pre>
-<div align="center"><img src="png/3wave.png" alt="Sample 3wave">
-</div>
-<hr>
-<a name="alpha-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#apde-sample" accesskey="n" rel="next">apde sample</a>, Previous: <a href="#g_t3wave-sample" accesskey="p" rel="prev">3wave sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-alpha"></a>
-<h3 class="section">6.3 Sample `<samp>alpha</samp>`</h3>
-
-
-<p>Example of <a href="#light">light</a> and <a href="#alpha">alpha</a> (transparency).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-subplot 2 2 0:title 'default':rotate 50 60:box
-surf a
-subplot 2 2 1:title 'light on':rotate 50 60:box
-light on:surf a
-subplot 2 2 3:title 'light on; alpha on':rotate 50 60:box
-alpha on:surf a
-subplot 2 2 2:title 'alpha on':rotate 50 60:box
-light off:surf a
-</pre>
-<div align="center"><img src="png/alpha.png" alt="Sample alpha">
-</div>
-<hr>
-<a name="apde-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#area-sample" accesskey="n" rel="next">area sample</a>, Previous: <a href="#alpha-sample" accesskey="p" rel="prev">alpha sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-apde"></a>
-<h3 class="section">6.4 Sample `<samp>apde</samp>`</h3>
-
-
-<p>Comparison of advanced PDE solver (<a href="#apde">apde</a>) and ordinary one (<a href="#pde">pde</a>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">ranges -1 1 0 2 0 2
-new ar 256 'exp(-2*(x+0.0)^2)'
-new ai 256
-
-apde res1 'exp(-x^2-p^2)' ar ai 0.01:transpose res1
-pde res2 'exp(-x^2-p^2)' ar ai 0.01
-
-subplot 1 2 0 '_':title 'Advanced PDE solver'
-ranges 0 2 -1 1:crange res1
-dens res1:box
-axis:xlabel '\i z':ylabel '\i x'
-text -0.5 0.2 'i\partial_z\i u = exp(-\i x^2+\partial_x^2)[\i u]' 'y'
-
-subplot 1 2 1 '_':title 'Simplified PDE solver'
-dens res2:box
-axis:xlabel '\i z':ylabel '\i x'
-text -0.5 0.2 'i\partial_z\i u \approx\ exp(-\i x^2)\i u+exp(\partial_x^2)[\i u]' 'y'
-</pre>
-<div align="center"><img src="png/apde.png" alt="Sample apde">
-</div>
-<hr>
-<a name="area-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#aspect-sample" accesskey="n" rel="next">aspect sample</a>, Previous: <a href="#apde-sample" accesskey="p" rel="prev">apde sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-area"></a>
-<h3 class="section">6.5 Sample `<samp>area</samp>`</h3>
-
-
-<p>Function <a href="#area">area</a> fill the area between curve and axis plane. It support gradient filling if 2 colors per curve is specified.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-origin 0 0 0
-subplot 2 2 0 '':title 'Area plot (default)':box:area y
-subplot 2 2 1 '':title '2 colors':box:area y 'cbgGyr'
-subplot 2 2 2 '':title '"!" style':box:area y '!'
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 2 2 3:title '3d variant':rotate 50 60:box
-area xc yc z 'r'
-area xc -yc z 'b#'
-</pre>
-<div align="center"><img src="png/area.png" alt="Sample area">
-</div>
-<hr>
-<a name="aspect-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#axial-sample" accesskey="n" rel="next">axial sample</a>, Previous: <a href="#area-sample" accesskey="p" rel="prev">area sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-aspect"></a>
-<h3 class="section">6.6 Sample `<samp>aspect</samp>`</h3>
-
-
-<p>Example of <a href="#subplot">subplot</a>, <a href="#inplot">inplot</a>, <a href="#rotate">rotate</a>, <a href="#aspect">aspect</a>, <a href="#shear">shear</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0:box:text -1 1.1 'Just box' ':L'
-inplot 0.2 0.5 0.7 1 off:box:text 0 1.2 'InPlot example'
-subplot 2 2 1:title 'Rotate only':rotate 50 60:box
-subplot 2 2 2:title 'Rotate and Aspect':rotate 50 60:aspect 1 1 2:box
-subplot 2 2 3:title 'Shear':box 'c':shear 0.2 0.1:box
-</pre>
-<div align="center"><img src="png/aspect.png" alt="Sample aspect">
-</div>
-<hr>
-<a name="axial-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#axis-sample" accesskey="n" rel="next">axis sample</a>, Previous: <a href="#aspect-sample" accesskey="p" rel="prev">aspect sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-axial"></a>
-<h3 class="section">6.7 Sample `<samp>axial</samp>`</h3>
-
-
-<p>Function <a href="#axial">axial</a> draw surfaces of rotation for contour lines. You can draw wire surfaces (`<samp>#</samp>` style) or ones rotated in other directions (`<samp>x</samp>`, `<samp>z</samp>` styles).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-subplot 2 2 0:title 'Axial plot (default)':light on:alpha on:rotate 50 60:box:axial a
-subplot 2 2 1:title '"x" style;"." style':light on:rotate 50 60:box:axial a 'x.'
-subplot 2 2 2:title '"z" style':light on:rotate 50 60:box:axial a 'z'
-subplot 2 2 3:title '"\#" style':light on:rotate 50 60:box:axial a '#'
-</pre>
-<div align="center"><img src="png/axial.png" alt="Sample axial">
-</div>
-<hr>
-<a name="axis-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#barh-sample" accesskey="n" rel="next">barh sample</a>, Previous: <a href="#axial-sample" accesskey="p" rel="prev">axial sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-axis"></a>
-<h3 class="section">6.8 Sample `<samp>axis</samp>`</h3>
-
-
-<p>Different forms of <a href="#axis">axis</a> position.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0:title 'Axis origin, Grid':origin 0 0:axis:grid:fplot 'x^3'
-subplot 2 2 1:title '2 axis':ranges -1 1 -1 1:origin -1 -1:axis:ylabel 'axis_1':fplot 'sin(pi*x)' 'r2'
-ranges 0 1 0 1:origin 1 1:axis:ylabel 'axis_2':fplot 'cos(pi*x)'
-subplot 2 2 3:title 'More axis':origin nan nan:xrange -1 1:axis:xlabel 'x' 0:ylabel 'y_1' 0:fplot 'x^2' 'k'
-yrange -1 1:origin -1.3 -1:axis 'y' 'r':ylabel '#r{y_2}' 0.2:fplot 'x^3' 'r'
-
-subplot 2 2 2:title '4 segments, inverted axis':origin 0 0:
-inplot 0.5 1 0.5 1 on:ranges 0 10 0 2:axis
-fplot 'sqrt(x/2)':xlabel 'W' 1:ylabel 'U' 1
-inplot 0 0.5 0.5 1 on:ranges 1 0 0 2:axis 'x':fplot 'sqrt(x)+x^3':xlabel '\tau' 1
-inplot 0.5 1 0 0.5 on:ranges 0 10 4 0:axis 'y':fplot 'x/4':ylabel 'L' -1
-inplot 0 0.5 0 0.5 on:ranges 1 0 4 0:fplot '4*x^2'
-</pre>
-<div align="center"><img src="png/axis.png" alt="Sample axis">
-</div>
-<hr>
-<a name="barh-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#bars-sample" accesskey="n" rel="next">bars sample</a>, Previous: <a href="#axis-sample" accesskey="p" rel="prev">axis sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-barh"></a>
-<h3 class="section">6.9 Sample `<samp>barh</samp>`</h3>
-
-
-<p>Function <a href="#barh">barh</a> is the similar to <a href="#bars">bars</a> but draw horizontal bars.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ys 10 3 '0.8*sin(pi*(x+y/4+1.25))+0.2*rnd':origin 0 0 0
-subplot 2 2 0 '':title 'Barh plot (default)':box:barh ys
-subplot 2 2 1 '':title '2 colors':box:barh ys 'cbgGyr'
-ranges -3 3 -1 1:subplot 2 2 2 '':title '"a" style':box:barh ys 'a'
-subplot 2 2 3 '': title '"f" style':box:barh ys 'f'
-</pre>
-<div align="center"><img src="png/barh.png" alt="Sample barh">
-</div>
-<hr>
-<a name="bars-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#belt-sample" accesskey="n" rel="next">belt sample</a>, Previous: <a href="#barh-sample" accesskey="p" rel="prev">barh sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-bars"></a>
-<h3 class="section">6.10 Sample `<samp>bars</samp>`</h3>
-
-
-<p>Function <a href="#bars">bars</a> draw vertical bars. It have a lot of options: bar-above-bar (`<samp>a</samp>` style), fall like (`<samp>f</samp>` style), 2 colors for positive and negative values, wired bars (`<samp>#</samp>` style), 3D variant.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ys 10 3 '0.8*sin(pi*(x+y/4+1.25))+0.2*rnd':origin 0 0 0
-subplot 3 2 0 '':title 'Bars plot (default)':box:bars ys
-subplot 3 2 1 '':title '2 colors':box:bars ys 'cbgGyr'
-subplot 3 2 4 '':title '"\#" style':box:bars ys '#'
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 3 2 5:title '3d variant':rotate 50 60:box:bars xc yc z 'r'
-ranges -1 1 -3 3:subplot 3 2 2 '':title '"a" style':box:bars ys 'a'
-subplot 3 2 3 '':title '"f" style':box:bars ys 'f'
-</pre>
-<div align="center"><img src="png/bars.png" alt="Sample bars">
-</div>
-<hr>
-<a name="belt-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#bifurcation-sample" accesskey="n" rel="next">bifurcation sample</a>, Previous: <a href="#bars-sample" accesskey="p" rel="prev">bars sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-belt"></a>
-<h3 class="section">6.11 Sample `<samp>belt</samp>`</h3>
-
-
-<p>Function <a href="#belt">belt</a> draw surface by belts. You can use `<samp>x</samp>` style for drawing lines in other direction.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Belt plot':rotate 50 60:box:belt a
-</pre>
-<div align="center"><img src="png/belt.png" alt="Sample belt">
-</div>
-<hr>
-<a name="bifurcation-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#box-sample" accesskey="n" rel="next">box sample</a>, Previous: <a href="#belt-sample" accesskey="p" rel="prev">belt sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-bifurcation"></a>
-<h3 class="section">6.12 Sample `<samp>bifurcation</samp>`</h3>
-
-
-<p>Function <a href="#bifurcation">bifurcation</a> draw Bifurcation diagram for multiple stationary points of the map (like logistic map).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Bifurcation sample'
-ranges 0 4 0 1:axis
-bifurcation 0.005 'x*y*(1-y)' 'r'
-</pre>
-<div align="center"><img src="png/bifurcation.png" alt="Sample bifurcation">
-</div>
-<hr>
-<a name="box-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#boxplot-sample" accesskey="n" rel="next">boxplot sample</a>, Previous: <a href="#bifurcation-sample" accesskey="p" rel="prev">bifurcation sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-box"></a>
-<h3 class="section">6.13 Sample `<samp>box</samp>`</h3>
-
-
-<p>Different styles of bounding <a href="#box">box</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0:title 'Box (default)':rotate 50 60:box
-subplot 2 2 1:title 'colored':rotate 50 60:box 'r'
-subplot 2 2 2:title 'with faces':rotate 50 60:box '@'
-subplot 2 2 3:title 'both':rotate 50 60:box '@cm'
-</pre>
-<div align="center"><img src="png/box.png" alt="Sample box">
-</div>
-<hr>
-<a name="boxplot-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#boxs-sample" accesskey="n" rel="next">boxs sample</a>, Previous: <a href="#box-sample" accesskey="p" rel="prev">box sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-boxplot"></a>
-<h3 class="section">6.14 Sample `<samp>boxplot</samp>`</h3>
-
-
-<p>Function <a href="#boxplot">boxplot</a> draw box-and-whisker diagram.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 10 7 '(2*rnd-1)^3/2'
-subplot 1 1 0 '':title 'Boxplot plot':box:boxplot a
-</pre>
-<div align="center"><img src="png/boxplot.png" alt="Sample boxplot">
-</div>
-<hr>
-<a name="boxs-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#candle-sample" accesskey="n" rel="next">candle sample</a>, Previous: <a href="#boxplot-sample" accesskey="p" rel="prev">boxplot sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-boxs"></a>
-<h3 class="section">6.15 Sample `<samp>boxs</samp>`</h3>
-
-
-<p>Function <a href="#boxs">boxs</a> draw surface by boxes. You can use `<samp>#</samp>` for drawing wire plot.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-origin 0 0 0
-subplot 2 2 0:title 'Boxs plot (default)':rotate 40 60:light on:box:boxs a
-subplot 2 2 1:title '"\@" style':rotate 50 60:box:boxs a '@'
-subplot 2 2 2:title '"\#" style':rotate 50 60:box:boxs a '#'
-subplot 2 2 3:title 'compare with Tile':rotate 50 60:box:tile a
-</pre>
-<div align="center"><img src="png/boxs.png" alt="Sample boxs">
-</div>
-<hr>
-<a name="candle-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#chart-sample" accesskey="n" rel="next">chart sample</a>, Previous: <a href="#boxs-sample" accesskey="p" rel="prev">boxs sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-candle"></a>
-<h3 class="section">6.16 Sample `<samp>candle</samp>`</h3>
-
-
-<p>Function <a href="#candle">candle</a> draw candlestick chart. This is a combination of a line-chart and a bar-chart, in that each bar represents the range of price movement over a given time interval.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new y 30 'sin(pi*x/2)^2'
-subplot 1 1 0 '':title 'Candle plot (default)'
-yrange 0 1:box
-candle y y/2 (y+1)/2
-</pre>
-<div align="center"><img src="png/candle.png" alt="Sample candle">
-</div>
-<hr>
-<a name="chart-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cloud-sample" accesskey="n" rel="next">cloud sample</a>, Previous: <a href="#candle-sample" accesskey="p" rel="prev">candle sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-chart"></a>
-<h3 class="section">6.17 Sample `<samp>chart</samp>`</h3>
-
-
-<p>Function <a href="#chart">chart</a> draw colored boxes with width proportional to data values. Use `<samp> </samp>` for empty box. It produce well known pie chart if drawn in polar coordinates.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ch 7 2 'rnd+0.1':light on
-subplot 2 2 0:title 'Chart plot (default)':rotate 50 60:box:chart ch
-subplot 2 2 1:title '"\#" style':rotate 50 60:box:chart ch '#'
-subplot 2 2 2:title 'Pie chart; " " color':rotate 50 60:
-axis '(y+1)/2*cos(pi*x)' '(y+1)/2*sin(pi*x)' '':box:chart ch 'bgr cmy#'
-subplot 2 2 3:title 'Ring chart; " " color':rotate 50 60:
-axis '(y+2)/3*cos(pi*x)' '(y+2)/3*sin(pi*x)' '':box:chart ch 'bgr cmy#'
-</pre>
-<div align="center"><img src="png/chart.png" alt="Sample chart">
-</div>
-<hr>
-<a name="cloud-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#colorbar-sample" accesskey="n" rel="next">colorbar sample</a>, Previous: <a href="#chart-sample" accesskey="p" rel="prev">chart sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cloud"></a>
-<h3 class="section">6.18 Sample `<samp>cloud</samp>`</h3>
-
-
-<p>Function <a href="#cloud">cloud</a> draw cloud-like object which is less transparent for higher data values. Similar plot can be created using many (about 10...20 - <code>surf3a a a;value 10</code>) isosurfaces <a href="#surf3a">surf3a</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-subplot 2 2 0:title 'Cloud plot':rotate 50 60:alpha on:box:cloud c 'wyrRk'
-subplot 2 2 1:title '"i" style':rotate 50 60:box:cloud c 'iwyrRk'
-subplot 2 2 2:title '"." style':rotate 50 60:box:cloud c '.wyrRk'
-subplot 2 2 3:title 'meshnum 10':rotate 50 60:box:cloud c 'wyrRk'; meshnum 10
-</pre>
-<div align="center"><img src="png/cloud.png" alt="Sample cloud">
-</div>
-<hr>
-<a name="colorbar-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#combined-sample" accesskey="n" rel="next">combined sample</a>, Previous: <a href="#cloud-sample" accesskey="p" rel="prev">cloud sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-colorbar"></a>
-<h3 class="section">6.19 Sample `<samp>colorbar</samp>`</h3>
-
-
-<p>Example of <a href="#colorbar">colorbar</a> position and styles.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-new v 9 'x'
-subplot 2 2 0:title 'Colorbar out of box':box
-colorbar '<':colorbar '>':colorbar '_':colorbar '^'
-subplot 2 2 1:title 'Colorbar near box':box
-colorbar '<I':colorbar '>I':colorbar '_I':colorbar '^I'
-subplot 2 2 2:title 'manual colors':box:contd v a
-colorbar v '<':colorbar v '>':colorbar v '_':colorbar v '^'
-subplot 2 2 3:title '':text -0.5 1.55 'Color positions' ':C' -2
-colorbar 'bwr>' 0.25 0:text -0.9 1.2 'Default'
-colorbar 'b{w,0.3}r>' 0.5 0:text -0.1 1.2 'Manual'
-crange 0.01 1e3
-colorbar '>' 0.75 0:text 0.65 1.2 'Normal scale':colorbar '>':text 1.35 1.2 'Log scale'
-</pre>
-<div align="center"><img src="png/colorbar.png" alt="Sample colorbar">
-</div>
-<hr>
-<a name="combined-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cones-sample" accesskey="n" rel="next">cones sample</a>, Previous: <a href="#colorbar-sample" accesskey="p" rel="prev">colorbar sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-combined"></a>
-<h3 class="section">6.20 Sample `<samp>combined</samp>`</h3>
-
-
-<p>Example of several plots in the same axis.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2v'
-call 'prepare3d'
-new v 10:fill v -0.5 1:copy d sqrt(a^2+b^2)
-subplot 2 2 0:title 'Surf + Cont':rotate 50 60:light on:box:surf a:cont a 'y'
-subplot 2 2 1 '':title 'Flow + Dens':light off:box:flow a b 'br':dens d
-subplot 2 2 2:title 'Mesh + Cont':rotate 50 60:box:mesh a:cont a '_'
-subplot 2 2 3:title 'Surf3 + ContF3':rotate 50 60:light on
-box:contf3 v c 'z' 0:contf3 v c 'x':contf3 v c
-cut 0 -1 -1 1 0 1.1
-contf3 v c 'z' c.nz-1:surf3 c -0.5
-</pre>
-<div align="center"><img src="png/combined.png" alt="Sample combined">
-</div>
-<hr>
-<a name="cones-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cont-sample" accesskey="n" rel="next">cont sample</a>, Previous: <a href="#combined-sample" accesskey="p" rel="prev">combined sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cones"></a>
-<h3 class="section">6.21 Sample `<samp>cones</samp>`</h3>
-
-
-<p>Function <a href="#cones">cones</a> is similar to <a href="#bars">bars</a> but draw cones.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ys 10 3 '0.8*sin(pi*(x+y/4+1.25))+0.2*rnd'
-light on:origin 0 0 0
-subplot 3 2 0:title 'Cones plot':rotate 50 60:box:cones ys
-subplot 3 2 1:title '2 colors':rotate 50 60:box:cones ys 'cbgGyr'
-subplot 3 2 2:title '"\#" style':rotate 50 60:box:cones ys '#'
-subplot 3 2 3:title '"a" style':rotate 50 60:zrange -2 2:box:cones ys 'a'
-subplot 3 2 4:title '"t" style':rotate 50 60:box:cones ys 't'
-subplot 3 2 5:title '"4" style':rotate 50 60:box:cones ys '4'
-</pre>
-<div align="center"><img src="png/cones.png" alt="Sample cones">
-</div>
-<hr>
-<a name="cont-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cont3-sample" accesskey="n" rel="next">cont3 sample</a>, Previous: <a href="#cones-sample" accesskey="p" rel="prev">cones sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cont"></a>
-<h3 class="section">6.22 Sample `<samp>cont</samp>`</h3>
-
-
-<p>Function <a href="#cont">cont</a> draw contour lines for surface. You can select automatic (default) or manual levels for contours, print contour labels, draw it on the surface (default) or at plane (as <code>Dens</code>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-list v -0.5 -0.15 0 0.15 0.5
-subplot 2 2 0:title 'Cont plot (default)':rotate 50 60:box:cont a
-subplot 2 2 1:title 'manual levels':rotate 50 60:box:cont v a
-subplot 2 2 2:title '"\_" and "." styles':rotate 50 60:box:cont a '_':cont a '_.2k'
-subplot 2 2 3 '':title '"t" style':box:cont a 't'
-</pre>
-<div align="center"><img src="png/cont.png" alt="Sample cont">
-</div>
-<hr>
-<a name="cont3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cont_005fxyz-sample" accesskey="n" rel="next">cont_xyz sample</a>, Previous: <a href="#cont-sample" accesskey="p" rel="prev">cont sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cont3"></a>
-<h3 class="section">6.23 Sample `<samp>cont3</samp>`</h3>
-
-
-<p>Function <a href="#contf3">contf3</a> draw ordinary contour lines but at slices of 3D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Cont3 sample':rotate 50 60:box
-cont3 c 'x':cont3 c:cont3 c 'z'
-</pre>
-<div align="center"><img src="png/cont3.png" alt="Sample cont3">
-</div>
-<hr>
-<a name="cont_005fxyz-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#contd-sample" accesskey="n" rel="next">contd sample</a>, Previous: <a href="#cont3-sample" accesskey="p" rel="prev">cont3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cont_005fxyz"></a>
-<h3 class="section">6.24 Sample `<samp>cont_xyz</samp>`</h3>
-
-
-<p>Functions <a href="#contz">contz</a>, <a href="#conty">conty</a>, <a href="#contx">contx</a> draw contour lines on plane perpendicular to corresponding axis. One of possible application is drawing projections of 3D field.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Cont[XYZ] sample':rotate 50 60:box
-contx {sum c 'x'} '' -1:conty {sum c 'y'} '' 1:contz {sum c 'z'} '' -1
-</pre>
-<div align="center"><img src="png/cont_xyz.png" alt="Sample cont_xyz">
-</div>
-<hr>
-<a name="contd-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#contf-sample" accesskey="n" rel="next">contf sample</a>, Previous: <a href="#cont_005fxyz-sample" accesskey="p" rel="prev">cont_xyz sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-contd"></a>
-<h3 class="section">6.25 Sample `<samp>contd</samp>`</h3>
-
-
-<p>Function <a href="#contd">contd</a> is similar to <a href="#contf">contf</a> but with manual contour colors.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-list v -0.5 -0.15 0 0.15 0.5
-new a1 30 40 3 '0.6*sin(2*pi*x+pi*(z+1)/2)*sin(3*pi*y+pi*z) + 0.4*cos(3*pi*(x*y)+pi*(z+1)^2/2)'
-subplot 2 2 0:title 'ContD plot (default)':rotate 50 60:box:contd a
-subplot 2 2 1:title 'manual levels':rotate 50 60:box:contd v a
-subplot 2 2 2:title '"\_" style':rotate 50 60:box:contd a '_'
-subplot 2 2 3:title 'several slices':rotate 50 60:box:contd a1
-</pre>
-<div align="center"><img src="png/contd.png" alt="Sample contd">
-</div>
-<hr>
-<a name="contf-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#contf3-sample" accesskey="n" rel="next">contf3 sample</a>, Previous: <a href="#contd-sample" accesskey="p" rel="prev">contd sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-contf"></a>
-<h3 class="section">6.26 Sample `<samp>contf</samp>`</h3>
-
-
-<p>Function <a href="#contf">contf</a> draw filled contours. You can select automatic (default) or manual levels for contours.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-list v -0.5 -0.15 0 0.15 0.5
-new a1 30 40 3 '0.6*sin(2*pi*x+pi*(z+1)/2)*sin(3*pi*y+pi*z) + 0.4*cos(3*pi*(x*y)+pi*(z+1)^2/2)'
-subplot 2 2 0:title 'ContF plot (default)':rotate 50 60:box:contf a
-subplot 2 2 1:title 'manual levels':rotate 50 60:box:contf v a
-subplot 2 2 2:title '"\_" style':rotate 50 60:box:contf a '_'
-subplot 2 2 3:title 'several slices':rotate 50 60:box:contf a1
-</pre>
-<div align="center"><img src="png/contf.png" alt="Sample contf">
-</div>
-<hr>
-<a name="contf3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#contf_005fxyz-sample" accesskey="n" rel="next">contf_xyz sample</a>, Previous: <a href="#contf-sample" accesskey="p" rel="prev">contf sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-contf3"></a>
-<h3 class="section">6.27 Sample `<samp>contf3</samp>`</h3>
-
-
-<p>Function <a href="#contf3">contf3</a> draw ordinary filled contours but at slices of 3D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Cont3 sample':rotate 50 60:box:light on
-contf3 c 'x':contf3 c:contf3 c 'z'
-cont3 c 'xk':cont3 c 'k':cont3 c 'zk'
-</pre>
-<div align="center"><img src="png/contf3.png" alt="Sample contf3">
-</div>
-<hr>
-<a name="contf_005fxyz-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#contv-sample" accesskey="n" rel="next">contv sample</a>, Previous: <a href="#contf3-sample" accesskey="p" rel="prev">contf3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-contf_005fxyz"></a>
-<h3 class="section">6.28 Sample `<samp>contf_xyz</samp>`</h3>
-
-
-<p>Functions <a href="#contfz">contfz</a>, <a href="#contfy">contfy</a>, <a href="#contfx">contfx</a>, draw filled contours on plane perpendicular to corresponding axis. One of possible application is drawing projections of 3D field.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'ContF[XYZ] sample':rotate 50 60:box
-contfx {sum c 'x'} '' -1:contfy {sum c 'y'} '' 1:contfz {sum c 'z'} '' -1
-</pre>
-<div align="center"><img src="png/contf_xyz.png" alt="Sample contf_xyz">
-</div>
-<hr>
-<a name="contv-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#correl-sample" accesskey="n" rel="next">correl sample</a>, Previous: <a href="#contf_005fxyz-sample" accesskey="p" rel="prev">contf_xyz sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-contv"></a>
-<h3 class="section">6.29 Sample `<samp>contv</samp>`</h3>
-
-
-<p>Function <a href="#contv">contv</a> draw vertical cylinders (belts) at contour lines.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-list v -0.5 -0.15 0 0.15 0.5
-subplot 2 2 0:title 'ContV plot (default)':rotate 50 60:box:contv a
-subplot 2 2 1:title 'manual levels':rotate 50 60:box:contv v a
-subplot 2 2 2:title '"\_" style':rotate 50 60:box:contv a '_'
-subplot 2 2 3:title 'ContV and ContF':rotate 50 60:light on:box
-contv a:contf a:cont a 'k'
-</pre>
-<div align="center"><img src="png/contv.png" alt="Sample contv">
-</div>
-<hr>
-<a name="correl-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#curvcoor-sample" accesskey="n" rel="next">curvcoor sample</a>, Previous: <a href="#contv-sample" accesskey="p" rel="prev">contv sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-correl"></a>
-<h3 class="section">6.30 Sample `<samp>correl</samp>`</h3>
-
-
-<p>Test of correlation function (<a href="#correl">correl</a>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 100 'exp(-10*x^2)'
-new b 100 'exp(-10*(x+0.5)^2)'
-yrange 0 1
-subplot 1 2 0 '_':title 'Input fields'
-plot a:plot b:box:axis
-correl r a b 'x'
-norm r 0 1:swap r 'x' # make it human readable
-subplot 1 2 1 '_':title 'Correlation of a and b'
-plot r 'r':axis:box
-line 0.5 0 0.5 1 'B|'
-</pre>
-<div align="center"><img src="png/correl.png" alt="Sample correl">
-</div>
-<hr>
-<a name="curvcoor-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cut-sample" accesskey="n" rel="next">cut sample</a>, Previous: <a href="#correl-sample" accesskey="p" rel="prev">correl sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-curvcoor"></a>
-<h3 class="section">6.31 Sample `<samp>curvcoor</samp>`</h3>
-
-
-<p>Some common curvilinear coordinates.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">origin -1 1 -1
-subplot 2 2 0:title 'Cartesian':rotate 50 60:fplot '2*t-1' '0.5' '0' '2r':axis:grid
-axis 'y*sin(pi*x)' 'y*cos(pi*x)' '':subplot 2 2 1:title 'Cylindrical':rotate 50 60:fplot '2*t-1' '0.5' '0' '2r':axis:grid
-axis '2*y*x' 'y*y - x*x' '':subplot 2 2 2:title 'Parabolic':rotate 50 60:fplot '2*t-1' '0.5' '0' '2r':axis:grid
-axis 'y*sin(pi*x)' 'y*cos(pi*x)' 'x+z':subplot 2 2 3:title 'Spiral':rotate 50 60:fplot '2*t-1' '0.5' '0' '2r':axis:grid
-</pre>
-<div align="center"><img src="png/curvcoor.png" alt="Sample curvcoor">
-</div>
-<hr>
-<a name="cut-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dat_005fdiff-sample" accesskey="n" rel="next">dat_diff sample</a>, Previous: <a href="#curvcoor-sample" accesskey="p" rel="prev">curvcoor sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cut"></a>
-<h3 class="section">6.32 Sample `<samp>cut</samp>`</h3>
-
-
-<p>Example of point cutting (<a href="#cut">cut</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-call 'prepare3d'
-subplot 2 2 0:title 'Cut on (default)':rotate 50 60:light on:box:surf a; zrange -1 0.5
-subplot 2 2 1:title 'Cut off':rotate 50 60:box:surf a; zrange -1 0.5; cut off
-subplot 2 2 2:title 'Cut in box':rotate 50 60:box:alpha on
-cut 0 -1 -1 1 0 1.1:surf3 c
-cut 0 0 0 0 0 0 # restore back
-subplot 2 2 3:title 'Cut by formula':rotate 50 60:box
-cut '(z>(x+0.5*y-1)^2-1) & (z>(x-0.5*y-1)^2-1)':surf3 c
-</pre>
-<div align="center"><img src="png/cut.png" alt="Sample cut">
-</div>
-<hr>
-<a name="dat_005fdiff-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dat_005fextra-sample" accesskey="n" rel="next">dat_extra sample</a>, Previous: <a href="#cut-sample" accesskey="p" rel="prev">cut sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dat_005fdiff"></a>
-<h3 class="section">6.33 Sample `<samp>dat_diff</samp>`</h3>
-
-
-<p>Example of <a href="#diff">diff</a> and <a href="#integrate">integrate</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">ranges 0 1 0 1 0 1:new a 30 40 'x*y'
-subplot 2 2 0:title 'a(x,y)':rotate 60 40:surf a:box
-subplot 2 2 1:title 'da/dx':rotate 60 40:diff a 'x':surf a:box
-subplot 2 2 2:title '\int da/dx dxdy':rotate 60 40:integrate a 'xy':surf a:box
-subplot 2 2 3:title '\int {d^2}a/dxdy dx':rotate 60 40:diff2 a 'y':surf a:box
-</pre>
-<div align="center"><img src="png/dat_diff.png" alt="Sample dat_diff">
-</div>
-<hr>
-<a name="dat_005fextra-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#data1-sample" accesskey="n" rel="next">data1 sample</a>, Previous: <a href="#dat_005fdiff-sample" accesskey="p" rel="prev">dat_diff sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dat_005fextra"></a>
-<h3 class="section">6.34 Sample `<samp>dat_extra</samp>`</h3>
-
-
-<p>Example of <a href="#envelop">envelop</a>, <a href="#sew">sew</a>, <a href="#smooth">smooth</a> and <a href="#resize">resize</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0 '':title 'Envelop sample':new d1 1000 'exp(-8*x^2)*sin(10*pi*x)'
-axis:plot d1 'b':envelop d1 'x':plot d1 'r'
-subplot 2 2 1 '':title 'Smooth sample':ranges 0 1 0 1
-new y0 30 '0.4*sin(pi*x) + 0.3*cos(1.5*pi*x) - 0.4*sin(2*pi*x)+0.5*rnd'
-copy y1 y0:smooth y1 'x3':plot y1 'r';legend '"3" style'
-copy y2 y0:smooth y2 'x5':plot y2 'g';legend '"5" style'
-copy y3 y0:smooth y3 'x':plot y3 'b';legend 'default'
-plot y0 '{m7}:s';legend 'none'
-legend:box
-subplot 2 2 2:title 'Sew sample':rotate 50 60:light on:alpha on
-new d2 100 100 'mod((y^2-(1-x)^2)/2,0.1)'
-box:surf d2 'b':sew d2 'xy' 0.1:surf d2 'r'
-subplot 2 2 3:title 'Resize sample (interpolation)'
-new x0 10 'rnd':new v0 10 'rnd'
-resize x1 x0 100:resize v1 v0 100
-plot x0 v0 'b+ ':plot x1 v1 'r-':label x0 v0 '%n'
-</pre>
-<div align="center"><img src="png/dat_extra.png" alt="Sample dat_extra">
-</div>
-<hr>
-<a name="data1-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#data2-sample" accesskey="n" rel="next">data2 sample</a>, Previous: <a href="#dat_005fextra-sample" accesskey="p" rel="prev">dat_extra sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-data1"></a>
-<h3 class="section">6.35 Sample `<samp>data1</samp>`</h3>
-
-
-
-
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 40 50 60 'exp(-x^2-4*y^2-16*z^2)'
-light on:alpha on
-copy b a:diff b 'x':subplot 5 3 0:call 'splot'
-copy b a:diff2 b 'x':subplot 5 3 1:call 'splot'
-copy b a:cumsum b 'x':subplot 5 3 2:call 'splot'
-copy b a:integrate b 'x':subplot 5 3 3:call 'splot'
-mirror b 'x':subplot 5 3 4:call 'splot'
-copy b a:diff b 'y':subplot 5 3 5:call 'splot'
-copy b a:diff2 b 'y':subplot 5 3 6:call 'splot'
-copy b a:cumsum b 'y':subplot 5 3 7:call 'splot'
-copy b a:integrate b 'y':subplot 5 3 8:call 'splot'
-mirror b 'y':subplot 5 3 9:call 'splot'
-copy b a:diff b 'z':subplot 5 3 10:call 'splot'
-copy b a:diff2 b 'z':subplot 5 3 11:call 'splot'
-copy b a:cumsum b 'z':subplot 5 3 12:call 'splot'
-copy b a:integrate b 'z':subplot 5 3 13:call 'splot'
-mirror b 'z':subplot 5 3 14:call 'splot'
-stop
-func splot 0
-title 'max=',b.max:norm b -1 1 on:rotate 70 60:box:surf3 b
-return
-</pre>
-<div align="center"><img src="png/data1.png" alt="Sample data1">
-</div>
-<hr>
-<a name="data2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dens-sample" accesskey="n" rel="next">dens sample</a>, Previous: <a href="#data1-sample" accesskey="p" rel="prev">data1 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-data2"></a>
-<h3 class="section">6.36 Sample `<samp>data2</samp>`</h3>
-
-
-
-
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 40 50 60 'exp(-x^2-4*y^2-16*z^2)'
-light on:alpha on
-copy b a:sinfft b 'x':subplot 5 3 0:call 'splot'
-copy b a:cosfft b 'x':subplot 5 3 1:call 'splot'
-copy b a:hankel b 'x':subplot 5 3 2:call 'splot'
-copy b a:swap b 'x':subplot 5 3 3:call 'splot'
-copy b a:smooth b 'x':subplot 5 3 4:call 'splot'
-copy b a:sinfft b 'y':subplot 5 3 5:call 'splot'
-copy b a:cosfft b 'y':subplot 5 3 6:call 'splot'
-copy b a:hankel b 'y':subplot 5 3 7:call 'splot'
-copy b a:swap b 'y':subplot 5 3 8:call 'splot'
-copy b a:smooth b 'y':subplot 5 3 9:call 'splot'
-copy b a:sinfft b 'z':subplot 5 3 10:call 'splot'
-copy b a:cosfft b 'z':subplot 5 3 11:call 'splot'
-copy b a:hankel b 'z':subplot 5 3 12:call 'splot'
-copy b a:swap b 'z':subplot 5 3 13:call 'splot'
-copy b a:smooth b 'z':subplot 5 3 14:call 'splot'
-stop
-func splot 0
-title 'max=',b.max:norm b -1 1 on:rotate 70 60:box
-surf3 b 0.5:surf3 b -0.5
-return
-</pre>
-<div align="center"><img src="png/data2.png" alt="Sample data2">
-</div>
-<hr>
-<a name="dens-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dens3-sample" accesskey="n" rel="next">dens3 sample</a>, Previous: <a href="#data2-sample" accesskey="p" rel="prev">data2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dens"></a>
-<h3 class="section">6.37 Sample `<samp>dens</samp>`</h3>
-
-
-<p>Function <a href="#dens">dens</a> draw density plot (also known as color-map) for surface.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-new a1 30 40 3 '0.6*sin(2*pi*x+pi*(z+1)/2)*sin(3*pi*y+pi*z) + 0.4*cos(3*pi*(x*y)+pi*(z+1)^2/2)'
-subplot 2 2 0 '':title 'Dens plot (default)':box:dens a
-subplot 2 2 1:title '3d variant':rotate 50 60:box:dens a
-subplot 2 2 2 '':title '"\#" style; meshnum 10':box:dens a '#'; meshnum 10
-subplot 2 2 3:title 'several slices':rotate 50 60:box:dens a1
-</pre>
-<div align="center"><img src="png/dens.png" alt="Sample dens">
-</div>
-<hr>
-<a name="dens3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dens_005fxyz-sample" accesskey="n" rel="next">dens_xyz sample</a>, Previous: <a href="#dens-sample" accesskey="p" rel="prev">dens sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dens3"></a>
-<h3 class="section">6.38 Sample `<samp>dens3</samp>`</h3>
-
-
-<p>Function <a href="#dens3">dens3</a> draw ordinary density plots but at slices of 3D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Dens3 sample':rotate 50 60:alpha on:alphadef 0.7
-origin 0 0 0:box:axis '_xyz'
-dens3 c 'x':dens3 c ':y':dens3 c 'z'
-</pre>
-<div align="center"><img src="png/dens3.png" alt="Sample dens3">
-</div>
-<hr>
-<a name="dens_005fxyz-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#detect-sample" accesskey="n" rel="next">detect sample</a>, Previous: <a href="#dens3-sample" accesskey="p" rel="prev">dens3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dens_005fxyz"></a>
-<h3 class="section">6.39 Sample `<samp>dens_xyz</samp>`</h3>
-
-
-<p>Functions <a href="#densz">densz</a>, <a href="#densy">densy</a>, <a href="#densx">densx</a> draw density plot on plane perpendicular to corresponding axis. One of possible application is drawing projections of 3D field.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Dens[XYZ] sample':rotate 50 60:box
-densx {sum c 'x'} '' -1:densy {sum c 'y'} '' 1:densz {sum c 'z'} '' -1
-</pre>
-<div align="center"><img src="png/dens_xyz.png" alt="Sample dens_xyz">
-</div>
-<hr>
-<a name="detect-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dew-sample" accesskey="n" rel="next">dew sample</a>, Previous: <a href="#dens_005fxyz-sample" accesskey="p" rel="prev">dens_xyz sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-detect"></a>
-<h3 class="section">6.40 Sample `<samp>detect</samp>`</h3>
-
-
-<p>Example of curve <a href="#detect">detect</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '':title 'Detect sample'
-new a 200 100 'exp(-30*(y-0.5*sin(pi*x))^2-rnd/10)+exp(-30*(y+0.5*sin(pi*x))^2-rnd/10)+exp(-30*(x+y)^2-rnd/10)'
-ranges 0 a.nx 0 a.ny:box
-alpha on:crange a:dens a
-
-detect r a 0.1 5
-plot r(0) r(1) '.'
-</pre>
-<div align="center"><img src="png/detect.png" alt="Sample detect">
-</div>
-<hr>
-<a name="dew-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#diffract-sample" accesskey="n" rel="next">diffract sample</a>, Previous: <a href="#detect-sample" accesskey="p" rel="prev">detect sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dew"></a>
-<h3 class="section">6.41 Sample `<samp>dew</samp>`</h3>
-
-
-<p>Function <a href="#dew">dew</a> is similar to <a href="#vect">vect</a> but use drops instead of arrows.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2v'
-subplot 1 1 0 '':title 'Dew plot':light on:box:dew a b
-</pre>
-<div align="center"><img src="png/dew.png" alt="Sample dew">
-</div>
-<hr>
-<a name="diffract-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dilate-sample" accesskey="n" rel="next">dilate sample</a>, Previous: <a href="#dew-sample" accesskey="p" rel="prev">dew sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-diffract"></a>
-<h3 class="section">6.42 Sample `<samp>diffract</samp>`</h3>
-
-
-
-
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">define n 32 #number of points
-define m 20 # number of iterations
-define dt 0.01 # time step
-new res n m+1
-ranges -1 1 0 m*dt 0 1
-
-#tridmat periodic variant
-new !a n 'i',dt*(n/2)^2/2
-copy !b !(1-2*a)
-
-new !u n 'exp(-6*x^2)'
-put res u all 0
-for $i 0 m
-tridmat u a b a u 'xdc'
-put res u all $i+1
-next
-subplot 2 2 0 '<_':title 'Tridmat, periodic b.c.'
-axis:box:dens res
-
-#fourier variant
-new k n:fillsample k 'xk'
-copy !e !exp(-i1*dt*k^2)
-
-new !u n 'exp(-6*x^2)'
-put res u all 0
-for $i 0 m
-fourier u 'x'
-multo u e
-fourier u 'ix'
-put res u all $i+1
-next
-subplot 2 2 1 '<_':title 'Fourier method'
-axis:box:dens res
-
-#tridmat zero variant
-new !u n 'exp(-6*x^2)'
-put res u all 0
-for $i 0 m
-tridmat u a b a u 'xd'
-put res u all $i+1
-next
-subplot 2 2 2 '<_':title 'Tridmat, zero b.c.'
-axis:box:dens res
-
-#diffract exp variant
-new !u n 'exp(-6*x^2)'
-define q dt*(n/2)^2/8 # need q<0.4 !!!
-put res u all 0
-for $i 0 m
-for $j 1 8 # due to smaller dt
-diffract u 'xe' q
-next
-put res u all $i+1
-next
-subplot 2 2 3 '<_':title 'Diffract, exp b.c.'
-axis:box:dens res
-</pre>
-<div align="center"><img src="png/diffract.png" alt="Sample diffract">
-</div>
-<hr>
-<a name="dilate-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dots-sample" accesskey="n" rel="next">dots sample</a>, Previous: <a href="#diffract-sample" accesskey="p" rel="prev">diffract sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dilate"></a>
-<h3 class="section">6.43 Sample `<samp>dilate</samp>`</h3>
-
-
-<p>Example of <a href="#dilate">dilate</a> and <a href="#erode">erode</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0:title 'Dilate&Erode 1D sample'
-new y 11:put y 1 5
-ranges 0 10 0 1:axis:box
-plot y 'b*'
-dilate y 0.5 2
-plot y 'rs'
-erode y 0.5 1
-plot y 'g#o'
-
-subplot 2 2 1:title 'Dilate&Erode 2D sample':rotate 40 60
-ranges 0 10 0 10 0 3
-axis:box
-new z 11 11:put z 3 5 5
-boxs z 'b':boxs z 'k#'
-dilate z 1 2
-boxs z 'r':boxs z 'k#'
-erode z 1 1
-boxs 2*z 'g':boxs 2*z 'k#'
-
-subplot 2 2 2
-text 0.5 0.7 'initial' 'ba';size -2
-text 0.5 0.5 'dilate=2' 'ra';size -2
-text 0.5 0.3 'erode=1' 'ga';size -2
-
-subplot 2 2 3:title 'Dilate&Erode 3D sample'
-rotate 60 50:light on:alpha on
-ranges 0 10 0 10 0 10:crange 0 3
-axis:box
-new a 11 11 11:put a 3 5 5 5
-surf3a a a 1.5 'b'
-dilate a 1 2
-surf3a a a 0.5 'r'
-erode a 1 1
-surf3a 2*a 2*a 1 'g'
-</pre>
-<div align="center"><img src="png/dilate.png" alt="Sample dilate">
-</div>
-<hr>
-<a name="dots-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#earth-sample" accesskey="n" rel="next">earth sample</a>, Previous: <a href="#dilate-sample" accesskey="p" rel="prev">dilate sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dots"></a>
-<h3 class="section">6.44 Sample `<samp>dots</samp>`</h3>
-
-
-<p>Function <a href="#dots">dots</a> is another way to draw irregular points. <code>Dots</code> use color scheme for coloring (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new t 2000 'pi*(rnd-0.5)':new f 2000 '2*pi*rnd'
-copy x 0.9*cos(t)*cos(f):copy y 0.9*cos(t)*sin(f):copy z 0.6*sin(t):copy c cos(2*t)
-subplot 2 2 0:title 'Dots sample':rotate 50 60
-box:dots x y z
-alpha on
-subplot 2 2 1:title 'add transparency':rotate 50 60
-box:dots x y z c
-subplot 2 2 2:title 'add colorings':rotate 50 60
-box:dots x y z x c
-subplot 2 2 3:title 'Only coloring':rotate 50 60
-box:tens x y z x ' .'
-</pre>
-<div align="center"><img src="png/dots.png" alt="Sample dots">
-</div>
-<hr>
-<a name="earth-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#error-sample" accesskey="n" rel="next">error sample</a>, Previous: <a href="#dots-sample" accesskey="p" rel="prev">dots sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-earth"></a>
-<h3 class="section">6.45 Sample `<samp>earth</samp>`</h3>
-
-
-<p>Example of Earth map by using <a href="#import">import</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">import dat 'Equirectangular-projection.jpg' 'BbGYw' -1 1
-subplot 1 1 0 '<>':title 'Earth in 3D':rotate 40 60
-copy phi dat 'pi*x':copy tet dat 'pi*y/2'
-copy x cos(tet)*cos(phi)
-copy y cos(tet)*sin(phi)
-copy z sin(tet)
-
-light on
-surfc x y z dat 'BbGYw'
-contp [-0.51,-0.51] x y z dat 'y'
-</pre>
-<div align="center"><img src="png/earth.png" alt="Sample earth">
-</div>
-<hr>
-<a name="error-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#error2-sample" accesskey="n" rel="next">error2 sample</a>, Previous: <a href="#earth-sample" accesskey="p" rel="prev">earth sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-error"></a>
-<h3 class="section">6.46 Sample `<samp>error</samp>`</h3>
-
-
-<p>Function <a href="#error">error</a> draw error boxes around the points. You can draw default boxes or semi-transparent symbol (like marker, see <a href="#Line-styles">Line styles</a>). Also you can set individual color for each box. See also <a href="#error2-sample">error2 sample</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-new y 50 '0.7*sin(pi*x-pi) + 0.5*cos(3*pi*(x+1)/2) + 0.2*sin(pi*(x+1)/2)'
-new x0 10 'x + 0.1*rnd-0.05':new ex 10 '0.1':new ey 10 '0.2'
-new y0 10 '0.7*sin(pi*x-pi) + 0.5*cos(3*pi*(x+1)/2) + 0.2*sin(pi*(x+1)/2) + 0.2*rnd-0.1'
-subplot 2 2 0 '':title 'Error plot (default)':box:plot y:error x0 y0 ex ey 'k'
-subplot 2 2 1 '':title '"!" style; no e_x':box:plot y:error x0 y0 ey 'o!rgb'
-subplot 2 2 2 '':title '"\@" style':alpha on:box:plot y:error x0 y0 ex ey '@'; alpha 0.5
-subplot 2 2 3:title '3d variant':rotate 50 60:axis
-for $1 0 9
- errbox 2*rnd-1 2*rnd-1 2*rnd-1 0.2 0.2 0.2 'bo'
-next
-</pre>
-<div align="center"><img src="png/error.png" alt="Sample error">
-</div>
-<hr>
-<a name="error2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#export-sample" accesskey="n" rel="next">export sample</a>, Previous: <a href="#error-sample" accesskey="p" rel="prev">error sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-error2"></a>
-<h3 class="section">6.47 Sample `<samp>error2</samp>`</h3>
-
-
-<p>Example of <a href="#error">error</a> kinds.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x0 10 'rnd':new ex 10 '0.1'
-new y0 10 'rnd':new ey 10 '0.1'
-ranges 0 1 0 1
-subplot 4 3 0 '':box:error x0 y0 ex ey '#+@'
-subplot 4 3 1 '':box:error x0 y0 ex ey '#x@'
-subplot 4 3 2 '':box:error x0 y0 ex ey '#s@'; alpha 0.5
-subplot 4 3 3 '':box:error x0 y0 ex ey 's@'
-subplot 4 3 4 '':box:error x0 y0 ex ey 'd@'
-subplot 4 3 5 '':box:error x0 y0 ex ey '#d@'; alpha 0.5
-subplot 4 3 6 '':box:error x0 y0 ex ey '+@'
-subplot 4 3 7 '':box:error x0 y0 ex ey 'x@'
-subplot 4 3 8 '':box:error x0 y0 ex ey 'o@'
-subplot 4 3 9 '':box:error x0 y0 ex ey '#o@'; alpha 0.5
-subplot 4 3 10 '':box:error x0 y0 ex ey '#.@'
-subplot 4 3 11 '':box:error x0 y0 ex ey; alpha 0.5
-</pre>
-<div align="center"><img src="png/error2.png" alt="Sample error2">
-</div>
-<hr>
-<a name="export-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#fall-sample" accesskey="n" rel="next">fall sample</a>, Previous: <a href="#error2-sample" accesskey="p" rel="prev">error2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-export"></a>
-<h3 class="section">6.48 Sample `<samp>export</samp>`</h3>
-
-
-<p>Example of data <a href="#export">export</a> and <a href="#import">import</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 100 100 'x^2*y':new b 100 100
-export a 'test_data.png' 'BbcyrR' -1 1
-import b 'test_data.png' 'BbcyrR' -1 1
-subplot 2 1 0 '':title 'initial':box:dens a
-subplot 2 1 1 '':title 'imported':box:dens b
-</pre>
-<div align="center"><img src="png/export.png" alt="Sample export">
-</div>
-<hr>
-<a name="fall-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#fexport-sample" accesskey="n" rel="next">fexport sample</a>, Previous: <a href="#export-sample" accesskey="p" rel="prev">export sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-fall"></a>
-<h3 class="section">6.49 Sample `<samp>fall</samp>`</h3>
-
-
-<p>Function <a href="#fall">fall</a> draw waterfall surface. You can use <a href="#meshnum">meshnum</a> for changing number of lines to be drawn. Also you can use `<samp>x</samp>` style for drawing lines in other direction.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Fall plot':rotate 50 60:box:fall a
-</pre>
-<div align="center"><img src="png/fall.png" alt="Sample fall">
-</div>
-<hr>
-<a name="fexport-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#fit-sample" accesskey="n" rel="next">fit sample</a>, Previous: <a href="#fall-sample" accesskey="p" rel="prev">fall sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-fexport"></a>
-<h3 class="section">6.50 Sample `<samp>fexport</samp>`</h3>
-
-
-<p>Example of <a href="#write">write</a> to different file formats.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-write 'fexport.jpg':#write 'fexport.png'
-write 'fexport.bmp':write 'fexport.tga'
-write 'fexport.eps':write 'fexport.svg'
-write 'fexport.gif':write 'fexport.xyz'
-write 'fexport.stl':write 'fexport.off'
-write 'fexport.tex':write 'fexport.obj'
-write 'fexport.prc':write 'fexport.json'
-write 'fexport.mgld'
-</pre>
-<div align="center"><img src="png/fexport.png" alt="Sample fexport">
-</div>
-<hr>
-<a name="fit-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#flame2d-sample" accesskey="n" rel="next">flame2d sample</a>, Previous: <a href="#fexport-sample" accesskey="p" rel="prev">fexport sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-fit"></a>
-<h3 class="section">6.51 Sample `<samp>fit</samp>`</h3>
-
-
-<p>Example of nonlinear <a href="#fit">fit</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new dat 100 '0.4*rnd+0.1+sin(2*pi*x)'
-new in 100 '0.3+sin(2*pi*x)'
-list ini 1 1 3:fit res dat 'a+b*sin(c*x)' 'abc' ini
-title 'Fitting sample':yrange -2 2:box:axis:plot dat 'k. '
-plot res 'r':plot in 'b'
-text -0.9 -1.3 'fitted:' 'r:L'
-putsfit 0 -1.8 'y = ' 'r':text 0 2.2 'initial: y = 0.3+sin(2\pi x)' 'b'
-</pre>
-<div align="center"><img src="png/fit.png" alt="Sample fit">
-</div>
-<hr>
-<a name="flame2d-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#flow-sample" accesskey="n" rel="next">flow sample</a>, Previous: <a href="#fit-sample" accesskey="p" rel="prev">fit sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-flame2d"></a>
-<h3 class="section">6.52 Sample `<samp>flame2d</samp>`</h3>
-
-
-<p>Function <a href="#flame2d">flame2d</a> generate points for flame fractals in 2d case.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">list A [0.33,0,0,0.33,0,0,0.2] [0.33,0,0,0.33,0.67,0,0.2] [0.33,0,0,0.33,0.33,0.33,0.2]\
- [0.33,0,0,0.33,0,0.67,0.2] [0.33,0,0,0.33,0.67,0.67,0.2]
-new B 2 3 A.ny '0.3'
-put B 3 0 0 -1
-put B 3 0 1 -1
-put B 3 0 2 -1
-flame2d fx fy A B 1000000
-subplot 1 1 0 '<_':title 'Flame2d sample'
-ranges fx fy:box:axis
-plot fx fy 'r#o ';size 0.05
-</pre>
-<div align="center"><img src="png/flame2d.png" alt="Sample flame2d">
-</div>
-<hr>
-<a name="flow-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#flow3-sample" accesskey="n" rel="next">flow3 sample</a>, Previous: <a href="#flame2d-sample" accesskey="p" rel="prev">flame2d sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-flow"></a>
-<h3 class="section">6.53 Sample `<samp>flow</samp>`</h3>
-
-
-<p>Function <a href="#flow">flow</a> is another standard way to visualize vector fields - it draw lines (threads) which is tangent to local vector field direction. MathGL draw threads from edges of bounding box and from central slices. Sometimes it is not most appropriate variant - you may want to use <code>flowp</code> to specify manual position of threads. The color scheme is used for coloring (see <a href="#Color-scheme">Color scheme</a>). At this warm color corresponds to normal flow (like attractor), cold one corresponds to inverse flow (like source).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2v'
-call 'prepare3v'
-subplot 2 2 0 '':title 'Flow plot (default)':box:flow a b
-subplot 2 2 1 '':title '"v" style':box:flow a b 'v'
-subplot 2 2 2 '':title '"#" and "." styles':box:flow a b '#':flow a b '.2k'
-subplot 2 2 3:title '3d variant':rotate 50 60:box:flow ex ey ez
-</pre>
-<div align="center"><img src="png/flow.png" alt="Sample flow">
-</div>
-<hr>
-<a name="flow3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#fog-sample" accesskey="n" rel="next">fog sample</a>, Previous: <a href="#flow-sample" accesskey="p" rel="prev">flow sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-flow3"></a>
-<h3 class="section">6.54 Sample `<samp>flow3</samp>`</h3>
-
-
-<p>Function <a href="#flow3">flow3</a> draw flow threads, which start from given plane.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3v'
-subplot 2 2 0:title 'Flow3 plot (default)':rotate 50 60:box
-flow3 ex ey ez
-subplot 2 2 1:title '"v" style, from boundary':rotate 50 60:box
-flow3 ex ey ez 'v' 0
-subplot 2 2 2:title '"t" style':rotate 50 60:box
-flow3 ex ey ez 't' 0
-subplot 2 2 3:title 'from \i z planes':rotate 50 60:box
-flow3 ex ey ez 'z' 0
-flow3 ex ey ez 'z' 9
-</pre>
-<div align="center"><img src="png/flow3.png" alt="Sample flow3">
-</div>
-<hr>
-<a name="fog-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#fonts-sample" accesskey="n" rel="next">fonts sample</a>, Previous: <a href="#flow3-sample" accesskey="p" rel="prev">flow3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-fog"></a>
-<h3 class="section">6.55 Sample `<samp>fog</samp>`</h3>
-
-
-<p>Example of <a href="#fog">fog</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Fog sample':rotate 50 60:light on:fog 1
-box:surf a:cont a 'y'
-</pre>
-<div align="center"><img src="png/fog.png" alt="Sample fog">
-</div>
-<hr>
-<a name="fonts-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#grad-sample" accesskey="n" rel="next">grad sample</a>, Previous: <a href="#fog-sample" accesskey="p" rel="prev">fog sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-fonts"></a>
-<h3 class="section">6.56 Sample `<samp>fonts</samp>`</h3>
-
-
-<p>Example of <a href="#font">font</a> typefaces.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">define d 0.25
-loadfont 'STIX':text 0 1.1 'default font (STIX)'
-loadfont 'adventor':text 0 1.1-d 'adventor font'
-loadfont 'bonum':text 0 1.1-2*d 'bonum font'
-loadfont 'chorus':text 0 1.1-3*d 'chorus font'
-loadfont 'cursor':text 0 1.1-4*d 'cursor font'
-loadfont 'heros':text 0 1.1-5*d 'heros font'
-loadfont 'heroscn':text 0 1.1-6*d 'heroscn font'
-loadfont 'pagella':text 0 1.1-7*d 'pagella font'
-loadfont 'schola':text 0 1.1-8*d 'schola font'
-loadfont 'termes':text 0 1.1-9*d 'termes font'
-loadfont ''
-</pre>
-<div align="center"><img src="png/fonts.png" alt="Sample fonts">
-</div>
-<hr>
-<a name="grad-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#hist-sample" accesskey="n" rel="next">hist sample</a>, Previous: <a href="#fonts-sample" accesskey="p" rel="prev">fonts sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-grad"></a>
-<h3 class="section">6.57 Sample `<samp>grad</samp>`</h3>
-
-
-<p>Function <a href="#grad">grad</a> draw gradient lines for matrix.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-subplot 1 1 0 '':title 'Grad plot':box:grad a:dens a '{u8}w{q8}'
-</pre>
-<div align="center"><img src="png/grad.png" alt="Sample grad">
-</div>
-<hr>
-<a name="hist-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ifs2d-sample" accesskey="n" rel="next">ifs2d sample</a>, Previous: <a href="#grad-sample" accesskey="p" rel="prev">grad sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-hist"></a>
-<h3 class="section">6.58 Sample `<samp>hist</samp>`</h3>
-
-
-<p>Example of <a href="#hist">hist</a> (histogram).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 10000 '2*rnd-1':new y 10000 '2*rnd-1':copy z exp(-6*(x^2+y^2))
-hist xx x z:norm xx 0 1:hist yy y z:norm yy 0 1
-multiplot 3 3 3 2 2 '':ranges -1 1 -1 1 0 1:box:dots x y z 'wyrRk'
-multiplot 3 3 0 2 1 '':ranges -1 1 0 1:box:bars xx
-multiplot 3 3 5 1 2 '':ranges 0 1 -1 1:box:barh yy
-subplot 3 3 2:text 0.5 0.5 'Hist and\n{}MultiPlot\n{}sample' 'a' -3
-</pre>
-<div align="center"><img src="png/hist.png" alt="Sample hist">
-</div>
-<hr>
-<a name="ifs2d-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ifs3d-sample" accesskey="n" rel="next">ifs3d sample</a>, Previous: <a href="#hist-sample" accesskey="p" rel="prev">hist sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ifs2d"></a>
-<h3 class="section">6.59 Sample `<samp>ifs2d</samp>`</h3>
-
-
-<p>Function <a href="#ifs2d">ifs2d</a> generate points for fractals using iterated function system in 2d case.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">list A [0.33,0,0,0.33,0,0,0.2] [0.33,0,0,0.33,0.67,0,0.2] [0.33,0,0,0.33,0.33,0.33,0.2]\
- [0.33,0,0,0.33,0,0.67,0.2] [0.33,0,0,0.33,0.67,0.67,0.2]
-ifs2d fx fy A 100000
-subplot 1 1 0 '<_':title 'IFS 2d sample'
-ranges fx fy:axis
-plot fx fy 'r#o ';size 0.05
-</pre>
-<div align="center"><img src="png/ifs2d.png" alt="Sample ifs2d">
-</div>
-<hr>
-<a name="ifs3d-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#indirect-sample" accesskey="n" rel="next">indirect sample</a>, Previous: <a href="#ifs2d-sample" accesskey="p" rel="prev">ifs2d sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ifs3d"></a>
-<h3 class="section">6.60 Sample `<samp>ifs3d</samp>`</h3>
-
-
-<p>Function <a href="#ifs3d">ifs3d</a> generate points for fractals using iterated function system in 3d case.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">list A [0,0,0,0,.18,0,0,0,0,0,0,0,.01] [.85,0,0,0,.85,.1,0,-0.1,0.85,0,1.6,0,.85]\
- [.2,-.2,0,.2,.2,0,0,0,0.3,0,0.8,0,.07] [-.2,.2,0,.2,.2,0,0,0,0.3,0,0.8,0,.07]
-ifs3d f A 100000
-title 'IFS 3d sample':rotate 50 60
-ranges f(0) f(1) f(2):axis:box
-dots f(0) f(1) f(2) 'G#o';size 0.05
-</pre>
-<div align="center"><img src="png/ifs3d.png" alt="Sample ifs3d">
-</div>
-<hr>
-<a name="indirect-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#inplot-sample" accesskey="n" rel="next">inplot sample</a>, Previous: <a href="#ifs3d-sample" accesskey="p" rel="prev">ifs3d sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-indirect"></a>
-<h3 class="section">6.61 Sample `<samp>indirect</samp>`</h3>
-
-
-<p>Comparison of <a href="#subdata">subdata</a> vs <a href="#evaluate">evaluate</a>/
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '':title 'SubData vs Evaluate'
-new in 9 'x^3/1.1':plot in 'ko ':box
-new arg 99 '4*x+4'
-evaluate e in arg off:plot e 'b.'; legend 'Evaluate'
-subdata s in arg:plot s 'r.';legend 'SubData'
-legend 2
-</pre>
-<div align="center"><img src="png/indirect.png" alt="Sample indirect">
-</div>
-<hr>
-<a name="inplot-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#iris-sample" accesskey="n" rel="next">iris sample</a>, Previous: <a href="#indirect-sample" accesskey="p" rel="prev">indirect sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-inplot"></a>
-<h3 class="section">6.62 Sample `<samp>inplot</samp>`</h3>
-
-
-<p>Example of <a href="#inplot">inplot</a>, <a href="#multiplot">multiplot</a>, <a href="#columnplot">columnplot</a>, <a href="#gridplot">gridplot</a>, <a href="#shearplot">shearplot</a>, <a href="#stickplot">stickplot</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 3 2 0:title 'StickPlot'
-stickplot 3 0 20 30:box 'r':text 0 0 0 '0' 'r'
-stickplot 3 1 20 30:box 'g':text 0 0 0 '1' 'g'
-stickplot 3 2 20 30:box 'b':text 0 9 0 '2' 'b'
-subplot 3 2 3 '':title 'ColumnPlot'
-columnplot 3 0:box 'r':text 0 0 '0' 'r'
-columnplot 3 1:box 'g':text 0 0 '1' 'g'
-columnplot 3 2:box 'b':text 0 0 '2' 'b'
-subplot 3 2 4 '':title 'GridPlot'
-gridplot 2 2 0:box 'r':text 0 0 '0' 'r'
-gridplot 2 2 1:box 'g':text 0 0 '1' 'g'
-gridplot 2 2 2:box 'b':text 0 0 '2' 'b'
-gridplot 2 2 3:box 'm':text 0 0 '3' 'm'
-subplot 3 2 5 '':title 'InPlot':box
-inplot 0.4 1 0.6 1 on:box 'r'
-multiplot 3 2 1 2 1 '':title 'MultiPlot and ShearPlot':box
-shearplot 3 0 0.2 0.1:box 'r':text 0 0 '0' 'r'
-shearplot 3 1 0.2 0.1:box 'g':text 0 0 '1' 'g'
-shearplot 3 2 0.2 0.1:box 'b':text 0 0 '2' 'b'
-</pre>
-<div align="center"><img src="png/inplot.png" alt="Sample inplot">
-</div>
-<hr>
-<a name="iris-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#label-sample" accesskey="n" rel="next">label sample</a>, Previous: <a href="#inplot-sample" accesskey="p" rel="prev">inplot sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-iris"></a>
-<h3 class="section">6.63 Sample `<samp>iris</samp>`</h3>
-
-
-<p>Function <a href="#iris">iris</a> draw Iris plot for columns of data array.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">read a 'iris.dat'
-crop a 0 4 'x':rearrange a a.nx 50
-subplot 1 1 0 '':title 'Iris plot'
-iris a 'sepal\n length;sepal\n width;petal\n length;petal\n width' '. ';value -1.5;size -2
-</pre>
-<div align="center"><img src="png/iris.png" alt="Sample iris">
-</div>
-<hr>
-<a name="label-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#lamerey-sample" accesskey="n" rel="next">lamerey sample</a>, Previous: <a href="#iris-sample" accesskey="p" rel="prev">iris sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-label"></a>
-<h3 class="section">6.64 Sample `<samp>label</samp>`</h3>
-
-
-<p>Function <a href="#label">label</a> print text at data points. The string may contain `<samp>%x</samp>`, `<samp>%y</samp>`, `<samp>%z</samp>` for x-, y-, z-coordinates of points, `<samp>%n</samp>` for point index.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ys 10 '0.2*rnd-0.8*sin(pi*x)'
-subplot 1 1 0 '':title 'Label plot':box:plot ys ' *':label ys 'y=%y'
-</pre>
-<div align="center"><img src="png/label.png" alt="Sample label">
-</div>
-<hr>
-<a name="lamerey-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#legend-sample" accesskey="n" rel="next">legend sample</a>, Previous: <a href="#label-sample" accesskey="p" rel="prev">label sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-lamerey"></a>
-<h3 class="section">6.65 Sample `<samp>lamerey</samp>`</h3>
-
-
-<p>Function <a href="#lamerey">lamerey</a> draw Lamerey diagram.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Lamerey sample'
-axis:xlabel '\i x':ylabel '\bar{\i x} = 2 \i{x}'
-fplot 'x' 'k='
-fplot '2*x' 'b'
-lamerey 0.00097 '2*x' 'rv~';size 2
-lamerey -0.00097 '2*x' 'rv~';size 2
-</pre>
-<div align="center"><img src="png/lamerey.png" alt="Sample lamerey">
-</div>
-<hr>
-<a name="legend-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#light-sample" accesskey="n" rel="next">light sample</a>, Previous: <a href="#lamerey-sample" accesskey="p" rel="prev">lamerey sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-legend"></a>
-<h3 class="section">6.66 Sample `<samp>legend</samp>`</h3>
-
-
-<p>Example of <a href="#legend">legend</a> styles.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">addlegend 'sin(\pi {x^2})' 'b':addlegend 'sin(\pi x)' 'g*'
-addlegend 'sin(\pi \sqrt{x})' 'rd':addlegend 'jsut text' ' ':addlegend 'no indent for this' ''
-subplot 2 2 0 '':title 'Legend (default)':box:legend
-legend 1 0.5 '^':text 0.49 0.88 'Style "\^"' 'A:L'
-legend 3 'A#':text 0.75 0.65 'Absolute position' 'A'
-subplot 2 2 2 '':title 'coloring':box:legend 0 'r#':legend 1 'Wb#':legend 2 'ygr#'
-subplot 2 2 3 '':title 'manual position':box
-legend 0.5 1:text 0.5 0.5 'at x=0.5, y=1' 'a'
-legend 1 '#-':text 0.75 0.25 'Horizontal legend' 'a'
-</pre>
-<div align="center"><img src="png/legend.png" alt="Sample legend">
-</div>
-<hr>
-<a name="light-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#loglog-sample" accesskey="n" rel="next">loglog sample</a>, Previous: <a href="#legend-sample" accesskey="p" rel="prev">legend sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-light"></a>
-<h3 class="section">6.67 Sample `<samp>light</samp>`</h3>
-
-
-<p>Example of <a href="#light">light</a> with different types.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">light on:attachlight on
-call 'prepare2d'
-subplot 2 2 0:title 'Default':rotate 50 60:box:surf a
-line -1 -0.7 1.7 -1 -0.7 0.7 'BA'
-
-subplot 2 2 1:title 'Local':rotate 50 60
-light 0 1 0 1 -2 -1 -1
-line 1 0 1 -1 -1 0 'BAO':box:surf a
-
-subplot 2 2 2:title 'no diffuse':rotate 50 60
-diffuse 0
-line 1 0 1 -1 -1 0 'BAO':box:surf a
-
-subplot 2 2 3:title 'diffusive only':rotate 50 60
-diffuse 0.5:light 0 1 0 1 -2 -1 -1 'w' 0
-line 1 0 1 -1 -1 0 'BAO':box:surf a
-</pre>
-<div align="center"><img src="png/light.png" alt="Sample light">
-</div>
-<hr>
-<a name="loglog-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#map-sample" accesskey="n" rel="next">map sample</a>, Previous: <a href="#light-sample" accesskey="p" rel="prev">light sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-loglog"></a>
-<h3 class="section">6.68 Sample `<samp>loglog</samp>`</h3>
-
-
-<p>Example of log- and log-log- axis labels.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0 '<_':title 'Semi-log axis':ranges 0.01 100 -1 1:axis 'lg(x)' '' ''
-axis:grid 'xy' 'g':fplot 'sin(1/x)':xlabel 'x' 0:ylabel 'y = sin 1/x' 0
-subplot 2 2 1 '<_':title 'Log-log axis':ranges 0.01 100 0.1 100:axis 'lg(x)' 'lg(y)' ''
-axis:grid '!' 'h=':grid:fplot 'sqrt(1+x^2)'
-xlabel 'x' 0:ylabel 'y = \sqrt{1+x^2}' 0
-subplot 2 2 2 '<_':title 'Minus-log axis':ranges -100 -0.01 -100 -0.1:axis '-lg(-x)' '-lg(-y)' ''
-axis:fplot '-sqrt(1+x^2)':xlabel 'x' 0:ylabel 'y = -\sqrt{1+x^2}' 0
-subplot 2 2 3 '<_':title 'Log-ticks':ranges 0.01 100 0 100:axis 'sqrt(x)' '' ''
-axis:fplot 'x':xlabel 'x' 1:ylabel 'y = x' 0
-</pre>
-<div align="center"><img src="png/loglog.png" alt="Sample loglog">
-</div>
-<hr>
-<a name="map-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#mark-sample" accesskey="n" rel="next">mark sample</a>, Previous: <a href="#loglog-sample" accesskey="p" rel="prev">loglog sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-map"></a>
-<h3 class="section">6.69 Sample `<samp>map</samp>`</h3>
-
-
-<p>Example of <a href="#map">map</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 50 40 'x':new b 50 40 'y':zrange -2 2:text 0 0 '\to'
-subplot 2 1 0:text 0 1.1 '\{x, y\}' '' -2:box:map a b 'brgk'
-subplot 2 1 1:text 0 1.1 '\{\frac{x^3+y^3}{2}, \frac{x-y}{2}\}' '' -2
-box:fill a '(x^3+y^3)/2':fill b '(x-y)/2':map a b 'brgk'
-</pre>
-<div align="center"><img src="png/map.png" alt="Sample map">
-</div>
-<hr>
-<a name="mark-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#mask-sample" accesskey="n" rel="next">mask sample</a>, Previous: <a href="#map-sample" accesskey="p" rel="prev">map sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-mark"></a>
-<h3 class="section">6.70 Sample `<samp>mark</samp>`</h3>
-
-
-<p>Example of <a href="#mark">mark</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 1 1 0 '':title 'Mark plot (default)':box:mark y y1 's'
-</pre>
-<div align="center"><img src="png/mark.png" alt="Sample mark">
-</div>
-<hr>
-<a name="mask-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#mesh-sample" accesskey="n" rel="next">mesh sample</a>, Previous: <a href="#mark-sample" accesskey="p" rel="prev">mark sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-mask"></a>
-<h3 class="section">6.71 Sample `<samp>mask</samp>`</h3>
-
-
-<p>Example of <a href="#mask">mask</a> kinds.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 10 10 'x'
-subplot 5 4 0 '':title '"-" mask':dens a '3-'
-subplot 5 4 1 '':title '"+" mask':dens a '3+'
-subplot 5 4 2 '':title '"=" mask':dens a '3='
-subplot 5 4 3 '':title '";" mask':dens a '3;'
-subplot 5 4 4 '':title '";I" mask':dens a '3;I'
-subplot 5 4 5 '':title '"o" mask':dens a '3o'
-subplot 5 4 6 '':title '"O" mask':dens a '3O'
-subplot 5 4 7 '':title '"s" mask':dens a '3s'
-subplot 5 4 8 '':title '"S" mask':dens a '3S'
-subplot 5 4 9 '':title '";/" mask':dens a '3;/'
-subplot 5 4 10 '':title '"~" mask':dens a '3~'
-subplot 5 4 11 '':title '"<" mask':dens a '3<'
-subplot 5 4 12 '':title '">" mask':dens a '3>'
-subplot 5 4 13 '':title '"j" mask':dens a '3j'
-subplot 5 4 14 '':title '"-;\" mask':dens a '3;\ '
-subplot 5 4 15 '':title '"d" mask':dens a '3d'
-subplot 5 4 16 '':title '"D" mask':dens a '3D'
-subplot 5 4 17 '':title '"*" mask':dens a '3*'
-subplot 5 4 18 '':title '"^" mask':dens a '3^'
-subplot 5 4 19 '':title 'manual mask'
-mask '+' 'ff00182424f800':dens a '3+'
-</pre>
-<div align="center"><img src="png/mask.png" alt="Sample mask">
-</div>
-<hr>
-<a name="mesh-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#mirror-sample" accesskey="n" rel="next">mirror sample</a>, Previous: <a href="#mask-sample" accesskey="p" rel="prev">mask sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-mesh"></a>
-<h3 class="section">6.72 Sample `<samp>mesh</samp>`</h3>
-
-
-<p>Function <a href="#mesh">mesh</a> draw wired surface. You can use <a href="#meshnum">meshnum</a> for changing number of lines to be drawn.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Mesh plot':rotate 50 60:box:mesh a
-</pre>
-<div align="center"><img src="png/mesh.png" alt="Sample mesh">
-</div>
-<hr>
-<a name="mirror-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#molecule-sample" accesskey="n" rel="next">molecule sample</a>, Previous: <a href="#mesh-sample" accesskey="p" rel="prev">mesh sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-mirror"></a>
-<h3 class="section">6.73 Sample `<samp>mirror</samp>`</h3>
-
-
-<p>Example of using options.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 31 41 '-pi*x*exp(-(y+1)^2-4*x^2)'
-subplot 2 2 0:title 'Options for coordinates':alpha on:light on:rotate 40 60:box
-surf a 'r';yrange 0 1:surf a 'b';yrange 0 -1
-subplot 2 2 1:title 'Option "meshnum"':rotate 40 60:box
-mesh a 'r'; yrange 0 1:mesh a 'b';yrange 0 -1; meshnum 5
-subplot 2 2 2:title 'Option "alpha"':rotate 40 60:box
-surf a 'r';yrange 0 1; alpha 0.7:surf a 'b';yrange 0 -1; alpha 0.3
-subplot 2 2 3 '<_':title 'Option "legend"'
-fplot 'x^3' 'r'; legend 'y = x^3':fplot 'cos(pi*x)' 'b'; legend 'y = cos \pi x'
-box:axis:legend 2
-</pre>
-<div align="center"><img src="png/mirror.png" alt="Sample mirror">
-</div>
-<hr>
-<a name="molecule-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ode-sample" accesskey="n" rel="next">ode sample</a>, Previous: <a href="#mirror-sample" accesskey="p" rel="prev">mirror sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-molecule"></a>
-<h3 class="section">6.74 Sample `<samp>molecule</samp>`</h3>
-
-
-<p>Example of drawing molecules.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">alpha on:light on
-subplot 2 2 0 '':title 'Methane, CH_4':rotate 60 120
-sphere 0 0 0 0.25 'k':drop 0 0 0 0 0 1 0.35 'h' 1 2:sphere 0 0 0.7 0.25 'g'
-drop 0 0 0 -0.94 0 -0.33 0.35 'h' 1 2:sphere -0.66 0 -0.23 0.25 'g'
-drop 0 0 0 0.47 0.82 -0.33 0.35 'h' 1 2:sphere 0.33 0.57 -0.23 0.25 'g'
-drop 0 0 0 0.47 -0.82 -0.33 0.35 'h' 1 2:sphere 0.33 -0.57 -0.23 0.25 'g'
-subplot 2 2 1 '':title 'Water, H{_2}O':rotate 60 100
-sphere 0 0 0 0.25 'r':drop 0 0 0 0.3 0.5 0 0.3 'm' 1 2:sphere 0.3 0.5 0 0.25 'g'
-drop 0 0 0 0.3 -0.5 0 0.3 'm' 1 2:sphere 0.3 -0.5 0 0.25 'g'
-subplot 2 2 2 '':title 'Oxygen, O_2':rotate 60 120
-drop 0 0.5 0 0 -0.3 0 0.3 'm' 1 2:sphere 0 0.5 0 0.25 'r'
-drop 0 -0.5 0 0 0.3 0 0.3 'm' 1 2:sphere 0 -0.5 0 0.25 'r'
-subplot 2 2 3 '':title 'Ammonia, NH_3':rotate 60 120
-sphere 0 0 0 0.25 'b':drop 0 0 0 0.33 0.57 0 0.32 'n' 1 2
-sphere 0.33 0.57 0 0.25 'g':drop 0 0 0 0.33 -0.57 0 0.32 'n' 1 2
-sphere 0.33 -0.57 0 0.25 'g':drop 0 0 0 -0.65 0 0 0.32 'n' 1 2
-sphere -0.65 0 0 0.25 'g'
-</pre>
-<div align="center"><img src="png/molecule.png" alt="Sample molecule">
-</div>
-<hr>
-<a name="ode-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ohlc-sample" accesskey="n" rel="next">ohlc sample</a>, Previous: <a href="#molecule-sample" accesskey="p" rel="prev">molecule sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ode"></a>
-<h3 class="section">6.75 Sample `<samp>ode</samp>`</h3>
-
-
-<p>Example of phase plain created by <a href="#ode">ode</a> solving, contour lines (<a href="#cont">cont</a>) and <a href="#flow">flow</a> threads.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0 '<_':title 'Cont':box
-axis:xlabel 'x':ylabel '\dot{x}'
-new f 100 100 'y^2+2*x^3-x^2-0.5':cont f
-
-subplot 2 2 1 '<_':title 'Flow':box
-axis:xlabel 'x':ylabel '\dot{x}'
-new fx 100 100 'x-3*x^2'
-new fy 100 100 'y'
-flow fy fx 'v';value 7
-
-subplot 2 2 2 '<_':title 'ODE':box
-axis:xlabel 'x':ylabel '\dot{x}'
-for $x -1 1 0.1
- ode r 'y;x-3*x^2' 'xy' [$x,0]
- plot r(0) r(1)
- ode r '-y;-x+3*x^2' 'xy' [$x,0]
- plot r(0) r(1)
-next
-</pre>
-<div align="center"><img src="png/ode.png" alt="Sample ode">
-</div>
-<hr>
-<a name="ohlc-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#param1-sample" accesskey="n" rel="next">param1 sample</a>, Previous: <a href="#ode-sample" accesskey="p" rel="prev">ode sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ohlc"></a>
-<h3 class="section">6.76 Sample `<samp>ohlc</samp>`</h3>
-
-
-<p>Function <a href="#ohlc">ohlc</a> draw Open-High-Low-Close diagram. This diagram show vertical line for between maximal(high) and minimal(low) values, as well as horizontal lines before/after vertical line for initial(open)/final(close) values of some process.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new o 10 '0.5*sin(pi*x)'
-new c 10 '0.5*sin(pi*(x+2/9))'
-new l 10 '0.3*rnd-0.8'
-new h 10 '0.3*rnd+0.5'
-subplot 1 1 0 '':title 'OHLC plot':box:ohlc o h l c
-</pre>
-<div align="center"><img src="png/ohlc.png" alt="Sample ohlc">
-</div>
-<hr>
-<a name="param1-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#param2-sample" accesskey="n" rel="next">param2 sample</a>, Previous: <a href="#ohlc-sample" accesskey="p" rel="prev">ohlc sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-param1"></a>
-<h3 class="section">6.77 Sample `<samp>param1</samp>`</h3>
-
-
-<p>Example of parametric plots for 1D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 100 'sin(pi*x)'
-new y 100 'cos(pi*x)'
-new z 100 'sin(2*pi*x)'
-new c 100 'cos(2*pi*x)'
-
-subplot 4 3 0:rotate 40 60:box:plot x y z
-subplot 4 3 1:rotate 40 60:box:area x y z
-subplot 4 3 2:rotate 40 60:box:tens x y z c
-subplot 4 3 3:rotate 40 60:box:bars x y z
-subplot 4 3 4:rotate 40 60:box:stem x y z
-subplot 4 3 5:rotate 40 60:box:textmark x y z c*2 '\alpha'
-subplot 4 3 6:rotate 40 60:box:tube x y z c/10
-subplot 4 3 7:rotate 40 60:box:mark x y z c 's'
-subplot 4 3 8:box:error x y z/10 c/10
-subplot 4 3 9:rotate 40 60:box:step x y z
-subplot 4 3 10:rotate 40 60:box:torus x z 'z';light on
-subplot 4 3 11:rotate 40 60:box:label x y z '%z'
-</pre>
-<div align="center"><img src="png/param1.png" alt="Sample param1">
-</div>
-<hr>
-<a name="param2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#param3-sample" accesskey="n" rel="next">param3 sample</a>, Previous: <a href="#param1-sample" accesskey="p" rel="prev">param1 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-param2"></a>
-<h3 class="section">6.78 Sample `<samp>param2</samp>`</h3>
-
-
-<p>Example of parametric plots for 2D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 100 100 'sin(pi*(x+y)/2)*cos(pi*y/2)'
-new y 100 100 'cos(pi*(x+y)/2)*cos(pi*y/2)'
-new z 100 100 'sin(pi*y/2)'
-new c 100 100 'cos(pi*x)'
-
-subplot 4 4 0:rotate 40 60:box:surf x y z
-subplot 4 4 1:rotate 40 60:box:surfc x y z c
-subplot 4 4 2:rotate 40 60:box:surfa x y z c;alpha 1
-subplot 4 4 3:rotate 40 60:box:mesh x y z;meshnum 10
-subplot 4 4 4:rotate 40 60:box:tile x y z;meshnum 10
-subplot 4 4 5:rotate 40 60:box:tiles x y z c;meshnum 10
-subplot 4 4 6:rotate 40 60:box:axial x y z;alpha 0.5;light on
-subplot 4 4 7:rotate 40 60:box:cont x y z
-subplot 4 4 8:rotate 40 60:box:contf x y z;light on:contv x y z;light on
-subplot 4 4 9:rotate 40 60:box:belt x y z 'x';meshnum 10;light on
-subplot 4 4 10:rotate 40 60:box:dens x y z;alpha 0.5
-subplot 4 4 11:rotate 40 60:box
-fall x y z 'g';meshnum 10:fall x y z 'rx';meshnum 10
-subplot 4 4 12:rotate 40 60:box:belt x y z '';meshnum 10;light on
-subplot 4 4 13:rotate 40 60:box:boxs x y z '';meshnum 10;light on
-subplot 4 4 14:rotate 40 60:box:boxs x y z '#';meshnum 10;light on
-subplot 4 4 15:rotate 40 60:box:boxs x y z '@';meshnum 10;light on
-</pre>
-<div align="center"><img src="png/param2.png" alt="Sample param2">
-</div>
-<hr>
-<a name="param3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#paramv-sample" accesskey="n" rel="next">paramv sample</a>, Previous: <a href="#param2-sample" accesskey="p" rel="prev">param2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-param3"></a>
-<h3 class="section">6.79 Sample `<samp>param3</samp>`</h3>
-
-
-<p>Example of parametric plots for 3D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 50 50 50 '(x+2)/3*sin(pi*y/2)'
-new y 50 50 50 '(x+2)/3*cos(pi*y/2)'
-new z 50 50 50 'z'
-new c 50 50 50 '-2*(x^2+y^2+z^4-z^2)+0.2'
-new d 50 50 50 '1-2*tanh(2*(x+y)^2)'
-
-alpha on:light on
-subplot 4 3 0:rotate 40 60:box:surf3 x y z c
-subplot 4 3 1:rotate 40 60:box:surf3c x y z c d
-subplot 4 3 2:rotate 40 60:box:surf3a x y z c d
-subplot 4 3 3:rotate 40 60:box:cloud x y z c
-subplot 4 3 4:rotate 40 60:box:cont3 x y z c:cont3 x y z c 'x':cont3 x y z c 'z'
-subplot 4 3 5:rotate 40 60:box:contf3 x y z c:contf3 x y z c 'x':contf3 x y z c 'z'
-subplot 4 3 6:rotate 40 60:box:dens3 x y z c:dens3 x y z c 'x':dens3 x y z c 'z'
-subplot 4 3 7:rotate 40 60:box:dots x y z c;meshnum 15
-subplot 4 3 8:rotate 40 60:box:densx c '' 0:densy c '' 0:densz c '' 0
-subplot 4 3 9:rotate 40 60:box:contx c '' 0:conty c '' 0:contz c '' 0
-subplot 4 3 10:rotate 40 60:box:contfx c '' 0:contfy c '' 0:contfz c '' 0
-</pre>
-<div align="center"><img src="png/param3.png" alt="Sample param3">
-</div>
-<hr>
-<a name="paramv-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#parser-sample" accesskey="n" rel="next">parser sample</a>, Previous: <a href="#param3-sample" accesskey="p" rel="prev">param3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-paramv"></a>
-<h3 class="section">6.80 Sample `<samp>paramv</samp>`</h3>
-
-
-<p>Example of parametric plots for vector fields.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 20 20 20 '(x+2)/3*sin(pi*y/2)'
-new y 20 20 20 '(x+2)/3*cos(pi*y/2)'
-new z 20 20 20 'z+x'
-new ex 20 20 20 'x'
-new ey 20 20 20 'x^2+y'
-new ez 20 20 20 'y^2+z'
-
-new x1 50 50 '(x+2)/3*sin(pi*y/2)'
-new y1 50 50 '(x+2)/3*cos(pi*y/2)'
-new e1 50 50 'x'
-new e2 50 50 'x^2+y'
-
-subplot 3 3 0:rotate 40 60:box:vect x1 y1 e1 e2
-subplot 3 3 1:rotate 40 60:box:flow x1 y1 e1 e2
-subplot 3 3 2:rotate 40 60:box:pipe x1 y1 e1 e2
-subplot 3 3 3:rotate 40 60:box:dew x1 y1 e1 e2
-subplot 3 3 4:rotate 40 60:box:vect x y z ex ey ez
-subplot 3 3 5:rotate 40 60:box
-vect3 x y z ex ey ez:vect3 x y z ex ey ez 'x':vect3 x y z ex ey ez 'z'
-grid3 x y z z '{r9}':grid3 x y z z '{g9}x':grid3 x y z z '{b9}z'
-subplot 3 3 6:rotate 40 60:box:flow x y z ex ey ez
-subplot 3 3 7:rotate 40 60:box:pipe x y z ex ey ez
-</pre>
-<div align="center"><img src="png/paramv.png" alt="Sample paramv">
-</div>
-<hr>
-<a name="parser-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#pde-sample" accesskey="n" rel="next">pde sample</a>, Previous: <a href="#paramv-sample" accesskey="p" rel="prev">paramv sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-parser"></a>
-<h3 class="section">6.81 Sample `<samp>parser</samp>`</h3>
-
-
-<p>Basic MGL script.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">title 'MGL parser sample'
-# call function
-call 'sample'
-
-# ordinary for-loop
-for $0 -1 1 0.1
-if $0<0:line 0 0 1 $0 'r':else:line 0 0 1 $0 'g':endif
-next
-
-# if-elseif-else
-for $i -1 1 0.5
-if $i<0
-text 1.1 $i '$i' 'b'
-elseif $i>0
-text 1.1 $i '$i' 'r'
-else
-text 1.1 $i '$i'
-endif
-next
-
-# ordinary do-while
-do
-defnum $i $i-0.2
-line 0 0 $i 1 'b'
-while $i>0
-
-# do-next-break
-do
-defnum $i $i-0.2
-if $i<-1 then break
-line 0 0 $i 1 'm'
-next
-
-# for-while-continue
-for $i -5 10
-text $i/5 1.1 'a'+($i+5)
-if $i<0
-text $i/5-0.06 1.1 '--' 'b'
-elseif mod($i,2)=0
-text $i/5-0.06 1.1 '~' 'r'
-else
-# NOTE: 'continue' bypass the 'while'!
-continue
-endif
-# NOTE: 'while' limit the actual number of iterations
-while $i<5
-
-# nested loops
-for $i 0 1 0.1
-for $j 0 1 0.1
-ball $i $j
-if $j>0.5 then continue
-ball $i $j 'b+'
-next
-next
-
-func 'sample'
-new dat 100 'sin(2*pi*(i/99+1))'
-plot dat;xrange -1 0
-box:axis
-xlabel 'x':ylabel 'y'
-return
-</pre>
-<div align="center"><img src="png/parser.png" alt="Sample parser">
-</div>
-<hr>
-<a name="pde-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#pendelta-sample" accesskey="n" rel="next">pendelta sample</a>, Previous: <a href="#parser-sample" accesskey="p" rel="prev">parser sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-pde"></a>
-<h3 class="section">6.82 Sample `<samp>pde</samp>`</h3>
-
-
-<p>Example of <a href="#pde">pde</a> solver.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new re 128 'exp(-48*(x+0.7)^2)':new im 128
-pde a 'p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)' re im 0.01 30
-transpose a
-subplot 1 1 0 '<_':title 'PDE solver'
-axis:xlabel '\i x':ylabel '\i z'
-crange 0 1:dens a 'wyrRk'
-fplot '-x' 'k|'
-text 0 0.95 'Equation: ik_0\partial_zu + \Delta u + x\cdot u + i \frac{x+z}{2}\cdot u = 0\n{}absorption: (x+z)/2 for x+z>0'
-</pre>
-<div align="center"><img src="png/pde.png" alt="Sample pde">
-</div>
-<hr>
-<a name="pendelta-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#pipe-sample" accesskey="n" rel="next">pipe sample</a>, Previous: <a href="#pde-sample" accesskey="p" rel="prev">pde sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-pendelta"></a>
-<h3 class="section">6.83 Sample `<samp>pendelta</samp>`</h3>
-
-
-<p>Example of <a href="#pendelta">pendelta</a> for lines and glyphs smoothing.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 6
-list a 0.25 0.5 1 2 4
-for $0 0 4
-pendelta a($0)
-define $1 0.5*$0-1
-line -1 $1 1 $1 'r'
-text 0 $1 'delta=',a($0)
-next
-</pre>
-<div align="center"><img src="png/pendelta.png" alt="Sample pendelta">
-</div>
-<hr>
-<a name="pipe-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#plot-sample" accesskey="n" rel="next">plot sample</a>, Previous: <a href="#pendelta-sample" accesskey="p" rel="prev">pendelta sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-pipe"></a>
-<h3 class="section">6.84 Sample `<samp>pipe</samp>`</h3>
-
-
-<p>Function <a href="#pipe">pipe</a> is similar to <a href="#flow">flow</a> but draw pipes (tubes) which radius is proportional to the amplitude of vector field. The color scheme is used for coloring (see <a href="#Color-scheme">Color scheme</a>). At this warm color corresponds to normal flow (like attractor), cold one corresponds to inverse flow (like source).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2v'
-call 'prepare3v'
-subplot 2 2 0 '':title 'Pipe plot (default)':light on:box:pipe a b
-subplot 2 2 1 '':title '"i" style':box:pipe a b 'i'
-subplot 2 2 2 '':title 'from edges only':box:pipe a b '#'
-subplot 2 2 3:title '3d variant':rotate 50 60:box:pipe ex ey ez '' 0.1
-</pre>
-<div align="center"><img src="png/pipe.png" alt="Sample pipe">
-</div>
-<hr>
-<a name="plot-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#pmap-sample" accesskey="n" rel="next">pmap sample</a>, Previous: <a href="#pipe-sample" accesskey="p" rel="prev">pipe sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-plot"></a>
-<h3 class="section">6.85 Sample `<samp>plot</samp>`</h3>
-
-
-<p>Function <a href="#plot">plot</a> is most standard way to visualize 1D data array. By default, <code>Plot</code> use colors from palette. However, you can specify manual color/palette, and even set to use new color for each points by using `<samp>!</samp>` style. Another feature is `<samp> </samp>` style which draw only markers without line between points.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 2 2 0 '':title 'Plot plot (default)':box:plot y
-subplot 2 2 2 '':title ''!' style; 'rgb' palette':box:plot y 'o!rgb'
-subplot 2 2 3 '':title 'just markers':box:plot y ' +'
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 2 2 1:title '3d variant':rotate 50 60:box:plot xc yc z 'rs'
-</pre>
-<div align="center"><img src="png/plot.png" alt="Sample plot">
-</div>
-<hr>
-<a name="pmap-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#primitives-sample" accesskey="n" rel="next">primitives sample</a>, Previous: <a href="#plot-sample" accesskey="p" rel="prev">plot sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-pmap"></a>
-<h3 class="section">6.86 Sample `<samp>pmap</samp>`</h3>
-
-
-<p>Function <a href="#pmap">pmap</a> draw Poincare map - show intersections of the curve and the surface.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_^':title 'Poincare map sample'
-ode r 'cos(y)+sin(z);cos(z)+sin(x);cos(x)+sin(y)' 'xyz' [0.1,0,0] 0.1 100
-rotate 40 60:copy x r(0):copy y r(1):copy z r(2)
-ranges x y z
-axis:plot x y z 'b'
-xlabel '\i x' 0:ylabel '\i y' 0:zlabel '\i z'
-pmap x y z z 'b#o'
-fsurf '0'
-</pre>
-<div align="center"><img src="png/pmap.png" alt="Sample pmap">
-</div>
-<hr>
-<a name="primitives-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#projection-sample" accesskey="n" rel="next">projection sample</a>, Previous: <a href="#pmap-sample" accesskey="p" rel="prev">pmap sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-primitives"></a>
-<h3 class="section">6.87 Sample `<samp>primitives</samp>`</h3>
-
-
-<p>Example of primitives: <a href="#line">line</a>, <a href="#curve">curve</a>, <a href="#rhomb">rhomb</a>, <a href="#ellipse">ellipse</a>, <a href="#face">face</a>, <a href="#sphere">sphere</a>, <a href="#drop">drop</a>, <a href="#cone">cone</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0 '':title 'Line, Curve, Rhomb, Ellipse' '' -1.5
-line -1 -1 -0.5 1 'qAI'
-curve -0.6 -1 1 1 0 1 1 1 'rA'
-ball 0 -0.5 '*':ball 1 -0.1 '*'
-rhomb 0 0.4 1 0.9 0.2 'b#'
-rhomb 0 0 1 0.4 0.2 'cg@'
-ellipse 0 -0.5 1 -0.1 0.2 'u#'
-ellipse 0 -1 1 -0.6 0.2 'm@'
-
-subplot 2 3 1 '':title 'Arc, Polygon, Symbol';size -1.2
-arc -0.6 0 -0.6 0.3 180 '2kA':ball -0.6 0
-polygon 0 0 0 0.4 6 'r'
-new x 50 'cos(3*pi*x)':new y 50 'sin(pi*x)'
-addsymbol 'a' x y
-symbol 0.7 0 'a'
-
-light on
-subplot 2 3 3 '<^>' 0 -0.2:title 'Face[xyz]';size -1.5:rotate 50 60:box
-facex 1 0 -1 1 1 'r':facey -1 -1 -1 1 1 'g':facez 1 -1 -1 -1 1 'b'
-face -1 -1 1 -1 1 1 1 -1 0 1 1 1 'bmgr'
-
-subplot 2 3 5 '':title 'Cone';size -1.5
-cone -0.7 -0.3 0 -0.7 0.7 0.5 0.2 0.1 'b':text -0.7 -0.7 'no edges\n(default)';size -1.5
-cone 0 -0.3 0 0 0.7 0.5 0.2 0.1 'g@':text 0 -0.7 'with edges\n("\@" style)';size -1.5
-cone 0.7 -0.3 0 0.7 0.7 0.5 0.2 0 'Ggb':text 0.7 -0.7 '"arrow" with\n{}gradient';size -1.5
-subplot 2 2 2 '':title 'Sphere and Drop'
-line -0.9 0 1 0.9 0 1
-text -0.9 0.4 'sh=0':drop -0.9 0 0 1 0.5 'r' 0:ball -0.9 0 1 'k'
-text -0.3 0.6 'sh=0.33':drop -0.3 0 0 1 0.5 'r' 0.33:ball -0.3 0 1 'k'
-text 0.3 0.8 'sh=0.67':drop 0.3 0 0 1 0.5 'r' 0.67:ball 0.3 0 1 'k'
-text 0.9 1. 'sh=1':drop 0.9 0 0 1 0.5 'r' 1:ball 0.9 0 1 'k'
-
-text -0.9 -1.1 'asp=0.33':drop -0.9 -0.7 0 1 0.5 'b' 0 0.33
-text -0.3 -1.1 'asp=0.67':drop -0.3 -0.7 0 1 0.5 'b' 0 0.67
-text 0.3 -1.1 'asp=1':drop 0.3 -0.7 0 1 0.5 'b' 0 1
-text 0.9 -1.1 'asp=1.5':drop 0.9 -0.7 0 1 0.5 'b' 0 1.5
-</pre>
-<div align="center"><img src="png/primitives.png" alt="Sample primitives">
-</div>
-<hr>
-<a name="projection-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#projection5-sample" accesskey="n" rel="next">projection5 sample</a>, Previous: <a href="#primitives-sample" accesskey="p" rel="prev">primitives sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-projection"></a>
-<h3 class="section">6.88 Sample `<samp>projection</samp>`</h3>
-
-
-<p>Example of plot projection (<a href="#ternary">ternary</a>=4).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">ranges 0 1 0 1 0 1
-new x 50 '0.25*(1+cos(2*pi*x))'
-new y 50 '0.25*(1+sin(2*pi*x))'
-new z 50 'x'
-new a 20 30 '30*x*y*(1-x-y)^2*(x+y<1)'
-new rx 10 'rnd':new ry 10:fill ry '(1-v)*rnd' rx
-light on
-
-title 'Projection sample':ternary 4:rotate 50 60
-box:axis:grid
-plot x y z 'r2':surf a '#'
-xlabel 'X':ylabel 'Y':zlabel 'Z'
-</pre>
-<div align="center"><img src="png/projection.png" alt="Sample projection">
-</div>
-<hr>
-<a name="projection5-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#pulse-sample" accesskey="n" rel="next">pulse sample</a>, Previous: <a href="#projection-sample" accesskey="p" rel="prev">projection sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-projection5"></a>
-<h3 class="section">6.89 Sample `<samp>projection5</samp>`</h3>
-
-
-<p>Example of plot projection in ternary coordinates (<a href="#ternary">ternary</a>=5).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">ranges 0 1 0 1 0 1
-new x 50 '0.25*(1+cos(2*pi*x))'
-new y 50 '0.25*(1+sin(2*pi*x))'
-new z 50 'x'
-new a 20 30 '30*x*y*(1-x-y)^2*(x+y<1)'
-new rx 10 'rnd':new ry 10:fill ry '(1-v)*rnd' rx
-light on
-
-title 'Projection sample (ternary)':ternary 5:rotate 50 60
-box:axis:grid
-plot x y z 'r2':surf a '#'
-xlabel 'X':ylabel 'Y':zlabel 'Z'
-</pre>
-<div align="center"><img src="png/projection5.png" alt="Sample projection5">
-</div>
-<hr>
-<a name="pulse-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#qo2d-sample" accesskey="n" rel="next">qo2d sample</a>, Previous: <a href="#projection5-sample" accesskey="p" rel="prev">projection5 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-pulse"></a>
-<h3 class="section">6.90 Sample `<samp>pulse</samp>`</h3>
-
-
-<p>Example of <a href="#pulse">pulse</a> parameter determining.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Pulse sample'
-new a 100 'exp(-6*x^2)':ranges 0 a.nx-1 0 1
-axis:plot a
-
-pulse b a 'x'
-
-define m a.max
-
-line b(1) 0 b(1) m 'r='
-line b(1)-b(3)/2 0 b(1)-b(3)/2 m 'm|'
-line b(1)+b(3)/2 0 b(1)+b(3)/2 m 'm|'
-line 0 0.5*m a.nx-1 0.5*m 'h'
-new x 100 'x'
-plot b(0)*(1-((x-b(1))/b(2))^2) 'g'
-</pre>
-<div align="center"><img src="png/pulse.png" alt="Sample pulse">
-</div>
-<hr>
-<a name="qo2d-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality0-sample" accesskey="n" rel="next">quality0 sample</a>, Previous: <a href="#pulse-sample" accesskey="p" rel="prev">pulse sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-qo2d"></a>
-<h3 class="section">6.91 Sample `<samp>qo2d</samp>`</h3>
-
-
-<p>Example of PDE solving by quasioptical approach <a href="#qo2d">qo2d</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">define $1 'p^2+q^2-x-1+i*0.5*(y+x)*(y>-x)'
-subplot 1 1 0 '<_':title 'Beam and ray tracing'
-ray r $1 -0.7 -1 0 0 0.5 0 0.02 2:plot r(0) r(1) 'k'
-axis:xlabel '\i x':ylabel '\i z'
-new re 128 'exp(-48*x^2)':new im 128
-new xx 1:new yy 1
-qo2d a $1 re im r 1 30 xx yy
-crange 0 1:dens xx yy a 'wyrRk':fplot '-x' 'k|'
-text 0 0.85 'absorption: (x+y)/2 for x+y>0'
-text 0.7 -0.05 'central ray'
-</pre>
-<div align="center"><img src="png/qo2d.png" alt="Sample qo2d">
-</div>
-<hr>
-<a name="quality0-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality1-sample" accesskey="n" rel="next">quality1 sample</a>, Previous: <a href="#qo2d-sample" accesskey="p" rel="prev">qo2d sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality0"></a>
-<h3 class="section">6.92 Sample `<samp>quality0</samp>`</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=0.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 0
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<div align="center"><img src="png/quality0.png" alt="Sample quality0">
-</div>
-<hr>
-<a name="quality1-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality2-sample" accesskey="n" rel="next">quality2 sample</a>, Previous: <a href="#quality0-sample" accesskey="p" rel="prev">quality0 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality1"></a>
-<h3 class="section">6.93 Sample `<samp>quality1</samp>`</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=1.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 1
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<div align="center"><img src="png/quality1.png" alt="Sample quality1">
-</div>
-<hr>
-<a name="quality2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality4-sample" accesskey="n" rel="next">quality4 sample</a>, Previous: <a href="#quality1-sample" accesskey="p" rel="prev">quality1 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality2"></a>
-<h3 class="section">6.94 Sample `<samp>quality2</samp>`</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=2.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 2
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<div align="center"><img src="png/quality2.png" alt="Sample quality2">
-</div>
-<hr>
-<a name="quality4-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality5-sample" accesskey="n" rel="next">quality5 sample</a>, Previous: <a href="#quality2-sample" accesskey="p" rel="prev">quality2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality4"></a>
-<h3 class="section">6.95 Sample `<samp>quality4</samp>`</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=4.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 4
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<div align="center"><img src="png/quality4.png" alt="Sample quality4">
-</div>
-<hr>
-<a name="quality5-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality6-sample" accesskey="n" rel="next">quality6 sample</a>, Previous: <a href="#quality4-sample" accesskey="p" rel="prev">quality4 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality5"></a>
-<h3 class="section">6.96 Sample `<samp>quality5</samp>`</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=5.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 5
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<div align="center"><img src="png/quality5.png" alt="Sample quality5">
-</div>
-<hr>
-<a name="quality6-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality8-sample" accesskey="n" rel="next">quality8 sample</a>, Previous: <a href="#quality5-sample" accesskey="p" rel="prev">quality5 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality6"></a>
-<h3 class="section">6.97 Sample `<samp>quality6</samp>`</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=6.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 6
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<div align="center"><img src="png/quality6.png" alt="Sample quality6">
-</div>
-<hr>
-<a name="quality8-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#radar-sample" accesskey="n" rel="next">radar sample</a>, Previous: <a href="#quality6-sample" accesskey="p" rel="prev">quality6 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality8"></a>
-<h3 class="section">6.98 Sample `<samp>quality8</samp>`</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=8.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 8
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<div align="center"><img src="png/quality8.png" alt="Sample quality8">
-</div>
-<hr>
-<a name="radar-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#refill-sample" accesskey="n" rel="next">refill sample</a>, Previous: <a href="#quality8-sample" accesskey="p" rel="prev">quality8 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-radar"></a>
-<h3 class="section">6.99 Sample `<samp>radar</samp>`</h3>
-
-
-<p>The <a href="#radar">radar</a> plot is variant of <a href="#plot">plot</a>, which make plot in polar coordinates and draw radial rays in point directions. If you just need a plot in polar coordinates then I recommend to use <a href="#Curvilinear-coordinates">Curvilinear coordinates</a> or <a href="#plot">plot</a> in parametric form with <code>x=r*cos(fi); y=r*sin(fi);</code>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new yr 10 3 '0.4*sin(pi*(x+1.5+y/2)+0.1*rnd)'
-subplot 1 1 0 '':title 'Radar plot (with grid, "\#")':radar yr '#'
-</pre>
-<div align="center"><img src="png/radar.png" alt="Sample radar">
-</div>
-<hr>
-<a name="refill-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#region-sample" accesskey="n" rel="next">region sample</a>, Previous: <a href="#radar-sample" accesskey="p" rel="prev">radar sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-refill"></a>
-<h3 class="section">6.100 Sample `<samp>refill</samp>`</h3>
-
-
-<p>Example of <a href="#refill">refill</a> and <a href="#gspline">gspline</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 10 '0.5+rnd':cumsum x 'x':norm x -1 1
-copy y sin(pi*x)/1.5
-subplot 2 2 0 '<_':title 'Refill sample'
-box:axis:plot x y 'o ':fplot 'sin(pi*x)/1.5' 'B:'
-new r 100:refill r x y:plot r 'r'
-
-subplot 2 2 1 '<_':title 'Global spline'
-box:axis:plot x y 'o ':fplot 'sin(pi*x)/1.5' 'B:'
-new r 100:gspline r x y:plot r 'r'
-
-new y 10 '0.5+rnd':cumsum y 'x':norm y -1 1
-copy xx x:extend xx 10
-copy yy y:extend yy 10:transpose yy
-copy z sin(pi*xx*yy)/1.5
-alpha on:light on
-subplot 2 2 2:title '2d regular':rotate 40 60
-box:axis:mesh xx yy z 'k'
-new rr 100 100:refill rr x y z:surf rr
-
-new xx 10 10 '(x+1)/2*cos(y*pi/2-1)':new yy 10 10 '(x+1)/2*sin(y*pi/2-1)'
-copy z sin(pi*xx*yy)/1.5
-subplot 2 2 3:title '2d non-regular':rotate 40 60
-box:axis:plot xx yy z 'ko '
-new rr 100 100:refill rr xx yy z:surf rr
-</pre>
-<div align="center"><img src="png/refill.png" alt="Sample refill">
-</div>
-<hr>
-<a name="region-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#scanfile-sample" accesskey="n" rel="next">scanfile sample</a>, Previous: <a href="#refill-sample" accesskey="p" rel="prev">refill sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-region"></a>
-<h3 class="section">6.101 Sample `<samp>region</samp>`</h3>
-
-
-<p>Function <a href="#region">region</a> fill the area between 2 curves. It support gradient filling if 2 colors per curve is specified. Also it can fill only the region y1<y<y2 if style `<samp>i</samp>` is used.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-copy y1 y(:,1):copy y2 y(:,2)
-subplot 2 2 0 '':title 'Region plot (default)':box:region y1 y2:plot y1 'k2':plot y2 'k2'
-subplot 2 2 1 '':title '2 colors':box:region y1 y2 'yr':plot y1 'k2':plot y2 'k2'
-subplot 2 2 2 '':title '"i" style':box:region y1 y2 'ir':plot y1 'k2':plot y2 'k2'
-subplot 2 2 3 '^_':title '3d variant':rotate 40 60:box
-new x1 100 'sin(pi*x)':new y1 100 'cos(pi*x)':new z 100 'x'
-new x2 100 'sin(pi*x+pi/3)':new y2 100 'cos(pi*x+pi/3)'
-plot x1 y1 z 'r2':plot x2 y2 z 'b2'
-region x1 y1 z x2 y2 z 'cmy!'
-</pre>
-<div align="center"><img src="png/region.png" alt="Sample region">
-</div>
-<hr>
-<a name="scanfile-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#schemes-sample" accesskey="n" rel="next">schemes sample</a>, Previous: <a href="#region-sample" accesskey="p" rel="prev">region sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-scanfile"></a>
-<h3 class="section">6.102 Sample `<samp>scanfile</samp>`</h3>
-
-
-<p>Example of <a href="#scanfile">scanfile</a> for reading `named` data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Save and scanfile sample'
-list a 1 -1 0
-save 'This is test: 0 -> ',a(0),' q' 'test.txt' 'w'
-save 'This is test: 1 -> ',a(1),' q' 'test.txt'
-save 'This is test: 2 -> ',a(2),' q' 'test.txt'
-
-scanfile a 'test.txt' 'This is test: %g -> %g'
-ranges a(0) a(1):axis:plot a(0) a(1) 'o'
-</pre>
-<div align="center"><img src="png/scanfile.png" alt="Sample scanfile">
-</div>
-<hr>
-<a name="schemes-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#section-sample" accesskey="n" rel="next">section sample</a>, Previous: <a href="#scanfile-sample" accesskey="p" rel="prev">scanfile sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-schemes"></a>
-<h3 class="section">6.103 Sample `<samp>schemes</samp>`</h3>
-
-
-<p>Example of popular color schemes.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 100 100 'x':new y 100 100 'y'
-call 'sch' 0 'kw'
-call 'sch' 1 '%gbrw'
-call 'sch' 2 'kHCcw'
-call 'sch' 3 'kBbcw'
-call 'sch' 4 'kRryw'
-call 'sch' 5 'kGgew'
-call 'sch' 6 'BbwrR'
-call 'sch' 7 'BbwgG'
-call 'sch' 8 'GgwmM'
-call 'sch' 9 'UuwqR'
-call 'sch' 10 'QqwcC'
-call 'sch' 11 'CcwyY'
-call 'sch' 12 'bcwyr'
-call 'sch' 13 'bwr'
-call 'sch' 14 'wUrqy'
-call 'sch' 15 'UbcyqR'
-call 'sch' 16 'BbcyrR'
-call 'sch' 17 'bgr'
-call 'sch' 18 'BbcyrR|'
-call 'sch' 19 'b{g,0.3}r'
-stop
-func 'sch' 2
-subplot 2 10 $1 '<>_^' 0.2 0:surfa x y $2
-text 0.07+0.5*mod($1,2) 0.92-0.1*int($1/2) $2 'A'
-return
-</pre>
-<div align="center"><img src="png/schemes.png" alt="Sample schemes">
-</div>
-<hr>
-<a name="section-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#several_005flight-sample" accesskey="n" rel="next">several_light sample</a>, Previous: <a href="#schemes-sample" accesskey="p" rel="prev">schemes sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-section"></a>
-<h3 class="section">6.104 Sample `<samp>section</samp>`</h3>
-
-
-<p>Example of <a href="#section">section</a> to separate data and <a href="#join">join</a> it back.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Section&Join sample'
-axis:box:line -1 0 1 0 'h:'
-# first lets demonstrate 'join'
-new aa 11 'x^2':new a1 3 '-x':new a2 15 'x^3'
-join aa a1:join aa a2
-# add x-coordinate
-new xx aa.nx 'x':join aa xx
-plot aa(:,1) aa(:,0) '2y'
-# now select 1-st (id=0) section between zeros
-section b1 aa 0 'x' 0
-plot b1(:,1) b1(:,0) 'bo'
-# next, select 3-d (id=2) section between zeros
-section b3 aa 2 'x' 0
-plot b3(:,1) b3(:,0) 'gs'
-# finally, select 2-nd (id=-2) section from the end
-section b4 aa -2 'x' 0
-plot b4(:,1) b4(:,0) 'r#o'
-</pre>
-<div align="center"><img src="png/section.png" alt="Sample section">
-</div>
-<hr>
-<a name="several_005flight-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#solve-sample" accesskey="n" rel="next">solve sample</a>, Previous: <a href="#section-sample" accesskey="p" rel="prev">section sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-several_005flight"></a>
-<h3 class="section">6.105 Sample `<samp>several_light</samp>`</h3>
-
-
-<p>Example of using several <a href="#light">light</a> sources.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Several light sources':rotate 50 60:light on
-light 1 0 1 0 'c':light 2 1 0 0 'y':light 3 0 -1 0 'm'
-box:surf a 'h'
-</pre>
-<div align="center"><img src="png/several_light.png" alt="Sample several_light">
-</div>
-<hr>
-<a name="solve-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#stem-sample" accesskey="n" rel="next">stem sample</a>, Previous: <a href="#several_005flight-sample" accesskey="p" rel="prev">several_light sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-solve"></a>
-<h3 class="section">6.106 Sample `<samp>solve</samp>`</h3>
-
-
-<p>Example of <a href="#solve">solve</a> for root finding.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">zrange 0 1
-new x 20 30 '(x+2)/3*cos(pi*y)'
-new y 20 30 '(x+2)/3*sin(pi*y)'
-new z 20 30 'exp(-6*x^2-2*sin(pi*y)^2)'
-
-subplot 2 1 0:title 'Cartesian space':rotate 30 -40
-axis 'xyzU':box
-xlabel 'x':ylabel 'y'
-origin 1 1:grid 'xy'
-mesh x y z
-
-# section along 'x' direction
-solve u x 0.5 'x'
-var v u.nx 0 1
-evaluate yy y u v
-evaluate xx x u v
-evaluate zz z u v
-plot xx yy zz 'k2o'
-
-# 1st section along 'y' direction
-solve u1 x -0.5 'y'
-var v1 u1.nx 0 1
-evaluate yy y v1 u1
-evaluate xx x v1 u1
-evaluate zz z v1 u1
-plot xx yy zz 'b2^'
-
-# 2nd section along 'y' direction
-solve u2 x -0.5 'y' u1
-evaluate yy y v1 u2
-evaluate xx x v1 u2
-evaluate zz z v1 u2
-plot xx yy zz 'r2v'
-
-subplot 2 1 1:title 'Accompanied space'
-ranges 0 1 0 1:origin 0 0
-axis:box:xlabel 'i':ylabel 'j':grid2 z 'h'
-
-plot u v 'k2o':line 0.4 0.5 0.8 0.5 'kA'
-plot v1 u1 'b2^':line 0.5 0.15 0.5 0.3 'bA'
-plot v1 u2 'r2v':line 0.5 0.7 0.5 0.85 'rA'
-</pre>
-<div align="center"><img src="png/solve.png" alt="Sample solve">
-</div>
-<hr>
-<a name="stem-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#step-sample" accesskey="n" rel="next">step sample</a>, Previous: <a href="#solve-sample" accesskey="p" rel="prev">solve sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-stem"></a>
-<h3 class="section">6.107 Sample `<samp>stem</samp>`</h3>
-
-
-<p>Function <a href="#stem">stem</a> draw vertical bars. It is most attractive if markers are drawn too.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-origin 0 0 0:subplot 2 2 0 '':title 'Stem plot (default)':box:stem y
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 2 2 1:title '3d variant':rotate 50 60:box:stem xc yc z 'rx'
-subplot 2 2 2 '':title '"!" style':box:stem y 'o!rgb'
-</pre>
-<div align="center"><img src="png/stem.png" alt="Sample stem">
-</div>
-<hr>
-<a name="step-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#stereo-sample" accesskey="n" rel="next">stereo sample</a>, Previous: <a href="#stem-sample" accesskey="p" rel="prev">stem sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-step"></a>
-<h3 class="section">6.108 Sample `<samp>step</samp>`</h3>
-
-
-<p>Function <a href="#step">step</a> plot data as stairs. At this stairs can be centered if sizes are differ by 1.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-origin 0 0 0:subplot 2 2 0 '':title 'Step plot (default)':box:step y
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 2 2 1:title '3d variant':rotate 50 60:box:step xc yc z 'r'
-subplot 2 2 2 '':title '"!" style':box:step y 's!rgb'
-</pre>
-<div align="center"><img src="png/step.png" alt="Sample step">
-</div>
-<hr>
-<a name="stereo-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#stfa-sample" accesskey="n" rel="next">stfa sample</a>, Previous: <a href="#step-sample" accesskey="p" rel="prev">step sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-stereo"></a>
-<h3 class="section">6.109 Sample `<samp>stereo</samp>`</h3>
-
-
-<p>Example of stereo image of <a href="#surf">surf</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-light on
-subplot 2 1 0:rotate 50 60+1:box:surf a
-subplot 2 1 1:rotate 50 60-1:box:surf a
-</pre>
-<div align="center"><img src="png/stereo.png" alt="Sample stereo">
-</div>
-<hr>
-<a name="stfa-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#style-sample" accesskey="n" rel="next">style sample</a>, Previous: <a href="#stereo-sample" accesskey="p" rel="prev">stereo sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-stfa"></a>
-<h3 class="section">6.110 Sample `<samp>stfa</samp>`</h3>
-
-
-<p>Example of <a href="#stfa">stfa</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 2000:new b 2000
-fill a 'cos(50*pi*x)*(x<-.5)+cos(100*pi*x)*(x<0)*(x>-.5)+\
-cos(200*pi*x)*(x<.5)*(x>0)+cos(400*pi*x)*(x>.5)'
-subplot 1 2 0 '<_':title 'Initial signal':plot a:axis:xlabel '\i t'
-subplot 1 2 1 '<_':title 'STFA plot':stfa a b 64:axis:ylabel '\omega' 0:xlabel '\i t'
-</pre>
-<div align="center"><img src="png/stfa.png" alt="Sample stfa">
-</div>
-<hr>
-<a name="style-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surf-sample" accesskey="n" rel="next">surf sample</a>, Previous: <a href="#stfa-sample" accesskey="p" rel="prev">stfa sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-style"></a>
-<h3 class="section">6.111 Sample `<samp>style</samp>`</h3>
-
-
-<p>Example of colors and styles for plots.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">
-</pre>
-<div align="center"><img src="png/style.png" alt="Sample style">
-</div>
-<hr>
-<a name="surf-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surf3-sample" accesskey="n" rel="next">surf3 sample</a>, Previous: <a href="#style-sample" accesskey="p" rel="prev">style sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surf"></a>
-<h3 class="section">6.112 Sample `<samp>surf</samp>`</h3>
-
-
-<p>Function <a href="#surf">surf</a> is most standard way to visualize 2D data array. <code>Surf</code> use color scheme for coloring (see <a href="#Color-scheme">Color scheme</a>). You can use `<samp>#</samp>` style for drawing black meshes on the surface.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-subplot 2 2 0:title 'Surf plot (default)':rotate 50 60:light on:box:surf a
-subplot 2 2 1:title '"\#" style; meshnum 10':rotate 50 60:box:surf a '#'; meshnum 10
-subplot 2 2 2:title '"." style':rotate 50 60:box:surf a '.'
-new x 50 40 '0.8*sin(pi*x)*sin(pi*(y+1)/2)'
-new y 50 40 '0.8*cos(pi*x)*sin(pi*(y+1)/2)'
-new z 50 40 '0.8*cos(pi*(y+1)/2)'
-subplot 2 2 3:title 'parametric form':rotate 50 60:box:surf x y z 'BbwrR'
-</pre>
-<div align="center"><img src="png/surf.png" alt="Sample surf">
-</div>
-<hr>
-<a name="surf3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surf3a-sample" accesskey="n" rel="next">surf3a sample</a>, Previous: <a href="#surf-sample" accesskey="p" rel="prev">surf sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surf3"></a>
-<h3 class="section">6.113 Sample `<samp>surf3</samp>`</h3>
-
-
-<p>Function <a href="#surf3">surf3</a> is one of most suitable (for my opinion) functions to visualize 3D data. It draw the isosurface(s) - surface(s) of constant amplitude (3D analogue of contour lines). You can draw wired isosurfaces if specify `<samp>#</samp>` style.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-light on:alpha on
-subplot 2 2 0:title 'Surf3 plot (default)'
-rotate 50 60:box:surf3 c
-subplot 2 2 1:title '"\#" style'
-rotate 50 60:box:surf3 c '#'
-subplot 2 2 2:title '"." style'
-rotate 50 60:box:surf3 c '.'
-</pre>
-<div align="center"><img src="png/surf3.png" alt="Sample surf3">
-</div>
-<hr>
-<a name="surf3a-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surf3c-sample" accesskey="n" rel="next">surf3c sample</a>, Previous: <a href="#surf3-sample" accesskey="p" rel="prev">surf3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surf3a"></a>
-<h3 class="section">6.114 Sample `<samp>surf3a</samp>`</h3>
-
-
-<p>Function <a href="#surf3c">surf3c</a> is similar to <a href="#surf3">surf3</a> but its transparency is determined by another data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Surf3A plot':rotate 50 60:light on:alpha on:box:surf3a c d
-</pre>
-<div align="center"><img src="png/surf3a.png" alt="Sample surf3a">
-</div>
-<hr>
-<a name="surf3c-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surf3ca-sample" accesskey="n" rel="next">surf3ca sample</a>, Previous: <a href="#surf3a-sample" accesskey="p" rel="prev">surf3a sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surf3c"></a>
-<h3 class="section">6.115 Sample `<samp>surf3c</samp>`</h3>
-
-
-<p>Function <a href="#surf3c">surf3c</a> is similar to <a href="#surf3">surf3</a> but its coloring is determined by another data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Surf3C plot':rotate 50 60:light on:alpha on:box:surf3c c d
-</pre>
-<div align="center"><img src="png/surf3c.png" alt="Sample surf3c">
-</div>
-<hr>
-<a name="surf3ca-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surfa-sample" accesskey="n" rel="next">surfa sample</a>, Previous: <a href="#surf3c-sample" accesskey="p" rel="prev">surf3c sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surf3ca"></a>
-<h3 class="section">6.116 Sample `<samp>surf3ca</samp>`</h3>
-
-
-<p>Function <a href="#surf3c">surf3c</a> is similar to <a href="#surf3">surf3</a> but its coloring and transparency is determined by another data arrays.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Surf3CA plot':rotate 50 60:light on:alpha on:box:surf3ca c d c
-</pre>
-<div align="center"><img src="png/surf3ca.png" alt="Sample surf3ca">
-</div>
-<hr>
-<a name="surfa-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surfc-sample" accesskey="n" rel="next">surfc sample</a>, Previous: <a href="#surf3ca-sample" accesskey="p" rel="prev">surf3ca sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surfa"></a>
-<h3 class="section">6.117 Sample `<samp>surfa</samp>`</h3>
-
-
-<p>Function <a href="#surfa">surfa</a> is similar to <a href="#surf">surf</a> but its transparency is determined by another data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'SurfA plot':rotate 50 60:light on:alpha on:box:surfa a b
-</pre>
-<div align="center"><img src="png/surfa.png" alt="Sample surfa">
-</div>
-<hr>
-<a name="surfc-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surfca-sample" accesskey="n" rel="next">surfca sample</a>, Previous: <a href="#surfa-sample" accesskey="p" rel="prev">surfa sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surfc"></a>
-<h3 class="section">6.118 Sample `<samp>surfc</samp>`</h3>
-
-
-<p>Function <a href="#surfc">surfc</a> is similar to <a href="#surf">surf</a> but its coloring is determined by another data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'SurfC plot':rotate 50 60:light on:box:surfc a b
-</pre>
-<div align="center"><img src="png/surfc.png" alt="Sample surfc">
-</div>
-<hr>
-<a name="surfca-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#table-sample" accesskey="n" rel="next">table sample</a>, Previous: <a href="#surfc-sample" accesskey="p" rel="prev">surfc sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surfca"></a>
-<h3 class="section">6.119 Sample `<samp>surfca</samp>`</h3>
-
-
-<p>Function <a href="#surfca">surfca</a> is similar to <a href="#surf">surf</a> but its coloring and transparency is determined by another data arrays.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'SurfCA plot':rotate 50 60:light on:alpha on:box:surfca a b a
-</pre>
-<div align="center"><img src="png/surfca.png" alt="Sample surfca">
-</div>
-<hr>
-<a name="table-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#tape-sample" accesskey="n" rel="next">tape sample</a>, Previous: <a href="#surfca-sample" accesskey="p" rel="prev">surfca sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-table"></a>
-<h3 class="section">6.120 Sample `<samp>table</samp>`</h3>
-
-
-<p>Function <a href="#table">table</a> draw table with data values.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ys 10 3 '0.8*sin(pi*(x+y/4+1.25))+0.2*rnd'
-subplot 2 2 0:title 'Table sample':box
-table ys 'y_1\n{}y_2\n{}y_3'
-
-subplot 2 2 1:title 'no borders, colored'
-table ys 'y_1\n{}y_2\n{}y_3' 'r|'
-
-subplot 2 2 2:title 'no font decrease'
-table ys 'y_1\n{}y_2\n{}y_3' '#'
-
-subplot 2 2 3:title 'manual width and position':box
-table 0.5 0.95 ys 'y_1\n{}y_2\n{}y_3' '#';value 0.7
-</pre>
-<div align="center"><img src="png/table.png" alt="Sample table">
-</div>
-<hr>
-<a name="tape-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#tens-sample" accesskey="n" rel="next">tens sample</a>, Previous: <a href="#table-sample" accesskey="p" rel="prev">table sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-tape"></a>
-<h3 class="section">6.121 Sample `<samp>tape</samp>`</h3>
-
-
-<p>Function <a href="#tape">tape</a> draw tapes which rotate around the curve as transverse orts of accompanied coordinates.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-new yc 50 'sin(pi*x)':new xc 50 'cos(pi*x)':new z 50 'x'
-subplot 2 2 0 '':title 'Tape plot (default)':box:tape y:plot y 'k'
-subplot 2 2 1:title '3d variant, 2 colors':rotate 50 60:light on
-box:plot xc yc z 'k':tape xc yc z 'rg'
-subplot 2 2 2:title '3d variant, x only':rotate 50 60
-box:plot xc yc z 'k':tape xc yc z 'xr':tape xc yc z 'xr#'
-subplot 2 2 3:title '3d variant, z only':rotate 50 60
-box:plot xc yc z 'k':tape xc yc z 'zg':tape xc yc z 'zg#'
-</pre>
-<div align="center"><img src="png/tape.png" alt="Sample tape">
-</div>
-<hr>
-<a name="tens-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ternary-sample" accesskey="n" rel="next">ternary sample</a>, Previous: <a href="#tape-sample" accesskey="p" rel="prev">tape sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-tens"></a>
-<h3 class="section">6.122 Sample `<samp>tens</samp>`</h3>
-
-
-<p>Function <a href="#tens">tens</a> is variant of <a href="#plot">plot</a> with smooth coloring along the curves. At this, color is determined as for surfaces (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 2 2 0 '':title 'Tens plot (default)':box:tens y(:,0) y(:,1)
-subplot 2 2 2 '':title '" " style':box:tens y(:,0) y(:,1) 'o '
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 2 2 1:title '3d variant':rotate 50 60:box:tens xc yc z z 's'
-</pre>
-<div align="center"><img src="png/tens.png" alt="Sample tens">
-</div>
-<hr>
-<a name="ternary-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#text-sample" accesskey="n" rel="next">text sample</a>, Previous: <a href="#tens-sample" accesskey="p" rel="prev">tens sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ternary"></a>
-<h3 class="section">6.123 Sample `<samp>ternary</samp>`</h3>
-
-
-<p>Example of <a href="#ternary">ternary</a> coordinates.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">ranges 0 1 0 1 0 1
-new x 50 '0.25*(1+cos(2*pi*x))'
-new y 50 '0.25*(1+sin(2*pi*x))'
-new z 50 'x'
-new a 20 30 '30*x*y*(1-x-y)^2*(x+y<1)'
-new rx 10 'rnd':new ry 10:fill ry '(1-v)*rnd' rx
-light on
-
-subplot 2 2 0:title 'Ordinary axis 3D':rotate 50 60
-box:axis:grid
-plot x y z 'r2':surf a '#'
-xlabel 'B':ylabel 'C':zlabel 'Z'
-
-subplot 2 2 1:title 'Ternary axis (x+y+t=1)':ternary 1
-box:axis:grid 'xyz' 'B;'
-plot x y 'r2':plot rx ry 'q^ ':cont a:line 0.5 0 0 0.75 'g2'
-xlabel 'B':ylabel 'C':tlabel 'A'
-
-subplot 2 2 2:title 'Quaternary axis 3D':rotate 50 60:ternary 2
-box:axis:grid 'xyz' 'B;'
-plot x y z 'r2':surf a '#'
-xlabel 'B':ylabel 'C':tlabel 'A':zlabel 'D'
-
-subplot 2 2 3:title 'Ternary axis 3D':rotate 50 60:ternary 1
-box:axis:grid 'xyz' 'B;'
-plot x y z 'r2':surf a '#'
-xlabel 'B':ylabel 'C':tlabel 'A':zlabel 'Z'
-</pre>
-<div align="center"><img src="png/ternary.png" alt="Sample ternary">
-</div>
-<hr>
-<a name="text-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#text2-sample" accesskey="n" rel="next">text2 sample</a>, Previous: <a href="#ternary-sample" accesskey="p" rel="prev">ternary sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-text"></a>
-<h3 class="section">6.124 Sample `<samp>text</samp>`</h3>
-
-
-<p>Example of <a href="#text">text</a> possibilities.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 2 2 0 ''
-text 0 1 'Text can be in ASCII and in Unicode'
-text 0 0.6 'It can be \wire{wire}, \big{big} or #r{colored}'
-text 0 0.2 'One can change style in string: \b{bold}, \i{italic, \b{both}}'
-text 0 -0.2 'Easy to \a{overline} or \u{underline}'
-text 0 -0.6 'Easy to change indexes ^{up} _{down} @{center}'
-text 0 -1 'It parse TeX: \int \alpha \cdot \
-\sqrt3{sin(\pi x)^2 + \gamma_{i_k}} dx'
-subplot 2 2 1 ''
- text 0 0.5 '\sqrt{\frac{\alpha^{\gamma^2}+\overset 1{\big\infty}}{\sqrt3{2+b}}}' '@' -2
-text 0 -0.1 'More text position: \frac{a}{b}, \dfrac{a}{b}, [\stack{a}{bbb}], [\stackl{a}{bbb}], [\stackr{a}{bbb}], \sup{a}{sup}, \sub{a}{sub}'text 0 -0.5 'Text can be printed\n{}on several lines'
-text 0 -0.9 'or with color gradient' 'BbcyrR'
-subplot 2 2 2 '':box:plot y(:,0)
-text y 'This is very very long string drawn along a curve' 'k'
-text y 'Another string drawn above a curve' 'Tr'
-subplot 2 2 3 '':line -1 -1 1 -1 'rA':text 0 -1 1 -1 'Horizontal'
-line -1 -1 1 1 'rA':text 0 0 1 1 'At angle' '@'
-line -1 -1 -1 1 'rA':text -1 0 -1 1 'Vertical'
-</pre>
-<div align="center"><img src="png/text.png" alt="Sample text">
-</div>
-<hr>
-<a name="text2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#textmark-sample" accesskey="n" rel="next">textmark sample</a>, Previous: <a href="#text-sample" accesskey="p" rel="prev">text sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-text2"></a>
-<h3 class="section">6.125 Sample `<samp>text2</samp>`</h3>
-
-
-<p>Example of <a href="#text">text</a> along curve.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 1 3 0 '':box:plot y(:,0)
-text y 'This is very very long string drawn along a curve' 'k'
-text y 'Another string drawn under a curve' 'Tr'
-subplot 1 3 1 '':box:plot y(:,0)
-text y 'This is very very long string drawn along a curve' 'k:C'
-text y 'Another string drawn under a curve' 'Tr:C'
-subplot 1 3 2 '':box:plot y(:,0)
-text y 'This is very very long string drawn along a curve' 'k:R'
-text y 'Another string drawn under a curve' 'Tr:R'
-</pre>
-<div align="center"><img src="png/text2.png" alt="Sample text2">
-</div>
-<hr>
-<a name="textmark-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ticks-sample" accesskey="n" rel="next">ticks sample</a>, Previous: <a href="#text2-sample" accesskey="p" rel="prev">text2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-textmark"></a>
-<h3 class="section">6.126 Sample `<samp>textmark</samp>`</h3>
-
-
-<p>Function <a href="#textmark">textmark</a> is similar to <a href="#mark">mark</a> but draw text instead of markers.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 1 1 0 '':title 'TextMark plot (default)':box:textmark y y1 '\gamma' 'r'
-</pre>
-<div align="center"><img src="png/textmark.png" alt="Sample textmark">
-</div>
-<hr>
-<a name="ticks-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#tile-sample" accesskey="n" rel="next">tile sample</a>, Previous: <a href="#textmark-sample" accesskey="p" rel="prev">textmark sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ticks"></a>
-<h3 class="section">6.127 Sample `<samp>ticks</samp>`</h3>
-
-
-<p>Example of <a href="#axis">axis</a> ticks.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 3 3 0:title 'Usual axis with ":" style'
-axis ':'
-
-subplot 3 3 1:title 'Too big/small range'
-ranges -1000 1000 0 0.001:axis
-
-subplot 3 3 2:title 'LaTeX-like labels'
-axis 'F!'
-
-subplot 3 3 3:title 'Too narrow range'
-ranges 100 100.1 10 10.01:axis
-
-subplot 3 3 4:title 'No tuning, manual "+"'
-axis '+!'
-# for version <2.3 you can use
-#tuneticks off:axis
-
-subplot 3 3 5:title 'Template for ticks'
-xtick 'xxx:%g':ytick 'y:%g'
-axis
-
-xtick '':ytick '' # switch it off for other plots
-
-subplot 3 3 6:title 'No tuning, higher precision'
-axis '!4'
-
-subplot 3 3 7:title 'Manual ticks'
-ranges -pi pi 0 2
-xtick pi 3 '\pi'
-xtick 0.886 'x^*' on # note this will disable subticks drawing
-# or you can use
-#xtick -pi '\pi' -pi/2 '-\pi/2' 0 '0' 0.886 'x^*' pi/2 '\pi/2' pi 'pi'
-list v 0 0.5 1 2:ytick v '0
-0.5
-1
-2'
-axis:grid:fplot '2*cos(x^2)^2' 'r2'
-
-subplot 3 3 8:title 'Time ticks'
-xrange 0 3e5:ticktime 'x':axis
-</pre>
-<div align="center"><img src="png/ticks.png" alt="Sample ticks">
-</div>
-<hr>
-<a name="tile-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#tiles-sample" accesskey="n" rel="next">tiles sample</a>, Previous: <a href="#ticks-sample" accesskey="p" rel="prev">ticks sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-tile"></a>
-<h3 class="section">6.128 Sample `<samp>tile</samp>`</h3>
-
-
-<p>Function <a href="#tile">tile</a> draw surface by tiles.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Tile plot':rotate 50 60:box:tile a
-</pre>
-<div align="center"><img src="png/tile.png" alt="Sample tile">
-</div>
-<hr>
-<a name="tiles-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#torus-sample" accesskey="n" rel="next">torus sample</a>, Previous: <a href="#tile-sample" accesskey="p" rel="prev">tile sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-tiles"></a>
-<h3 class="section">6.129 Sample `<samp>tiles</samp>`</h3>
-
-
-<p>Function <a href="#tiles">tiles</a> is similar to <a href="#tile">tile</a> but tile sizes is determined by another data. This allows one to simulate transparency of the plot.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-subplot 1 1 0 '':title 'Tiles plot':box:tiles a b
-</pre>
-<div align="center"><img src="png/tiles.png" alt="Sample tiles">
-</div>
-<hr>
-<a name="torus-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#traj-sample" accesskey="n" rel="next">traj sample</a>, Previous: <a href="#tiles-sample" accesskey="p" rel="prev">tiles sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-torus"></a>
-<h3 class="section">6.130 Sample `<samp>torus</samp>`</h3>
-
-
-<p>Function <a href="#torus">torus</a> draw surface of the curve rotation.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 2 2 0:title 'Torus plot (default)':light on:rotate 50 60:box:torus y1 y2
-subplot 2 2 1:title '"x" style':light on:rotate 50 60:box:torus y1 y2 'x'
-subplot 2 2 2:title '"z" style':light on:rotate 50 60:box:torus y1 y2 'z'
-subplot 2 2 3:title '"\#" style':light on:rotate 50 60:box:torus y1 y2 '#'
-</pre>
-<div align="center"><img src="png/torus.png" alt="Sample torus">
-</div>
-<hr>
-<a name="traj-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#triangulation-sample" accesskey="n" rel="next">triangulation sample</a>, Previous: <a href="#torus-sample" accesskey="p" rel="prev">torus sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-traj"></a>
-<h3 class="section">6.131 Sample `<samp>traj</samp>`</h3>
-
-
-<p>Function <a href="#traj">traj</a> is 1D analogue of <a href="#vect">vect</a>. It draw vectors from specified points.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 1 1 0 '':title 'Traj plot':box:plot x1 y:traj x1 y y1 y2
-</pre>
-<div align="center"><img src="png/traj.png" alt="Sample traj">
-</div>
-<hr>
-<a name="triangulation-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#triplot-sample" accesskey="n" rel="next">triplot sample</a>, Previous: <a href="#traj-sample" accesskey="p" rel="prev">traj sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-triangulation"></a>
-<h3 class="section">6.132 Sample `<samp>triangulation</samp>`</h3>
-
-
-<p>Example of use <a href="#triangulate">triangulate</a> for arbitrary placed points.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 100 '2*rnd-1':new y 100 '2*rnd-1':copy z x^2-y^2
-new g 30 30:triangulate d x y
-title 'Triangulation'
-rotate 50 60:box:light on
-triplot d x y z:triplot d x y z '#k'
-datagrid g x y z:mesh g 'm'
-</pre>
-<div align="center"><img src="png/triangulation.png" alt="Sample triangulation">
-</div>
-<hr>
-<a name="triplot-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#tube-sample" accesskey="n" rel="next">tube sample</a>, Previous: <a href="#triangulation-sample" accesskey="p" rel="prev">triangulation sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-triplot"></a>
-<h3 class="section">6.133 Sample `<samp>triplot</samp>`</h3>
-
-
-<p>Functions <a href="#triplot">triplot</a> and <a href="#quadplot">quadplot</a> draw set of triangles (or quadrangles, correspondingly) for irregular data arrays. Note, that you have to provide not only vertexes, but also the indexes of triangles or quadrangles. I.e. perform triangulation by some other library. See also <a href="#triangulate">triangulate</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">list q 0 1 2 3 | 4 5 6 7 | 0 2 4 6 | 1 3 5 7 | 0 4 1 5 | 2 6 3 7
-list xq -1 1 -1 1 -1 1 -1 1
-list yq -1 -1 1 1 -1 -1 1 1
-list zq -1 -1 -1 -1 1 1 1 1
-light on
-subplot 2 2 0:title 'QuadPlot sample':rotate 50 60
-quadplot q xq yq zq 'yr'
-quadplot q xq yq zq '#k'
-subplot 2 2 2:title 'QuadPlot coloring':rotate 50 60
-quadplot q xq yq zq yq 'yr'
-quadplot q xq yq zq '#k'
-list t 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0
-list yt -1 -1 1 0
-list zt -1 -1 -1 1
-subplot 2 2 1:title 'TriPlot sample':rotate 50 60
-triplot t xt yt zt 'b'
-triplot t xt yt zt '#k'
-subplot 2 2 3:title 'TriPlot coloring':rotate 50 60
-triplot t xt yt zt yt 'cb'
-triplot t xt yt zt '#k'
-tricont t xt yt zt 'B'
-</pre>
-<div align="center"><img src="png/triplot.png" alt="Sample triplot">
-</div>
-<hr>
-<a name="tube-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#type0-sample" accesskey="n" rel="next">type0 sample</a>, Previous: <a href="#triplot-sample" accesskey="p" rel="prev">triplot sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-tube"></a>
-<h3 class="section">6.134 Sample `<samp>tube</samp>`</h3>
-
-
-<p>Function <a href="#tube">tube</a> draw tube with variable radius.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-light on
-new yc 50 'sin(pi*x)':new xc 50 'cos(pi*x)':new z 50 'x':divto y1 20
-subplot 2 2 0 '':title 'Tube plot (default)':box:tube y 0.05
-subplot 2 2 1 '':title 'variable radius':box:tube y y1
-subplot 2 2 2 '':title '"\#" style':box:tube y 0.05 '#'
-subplot 2 2 3:title '3d variant':rotate 50 60:box:tube xc yc z y2 'r'
-</pre>
-<div align="center"><img src="png/tube.png" alt="Sample tube">
-</div>
-<hr>
-<a name="type0-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#type1-sample" accesskey="n" rel="next">type1 sample</a>, Previous: <a href="#tube-sample" accesskey="p" rel="prev">tube sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-type0"></a>
-<h3 class="section">6.135 Sample `<samp>type0</samp>`</h3>
-
-
-<p>Example of ordinary transparency (<a href="#transptype">transptype</a>=0).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-alpha on:light on:transptype 0:clf
-subplot 2 2 0:rotate 50 60:surf a:box
-subplot 2 2 1:rotate 50 60:dens a:box
-subplot 2 2 2:rotate 50 60:cont a:box
-subplot 2 2 3:rotate 50 60:axial a:box
-</pre>
-<div align="center"><img src="png/type0.png" alt="Sample type0">
-</div>
-<hr>
-<a name="type1-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#type2-sample" accesskey="n" rel="next">type2 sample</a>, Previous: <a href="#type0-sample" accesskey="p" rel="prev">type0 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-type1"></a>
-<h3 class="section">6.136 Sample `<samp>type1</samp>`</h3>
-
-
-<p>Example of glass-like transparency (<a href="#transptype">transptype</a>=1).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-alpha on:light on:transptype 1:clf
-subplot 2 2 0:rotate 50 60:surf a:box
-subplot 2 2 1:rotate 50 60:dens a:box
-subplot 2 2 2:rotate 50 60:cont a:box
-subplot 2 2 3:rotate 50 60:axial a:box
-</pre>
-<div align="center"><img src="png/type1.png" alt="Sample type1">
-</div>
-<hr>
-<a name="type2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#vect-sample" accesskey="n" rel="next">vect sample</a>, Previous: <a href="#type1-sample" accesskey="p" rel="prev">type1 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-type2"></a>
-<h3 class="section">6.137 Sample `<samp>type2</samp>`</h3>
-
-
-<p>Example of lamp-like transparency (<a href="#transptype">transptype</a>=2).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-alpha on:light on:transptype 2:clf
-subplot 2 2 0:rotate 50 60:surf a:box
-subplot 2 2 1:rotate 50 60:dens a:box
-subplot 2 2 2:rotate 50 60:cont a:box
-subplot 2 2 3:rotate 50 60:axial a:box
-</pre>
-<div align="center"><img src="png/type2.png" alt="Sample type2">
-</div>
-<hr>
-<a name="vect-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#vect3-sample" accesskey="n" rel="next">vect3 sample</a>, Previous: <a href="#type2-sample" accesskey="p" rel="prev">type2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-vect"></a>
-<h3 class="section">6.138 Sample `<samp>vect</samp>`</h3>
-
-
-<p>Function <a href="#vect">vect</a> is most standard way to visualize vector fields - it draw a lot of arrows or hachures for each data cell. It have a lot of options which can be seen on the figure (and in the sample code), and use color scheme for coloring (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2v'
-call 'prepare3v'
-subplot 3 2 0 '':title 'Vect plot (default)':box:vect a b
-subplot 3 2 1 '':title '"." style; "=" style':box:vect a b '.='
-subplot 3 2 2 '':title '"f" style':box:vect a b 'f'
-subplot 3 2 3 '':title '">" style':box:vect a b '>'
-subplot 3 2 4 '':title '"<" style':box:vect a b '<'
-subplot 3 2 5:title '3d variant':rotate 50 60:box:vect ex ey ez
-</pre>
-<div align="center"><img src="png/vect.png" alt="Sample vect">
-</div>
-<hr>
-<a name="vect3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#venn-sample" accesskey="n" rel="next">venn sample</a>, Previous: <a href="#vect-sample" accesskey="p" rel="prev">vect sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-vect3"></a>
-<h3 class="section">6.139 Sample `<samp>vect3</samp>`</h3>
-
-
-<p>Function <a href="#vect3">vect3</a> draw ordinary vector field plot but at slices of 3D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3v'
-subplot 2 1 0:title 'Vect3 sample':rotate 50 60
-origin 0 0 0:box:axis '_xyz'
-vect3 ex ey ez 'x':vect3 ex ey ez:vect3 ex ey ez 'z'
-subplot 2 1 1:title '"f" style':rotate 50 60
-origin 0 0 0:box:axis '_xyz'
-vect3 ex ey ez 'fx':vect3 ex ey ez 'f':vect3 ex ey ez 'fz'
-grid3 ex 'Wx':grid3 ex 'W':grid3 ex 'Wz'
-</pre>
-<div align="center"><img src="png/vect3.png" alt="Sample vect3">
-</div>
-<hr>
-<a name="venn-sample"></a>
-<div class="header">
-<p>
-Previous: <a href="#vect3-sample" accesskey="p" rel="prev">vect3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-_0027venn_0027"></a>
-<h3 class="section">6.140 Sample `venn`</h3>
-
-
-<p>Example of venn-like diagram.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">list x -0.3 0 0.3:list y 0.3 -0.3 0.3:list e 0.7 0.7 0.7
-subplot 1 1 0:title 'Venn-like diagram'
-transptype 1:alpha on:error x y e e '!rgb@#o';alpha 0.1
-</pre>
-<div align="center"><img src="png/venn.png" alt="Sample venn">
-</div>
-
-<hr>
-<a name="Symbols-and-hot_002dkeys"></a>
-<div class="header">
-<p>
-Next: <a href="#Copying-This-Manual" accesskey="n" rel="next">Copying This Manual</a>, Previous: <a href="#All-samples" accesskey="p" rel="prev">All samples</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Symbols-and-hot_002dkeys-1"></a>
-<h2 class="appendix">Appendix A Symbols and hot-keys</h2>
-
-
-<p>This appendix contain the full list of symbols (characters) used by MathGL for setting up plot. Also it contain sections for full list of hot-keys supported by mglview tool and by UDAV program.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Symbols-for-styles" accesskey="1">Symbols for styles</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Hot_002dkeys-for-mglview" accesskey="2">Hot-keys for mglview</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Hot_002dkeys-for-UDAV" accesskey="3">Hot-keys for UDAV</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Symbols-for-styles"></a>
-<div class="header">
-<p>
-Next: <a href="#Hot_002dkeys-for-mglview" accesskey="n" rel="next">Hot-keys for mglview</a>, Up: <a href="#Symbols-and-hot_002dkeys" accesskey="u" rel="up">Symbols and hot-keys</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Symbols-for-styles-1"></a>
-<h3 class="section">A.1 Symbols for styles</h3>
-
-
-<p>Below is full list of all characters (symbols) which MathGL use for setting up the plot.
-</p>
-<dl compact="compact">
-<dt>`<samp>space ' '</samp>`</dt>
-<dd><p>empty line style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>empty color in <a href="#chart">chart</a>.
-</p>
-</dd>
-<dt>`<samp>!</samp>`</dt>
-<dd><p>set to use new color from palette for each point (not for each curve, as default) in <a href="#g_t1D-plotting">1D plotting</a>;
-</p>
-<p>set to disable ticks tuning in <a href="#axis">axis</a> and <a href="#colorbar">colorbar</a>;
-</p>
-<p>set to draw <a href="#grid">grid</a> lines at subticks coordinates too;
-</p>
-<p>define complex variable/expression in MGL script if placed at beginning.
-</p>
-</dd>
-<dt>`<samp>#</samp>`</dt>
-<dd><p>set to use solid marks (see <a href="#Line-styles">Line styles</a>) or solid <a href="#error">error</a> boxes;
-</p>
-<p>set to draw wired plot for <a href="#axial">axial</a>, <a href="#surf3">surf3</a>, <a href="#surf3a">surf3a</a>, <a href="#surf3c">surf3c</a>, <a href="#triplot">triplot</a>, <a href="#quadplot">quadplot</a>, <a href="#area">area</a>, <a href="#region">region</a>, <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#tube">tube</a>, <a href="#tape">tape</a>, <a href="#cone">cone</a>, <a href="#boxs">boxs</a> and draw boundary only for <a href="#circle">circle</a>, <a href="#ellipse">ellipse</a>, <a href="#rhomb">rhomb</a>;
-</p>
-<p>set to draw also mesh lines for <a href="#surf">surf</a>, <a href="#surfc">surfc</a>, <a href="#surfa">surfa</a>, <a href="#dens">dens</a>, <a href="#densx">densx</a>, <a href="#densy">densy</a>, <a href="#densz">densz</a>, <a href="#dens3">dens3</a>, or boundary for <a href="#chart">chart</a>, <a href="#facex">facex</a>, <a href="#facey">facey</a>, <a href="#facez">facez</a>, <a href="#rect">rect</a>;
-</p>
-<p>set to draw boundary and box for <a href="#legend">legend</a>, <a href="#title">title</a>, or grid lines for <a href="#table">table</a>;
-</p>
-<p>set to draw grid for <a href="#radar">radar</a>;
-</p>
-<p>set to start flow threads and pipes from edges only for <a href="#flow">flow</a>, <a href="#pipe">pipe</a>;
-</p>
-<p>set to use whole are for axis range in <a href="#subplot">subplot</a>, <a href="#inplot">inplot</a>;
-</p>
-<p>change text color inside a string (see <a href="#Font-styles">Font styles</a>);
-</p>
-<p>start comment in <a href="#MGL-scripts">MGL scripts</a> or in <a href="#Command-options">Command options</a>.
-</p>
-</dd>
-<dt>`<samp>$</samp>`</dt>
-<dd><p>denote parameter of <a href="#MGL-scripts">MGL scripts</a>.
-</p>
-</dd>
-<dt>`<samp>%</samp>`</dt>
-<dd><p>set color scheme along 2 coordinates <a href="#Color-scheme">Color scheme</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>&</samp>`</dt>
-<dd>
-<p>set to pass long integer number in tick template <a href="#xtick">xtick</a>, <a href="#ytick">ytick</a>, <a href="#ztick">ztick</a>, <a href="#ctick">ctick</a>;
-</p>
-<p>specifier of drawing user-defined symbols as mark (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>`</samp>`</dt>
-<dd><p>denote string in <a href="#MGL-scripts">MGL scripts</a> or in <a href="#Command-options">Command options</a>.
-</p>
-</dd>
-<dt>`<samp>*</samp>`</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>set to start flow threads from 2d array inside data (see <a href="#flow">flow</a>);
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>+</samp>`</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>set to print `<samp>+</samp>` for positive numbers in <a href="#axis">axis</a>, <a href="#label">label</a>, <a href="#table">table</a>;
-</p>
-<p>operation of increasing last character value in MGL strings;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>,</samp>`</dt>
-<dd><p>separator for color positions (see <a href="#Color-styles">Color styles</a>) or items in a list
-</p>
-<p>concatenation of MGL string with another string or numerical value.
-</p>
-</dd>
-<dt>`<samp>-</samp>`</dt>
-<dd><p>solid line style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>place entries horizontally in <a href="#legend">legend</a>;
-</p>
-<p>set to use usual `<samp>-</samp>` for negative numbers in <a href="#axis">axis</a>, <a href="#label">label</a>, <a href="#table">table</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>.</samp>`</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>set to draw hachures instead of arrows for <a href="#vect">vect</a>, <a href="#vect3">vect3</a>;
-</p>
-<p>set to use dots instead of faces for <a href="#cloud">cloud</a>, <a href="#torus">torus</a>, <a href="#axial">axial</a>, <a href="#surf3">surf3</a>, <a href="#surf3a">surf3a</a>, <a href="#surf3c">surf3c</a>, <a href="#surf">surf</a>, <a href="#surfa">surfa</a>, <a href="#surfc">surfc</a>, <a href="#dens">dens</a>, <a href="#map">map</a>;
-</p>
-<p>delimiter of fractional parts for numbers.
-</p>
-</dd>
-<dt>`<samp>/</samp>`</dt>
-<dd><p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>:</samp>`</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>stop color scheme parsing (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>range operation in <a href="#MGL-scripts">MGL scripts</a>;
-</p>
-<p>style for <a href="#axis">axis</a>;
-</p>
-<p>separator of commands in <a href="#MGL-scripts">MGL scripts</a>.
-</p>
-</dd>
-<dt>`<samp>;</samp>`</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>start of an option in <a href="#MGL-scripts">MGL scripts</a> or in <a href="#Command-options">Command options</a>;
-</p>
-<p>separator of equations in <a href="#ode">ode</a>;
-</p>
-<p>separator of labels in <a href="#iris">iris</a>.
-</p>
-</dd>
-<dt>`<samp><</samp>`</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>style of <a href="#subplot">subplot</a> and <a href="#inplot">inplot</a>;
-</p>
-<p>set position of <a href="#colorbar">colorbar</a>;
-</p>
-<p>style of <a href="#vect">vect</a>, <a href="#vect3">vect3</a>;
-</p>
-<p>align left in <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#boxplot">boxplot</a>, <a href="#cones">cones</a>, <a href="#candle">candle</a>, <a href="#ohlc">ohlc</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-
-</dd>
-<dt>`<samp>></samp>`</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>style of <a href="#subplot">subplot</a> and <a href="#inplot">inplot</a>;
-</p>
-<p>set position of <a href="#colorbar">colorbar</a>;
-</p>
-<p>style of <a href="#vect">vect</a>, <a href="#vect3">vect3</a>;
-</p>
-<p>align right in <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#boxplot">boxplot</a>, <a href="#cones">cones</a>, <a href="#candle">candle</a>, <a href="#ohlc">ohlc</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>=</samp>`</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>set to use equidistant columns for <a href="#table">table</a>;
-</p>
-<p>set to use color gradient for <a href="#vect">vect</a>, <a href="#vect3">vect3</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>@</samp>`</dt>
-<dd><p>set to draw box around text for <a href="#text">text</a> and similar functions;
-</p>
-<p>set to draw boundary and fill it for <a href="#circle">circle</a>, <a href="#ellipse">ellipse</a>, <a href="#rhomb">rhomb</a>;
-</p>
-<p>set to fill faces for <a href="#box">box</a>;
-</p>
-<p>set to draw large semitransparent mark instead of error box for <a href="#error">error</a>;
-</p>
-<p>set to draw edges for <a href="#cone">cone</a>;
-</p>
-<p>set to draw filled boxes for <a href="#boxs">boxs</a>;
-</p>
-<p>reduce text size inside a string (see <a href="#Font-styles">Font styles</a>);
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>^</samp>`</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>style of <a href="#subplot">subplot</a> and <a href="#inplot">inplot</a>;
-</p>
-<p>set position of <a href="#colorbar">colorbar</a>;
-</p>
-<p>set outer position for <a href="#legend">legend</a>;
-</p>
-<p>inverse default position for <a href="#axis">axis</a>;
-</p>
-<p>switch to upper index inside a string (see <a href="#Font-styles">Font styles</a>);
-</p>
-<p>align center in <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#boxplot">boxplot</a>, <a href="#cones">cones</a>, <a href="#candle">candle</a>, <a href="#ohlc">ohlc</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>_</samp>`</dt>
-<dd><p>empty arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>disable drawing of tick labels for <a href="#axis">axis</a>;
-</p>
-<p>style of <a href="#subplot">subplot</a> and <a href="#inplot">inplot</a>;
-</p>
-<p>set position of <a href="#colorbar">colorbar</a>;
-</p>
-<p>set to draw contours at bottom for <a href="#cont">cont</a>, <a href="#contf">contf</a>, <a href="#contd">contd</a>, <a href="#contv">contv</a>, <a href="#tricont">tricont</a>;
-</p>
-<p>switch to lower index inside a string (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>`<samp>[]</samp>`</dt>
-<dd><p>contain symbols excluded from color scheme parsing (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>operation of getting n-th character from MGL string.
-</p>
-</dd>
-<dt>`<samp>{}</samp>`</dt>
-<dd><p>contain extended specification of color (see <a href="#Color-styles">Color styles</a>), dashing (see <a href="#Line-styles">Line styles</a>) or mask (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>denote special operation in <a href="#MGL-scripts">MGL scripts</a>;
-</p>
-<p>denote `meta-symbol` for LaTeX like string parsing (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>`<samp>|</samp>`</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>set to use sharp color scheme (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>set to limit width by subplot width for <a href="#table">table</a>;
-</p>
-<p>delimiter in <a href="#list">list</a> command;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>\</samp>`</dt>
-<dd><p>string continuation symbol on next line for <a href="#MGL-scripts">MGL scripts</a>.
-</p>
-</dd>
-<dt>`<samp>~</samp>`</dt>
-<dd><p>disable drawing of tick labels for <a href="#axis">axis</a> and <a href="#colorbar">colorbar</a>;
-</p>
-<p>disable first segment in <a href="#lamerey">lamerey</a>;
-</p>
-<p>reduce number of segments in <a href="#plot">plot</a> and <a href="#tens">tens</a>;
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-</dd>
-<dt>`<samp>0,1,2,3,4,5,6,7,8,9</samp>`</dt>
-<dd><p>line width (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>brightness of a color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>precision of numbers in <a href="#axis">axis</a>, <a href="#label">label</a>, <a href="#table">table</a>;
-</p>
-<p>kind of smoothing (for digits 1,3,5) in <a href="#smooth">smooth</a>;
-</p>
-<p>digits for a value.
-</p>
-</dd>
-<dt>`<samp>4,6,8</samp>`</dt>
-<dd><p>set to draw square, hex- or octo-pyramids instead of cones in <a href="#cone">cone</a>, <a href="#cones">cones</a>.
-</p>
-</dd>
-<dt>`<samp>A,B,C,D,E,F,a,b,c,d,e,f</samp>`</dt>
-<dd><p>can be hex-digit for color specification if placed inside {} (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>A</samp>`</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>set to use absolute position in whole picture for <a href="#text">text</a>, <a href="#colorbar">colorbar</a>, <a href="#legend">legend</a>.
-</p>
-</dd>
-<dt>`<samp>a</samp>`</dt>
-<dd><p>set to use absolute position in subplot for <a href="#text">text</a>;
-</p>
-<p>style of <a href="#plot">plot</a>, <a href="#radar">radar</a>, <a href="#tens">tens</a>, <a href="#area">area</a>, <a href="#region">region</a> to draw segments between points outside of axis range;
-</p>
-<p>style of <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#cones">cones</a>.
-</p>
-</dd>
-<dt>`<samp>B</samp>`</dt>
-<dd><p>dark blue color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>b</samp>`</dt>
-<dd><p>blue color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>bold font face if placed after `<samp>:</samp>` (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>`<samp>C</samp>`</dt>
-<dd><p>dark cyan color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>align text to center if placed after `<samp>:</samp>` (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>`<samp>c</samp>`</dt>
-<dd><p>cyan color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>name of color axis;
-</p>
-<p>cosine transform for <a href="#transform">transform</a>.
-</p>
-</dd>
-<dt>`<samp>D</samp>`</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-</dd>
-<dt>`<samp>d</samp>`</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>start hex-dash description if placed inside {} (see <a href="#Line-styles">Line styles</a>).
-</p>
-</dd>
-<dt>`<samp>E</samp>`</dt>
-<dd><p>dark green-yellow color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>e</samp>`</dt>
-<dd><p>green-yellow color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>F</samp>`</dt>
-<dd>
-<p>set fixed bar widths in <a href="#bars">bars</a>, <a href="#barh">barh</a>;
-</p>
-<p>set LaTeX-like format for numbers in <a href="#axis">axis</a>, <a href="#label">label</a>, <a href="#table">table</a>.
-</p>
-</dd>
-<dt>`<samp>f</samp>`</dt>
-<dd><p>style of <a href="#bars">bars</a>, <a href="#barh">barh</a>;
-</p>
-<p>style of <a href="#vect">vect</a>, <a href="#vect3">vect3</a>;
-</p>
-<p>set fixed format for numbers in <a href="#axis">axis</a>, <a href="#label">label</a>, <a href="#table">table</a>;
-</p>
-<p>Fourier transform for <a href="#transform">transform</a>.
-</p>
-</dd>
-<dt>`<samp>G</samp>`</dt>
-<dd><p>dark green color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>g</samp>`</dt>
-<dd><p>green color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>H</samp>`</dt>
-<dd><p>dark gray color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>h</samp>`</dt>
-<dd><p>gray color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>Hankel transform for <a href="#transform">transform</a>.
-</p>
-</dd>
-<dt>`<samp>I</samp>`</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>set <a href="#colorbar">colorbar</a> position near boundary.
-</p>
-</dd>
-<dt>`<samp>i</samp>`</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>italic font face if placed after `<samp>:</samp>` (see <a href="#Font-styles">Font styles</a>).
-</p>
-<p>set to use inverse values for <a href="#cloud">cloud</a>, <a href="#pipe">pipe</a>, <a href="#dew">dew</a>;
-</p>
-<p>set to fill only area with y1<y<y2 for <a href="#region">region</a>;
-</p>
-<p>inverse Fourier transform for <a href="#transform">transform</a>, <a href="#transforma">transforma</a>, <a href="#fourier">fourier</a>.
-</p>
-</dd>
-<dt>`<samp>j</samp>`</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-</dd>
-<dt>`<samp>K</samp>`</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>).
-</p>
-</dd>
-<dt>`<samp>k</samp>`</dt>
-<dd><p>black color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>L</samp>`</dt>
-<dd><p>dark green-blue color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>align text to left if placed after `<samp>:</samp>` (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>`<samp>l</samp>`</dt>
-<dd><p>green-blue color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>M</samp>`</dt>
-<dd><p>dark magenta color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>m</samp>`</dt>
-<dd><p>magenta color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>N</samp>`</dt>
-<dd><p>dark sky-blue color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>n</samp>`</dt>
-<dd><p>sky-blue color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>O</samp>`</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-</dd>
-<dt>`<samp>o</samp>`</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>over-line text if placed after `<samp>:</samp>` (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>`<samp>P</samp>`</dt>
-<dd><p>dark purple color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>p</samp>`</dt>
-<dd><p>purple color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>Q</samp>`</dt>
-<dd><p>dark orange or brown color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>q</samp>`</dt>
-<dd><p>orange color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>R</samp>`</dt>
-<dd><p>dark red color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>align text to right if placed after `<samp>:</samp>` (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>`<samp>r</samp>`</dt>
-<dd><p>red color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>S</samp>`</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-</dd>
-<dt>`<samp>s</samp>`</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>start hex-mask description if placed inside {} (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>sine transform for <a href="#transform">transform</a>.
-</p>
-</dd>
-<dt>`<samp>t</samp>`</dt>
-<dd><p>draw tubes instead of cones in <a href="#cone">cone</a>, <a href="#cones">cones</a>;
-</p>
-</dd>
-<dt>`<samp>T</samp>`</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>place text under the curve for <a href="#text">text</a>, <a href="#cont">cont</a>, <a href="#cont3">cont3</a>.
-</p>
-</dd>
-<dt>`<samp>t</samp>`</dt>
-<dd><p>set to draw text labels for <a href="#cont">cont</a>, <a href="#cont3">cont3</a>;
-</p>
-<p>name of t-axis (one of ternary axis);
-</p>
-<p>variable in <a href="#Textual-formulas">Textual formulas</a>, which usually is varied in range [0,1].
-</p>
-</dd>
-<dt>`<samp>U</samp>`</dt>
-<dd><p>dark blue-violet color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>disable rotation of tick labels for <a href="#axis">axis</a>.
-</p>
-</dd>
-<dt>`<samp>u</samp>`</dt>
-<dd><p>blue-violet color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>under-line text if placed after `<samp>:</samp>` (see <a href="#Font-styles">Font styles</a>);
-</p>
-<p>name of u-axis (one of ternary axis);
-</p>
-<p>variable in <a href="#Textual-formulas">Textual formulas</a>, which usually denote array itself.
-</p>
-</dd>
-<dt>`<samp>V</samp>`</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>place text centering on vertical direction for <a href="#text">text</a>.
-</p>
-</dd>
-<dt>`<samp>v</samp>`</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>set to draw vectors on flow threads for <a href="#flow">flow</a> and on segments for <a href="#lamerey">lamerey</a>.
-</p>
-</dd>
-<dt>`<samp>W</samp>`</dt>
-<dd><p>bright gray color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>w</samp>`</dt>
-<dd><p>white color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>wired text if placed after `<samp>:</samp>` (see <a href="#Font-styles">Font styles</a>);
-</p>
-<p>name of w-axis (one of ternary axis);
-</p>
-</dd>
-<dt>`<samp>X</samp>`</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>).
-</p>
-</dd>
-<dt>`<samp>x</samp>`</dt>
-<dd>
-<p>name of x-axis or x-direction or 1st dimension of a data array;
-</p>
-<p>start hex-color description if placed inside {} (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>tiles orientation perpendicular to x-axis in <a href="#tile">tile</a>, <a href="#tiles">tiles</a>;
-</p>
-<p>style of <a href="#tape">tape</a>.
-</p>
-</dd>
-<dt>`<samp>Y</samp>`</dt>
-<dd><p>dark yellow or gold color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>y</samp>`</dt>
-<dd><p>yellow color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>name of y-axis or y-direction or 2nd dimension of a data array;
-</p>
-<p>tiles orientation perpendicular to y-axis in <a href="#tile">tile</a>, <a href="#tiles">tiles</a>.
-</p>
-</dd>
-<dt>`<samp>z</samp>`</dt>
-<dd>
-<p>name of z-axis or z-direction or 3d dimension of a data array;
-</p>
-<p>style of <a href="#tape">tape</a>.
-</p>
-</dd>
-</dl>
-
-
-
-<hr>
-<a name="Hot_002dkeys-for-mglview"></a>
-<div class="header">
-<p>
-Next: <a href="#Hot_002dkeys-for-UDAV" accesskey="n" rel="next">Hot-keys for UDAV</a>, Previous: <a href="#Symbols-for-styles" accesskey="p" rel="prev">Symbols for styles</a>, Up: <a href="#Symbols-and-hot_002dkeys" accesskey="u" rel="up">Symbols and hot-keys</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Hot_002dkeys-for-mglview-1"></a>
-<h3 class="section">A.2 Hot-keys for mglview</h3>
-
-
-<table>
-<thead><tr><th width="30%">Key</th><th width="70%">Description</th></tr></thead>
-<tr><td width="30%"><tt class="key">Ctrl-P</tt></td><td width="70%">Open printer dialog and print graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-W</tt></td><td width="70%">Close window.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-T</tt></td><td width="70%">Switch on/off transparency for the graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-L</tt></td><td width="70%">Switch on/off additional lightning for the graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Space</tt></td><td width="70%">Restore default graphics rotation, zoom and perspective.</td></tr>
-<tr><td width="30%"><tt class="key">F5</tt></td><td width="70%">Execute script and redraw graphics.</td></tr>
-<tr><td width="30%"><tt class="key">F6</tt></td><td width="70%">Change canvas size to fill whole region.</td></tr>
-<tr><td width="30%"><tt class="key">F7</tt></td><td width="70%">Stop drawing and script execution.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-F5</tt></td><td width="70%">Run slideshow. If no parameter specified then the dialog with slideshow options will appear.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Comma</tt>, <tt class="key">Ctrl-Period</tt></td><td width="70%">Show next/previous slide. If no parameter specified then the dialog with slideshow options will appear.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-G</tt></td><td width="70%">Copy graphics to clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-P</tt></td><td width="70%">Export as semitransparent PNG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-F</tt></td><td width="70%">Export as solid PNG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-J</tt></td><td width="70%">Export as JPEG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-E</tt></td><td width="70%">Export as vector EPS.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-S</tt></td><td width="70%">Export as vector SVG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-L</tt></td><td width="70%">Export as LaTeX/Tikz image.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-M</tt></td><td width="70%">Export as MGLD.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-D</tt></td><td width="70%">Export as PRC/PDF.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-O</tt></td><td width="70%">Export as OBJ.</td></tr>
-</table>
-
-
-<hr>
-<a name="Hot_002dkeys-for-UDAV"></a>
-<div class="header">
-<p>
-Previous: <a href="#Hot_002dkeys-for-mglview" accesskey="p" rel="prev">Hot-keys for mglview</a>, Up: <a href="#Symbols-and-hot_002dkeys" accesskey="u" rel="up">Symbols and hot-keys</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Hot_002dkeys-for-UDAV-1"></a>
-<h3 class="section">A.3 Hot-keys for UDAV</h3>
-
-
-<table>
-<thead><tr><th width="30%">Key</th><th width="70%">Description</th></tr></thead>
-<tr><td width="30%"><tt class="key">Ctrl-N</tt></td><td width="70%">Create new window with empty script. Note, all scripts share variables. So, second window can be used to see some additional information of existed variables.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-O</tt></td><td width="70%">Open and execute/show script or data from file. You may switch off automatic exection in UDAV properties</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-S</tt></td><td width="70%">Save script to a file.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-P</tt></td><td width="70%">Open printer dialog and print graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Z</tt></td><td width="70%">Undo changes in script editor.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-Z</tt></td><td width="70%">Redo changes in script editor.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-X</tt></td><td width="70%">Cut selected text into clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-C</tt></td><td width="70%">Copy selected text into clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-V</tt></td><td width="70%">Paste selected text from clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-A</tt></td><td width="70%">Select all text in editor.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-F</tt></td><td width="70%">Show dialog for text finding.</td></tr>
-<tr><td width="30%"><tt class="key">F3</tt></td><td width="70%">Find next occurrence of the text.</td></tr>
-<tr><td width="30%"><tt class="key">Win-C</tt> or <tt class="key">Meta-C</tt></td><td width="70%">Show dialog for new command and put it into the script.</td></tr>
-<tr><td width="30%"><tt class="key">Win-F</tt> or <tt class="key">Meta-F</tt></td><td width="70%">Insert last fitted formula with found coefficients.</td></tr>
-<tr><td width="30%"><tt class="key">Win-S</tt> or <tt class="key">Meta-S</tt></td><td width="70%">Show dialog for styles and put it into the script. Styles define the plot view (color scheme, marks, dashing and so on).</td></tr>
-<tr><td width="30%"><tt class="key">Win-O</tt> or <tt class="key">Meta-O</tt></td><td width="70%">Show dialog for options and put it into the script. Options are used for additional setup the plot.</td></tr>
-<tr><td width="30%"><tt class="key">Win-N</tt> or <tt class="key">Meta-N</tt></td><td width="70%">Replace selected expression by its numerical value.</td></tr>
-<tr><td width="30%"><tt class="key">Win-P</tt> or <tt class="key">Meta-P</tt></td><td width="70%">Select file and insert its file name into the script.</td></tr>
-<tr><td width="30%"><tt class="key">Win-G</tt> or <tt class="key">Meta-G</tt></td><td width="70%">Show dialog for plot setup and put resulting code into the script. This dialog setup axis, labels, lighting and other general things.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-O</tt></td><td width="70%">Load data from file. Data will be deleted only at exit but UDAV will not ask to save it.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-S</tt></td><td width="70%">Save data to a file.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-C</tt></td><td width="70%">Copy range of numbers to clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-V</tt></td><td width="70%">Paste range of numbers from clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-N</tt></td><td width="70%">Recreate the data with new sizes and fill it by zeros.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-R</tt></td><td width="70%">Resize (interpolate) the data to specified sizes.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-T</tt></td><td width="70%">Transform data along dimension(s).</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-M</tt></td><td width="70%">Make another data.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-H</tt></td><td width="70%">Find histogram of data.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-T</tt></td><td width="70%">Switch on/off transparency for the graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-L</tt></td><td width="70%">Switch on/off additional lightning for the graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-G</tt></td><td width="70%">Switch on/off grid of absolute coordinates.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Space</tt></td><td width="70%">Restore default graphics rotation, zoom and perspective.</td></tr>
-<tr><td width="30%"><tt class="key">F5</tt></td><td width="70%">Execute script and redraw graphics.</td></tr>
-<tr><td width="30%"><tt class="key">F6</tt></td><td width="70%">Change canvas size to fill whole region.</td></tr>
-<tr><td width="30%"><tt class="key">F7</tt></td><td width="70%">Stop script execution and drawing.</td></tr>
-<tr><td width="30%"><tt class="key">F8</tt></td><td width="70%">Show/hide tool window with list of hidden plots.</td></tr>
-<tr><td width="30%"><tt class="key">F9</tt></td><td width="70%">Restore status for `once` command and reload data.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-F5</tt></td><td width="70%">Run slideshow. If no parameter specified then the dialog with slideshow options will appear.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Comma</tt>, <tt class="key">Ctrl-Period</tt></td><td width="70%">Show next/previous slide. If no parameter specified then the dialog with slideshow options will appear.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-W</tt></td><td width="70%">Open dialog with slideshow options.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-G</tt></td><td width="70%">Copy graphics to clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">F1</tt></td><td width="70%">Show help on MGL commands</td></tr>
-<tr><td width="30%"><tt class="key">F2</tt></td><td width="70%">Show/hide tool window with messages and information.</td></tr>
-<tr><td width="30%"><tt class="key">F4</tt></td><td width="70%">Show/hide calculator which evaluate and help to type textual formulas. Textual formulas may contain data variables too.</td></tr>
-<tr><td width="30%"><tt class="key">Meta-Shift-Up</tt>, <tt class="key">Meta-Shift-Down</tt></td><td width="70%">Change view angle <em>\theta</em>.</td></tr>
-<tr><td width="30%"><tt class="key">Meta-Shift-Left</tt>, <tt class="key">Meta-Shift-Right</tt></td><td width="70%">Change view angle <em>\phi</em>.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-Minus</tt>, <tt class="key">Alt-Equal</tt></td><td width="70%">Zoom in/out whole image.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-Up</tt>, <tt class="key">Alt-Down</tt>, <tt class="key">Alt-Right</tt>, <tt class="key">Alt-Left</tt></td><td width="70%">Shift whole image.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-P</tt></td><td width="70%">Export as semitransparent PNG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-F</tt></td><td width="70%">Export as solid PNG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-J</tt></td><td width="70%">Export as JPEG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-E</tt></td><td width="70%">Export as vector EPS.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-S</tt></td><td width="70%">Export as vector SVG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-L</tt></td><td width="70%">Export as LaTeX/Tikz image.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-M</tt></td><td width="70%">Export as MGLD.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-D</tt></td><td width="70%">Export as PRC/PDF.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-O</tt></td><td width="70%">Export as OBJ.</td></tr>
-</table>
-
-
-
-<hr>
-<a name="Copying-This-Manual"></a>
-<div class="header">
-<p>
-Next: <a href="#Index" accesskey="n" rel="next">Index</a>, Previous: <a href="#Symbols-and-hot_002dkeys" accesskey="p" rel="prev">Symbols and hot-keys</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="GNU-Free-Documentation-License"></a>
-<h2 class="appendix">Appendix B GNU Free Documentation License</h2>
-<div align="center">Version 1.2, November 2002
-</div>
-
-<div class="display">
-<pre class="display">Copyright © 2000,2001,2002 Free Software Foundation, Inc.
-51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-</pre></div>
-
-<ol start="0">
-<li> PREAMBLE
-
-<p>The purpose of this License is to make a manual, textbook, or other
-functional and useful document <em>free</em> in the sense of freedom: to
-assure everyone the effective freedom to copy and redistribute it,
-with or without modifying it, either commercially or noncommercially.
-Secondarily, this License preserves for the author and publisher a way
-to get credit for their work, while not being considered responsible
-for modifications made by others.
-</p>
-<p>This License is a kind of “copyleft”, which means that derivative
-works of the document must themselves be free in the same sense. It
-complements the GNU General Public License, which is a copyleft
-license designed for free software.
-</p>
-<p>We have designed this License in order to use it for manuals for free
-software, because free software needs free documentation: a free
-program should come with manuals providing the same freedoms that the
-software does. But this License is not limited to software manuals;
-it can be used for any textual work, regardless of subject matter or
-whether it is published as a printed book. We recommend this License
-principally for works whose purpose is instruction or reference.
-</p>
-</li><li> APPLICABILITY AND DEFINITIONS
-
-<p>This License applies to any manual or other work, in any medium, that
-contains a notice placed by the copyright holder saying it can be
-distributed under the terms of this License. Such a notice grants a
-world-wide, royalty-free license, unlimited in duration, to use that
-work under the conditions stated herein. The “Document”, below,
-refers to any such manual or work. Any member of the public is a
-licensee, and is addressed as “you”. You accept the license if you
-copy, modify or distribute the work in a way requiring permission
-under copyright law.
-</p>
-<p>A “Modified Version” of the Document means any work containing the
-Document or a portion of it, either copied verbatim, or with
-modifications and/or translated into another language.
-</p>
-<p>A “Secondary Section” is a named appendix or a front-matter section
-of the Document that deals exclusively with the relationship of the
-publishers or authors of the Document to the Document`s overall
-subject (or to related matters) and contains nothing that could fall
-directly within that overall subject. (Thus, if the Document is in
-part a textbook of mathematics, a Secondary Section may not explain
-any mathematics.) The relationship could be a matter of historical
-connection with the subject or with related matters, or of legal,
-commercial, philosophical, ethical or political position regarding
-them.
-</p>
-<p>The “Invariant Sections” are certain Secondary Sections whose titles
-are designated, as being those of Invariant Sections, in the notice
-that says that the Document is released under this License. If a
-section does not fit the above definition of Secondary then it is not
-allowed to be designated as Invariant. The Document may contain zero
-Invariant Sections. If the Document does not identify any Invariant
-Sections then there are none.
-</p>
-<p>The “Cover Texts” are certain short passages of text that are listed,
-as Front-Cover Texts or Back-Cover Texts, in the notice that says that
-the Document is released under this License. A Front-Cover Text may
-be at most 5 words, and a Back-Cover Text may be at most 25 words.
-</p>
-<p>A “Transparent” copy of the Document means a machine-readable copy,
-represented in a format whose specification is available to the
-general public, that is suitable for revising the document
-straightforwardly with generic text editors or (for images composed of
-pixels) generic paint programs or (for drawings) some widely available
-drawing editor, and that is suitable for input to text formatters or
-for automatic translation to a variety of formats suitable for input
-to text formatters. A copy made in an otherwise Transparent file
-format whose markup, or absence of markup, has been arranged to thwart
-or discourage subsequent modification by readers is not Transparent.
-An image format is not Transparent if used for any substantial amount
-of text. A copy that is not “Transparent” is called “Opaque”.
-</p>
-<p>Examples of suitable formats for Transparent copies include plain
-<small>ASCII</small> without markup, Texinfo input format, LaTeX input
-format, <acronym>SGML</acronym> or <acronym>XML</acronym> using a publicly available
-<acronym>DTD</acronym>, and standard-conforming simple <acronym>HTML</acronym>,
-PostScript or <acronym>PDF</acronym> designed for human modification. Examples
-of transparent image formats include <acronym>PNG</acronym>, <acronym>XCF</acronym> and
-<acronym>JPG</acronym>. Opaque formats include proprietary formats that can be
-read and edited only by proprietary word processors, <acronym>SGML</acronym> or
-<acronym>XML</acronym> for which the <acronym>DTD</acronym> and/or processing tools are
-not generally available, and the machine-generated <acronym>HTML</acronym>,
-PostScript or <acronym>PDF</acronym> produced by some word processors for
-output purposes only.
-</p>
-<p>The “Title Page” means, for a printed book, the title page itself,
-plus such following pages as are needed to hold, legibly, the material
-this License requires to appear in the title page. For works in
-formats which do not have any title page as such, “Title Page” means
-the text near the most prominent appearance of the work`s title,
-preceding the beginning of the body of the text.
-</p>
-<p>A section “Entitled XYZ” means a named subunit of the Document whose
-title either is precisely XYZ or contains XYZ in parentheses following
-text that translates XYZ in another language. (Here XYZ stands for a
-specific section name mentioned below, such as “Acknowledgements”,
-“Dedications”, “Endorsements”, or “History”.) To “Preserve the Title”
-of such a section when you modify the Document means that it remains a
-section “Entitled XYZ” according to this definition.
-</p>
-<p>The Document may include Warranty Disclaimers next to the notice which
-states that this License applies to the Document. These Warranty
-Disclaimers are considered to be included by reference in this
-License, but only as regards disclaiming warranties: any other
-implication that these Warranty Disclaimers may have is void and has
-no effect on the meaning of this License.
-</p>
-</li><li> VERBATIM COPYING
-
-<p>You may copy and distribute the Document in any medium, either
-commercially or noncommercially, provided that this License, the
-copyright notices, and the license notice saying this License applies
-to the Document are reproduced in all copies, and that you add no other
-conditions whatsoever to those of this License. You may not use
-technical measures to obstruct or control the reading or further
-copying of the copies you make or distribute. However, you may accept
-compensation in exchange for copies. If you distribute a large enough
-number of copies you must also follow the conditions in section 3.
-</p>
-<p>You may also lend copies, under the same conditions stated above, and
-you may publicly display copies.
-</p>
-</li><li> COPYING IN QUANTITY
-
-<p>If you publish printed copies (or copies in media that commonly have
-printed covers) of the Document, numbering more than 100, and the
-Document`s license notice requires Cover Texts, you must enclose the
-copies in covers that carry, clearly and legibly, all these Cover
-Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
-the back cover. Both covers must also clearly and legibly identify
-you as the publisher of these copies. The front cover must present
-the full title with all words of the title equally prominent and
-visible. You may add other material on the covers in addition.
-Copying with changes limited to the covers, as long as they preserve
-the title of the Document and satisfy these conditions, can be treated
-as verbatim copying in other respects.
-</p>
-<p>If the required texts for either cover are too voluminous to fit
-legibly, you should put the first ones listed (as many as fit
-reasonably) on the actual cover, and continue the rest onto adjacent
-pages.
-</p>
-<p>If you publish or distribute Opaque copies of the Document numbering
-more than 100, you must either include a machine-readable Transparent
-copy along with each Opaque copy, or state in or with each Opaque copy
-a computer-network location from which the general network-using
-public has access to download using public-standard network protocols
-a complete Transparent copy of the Document, free of added material.
-If you use the latter option, you must take reasonably prudent steps,
-when you begin distribution of Opaque copies in quantity, to ensure
-that this Transparent copy will remain thus accessible at the stated
-location until at least one year after the last time you distribute an
-Opaque copy (directly or through your agents or retailers) of that
-edition to the public.
-</p>
-<p>It is requested, but not required, that you contact the authors of the
-Document well before redistributing any large number of copies, to give
-them a chance to provide you with an updated version of the Document.
-</p>
-</li><li> MODIFICATIONS
-
-<p>You may copy and distribute a Modified Version of the Document under
-the conditions of sections 2 and 3 above, provided that you release
-the Modified Version under precisely this License, with the Modified
-Version filling the role of the Document, thus licensing distribution
-and modification of the Modified Version to whoever possesses a copy
-of it. In addition, you must do these things in the Modified Version:
-</p>
-<ol type="A" start="1">
-<li> Use in the Title Page (and on the covers, if any) a title distinct
-from that of the Document, and from those of previous versions
-(which should, if there were any, be listed in the History section
-of the Document). You may use the same title as a previous version
-if the original publisher of that version gives permission.
-
-</li><li> List on the Title Page, as authors, one or more persons or entities
-responsible for authorship of the modifications in the Modified
-Version, together with at least five of the principal authors of the
-Document (all of its principal authors, if it has fewer than five),
-unless they release you from this requirement.
-
-</li><li> State on the Title page the name of the publisher of the
-Modified Version, as the publisher.
-
-</li><li> Preserve all the copyright notices of the Document.
-
-</li><li> Add an appropriate copyright notice for your modifications
-adjacent to the other copyright notices.
-
-</li><li> Include, immediately after the copyright notices, a license notice
-giving the public permission to use the Modified Version under the
-terms of this License, in the form shown in the Addendum below.
-
-</li><li> Preserve in that license notice the full lists of Invariant Sections
-and required Cover Texts given in the Document`s license notice.
-
-</li><li> Include an unaltered copy of this License.
-
-</li><li> Preserve the section Entitled “History”, Preserve its Title, and add
-to it an item stating at least the title, year, new authors, and
-publisher of the Modified Version as given on the Title Page. If
-there is no section Entitled “History” in the Document, create one
-stating the title, year, authors, and publisher of the Document as
-given on its Title Page, then add an item describing the Modified
-Version as stated in the previous sentence.
-
-</li><li> Preserve the network location, if any, given in the Document for
-public access to a Transparent copy of the Document, and likewise
-the network locations given in the Document for previous versions
-it was based on. These may be placed in the “History” section.
-You may omit a network location for a work that was published at
-least four years before the Document itself, or if the original
-publisher of the version it refers to gives permission.
-
-</li><li> For any section Entitled “Acknowledgements” or “Dedications”, Preserve
-the Title of the section, and preserve in the section all the
-substance and tone of each of the contributor acknowledgements and/or
-dedications given therein.
-
-</li><li> Preserve all the Invariant Sections of the Document,
-unaltered in their text and in their titles. Section numbers
-or the equivalent are not considered part of the section titles.
-
-</li><li> Delete any section Entitled “Endorsements”. Such a section
-may not be included in the Modified Version.
-
-</li><li> Do not retitle any existing section to be Entitled “Endorsements” or
-to conflict in title with any Invariant Section.
-
-</li><li> Preserve any Warranty Disclaimers.
-</li></ol>
-
-<p>If the Modified Version includes new front-matter sections or
-appendices that qualify as Secondary Sections and contain no material
-copied from the Document, you may at your option designate some or all
-of these sections as invariant. To do this, add their titles to the
-list of Invariant Sections in the Modified Version`s license notice.
-These titles must be distinct from any other section titles.
-</p>
-<p>You may add a section Entitled “Endorsements”, provided it contains
-nothing but endorsements of your Modified Version by various
-parties—for example, statements of peer review or that the text has
-been approved by an organization as the authoritative definition of a
-standard.
-</p>
-<p>You may add a passage of up to five words as a Front-Cover Text, and a
-passage of up to 25 words as a Back-Cover Text, to the end of the list
-of Cover Texts in the Modified Version. Only one passage of
-Front-Cover Text and one of Back-Cover Text may be added by (or
-through arrangements made by) any one entity. If the Document already
-includes a cover text for the same cover, previously added by you or
-by arrangement made by the same entity you are acting on behalf of,
-you may not add another; but you may replace the old one, on explicit
-permission from the previous publisher that added the old one.
-</p>
-<p>The author(s) and publisher(s) of the Document do not by this License
-give permission to use their names for publicity for or to assert or
-imply endorsement of any Modified Version.
-</p>
-</li><li> COMBINING DOCUMENTS
-
-<p>You may combine the Document with other documents released under this
-License, under the terms defined in section 4 above for modified
-versions, provided that you include in the combination all of the
-Invariant Sections of all of the original documents, unmodified, and
-list them all as Invariant Sections of your combined work in its
-license notice, and that you preserve all their Warranty Disclaimers.
-</p>
-<p>The combined work need only contain one copy of this License, and
-multiple identical Invariant Sections may be replaced with a single
-copy. If there are multiple Invariant Sections with the same name but
-different contents, make the title of each such section unique by
-adding at the end of it, in parentheses, the name of the original
-author or publisher of that section if known, or else a unique number.
-Make the same adjustment to the section titles in the list of
-Invariant Sections in the license notice of the combined work.
-</p>
-<p>In the combination, you must combine any sections Entitled “History”
-in the various original documents, forming one section Entitled
-“History”; likewise combine any sections Entitled “Acknowledgements”,
-and any sections Entitled “Dedications”. You must delete all
-sections Entitled “Endorsements.”
-</p>
-</li><li> COLLECTIONS OF DOCUMENTS
-
-<p>You may make a collection consisting of the Document and other documents
-released under this License, and replace the individual copies of this
-License in the various documents with a single copy that is included in
-the collection, provided that you follow the rules of this License for
-verbatim copying of each of the documents in all other respects.
-</p>
-<p>You may extract a single document from such a collection, and distribute
-it individually under this License, provided you insert a copy of this
-License into the extracted document, and follow this License in all
-other respects regarding verbatim copying of that document.
-</p>
-</li><li> AGGREGATION WITH INDEPENDENT WORKS
-
-<p>A compilation of the Document or its derivatives with other separate
-and independent documents or works, in or on a volume of a storage or
-distribution medium, is called an “aggregate” if the copyright
-resulting from the compilation is not used to limit the legal rights
-of the compilation`s users beyond what the individual works permit.
-When the Document is included in an aggregate, this License does not
-apply to the other works in the aggregate which are not themselves
-derivative works of the Document.
-</p>
-<p>If the Cover Text requirement of section 3 is applicable to these
-copies of the Document, then if the Document is less than one half of
-the entire aggregate, the Document`s Cover Texts may be placed on
-covers that bracket the Document within the aggregate, or the
-electronic equivalent of covers if the Document is in electronic form.
-Otherwise they must appear on printed covers that bracket the whole
-aggregate.
-</p>
-</li><li> TRANSLATION
-
-<p>Translation is considered a kind of modification, so you may
-distribute translations of the Document under the terms of section 4.
-Replacing Invariant Sections with translations requires special
-permission from their copyright holders, but you may include
-translations of some or all Invariant Sections in addition to the
-original versions of these Invariant Sections. You may include a
-translation of this License, and all the license notices in the
-Document, and any Warranty Disclaimers, provided that you also include
-the original English version of this License and the original versions
-of those notices and disclaimers. In case of a disagreement between
-the translation and the original version of this License or a notice
-or disclaimer, the original version will prevail.
-</p>
-<p>If a section in the Document is Entitled “Acknowledgements”,
-“Dedications”, or “History”, the requirement (section 4) to Preserve
-its Title (section 1) will typically require changing the actual
-title.
-</p>
-</li><li> TERMINATION
-
-<p>You may not copy, modify, sublicense, or distribute the Document except
-as expressly provided for under this License. Any other attempt to
-copy, modify, sublicense or distribute the Document is void, and will
-automatically terminate your rights under this License. However,
-parties who have received copies, or rights, from you under this
-License will not have their licenses terminated so long as such
-parties remain in full compliance.
-</p>
-</li><li> FUTURE REVISIONS OF THIS LICENSE
-
-<p>The Free Software Foundation may publish new, revised versions
-of the GNU Free Documentation License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns. See
-<a href="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</a>.
-</p>
-<p>Each version of the License is given a distinguishing version number.
-If the Document specifies that a particular numbered version of this
-License “or any later version” applies to it, you have the option of
-following the terms and conditions either of that specified version or
-of any later version that has been published (not as a draft) by the
-Free Software Foundation. If the Document does not specify a version
-number of this License, you may choose any version ever published (not
-as a draft) by the Free Software Foundation.
-</p></li></ol>
-
-<a name="ADDENDUM_003a-How-to-use-this-License-for-your-documents"></a>
-<h3 class="heading">ADDENDUM: How to use this License for your documents</h3>
-
-<p>To use this License in a document you have written, include a copy of
-the License in the document and put the following copyright and
-license notices just after the title page:
-</p>
-<div class="smallexample">
-<pre class="smallexample"> Copyright (C) <var>year</var> <var>your name</var>.
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.2
- or any later version published by the Free Software Foundation;
- with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
- Texts. A copy of the license is included in the section entitled ``GNU
- Free Documentation License''.
-</pre></div>
-
-<p>If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
-replace the “with…Texts.” line with this:
-</p>
-<div class="smallexample">
-<pre class="smallexample"> with the Invariant Sections being <var>list their titles</var>, with
- the Front-Cover Texts being <var>list</var>, and with the Back-Cover Texts
- being <var>list</var>.
-</pre></div>
-
-<p>If you have Invariant Sections without Cover Texts, or some other
-combination of the three, merge those two alternatives to suit the
-situation.
-</p>
-<p>If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License,
-to permit their use in free software.
-</p>
-
-
-<hr>
-<a name="Index"></a>
-<div class="header">
-<p>
-Previous: <a href="#Copying-This-Manual" accesskey="p" rel="prev">Copying This Manual</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Index-1"></a>
-<h2 class="unnumbered">Index</h2>
-
-<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Index_cp_letter-A"><b>A</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-B"><b>B</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-C"><b>C</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-D"><b>D</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-E"><b>E</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-F"><b>F</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-G"><b>G</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-H"><b>H</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-I"><b>I</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-J"><b>J</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-L"><b>L</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-M"><b>M</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-N"><b>N</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-O"><b>O</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-P"><b>P</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Q"><b>Q</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-R"><b>R</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-S"><b>S</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-T"><b>T</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-V"><b>V</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-W"><b>W</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-X"><b>X</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Y"><b>Y</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Z"><b>Z</b></a>
-
-</td></tr></table>
-<table class="index-cp" border="0">
-<tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-A">A</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-AddLegend">AddLegend</a>:</td><td> </td><td valign="top"><a href="#Legend">Legend</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Adjust">Adjust</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-alpha">alpha</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Alpha">Alpha</a>:</td><td> </td><td valign="top"><a href="#Transparency">Transparency</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-alphadef">alphadef</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-AlphaDef">AlphaDef</a>:</td><td> </td><td valign="top"><a href="#Transparency">Transparency</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Ambient">Ambient</a>:</td><td> </td><td valign="top"><a href="#Lighting">Lighting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Area">Area</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Arrows">Arrows</a>:</td><td> </td><td valign="top"><a href="#Line-styles">Line styles</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ArrowSize">ArrowSize</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ask">ask</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Aspect">Aspect</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-AutoCorrel">AutoCorrel</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Axial">Axial</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Axis">Axis</a>:</td><td> </td><td valign="top"><a href="#Curved-coordinates">Curved coordinates</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Axis-1">Axis</a>:</td><td> </td><td valign="top"><a href="#Axis-and-Colorbar">Axis and Colorbar</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-AxisStl">AxisStl</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-B">B</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Ball">Ball</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Barh">Barh</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Bars">Bars</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-BarWidth">BarWidth</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Beam">Beam</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Belt">Belt</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Box">Box</a>:</td><td> </td><td valign="top"><a href="#Axis-and-Colorbar">Axis and Colorbar</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-BoxPlot">BoxPlot</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Boxs">Boxs</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-C">C</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-call">call</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Candle">Candle</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Chart">Chart</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-chdir">chdir</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Clean">Clean</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ClearLegend">ClearLegend</a>:</td><td> </td><td valign="top"><a href="#Legend">Legend</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Clf">Clf</a>:</td><td> </td><td valign="top"><a href="#Background">Background</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cloud">Cloud</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Color-scheme">Color scheme</a>:</td><td> </td><td valign="top"><a href="#Color-scheme">Color scheme</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Colorbar">Colorbar</a>:</td><td> </td><td valign="top"><a href="#Axis-and-Colorbar">Axis and Colorbar</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Column">Column</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ColumnPlot">ColumnPlot</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Combine">Combine</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cone">Cone</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cones">Cones</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cont">Cont</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cont3">Cont3</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ContD">ContD</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ContF">ContF</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ContF3">ContF3</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ContFXYZ">ContFXYZ</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ContXYZ">ContXYZ</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Correl">Correl</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CosFFT">CosFFT</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CRange">CRange</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Create">Create</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Crop">Crop</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Crust">Crust</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CTick">CTick</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CumSum">CumSum</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Curve">Curve</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-cut">cut</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cut">Cut</a>:</td><td> </td><td valign="top"><a href="#Cutting">Cutting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-D">D</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-DataGrid">DataGrid</a>:</td><td> </td><td valign="top"><a href="#Data-manipulation">Data manipulation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-defchr">defchr</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-define">define</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-defnum">defnum</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Delete">Delete</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Dens">Dens</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Dens3">Dens3</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-DensXYZ">DensXYZ</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Dew">Dew</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Diff">Diff</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Diff2">Diff2</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-do">do</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Dots">Dots</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Drop">Drop</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-E">E</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-else">else</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-elseif">elseif</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-endif">endif</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Envelop">Envelop</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Error">Error</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Evaluate">Evaluate</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Export">Export</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Extend">Extend</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-F">F</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Face">Face</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FaceX">FaceX</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FaceY">FaceY</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FaceZ">FaceZ</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fall">Fall</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-fgets">fgets</a>:</td><td> </td><td valign="top"><a href="#Text-printing">Text printing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fill">Fill</a>:</td><td> </td><td valign="top"><a href="#Data-manipulation">Data manipulation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fill-1">Fill</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fit">Fit</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fit2">Fit2</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fit3">Fit3</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FitS">FitS</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Flow">Flow</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FlowP">FlowP</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fog">Fog</a>:</td><td> </td><td valign="top"><a href="#Fog">Fog</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Font">Font</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Font-styles">Font styles</a>:</td><td> </td><td valign="top"><a href="#Font-styles">Font styles</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-fontsize">fontsize</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-for">for</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FPlot">FPlot</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FSurf">FSurf</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-func">func</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-G">G</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-GetNx">GetNx</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-GetNy">GetNy</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-GetNz">GetNz</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Glyph">Glyph</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Grad">Grad</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Grid">Grid</a>:</td><td> </td><td valign="top"><a href="#Axis-and-Colorbar">Axis and Colorbar</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Grid-1">Grid</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Grid3">Grid3</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-H">H</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Hankel">Hankel</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Hist">Hist</a>:</td><td> </td><td valign="top"><a href="#Data-manipulation">Data manipulation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Hist-1">Hist</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-I">I</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-if">if</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Import">Import</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-InPlot">InPlot</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Insert">Insert</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Integral">Integral</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-J">J</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Join">Join</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-L">L</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Label">Label</a>:</td><td> </td><td valign="top"><a href="#Text-printing">Text printing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Label-1">Label</a>:</td><td> </td><td valign="top"><a href="#Axis-and-Colorbar">Axis and Colorbar</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Label-2">Label</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-legend">legend</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Legend">Legend</a>:</td><td> </td><td valign="top"><a href="#Legend">Legend</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Light">Light</a>:</td><td> </td><td valign="top"><a href="#Lighting">Lighting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Line">Line</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Line-style">Line style</a>:</td><td> </td><td valign="top"><a href="#Line-styles">Line styles</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-List">List</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-load">load</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-LoadBackground">LoadBackground</a>:</td><td> </td><td valign="top"><a href="#Background">Background</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-M">M</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Map">Map</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Mark">Mark</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Mark-style">Mark style</a>:</td><td> </td><td valign="top"><a href="#Line-styles">Line styles</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-MarkSize">MarkSize</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-MathGL-setup">MathGL setup</a>:</td><td> </td><td valign="top"><a href="#Graphics-setup">Graphics setup</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Max">Max</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Maximal">Maximal</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Mesh">Mesh</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-meshnum">meshnum</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-MeshNum">MeshNum</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglData">mglData</a>:</td><td> </td><td valign="top"><a href="#Data-constructor">Data constructor</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglFitPnts">mglFitPnts</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglGraph">mglGraph</a>:</td><td> </td><td valign="top"><a href="#MathGL-core">MathGL core</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Min">Min</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Minimal">Minimal</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Mirror">Mirror</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Modify">Modify</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Momentum">Momentum</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Momentum-1">Momentum</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-MultiPlot">MultiPlot</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-N">N</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-next">next</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Norm">Norm</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-NormSl">NormSl</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-O">O</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-once">once</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Origin">Origin</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-P">P</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Palette">Palette</a>:</td><td> </td><td valign="top"><a href="#Palette-and-colors">Palette and colors</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Perspective">Perspective</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Pipe">Pipe</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Plot">Plot</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Pop">Pop</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-PrintInfo">PrintInfo</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Push">Push</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-PutsFit">PutsFit</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-Q">Q</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-QuadPlot">QuadPlot</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-R">R</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Radar">Radar</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Ranges">Ranges</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Rasterize">Rasterize</a>:</td><td> </td><td valign="top"><a href="#Background">Background</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Read">Read</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ReadAll">ReadAll</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ReadHDF">ReadHDF</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ReadMat">ReadMat</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ReadRange">ReadRange</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Rearrange">Rearrange</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Refill">Refill</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Region">Region</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Resize">Resize</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-return">return</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-rkstep">rkstep</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Roll">Roll</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Roots">Roots</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Rotate">Rotate</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-RotateN">RotateN</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-RotateText">RotateText</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-S">S</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Save">Save</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SaveHDF">SaveHDF</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Set">Set</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetLegendBox">SetLegendBox</a>:</td><td> </td><td valign="top"><a href="#Legend">Legend</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetLegendMarks">SetLegendMarks</a>:</td><td> </td><td valign="top"><a href="#Legend">Legend</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetMask">SetMask</a>:</td><td> </td><td valign="top"><a href="#Masks">Masks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetMaskAngle">SetMaskAngle</a>:</td><td> </td><td valign="top"><a href="#Masks">Masks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetSize">SetSize</a>:</td><td> </td><td valign="top"><a href="#Export-picture">Export picture</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Sew">Sew</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SinFFT">SinFFT</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Smooth">Smooth</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Sort">Sort</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Sphere">Sphere</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Squeeze">Squeeze</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Stem">Stem</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Step">Step</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-STFA">STFA</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-StickPlot">StickPlot</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-stop">stop</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SubData">SubData</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SubPlot">SubPlot</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Sum">Sum</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Surf">Surf</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Surf3">Surf3</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Surf3A">Surf3A</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Surf3C">Surf3C</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SurfA">SurfA</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SurfC">SurfC</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Swap">Swap</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-T">T</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Tape">Tape</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Tens">Tens</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Text">Text</a>:</td><td> </td><td valign="top"><a href="#Text-printing">Text printing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TextMark">TextMark</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Textual-formulas">Textual formulas</a>:</td><td> </td><td valign="top"><a href="#Textual-formulas">Textual formulas</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TickLen">TickLen</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Tile">Tile</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TileS">TileS</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Title">Title</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Torus">Torus</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Trace">Trace</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Traj">Traj</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Transpose">Transpose</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TranspType">TranspType</a>:</td><td> </td><td valign="top"><a href="#Transparency">Transparency</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TriCont">TriCont</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TriPlot">TriPlot</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Tube">Tube</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-V">V</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-value">value</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Var">Var</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-variant">variant</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Vect">Vect</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-View">View</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-W">W</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-while">while</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Write">Write</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-X">X</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-xrange">xrange</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-XRange">XRange</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-XTick">XTick</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-Y">Y</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-yrange">yrange</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-YRange">YRange</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-YTick">YTick</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-Z">Z</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-zrange">zrange</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ZRange">ZRange</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ZTick">ZTick</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-</table>
-<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Index_cp_letter-A"><b>A</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-B"><b>B</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-C"><b>C</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-D"><b>D</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-E"><b>E</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-F"><b>F</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-G"><b>G</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-H"><b>H</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-I"><b>I</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-J"><b>J</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-L"><b>L</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-M"><b>M</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-N"><b>N</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-O"><b>O</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-P"><b>P</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Q"><b>Q</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-R"><b>R</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-S"><b>S</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-T"><b>T</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-V"><b>V</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-W"><b>W</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-X"><b>X</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Y"><b>Y</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Z"><b>Z</b></a>
-
-</td></tr></table>
-
-<hr>
-
-
-
-</body>
-</html>
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<!-- Это документация для MathGL (версии 2.4.2) - библиотеки классов и функций для построения научной графики. Пожалуйста сообщайте о любых ошибках в этом руководстве на mathgl.abalakin@gmail.org.
-
-Copyright (C) 2008-2012 Alexey A. Balakin.
-
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
-Texts. A copy of the license is included in the section entitled "GNU
-Free Documentation License."
- -->
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>Язык MGL для версии 2.4.2</title>
-
-<meta name="description" content="Язык MGL для версии 2.4.2">
-<meta name="keywords" content="Язык MGL для версии 2.4.2">
-<meta name="resource-type" content="document">
-<meta name="distribution" content="global">
-<meta name="Generator" content="texi2any">
-<link href="#Top" rel="start" title="Top">
-<link href="#Index" rel="index" title="Index">
-<link href="#SEC_Contents" rel="contents" title="Table of Contents">
-<link href="dir.html#Top" rel="up" title="(dir)">
-<style type="text/css">
-<!--
-a.summary-letter {text-decoration: none}
-blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
-div.display {margin-left: 3.2em}
-div.example {margin-left: 3.2em}
-div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
-kbd {font-style: oblique}
-pre.display {font-family: inherit}
-pre.format {font-family: inherit}
-pre.menu-comment {font-family: serif}
-pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
-span.nolinebreak {white-space: nowrap}
-span.roman {font-family: initial; font-weight: normal}
-span.sansserif {font-family: sans-serif; font-weight: normal}
-ul.no-bullet {list-style: none}
--->
-</style>
-
-
-</head>
-
-<body >
-<h1 class="settitle" align="center">Язык MGL для версии 2.4.2</h1>
-
-
-
-
-<a name="SEC_Contents"></a>
-<h2 class="contents-heading">Table of Contents</h2>
-
-<div class="contents">
-
-<ul class="no-bullet">
- <li><a name="toc-Skripty-MGL" href="#MGL-scripts">1 Скрипты MGL</a>
- <ul class="no-bullet">
- <li><a name="toc-Osnovy-MGL" href="#MGL-definition">1.1 Основы MGL</a></li>
- <li><a name="toc-Upravlenie-khodom-vypolneniya" href="#Program-flow-commands">1.2 Управление ходом выполнения</a></li>
- <li><a name="toc-Specialxnye-kommentarii" href="#Special-comments">1.3 Специальные комментарии</a></li>
- <li><a name="toc-LaTeX-package-1" href="#LaTeX-package">1.4 LaTeX package</a></li>
- </ul></li>
- <li><a name="toc-Osnovnye-principy" href="#General-concepts">2 Основные принципы</a>
- <ul class="no-bullet">
- <li><a name="toc-Osi-koordinat" href="#Coordinate-axes">2.1 Оси координат</a></li>
- <li><a name="toc-Cveta" href="#Color-styles">2.2 Цвета</a></li>
- <li><a name="toc-Stilx-linii" href="#Line-styles">2.3 Стиль линий</a></li>
- <li><a name="toc-Cvetovaya-skhema" href="#Color-scheme">2.4 Цветовая схема</a></li>
- <li><a name="toc-Stilx-teksta" href="#Font-styles">2.5 Стиль текста</a></li>
- <li><a name="toc-Tekstovye-formuly" href="#Textual-formulas">2.6 Текстовые формулы</a></li>
- <li><a name="toc-Opcii-komand" href="#Command-options">2.7 Опции команд</a></li>
- <li><a name="toc-Interfeisy" href="#Interfaces">2.8 Интерфейсы</a></li>
- </ul></li>
- <li><a name="toc-YAdro-MathGL" href="#MathGL-core">3 Ядро MathGL</a>
- <ul class="no-bullet">
- <li><a name="toc-Sozdanie-i-udalenie-graficheskogo-obwekta" href="#Constructor">3.1 Создание и удаление графического объекта</a></li>
- <li><a name="toc-Nastroika-grafika" href="#Graphics-setup">3.2 Настройка графика</a>
- <ul class="no-bullet">
- <li><a name="toc-Prozrachnostx" href="#Transparency">3.2.1 Прозрачность</a></li>
- <li><a name="toc-Osveshchenie" href="#Lighting">3.2.2 Освещение</a></li>
- <li><a name="toc-Tuman" href="#Fog">3.2.3 Туман</a></li>
- <li><a name="toc-Bazovye-razmery" href="#Default-sizes">3.2.4 Базовые размеры</a></li>
- <li><a name="toc-Obrezanie" href="#Cutting">3.2.5 Обрезание</a></li>
- <li><a name="toc-Shrifty" href="#Font-settings">3.2.6 Шрифты</a></li>
- <li><a name="toc-Palitra-i-cveta" href="#Palette-and-colors">3.2.7 Палитра и цвета</a></li>
- <li><a name="toc-Maski" href="#Masks">3.2.8 Маски</a></li>
- <li><a name="toc-Obrabotka-oshibok" href="#Error-handling">3.2.9 Обработка ошибок</a></li>
- <li><a name="toc-Ostanovka-risovaniya" href="#Stop-drawing">3.2.10 Остановка рисования</a></li>
- </ul></li>
- <li><a name="toc-Nastroiki-osei-koordinat" href="#Axis-settings">3.3 Настройки осей координат</a>
- <ul class="no-bullet">
- <li><a name="toc-Masshtab-osei-koordinat" href="#Ranges-_0028bounding-box_0029">3.3.1 Масштаб осей координат</a></li>
- <li><a name="toc-Krivolineinye-koordinaty" href="#Curved-coordinates">3.3.2 Криволинейные координаты</a></li>
- <li><a name="toc-Metki-osei" href="#Ticks">3.3.3 Метки осей</a></li>
- </ul></li>
- <li><a name="toc-Matrica-preobrazovaniya" href="#Subplots-and-rotation">3.4 Матрица преобразования</a></li>
- <li><a name="toc-Eksport-risunka" href="#Export-picture">3.5 Экспорт рисунка</a>
- <ul class="no-bullet">
- <li><a name="toc-Eksport-v-fail" href="#Export-to-file">3.5.1 Экспорт в файл</a></li>
- <li><a name="toc-Kadry_002fAnimaciya" href="#Frames_002fAnimation">3.5.2 Кадры/Анимация</a></li>
- <li><a name="toc-Risovanie-v-pamyati" href="#Bitmap-in-memory">3.5.3 Рисование в памяти</a></li>
- <li><a name="toc-Rasparallelivanie" href="#Parallelization">3.5.4 Распараллеливание</a></li>
- </ul></li>
- <li><a name="toc-Fonovoe-izobrazhenie" href="#Background">3.6 Фоновое изображение</a></li>
- <li><a name="toc-Risovanie-primitivov" href="#Primitives">3.7 Рисование примитивов</a></li>
- <li><a name="toc-Vyvod-teksta" href="#Text-printing">3.8 Вывод текста</a></li>
- <li><a name="toc-Osi-i-Colorbar" href="#Axis-and-Colorbar">3.9 Оси и Colorbar</a></li>
- <li><a name="toc-Legenda" href="#Legend">3.10 Легенда</a></li>
- <li><a name="toc-1D-grafiki" href="#g_t1D-plotting">3.11 1D графики</a></li>
- <li><a name="toc-2D-grafiki" href="#g_t2D-plotting">3.12 2D графики</a></li>
- <li><a name="toc-3D-grafiki" href="#g_t3D-plotting">3.13 3D графики</a></li>
- <li><a name="toc-Parnye-grafiki" href="#Dual-plotting">3.14 Парные графики</a></li>
- <li><a name="toc-Vektornye-polya" href="#Vector-fields">3.15 Векторные поля</a></li>
- <li><a name="toc-Prochie-grafiki" href="#Other-plotting">3.16 Прочие графики</a></li>
- <li><a name="toc-Nonlinear-fitting-1" href="#Nonlinear-fitting">3.17 Nonlinear fitting</a></li>
- <li><a name="toc-Raspredelenie-dannykh" href="#Data-manipulation">3.18 Распределение данных</a></li>
- </ul></li>
- <li><a name="toc-Obrabotka-dannykh" href="#Data-processing">4 Обработка данных</a>
- <ul class="no-bullet">
- <li><a name="toc-Peremennye" href="#Public-variables">4.1 Переменные</a></li>
- <li><a name="toc-Sozdanie-i-udalenie-dannykh" href="#Data-constructor">4.2 Создание и удаление данных</a></li>
- <li><a name="toc-Izmenenie-razmerov-dannykh" href="#Data-resizing">4.3 Изменение размеров данных</a></li>
- <li><a name="toc-Zapolnenie-dannykh" href="#Data-filling">4.4 Заполнение данных</a></li>
- <li><a name="toc-Chtenie_002fsokhranenie-dannykh" href="#File-I_002fO">4.5 Чтение/сохранение данных</a></li>
- <li><a name="toc-Make-another-data-1" href="#Make-another-data">4.6 Make another data</a></li>
- <li><a name="toc-Izmenenie-dannykh" href="#Data-changing">4.7 Изменение данных</a></li>
- <li><a name="toc-Interpolyaciya" href="#Interpolation">4.8 Интерполяция</a></li>
- <li><a name="toc-Informacionnye-funkcii" href="#Data-information">4.9 Информационные функции</a></li>
- <li><a name="toc-Operatory" href="#Operators">4.10 Операторы</a></li>
- <li><a name="toc-Globalxnye-funkcii" href="#Global-functions">4.11 Глобальные функции</a></li>
- <li><a name="toc-Vychislenie-vyrazhenii" href="#Evaluate-expression">4.12 Вычисление выражений</a></li>
- <li><a name="toc-Special-data-classes-1" href="#Special-data-classes">4.13 Special data classes</a></li>
- </ul></li>
- <li><a name="toc-MathGL-examples" href="#Examples">5 MathGL examples</a>
- <ul class="no-bullet">
- <li><a name="toc-Basic-usage-1" href="#Basic-usage">5.1 Basic usage</a></li>
- <li><a name="toc-Advanced-usage-1" href="#Advanced-usage">5.2 Advanced usage</a>
- <ul class="no-bullet">
- <li><a name="toc-Subplots-1" href="#Subplots">5.2.1 Subplots</a></li>
- <li><a name="toc-Axis-and-ticks-1" href="#Axis-and-ticks">5.2.2 Axis and ticks</a></li>
- <li><a name="toc-Curvilinear-coordinates-1" href="#Curvilinear-coordinates">5.2.3 Curvilinear coordinates</a></li>
- <li><a name="toc-Colorbars-1" href="#Colorbars">5.2.4 Colorbars</a></li>
- <li><a name="toc-Bounding-box-1" href="#Bounding-box">5.2.5 Bounding box</a></li>
- <li><a name="toc-Ternary-axis-1" href="#Ternary-axis">5.2.6 Ternary axis</a></li>
- <li><a name="toc-Text-features-1" href="#Text-features">5.2.7 Text features</a></li>
- <li><a name="toc-Legend-sample-1" href="#Legend-sample">5.2.8 Legend sample</a></li>
- <li><a name="toc-Cutting-sample-1" href="#Cutting-sample">5.2.9 Cutting sample</a></li>
- </ul></li>
- <li><a name="toc-Data-handling-1" href="#Data-handling">5.3 Data handling</a>
- <ul class="no-bullet">
- <li><a name="toc-Array-creation-1" href="#Array-creation">5.3.1 Array creation</a></li>
- <li><a name="toc-Change-data-1" href="#Change-data">5.3.2 Change data</a></li>
- </ul></li>
- <li><a name="toc-Data-plotting-1" href="#Data-plotting">5.4 Data plotting</a></li>
- <li><a name="toc-Hints-1" href="#Hints">5.5 Hints</a>
- <ul class="no-bullet">
- <li><a name="toc-_0060_0060Compound_0027_0027-graphics-1" href="#g_t_0060_0060Compound_0027_0027-graphics">5.5.1 “Compound” graphics</a></li>
- <li><a name="toc-Transparency-and-lighting-1" href="#Transparency-and-lighting">5.5.2 Transparency and lighting</a></li>
- <li><a name="toc-Types-of-transparency-1" href="#Types-of-transparency">5.5.3 Types of transparency</a></li>
- <li><a name="toc-Axis-projection-1" href="#Axis-projection">5.5.4 Axis projection</a></li>
- <li><a name="toc-Adding-fog-1" href="#Adding-fog">5.5.5 Adding fog</a></li>
- <li><a name="toc-Lighting-sample-1" href="#Lighting-sample">5.5.6 Lighting sample</a></li>
- <li><a name="toc-Using-primitives-1" href="#Using-primitives">5.5.7 Using primitives</a></li>
- <li><a name="toc-STFA-sample-1" href="#STFA-sample">5.5.8 STFA sample</a></li>
- <li><a name="toc-Mapping-visualization-1" href="#Mapping-visualization">5.5.9 Mapping visualization</a></li>
- <li><a name="toc-Data-interpolation-1" href="#Data-interpolation">5.5.10 Data interpolation</a></li>
- <li><a name="toc-Making-regular-data-1" href="#Making-regular-data">5.5.11 Making regular data</a></li>
- <li><a name="toc-Making-histogram-1" href="#Making-histogram">5.5.12 Making histogram</a></li>
- <li><a name="toc-Nonlinear-fitting-hints-1" href="#Nonlinear-fitting-hints">5.5.13 Nonlinear fitting hints</a></li>
- <li><a name="toc-PDE-solving-hints-1" href="#PDE-solving-hints">5.5.14 PDE solving hints</a></li>
- <li><a name="toc-Drawing-phase-plain-1" href="#Drawing-phase-plain">5.5.15 Drawing phase plain</a></li>
- <li><a name="toc-Pulse-properties-1" href="#Pulse-properties">5.5.16 Pulse properties</a></li>
- <li><a name="toc-Using-MGL-parser-1" href="#Using-MGL-parser">5.5.17 Using MGL parser</a></li>
- <li><a name="toc-Using-options-1" href="#Using-options">5.5.18 Using options</a></li>
- <li><a name="toc-_0060_0060Templates_0027_0027-1" href="#g_t_0060_0060Templates_0027_0027">5.5.19 “Templates”</a></li>
- <li><a name="toc-Stereo-image-1" href="#Stereo-image">5.5.20 Stereo image</a></li>
- <li><a name="toc-Reduce-memory-usage-1" href="#Reduce-memory-usage">5.5.21 Reduce memory usage</a></li>
- <li><a name="toc-Scanning-file" href="#Saving-and-scanning-file">5.5.22 Scanning file</a></li>
- <li><a name="toc-Mixing-bitmap-and-vector-output-1" href="#Mixing-bitmap-and-vector-output">5.5.23 Mixing bitmap and vector output</a></li>
- </ul></li>
- <li><a name="toc-FAQ-1" href="#FAQ">5.6 FAQ</a></li>
- </ul></li>
- <li><a name="toc-All-samples-1" href="#All-samples">6 All samples</a>
- <ul class="no-bullet">
- <li><a name="toc-Functions-for-initialization" href="#initialization-sample">6.1 Functions for initialization</a></li>
- <li><a name="toc-Sample-3wave" href="#g_t3wave-sample">6.2 Sample `<samp>3wave</samp>`</a></li>
- <li><a name="toc-Sample-alpha" href="#alpha-sample">6.3 Sample `<samp>alpha</samp>`</a></li>
- <li><a name="toc-Sample-apde" href="#apde-sample">6.4 Sample `<samp>apde</samp>`</a></li>
- <li><a name="toc-Sample-area" href="#area-sample">6.5 Sample `<samp>area</samp>`</a></li>
- <li><a name="toc-Sample-aspect" href="#aspect-sample">6.6 Sample `<samp>aspect</samp>`</a></li>
- <li><a name="toc-Sample-axial" href="#axial-sample">6.7 Sample `<samp>axial</samp>`</a></li>
- <li><a name="toc-Sample-axis" href="#axis-sample">6.8 Sample `<samp>axis</samp>`</a></li>
- <li><a name="toc-Sample-barh" href="#barh-sample">6.9 Sample `<samp>barh</samp>`</a></li>
- <li><a name="toc-Sample-bars" href="#bars-sample">6.10 Sample `<samp>bars</samp>`</a></li>
- <li><a name="toc-Sample-belt" href="#belt-sample">6.11 Sample `<samp>belt</samp>`</a></li>
- <li><a name="toc-Sample-bifurcation" href="#bifurcation-sample">6.12 Sample `<samp>bifurcation</samp>`</a></li>
- <li><a name="toc-Sample-box" href="#box-sample">6.13 Sample `<samp>box</samp>`</a></li>
- <li><a name="toc-Sample-boxplot" href="#boxplot-sample">6.14 Sample `<samp>boxplot</samp>`</a></li>
- <li><a name="toc-Sample-boxs" href="#boxs-sample">6.15 Sample `<samp>boxs</samp>`</a></li>
- <li><a name="toc-Sample-candle" href="#candle-sample">6.16 Sample `<samp>candle</samp>`</a></li>
- <li><a name="toc-Sample-chart" href="#chart-sample">6.17 Sample `<samp>chart</samp>`</a></li>
- <li><a name="toc-Sample-cloud" href="#cloud-sample">6.18 Sample `<samp>cloud</samp>`</a></li>
- <li><a name="toc-Sample-colorbar" href="#colorbar-sample">6.19 Sample `<samp>colorbar</samp>`</a></li>
- <li><a name="toc-Sample-combined" href="#combined-sample">6.20 Sample `<samp>combined</samp>`</a></li>
- <li><a name="toc-Sample-cones" href="#cones-sample">6.21 Sample `<samp>cones</samp>`</a></li>
- <li><a name="toc-Sample-cont" href="#cont-sample">6.22 Sample `<samp>cont</samp>`</a></li>
- <li><a name="toc-Sample-cont3" href="#cont3-sample">6.23 Sample `<samp>cont3</samp>`</a></li>
- <li><a name="toc-Sample-cont_005fxyz" href="#cont_005fxyz-sample">6.24 Sample `<samp>cont_xyz</samp>`</a></li>
- <li><a name="toc-Sample-contd" href="#contd-sample">6.25 Sample `<samp>contd</samp>`</a></li>
- <li><a name="toc-Sample-contf" href="#contf-sample">6.26 Sample `<samp>contf</samp>`</a></li>
- <li><a name="toc-Sample-contf3" href="#contf3-sample">6.27 Sample `<samp>contf3</samp>`</a></li>
- <li><a name="toc-Sample-contf_005fxyz" href="#contf_005fxyz-sample">6.28 Sample `<samp>contf_xyz</samp>`</a></li>
- <li><a name="toc-Sample-contv" href="#contv-sample">6.29 Sample `<samp>contv</samp>`</a></li>
- <li><a name="toc-Sample-correl" href="#correl-sample">6.30 Sample `<samp>correl</samp>`</a></li>
- <li><a name="toc-Sample-curvcoor" href="#curvcoor-sample">6.31 Sample `<samp>curvcoor</samp>`</a></li>
- <li><a name="toc-Sample-cut" href="#cut-sample">6.32 Sample `<samp>cut</samp>`</a></li>
- <li><a name="toc-Sample-dat_005fdiff" href="#dat_005fdiff-sample">6.33 Sample `<samp>dat_diff</samp>`</a></li>
- <li><a name="toc-Sample-dat_005fextra" href="#dat_005fextra-sample">6.34 Sample `<samp>dat_extra</samp>`</a></li>
- <li><a name="toc-Sample-data1" href="#data1-sample">6.35 Sample `<samp>data1</samp>`</a></li>
- <li><a name="toc-Sample-data2" href="#data2-sample">6.36 Sample `<samp>data2</samp>`</a></li>
- <li><a name="toc-Sample-dens" href="#dens-sample">6.37 Sample `<samp>dens</samp>`</a></li>
- <li><a name="toc-Sample-dens3" href="#dens3-sample">6.38 Sample `<samp>dens3</samp>`</a></li>
- <li><a name="toc-Sample-dens_005fxyz" href="#dens_005fxyz-sample">6.39 Sample `<samp>dens_xyz</samp>`</a></li>
- <li><a name="toc-Sample-detect" href="#detect-sample">6.40 Sample `<samp>detect</samp>`</a></li>
- <li><a name="toc-Sample-dew" href="#dew-sample">6.41 Sample `<samp>dew</samp>`</a></li>
- <li><a name="toc-Sample-diffract" href="#diffract-sample">6.42 Sample `<samp>diffract</samp>`</a></li>
- <li><a name="toc-Sample-dilate" href="#dilate-sample">6.43 Sample `<samp>dilate</samp>`</a></li>
- <li><a name="toc-Sample-dots" href="#dots-sample">6.44 Sample `<samp>dots</samp>`</a></li>
- <li><a name="toc-Sample-earth" href="#earth-sample">6.45 Sample `<samp>earth</samp>`</a></li>
- <li><a name="toc-Sample-error" href="#error-sample">6.46 Sample `<samp>error</samp>`</a></li>
- <li><a name="toc-Sample-error2" href="#error2-sample">6.47 Sample `<samp>error2</samp>`</a></li>
- <li><a name="toc-Sample-export" href="#export-sample">6.48 Sample `<samp>export</samp>`</a></li>
- <li><a name="toc-Sample-fall" href="#fall-sample">6.49 Sample `<samp>fall</samp>`</a></li>
- <li><a name="toc-Sample-fexport" href="#fexport-sample">6.50 Sample `<samp>fexport</samp>`</a></li>
- <li><a name="toc-Sample-fit" href="#fit-sample">6.51 Sample `<samp>fit</samp>`</a></li>
- <li><a name="toc-Sample-flame2d" href="#flame2d-sample">6.52 Sample `<samp>flame2d</samp>`</a></li>
- <li><a name="toc-Sample-flow" href="#flow-sample">6.53 Sample `<samp>flow</samp>`</a></li>
- <li><a name="toc-Sample-flow3" href="#flow3-sample">6.54 Sample `<samp>flow3</samp>`</a></li>
- <li><a name="toc-Sample-fog" href="#fog-sample">6.55 Sample `<samp>fog</samp>`</a></li>
- <li><a name="toc-Sample-fonts" href="#fonts-sample">6.56 Sample `<samp>fonts</samp>`</a></li>
- <li><a name="toc-Sample-grad" href="#grad-sample">6.57 Sample `<samp>grad</samp>`</a></li>
- <li><a name="toc-Sample-hist" href="#hist-sample">6.58 Sample `<samp>hist</samp>`</a></li>
- <li><a name="toc-Sample-ifs2d" href="#ifs2d-sample">6.59 Sample `<samp>ifs2d</samp>`</a></li>
- <li><a name="toc-Sample-ifs3d" href="#ifs3d-sample">6.60 Sample `<samp>ifs3d</samp>`</a></li>
- <li><a name="toc-Sample-indirect" href="#indirect-sample">6.61 Sample `<samp>indirect</samp>`</a></li>
- <li><a name="toc-Sample-inplot" href="#inplot-sample">6.62 Sample `<samp>inplot</samp>`</a></li>
- <li><a name="toc-Sample-iris" href="#iris-sample">6.63 Sample `<samp>iris</samp>`</a></li>
- <li><a name="toc-Sample-label" href="#label-sample">6.64 Sample `<samp>label</samp>`</a></li>
- <li><a name="toc-Sample-lamerey" href="#lamerey-sample">6.65 Sample `<samp>lamerey</samp>`</a></li>
- <li><a name="toc-Sample-legend" href="#legend-sample">6.66 Sample `<samp>legend</samp>`</a></li>
- <li><a name="toc-Sample-light" href="#light-sample">6.67 Sample `<samp>light</samp>`</a></li>
- <li><a name="toc-Sample-loglog" href="#loglog-sample">6.68 Sample `<samp>loglog</samp>`</a></li>
- <li><a name="toc-Sample-map" href="#map-sample">6.69 Sample `<samp>map</samp>`</a></li>
- <li><a name="toc-Sample-mark" href="#mark-sample">6.70 Sample `<samp>mark</samp>`</a></li>
- <li><a name="toc-Sample-mask" href="#mask-sample">6.71 Sample `<samp>mask</samp>`</a></li>
- <li><a name="toc-Sample-mesh" href="#mesh-sample">6.72 Sample `<samp>mesh</samp>`</a></li>
- <li><a name="toc-Sample-mirror" href="#mirror-sample">6.73 Sample `<samp>mirror</samp>`</a></li>
- <li><a name="toc-Sample-molecule" href="#molecule-sample">6.74 Sample `<samp>molecule</samp>`</a></li>
- <li><a name="toc-Sample-ode" href="#ode-sample">6.75 Sample `<samp>ode</samp>`</a></li>
- <li><a name="toc-Sample-ohlc" href="#ohlc-sample">6.76 Sample `<samp>ohlc</samp>`</a></li>
- <li><a name="toc-Sample-param1" href="#param1-sample">6.77 Sample `<samp>param1</samp>`</a></li>
- <li><a name="toc-Sample-param2" href="#param2-sample">6.78 Sample `<samp>param2</samp>`</a></li>
- <li><a name="toc-Sample-param3" href="#param3-sample">6.79 Sample `<samp>param3</samp>`</a></li>
- <li><a name="toc-Sample-paramv" href="#paramv-sample">6.80 Sample `<samp>paramv</samp>`</a></li>
- <li><a name="toc-Sample-parser" href="#parser-sample">6.81 Sample `<samp>parser</samp>`</a></li>
- <li><a name="toc-Sample-pde" href="#pde-sample">6.82 Sample `<samp>pde</samp>`</a></li>
- <li><a name="toc-Sample-pendelta" href="#pendelta-sample">6.83 Sample `<samp>pendelta</samp>`</a></li>
- <li><a name="toc-Sample-pipe" href="#pipe-sample">6.84 Sample `<samp>pipe</samp>`</a></li>
- <li><a name="toc-Sample-plot" href="#plot-sample">6.85 Sample `<samp>plot</samp>`</a></li>
- <li><a name="toc-Sample-pmap" href="#pmap-sample">6.86 Sample `<samp>pmap</samp>`</a></li>
- <li><a name="toc-Sample-primitives" href="#primitives-sample">6.87 Sample `<samp>primitives</samp>`</a></li>
- <li><a name="toc-Sample-projection" href="#projection-sample">6.88 Sample `<samp>projection</samp>`</a></li>
- <li><a name="toc-Sample-projection5" href="#projection5-sample">6.89 Sample `<samp>projection5</samp>`</a></li>
- <li><a name="toc-Sample-pulse" href="#pulse-sample">6.90 Sample `<samp>pulse</samp>`</a></li>
- <li><a name="toc-Sample-qo2d" href="#qo2d-sample">6.91 Sample `<samp>qo2d</samp>`</a></li>
- <li><a name="toc-Sample-quality0" href="#quality0-sample">6.92 Sample `<samp>quality0</samp>`</a></li>
- <li><a name="toc-Sample-quality1" href="#quality1-sample">6.93 Sample `<samp>quality1</samp>`</a></li>
- <li><a name="toc-Sample-quality2" href="#quality2-sample">6.94 Sample `<samp>quality2</samp>`</a></li>
- <li><a name="toc-Sample-quality4" href="#quality4-sample">6.95 Sample `<samp>quality4</samp>`</a></li>
- <li><a name="toc-Sample-quality5" href="#quality5-sample">6.96 Sample `<samp>quality5</samp>`</a></li>
- <li><a name="toc-Sample-quality6" href="#quality6-sample">6.97 Sample `<samp>quality6</samp>`</a></li>
- <li><a name="toc-Sample-quality8" href="#quality8-sample">6.98 Sample `<samp>quality8</samp>`</a></li>
- <li><a name="toc-Sample-radar" href="#radar-sample">6.99 Sample `<samp>radar</samp>`</a></li>
- <li><a name="toc-Sample-refill" href="#refill-sample">6.100 Sample `<samp>refill</samp>`</a></li>
- <li><a name="toc-Sample-region" href="#region-sample">6.101 Sample `<samp>region</samp>`</a></li>
- <li><a name="toc-Sample-scanfile" href="#scanfile-sample">6.102 Sample `<samp>scanfile</samp>`</a></li>
- <li><a name="toc-Sample-schemes" href="#schemes-sample">6.103 Sample `<samp>schemes</samp>`</a></li>
- <li><a name="toc-Sample-section" href="#section-sample">6.104 Sample `<samp>section</samp>`</a></li>
- <li><a name="toc-Sample-several_005flight" href="#several_005flight-sample">6.105 Sample `<samp>several_light</samp>`</a></li>
- <li><a name="toc-Sample-solve" href="#solve-sample">6.106 Sample `<samp>solve</samp>`</a></li>
- <li><a name="toc-Sample-stem" href="#stem-sample">6.107 Sample `<samp>stem</samp>`</a></li>
- <li><a name="toc-Sample-step" href="#step-sample">6.108 Sample `<samp>step</samp>`</a></li>
- <li><a name="toc-Sample-stereo" href="#stereo-sample">6.109 Sample `<samp>stereo</samp>`</a></li>
- <li><a name="toc-Sample-stfa" href="#stfa-sample">6.110 Sample `<samp>stfa</samp>`</a></li>
- <li><a name="toc-Sample-style" href="#style-sample">6.111 Sample `<samp>style</samp>`</a></li>
- <li><a name="toc-Sample-surf" href="#surf-sample">6.112 Sample `<samp>surf</samp>`</a></li>
- <li><a name="toc-Sample-surf3" href="#surf3-sample">6.113 Sample `<samp>surf3</samp>`</a></li>
- <li><a name="toc-Sample-surf3a" href="#surf3a-sample">6.114 Sample `<samp>surf3a</samp>`</a></li>
- <li><a name="toc-Sample-surf3c" href="#surf3c-sample">6.115 Sample `<samp>surf3c</samp>`</a></li>
- <li><a name="toc-Sample-surf3ca" href="#surf3ca-sample">6.116 Sample `<samp>surf3ca</samp>`</a></li>
- <li><a name="toc-Sample-surfa" href="#surfa-sample">6.117 Sample `<samp>surfa</samp>`</a></li>
- <li><a name="toc-Sample-surfc" href="#surfc-sample">6.118 Sample `<samp>surfc</samp>`</a></li>
- <li><a name="toc-Sample-surfca" href="#surfca-sample">6.119 Sample `<samp>surfca</samp>`</a></li>
- <li><a name="toc-Sample-table" href="#table-sample">6.120 Sample `<samp>table</samp>`</a></li>
- <li><a name="toc-Sample-tape" href="#tape-sample">6.121 Sample `<samp>tape</samp>`</a></li>
- <li><a name="toc-Sample-tens" href="#tens-sample">6.122 Sample `<samp>tens</samp>`</a></li>
- <li><a name="toc-Sample-ternary" href="#ternary-sample">6.123 Sample `<samp>ternary</samp>`</a></li>
- <li><a name="toc-Sample-text" href="#text-sample">6.124 Sample `<samp>text</samp>`</a></li>
- <li><a name="toc-Sample-text2" href="#text2-sample">6.125 Sample `<samp>text2</samp>`</a></li>
- <li><a name="toc-Sample-textmark" href="#textmark-sample">6.126 Sample `<samp>textmark</samp>`</a></li>
- <li><a name="toc-Sample-ticks" href="#ticks-sample">6.127 Sample `<samp>ticks</samp>`</a></li>
- <li><a name="toc-Sample-tile" href="#tile-sample">6.128 Sample `<samp>tile</samp>`</a></li>
- <li><a name="toc-Sample-tiles" href="#tiles-sample">6.129 Sample `<samp>tiles</samp>`</a></li>
- <li><a name="toc-Sample-torus" href="#torus-sample">6.130 Sample `<samp>torus</samp>`</a></li>
- <li><a name="toc-Sample-traj" href="#traj-sample">6.131 Sample `<samp>traj</samp>`</a></li>
- <li><a name="toc-Sample-triangulation" href="#triangulation-sample">6.132 Sample `<samp>triangulation</samp>`</a></li>
- <li><a name="toc-Sample-triplot" href="#triplot-sample">6.133 Sample `<samp>triplot</samp>`</a></li>
- <li><a name="toc-Sample-tube" href="#tube-sample">6.134 Sample `<samp>tube</samp>`</a></li>
- <li><a name="toc-Sample-type0" href="#type0-sample">6.135 Sample `<samp>type0</samp>`</a></li>
- <li><a name="toc-Sample-type1" href="#type1-sample">6.136 Sample `<samp>type1</samp>`</a></li>
- <li><a name="toc-Sample-type2" href="#type2-sample">6.137 Sample `<samp>type2</samp>`</a></li>
- <li><a name="toc-Sample-vect" href="#vect-sample">6.138 Sample `<samp>vect</samp>`</a></li>
- <li><a name="toc-Sample-vect3" href="#vect3-sample">6.139 Sample `<samp>vect3</samp>`</a></li>
- <li><a name="toc-Sample-_0027venn_0027" href="#venn-sample">6.140 Sample `venn`</a></li>
- </ul></li>
- <li><a name="toc-Symbols-and-hot_002dkeys-1" href="#Symbols-and-hot_002dkeys">Appendix A Symbols and hot-keys</a>
- <ul class="no-bullet">
- <li><a name="toc-Symbols-for-styles-1" href="#Symbols-for-styles">A.1 Symbols for styles</a></li>
- <li><a name="toc-Hot_002dkeys-for-mglview-1" href="#Hot_002dkeys-for-mglview">A.2 Hot-keys for mglview</a></li>
- <li><a name="toc-Hot_002dkeys-for-UDAV-1" href="#Hot_002dkeys-for-UDAV">A.3 Hot-keys for UDAV</a></li>
- </ul></li>
- <li><a name="toc-GNU-Free-Documentation-License" href="#Copying-This-Manual">Appendix B GNU Free Documentation License</a></li>
- <li><a name="toc-Index-1" href="#Index">Index</a></li>
-</ul>
-</div>
-
-
-<a name="Top"></a>
-<div class="header">
-<p>
-Next: <a href="#MGL-scripts" accesskey="n" rel="next">MGL scripts</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="YAzyk-MGL"></a>
-<h1 class="top">Язык MGL</h1>
-
-<p>Это документация для языка MGL (версии 2.4.2). Пожалуйста сообщайте о любых ошибках в этом руководстве на <a href="mailto:mathgl.abalakin@gmail.org">mathgl.abalakin@gmail.org</a>. Дополнительную информацию о MGL и MathGL можно найти на домашней странице проекта <a href="http://mathgl.sourceforge.net/">http://mathgl.sourceforge.net/</a>.
-</p>
-<p>Copyright © 2008-2012 Alexey A. Balakin.
-</p>
-<blockquote>
-<p>Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
-Texts. A copy of the license is included in the section entitled “GNU
-Free Documentation License.”
-</p></blockquote>
-
-
-
-<table class="menu" border="0" cellspacing="0">
-<tr><th colspan="3" align="left" valign="top"></th></tr><tr><td align="left" valign="top">• <a href="#MGL-scripts" accesskey="1">MGL scripts</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#General-concepts" accesskey="2">General concepts</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#MathGL-core" accesskey="3">MathGL core</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-processing" accesskey="4">Data processing</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Examples" accesskey="5">Examples</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#All-samples" accesskey="6">All samples</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Symbols-and-hot_002dkeys" accesskey="7">Symbols and hot-keys</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Copying-This-Manual" accesskey="8">Copying This Manual</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Index" accesskey="9">Index</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-
-
-
-<hr>
-<a name="MGL-scripts"></a>
-<div class="header">
-<p>
-Next: <a href="#General-concepts" accesskey="n" rel="next">General concepts</a>, Previous: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-
-<a name="Skripty-MGL"></a>
-<h2 class="chapter">1 Скрипты MGL</h2>
-
-
-<p>MathGL имеет встроенный скриптовый язык MGL для обработки и отображения данных. Скрипты MGL могут быть выполнены независимо (с помощью программ UDAV, mglconv, mglview и др.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#MGL-definition" accesskey="1">MGL definition</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Program-flow-commands" accesskey="2">Program flow commands</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Special-comments" accesskey="3">Special comments</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#LaTeX-package" accesskey="4">LaTeX package</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-
-<hr>
-<a name="MGL-definition"></a>
-<div class="header">
-<p>
-Next: <a href="#Program-flow-commands" accesskey="n" rel="next">Program flow commands</a>, Up: <a href="#MGL-scripts" accesskey="u" rel="up">MGL scripts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Osnovy-MGL"></a>
-<h3 class="section">1.1 Основы MGL</h3>
-
-
-<p>Язык MGL достаточно простой. Каждая строка - отдельная команда. Первое слово - имя команды, а все остальные ее аргументы. Команда может иметь до 1000 аргументов (по крайней мере сейчас). Слова разделяются одно от другого пробелом или символом табуляции. Различий между верхним и нижним индексом нет, т.е. переменные <var>a</var> и <var>A</var> идентичны. Символ `<samp>#</samp>` начинает комментарий - все символы после него игнорируются до конца строки. Исключением является случай, когда `<samp>#</samp>` входит в строку. Опции команды указываются после символа `<samp>;</samp>` (see <a href="#Command-options">Command options</a>). Символ `<samp>:</samp>` начинает новую команду (подобно переводу строки) если он расположен не внутри скобок или строки.
-</p>
-<p>Если строка содержит ссылки на внешние параметры (`<samp>$0</samp>`, `<samp>$1</samp>` ... `<samp>$9</samp>`) или макроопределения (`<samp>$a</samp>`, `<samp>$b</samp>` ... `<samp>$z</samp>`), то текущие значения параметров/макроопределений подставляются в строку вместо ссылки до выполнением команды. Это позволяет использовать один и тот же скрипт при различных входных параметрах командной строки или вводить макроопределения по ходу исполнения команд скрипта.
-</p>
-<p>Аргументы команды могут быть строками, переменными или числами.
-</p><ul>
-<li> Строка - произвольный набор символов между метками `<samp>'</samp>`. Длинные строки могут быть соединены из нескольких линий файла символом `<samp>\</samp>`. Т.е. строки файла `<samp>'a +'\<br>' b'</samp>` дадут строку `<samp>'a + b'</samp>` (здесь `<samp><br></samp>` - перевод строки). MGL поддерживает несколько операций над строками:
-<ul>
-<li> Соединение строк и чисел, используя `<samp>,</samp>` без пробелов (например, `<samp>'max(u)=',u.max,' a.u.'</samp>` или `<samp>'u=',!(1+i2)</samp>` для комплексных чисел);
-</li><li> Получение n-го символа строки, используя `<samp>[]</samp>` (например, `<samp>'abc'[1]</samp>` даст <code>'b'</code>);
-</li><li> Инкремент последнего символа строки, используя `<samp>+</samp>` (например, `<samp>'abc'+3</samp>` даст <code>'abf'</code>).
-</li></ul>
-
-</li><li> Обычно переменная имеет имя, состоящее из букв и чисел (должно начинаться с буквы и не быть длиннее 64 символов). Если выражение или переменная начинается с символа `<samp>!</samp>`, то будут использованы комплексные значения. Например, код <code>new x 100 'x':copy !b !exp(1i*x)</code> создаст массив действительных чисел <var>x</var> и массив комплексных чисел <var>b</var>, который будет равен <em>exp(I*x)</em>, где <em>I^2=-1</em>.
-В качестве переменной можно использовать также и временные массивы, включающие в себя:
-<ul>
-<li> срезы (“подмассивы”) массивов данных (подобно команде <a href="#subdata">subdata</a>). Например, <code>a(1)</code> или <code>a(1,:)</code> или <code>a(1,:,:)</code> - вторая строка массива <var>a</var>, <code>a(:,2)</code> или <code>a(:,2,:)</code> - третий столбец, <code>a(:,:,0)</code> - первый срез и т.д. Также можно выделить часть массива с m-го по n-ый элемент <code>a(m:n,:,:)</code> или просто <code>a(m:n)</code>.
-
-</li><li> произвольные комбинации столбцов данных (например, <code>a('n*w^2/exp(t)')</code>), если столбцы данных были именованы командой <a href="#idset">idset</a> или в файле данных (в строке начинающейся с <code>##</code>).
-
-</li><li> произвольное выражение из существующих переменных и констант. Например, `<samp>sqrt(dat(:,5)+1)</samp>` даст временный массив данных с элементами равными <code>tmp[i,j] = sqrt(dat[i,5,j]+1)</code>. При этом символ `<samp>`</samp>` возвращает транспонированный массив: `<samp>`sqrt(dat(:,5)+1)</samp>` и `<samp>sqrt(`dat(:,5)+1)</samp>` оба дадут временный массив данных с элементами равными <code>tmp[i,j] = sqrt(dat[j,5,i]+1)</code>.
-
-</li><li> массивы с элементами заданными в квадратных скобках [], разделенные `<samp>,</samp>`. При этом внутри выражения не должно быть пробелов! Например, `<samp>[1,2,3]</samp>` даст временный массив из 3 элементов {1, 2, 3}; `<samp>[[11,12],[21,22]]</samp>` даст матрицу 2*2 и т.д. Элементами такой конструкции могут быть и массивы если их размерности одинаковые, например `<samp>[v1,v2,...,vn]</samp>`.
-
-</li><li> результат команд построения новых данных (see <a href="#Make-another-data">Make another data</a>), если они заключены в фигурные скобки {}. Например, `<samp>{sum dat 'x'}</samp>` даст временный массив, который есть результат суммирования <var>dat</var> вдоль `x`. Это такой же массив как и <var>tmp</var>, полученный командой `<samp>sum tmp dat 'x'</samp>`. При этом можно использовать вложенные конструкции, например `<samp>{sum {max dat 'z'} 'x'}</samp>`.
-</li></ul>
-<p>Временные массивы не могут стоять в качестве первого аргумента команд, создающих массивы (например, `<samp>new</samp>`, `<samp>read</samp>`, `<samp>hist</samp>` и т.д.).
-</p>
-</li><li> К скалярным переменным, кроме собственно чисел, относятся: специальные переменные <code>nan=#QNAN, inf=бесконечность, rnd=случайное число, pi=3.1415926..., on=1, off=0, all=-1, :=-1</code>, переменные с суффиксами (see <a href="#Data-information">Data information</a>), переменные определенные командой <a href="#define">define</a>, значения времени (в формате "hh-mm-ss_DD.MM.YYYY", "hh-mm-ss" или "DD.MM.YYYY") . Также массивы размером 1x1x1 считаются скалярами (например, `<samp>pi/dat.nx</samp>`).
-</li></ul>
-<p>Перед первым использованием все переменные должны быть определены с помощью команд, создающих массивы (<a href="#new">new</a>, <a href="#var">var</a>, <a href="#list">list</a>, <a href="#copy">copy</a>, <a href="#read">read</a>, <a href="#hist">hist</a>, <a href="#sum">sum</a> и др., см. <a href="#Data-constructor">Data constructor</a>, <a href="#Data-filling">Data filling</a> и <a href="#Make-another-data">Make another data</a>).
-</p>
-<p>Команды могут иметь несколько наборов аргументов (например, <code>plot ydat</code> и <code>plot xdat ydat</code>). Все аргументы команды для выбранного набора должны быть указаны, однако часть из них могут иметь значения по умолчанию. Такие аргументы в описании команд будут помещены в квадратные скобки [], например <code>plot ydat ['stl'='' zval=nan]</code>. При этом запись <code>[arg1 arg2 arg3 ...]</code> подразумевает <code>[arg1 [arg2 [arg3 ...]]]</code>, т.е. опускать можно только аргументы с конца, если вы согласны с их значениями по умолчанию. Например, <code>plot ydat '' 1</code> или <code>plot ydat ''</code> правильно, а <code>plot ydat 1</code> не правильно (аргумент <code>'stl'</code> пропущен).
-</p>
-<p>Можно предоставить несколько вариантов аргументов комманд при использовании символа `<samp>?</samp>` для их разделения. Конкретный вариант аргумента, используемый при выполнении команды, задается значением команды <a href="#variant">variant</a>. При этом будет использован последний вариант, если задано слишком большое значение. По умолчанию используется первый вариант (т.е. как при <code>variant 0</code>). Например в следующем коде будет сначала нарисован график синим цветом (первый аргумент `<samp>b</samp>`), а затем красным пунктиром - после <code>variant 1</code> будет использован второй аргумент `<samp>r|</samp>`:
-</p><pre class="verbatim">fplot 'x' 'b'?'r'
-variant 1
-fplot 'x^3' 'b'?'r|'
-</pre>
-
-<hr>
-<a name="Program-flow-commands"></a>
-<div class="header">
-<p>
-Next: <a href="#Special-comments" accesskey="n" rel="next">Special comments</a>, Previous: <a href="#MGL-definition" accesskey="p" rel="prev">MGL definition</a>, Up: <a href="#MGL-scripts" accesskey="u" rel="up">MGL scripts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Upravlenie-khodom-vypolneniya"></a>
-<h3 class="section">1.2 Управление ходом выполнения</h3>
-
-
-<p>Ниже собраны команды, управляющие порядком выполнения других команд (условия, циклы, подпрограммы), (пере-)определяют аргументы скрипта и пр. Прочие команды могут быть найдены в главах <a href="#MathGL-core">MathGL core</a> и <a href="#Data-processing">Data processing</a>. Отмечу, что некоторые из команд (например, <a href="#define">define</a>, <a href="#ask">ask</a>, <a href="#call">call</a>, <a href="#for">for</a>, <a href="#func">func</a>) должны быть расположены на отдельной строке.
-</p>
-<a name="index-chdir"></a>
-<a name="chdir"></a><dl>
-<dt><a name="index-chdir-1"></a>Команда MGL: <em></em> <strong>chdir</strong> <em>'path'</em></dt>
-<dd><p>Переходит в папку <var>path</var>.
-</p></dd></dl>
-
-<a name="index-ask"></a>
-<a name="ask"></a><dl>
-<dt><a name="index-ask-1"></a>Команда MGL: <em></em> <strong>ask</strong> <em>$N 'question'</em></dt>
-<dd><p>Задает <var>N</var>-ый аргумент скрипта равным ответу пользователя на вопрос <var>question</var>. Обычно команда показывает диалог с вопросом и полем ввода текста ответа. Здесь <var>N</var> это цифра (0...9) или буква (a...z).
-</p></dd></dl>
-
-<a name="index-define"></a>
-<a name="define"></a><dl>
-<dt><a name="index-define-1"></a>Команда MGL: <em></em> <strong>define</strong> <em>$N smth</em></dt>
-<dd><p>Задает <var>N</var>-ый аргумент скрипта равным <var>smth</var>. Отмечу, что <var>smth</var> используется как есть (с символами `<samp>'</samp>` если присутствуют). Выполняется только подстановка других макроопределений $0...$9, $a...$z. Здесь <var>N</var> это цифра (0...9) или буква (a...z).
-</p></dd></dl>
-<dl>
-<dt><a name="index-define-2"></a>Команда MGL: <em></em> <strong>define</strong> <em>name smth</em></dt>
-<dd><p>Определяет константу (скаляр) с именем <code>name</code> и числовым значением <code>smth</code>. Позднее она может быть использована как обычное число.
-</p></dd></dl>
-<a name="index-defchr"></a>
-<a name="defchr"></a><dl>
-<dt><a name="index-defchr-1"></a>Команда MGL: <em></em> <strong>defchr</strong> <em>$N smth</em></dt>
-<dd><p>Задает <var>N</var>-ый аргумент скрипта равным символу с UTF кодом <var>smth</var>. Здесь <var>N</var> это цифра (0...9) или буква (a...z).
-</p></dd></dl>
-<a name="index-defnum"></a>
-<a name="defnum"></a><dl>
-<dt><a name="index-defnum-1"></a>Команда MGL: <em></em> <strong>defnum</strong> <em>$N smth</em></dt>
-<dd><p>Задает <var>N</var>-ый аргумент скрипта равным числовому значению <var>smth</var>. Здесь <var>N</var> это цифра (0...9) или буква (a...z).
-</p></dd></dl>
-
-
-<a name="index-call"></a>
-<a name="call"></a><dl>
-<dt><a name="index-call-1"></a>Команда MGL: <em></em> <strong>call</strong> <em>'fname' [ARG1 ARG2 ... ARG9]</em></dt>
-<dd><p>Переходит к выполнению (вызывает) подпрограммы <var>fname</var> (или внешнего скрипта, если функция не была найдена). Опциональные аргументы передаются в подпрограмму. См. также <a href="#func">func</a>.
-</p></dd></dl>
-
-<a name="index-func"></a>
-<a name="func"></a><dl>
-<dt><a name="index-func-1"></a>Команда MGL: <em></em> <strong>func</strong> <em>'fname' [narg=0]</em></dt>
-<dd><p>Определяет подпрограмму с именем <var>fname</var> и задает число требуемых аргументов. Аргументы будут помещены в параметры скрипта $1, $2, ... $9. Отмечу, что выполнение основной программы будет остановлено при встрече <code>func</code> - действует аналогично комманде <a href="#stop">stop</a>. См. также <a href="#return">return</a>.
-</p>
-</dd></dl>
-<a name="index-return"></a>
-<a name="return"></a><dl>
-<dt><a name="index-return-1"></a>Команда MGL: <em></em> <strong>return</strong></dt>
-<dd><p>Возвращается из подпрограммы. См. также <a href="#func">func</a>.
-</p></dd></dl>
-
-<a name="index-load"></a>
-<a name="load"></a><dl>
-<dt><a name="index-load-1"></a>Команда MGL: <em></em> <strong>load</strong> <em>'filename'</em></dt>
-<dd><p>Загружает дополнительные команды MGL из внешней динамической библиотеки <var>filename</var>. Данная библиотека должна содержать массив с именем <code>mgl_cmd_extra</code> типа <code>mglCommand</code>, который содержит описание новых комманд.
-</p></dd></dl>
-
-
-<a name="index-if"></a>
-<a name="if"></a><a name="then"></a><dl>
-<dt><a name="index-if-1"></a>Команда MGL: <em></em> <strong>if</strong> <em><code>val</code> <strong>then</strong> <code>CMD</code></em></dt>
-<dd><p>Выполняет команду <code>CMD</code> только если <code>val</code> не ноль.
-</p></dd></dl>
-<dl>
-<dt><a name="index-if-2"></a>Команда MGL: <em></em> <strong>if</strong> <em><code>val</code></em></dt>
-<dd><p>Начинает блок команд, выполняемый если <code>val</code> не ноль.
-</p></dd></dl>
-<dl>
-<dt><a name="index-if-3"></a>Команда MGL: <em></em> <strong>if</strong> <em>dat 'cond'</em></dt>
-<dd><p>Начинает блок команд, выполняемый если каждый элемент <var>dat</var> удовлетворяет условию <var>cond</var>.
-</p></dd></dl>
-<a name="index-elseif"></a>
-<a name="elseif"></a><dl>
-<dt><a name="index-elseif-1"></a>Команда MGL: <em></em> <strong>elseif</strong> <em>dat 'cond'</em></dt>
-<dd><p>Начинает блок команд, выполняемый если предыдущий <code>if</code> или <code>elseif</code> не был выполнен и каждый элемент <var>dat</var> удовлетворяет условию <var>cond</var>.
-</p></dd></dl>
-<dl>
-<dt><a name="index-elseif-2"></a>Команда MGL: <em></em> <strong>elseif</strong> <em><code>val</code></em></dt>
-<dd><p>Начинает блок команд, выполняемый если предыдущий <code>if</code> или <code>elseif</code> не был выполнен и <code>val</code> не ноль.
-</p></dd></dl>
-<a name="index-else"></a>
-<a name="else"></a><dl>
-<dt><a name="index-else-1"></a>Команда MGL: <em></em> <strong>else</strong></dt>
-<dd><p>Начинает блок команд, выполняемый если предыдущий <code>if</code> или <code>elseif</code> не был выполнен.
-</p></dd></dl>
-<a name="index-endif"></a>
-<a name="endif"></a><dl>
-<dt><a name="index-endif-1"></a>Команда MGL: <em></em> <strong>endif</strong></dt>
-<dd><p>Заканчивает определение блока <code>if/elseif/else</code>.
-</p></dd></dl>
-
-<a name="index-for"></a>
-<a name="for"></a><dl>
-<dt><a name="index-for-1"></a>Команда MGL: <em></em> <strong>for</strong> <em>$N <code>v1 v2 [dv=1]</code></em></dt>
-<dd><p>Начинает блок команд, выполняемый в цикле с $<var>N</var>-ым аргументом изменяющимся от <var>v1</var> до <var>v2</var> с шагом <var>dv</var>. Здесь <var>N</var> это цифра (0...9) или буква (a...z).
-</p></dd></dl>
-<dl>
-<dt><a name="index-for-2"></a>Команда MGL: <em></em> <strong>for</strong> <em>$N dat</em></dt>
-<dd><p>Начинает блок команд, выполняемый в цикле с $<var>N</var>-ым аргументом пробегающим значения массива <var>dat</var>. Здесь <var>N</var> это цифра (0...9) или буква (a...z).
-</p></dd></dl>
-<a name="index-next"></a>
-<a name="next"></a><dl>
-<dt><a name="index-next-1"></a>Команда MGL: <em></em> <strong>next</strong></dt>
-<dd><p>Заканчивает блок цикла <code>for</code>.
-</p></dd></dl>
-
-<a name="index-do"></a>
-<a name="do"></a><dl>
-<dt><a name="index-do-1"></a>Команда MGL: <em></em> <strong>do</strong></dt>
-<dd><p>Начинает бесконечный цикл.
-</p></dd></dl>
-<a name="index-while"></a>
-<a name="while"></a><dl>
-<dt><a name="index-while-1"></a>Команда MGL: <em></em> <strong>while</strong> <em><code>val</code></em></dt>
-<dd><p>Переходит к следующей итерации цикла если <var>val</var> не ноль, в противном случае заканчивает цикл.
-</p></dd></dl>
-<dl>
-<dt><a name="index-while-2"></a>Команда MGL: <em></em> <strong>while</strong> <em>dat 'cond'</em></dt>
-<dd><p>Переходит к следующей итерации цикла если <var>dat</var> удовлетворяет условию <var>cond</var>, в противном случае заканчивает цикл.
-</p></dd></dl>
-
-<a name="index-once"></a>
-<a name="once"></a><dl>
-<dt><a name="index-once-1"></a>Команда MGL: <em></em> <strong>once</strong> <em><code>val</code></em></dt>
-<dd><p>Определяет код (между <code>once on</code> и <code>once off</code>) который будет выполнен только один раз. Полезно для работы с большими данными в программах типа UDAV.
-</p></dd></dl>
-<a name="index-stop"></a>
-<a name="stop"></a><dl>
-<dt><a name="index-stop-1"></a>Команда MGL: <em></em> <strong>stop</strong></dt>
-<dd><p>Останавливает выполнение скрипта.
-</p></dd></dl>
-
-<a name="index-variant"></a>
-<a name="variant"></a><dl>
-<dt><a name="index-variant-1"></a>Команда MGL: <em></em> <strong>variant</strong> <em><code>val</code></em></dt>
-<dd><p>Задает вариант аргумента(ов), разделенных символом `<samp>?</samp>`, для всех последующих комманд.
-</p></dd></dl>
-
-<a name="index-rkstep"></a>
-<a name="rkstep"></a><dl>
-<dt><a name="index-rkstep-1"></a>Команда MGL: <em></em> <strong>rkstep</strong> <em>eq1;... var1;... [<code>dt=1</code>]</em></dt>
-<dd><p>Выполняет один шаг решения системы обыкновенных дифференциальных уравнений {var1` = eq1, ... } с временным шагом <var>dt</var>. Здесь переменные `<samp>var1</samp>`, ... - переменные, определенные в MGL скрипте ранее. При решении используется метод Рунге-Кутта 4-го порядка.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Special-comments"></a>
-<div class="header">
-<p>
-Next: <a href="#LaTeX-package" accesskey="n" rel="next">LaTeX package</a>, Previous: <a href="#Program-flow-commands" accesskey="p" rel="prev">Program flow commands</a>, Up: <a href="#MGL-scripts" accesskey="u" rel="up">MGL scripts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Specialxnye-kommentarii"></a>
-<h3 class="section">1.3 Специальные комментарии</h3>
-
-
-<p>There are number of special comments for MGL script, which set some global behavior (like, animation, dialog for parameters and so on). All these special comments starts with double sign <code>##</code>. Let consider them.
-</p>
-<dl compact="compact">
-<dt>`<samp><strong>##c</strong> <code>v1 v2 [dv=1]</code></samp>`</dt>
-<dd><p>Sets the parameter for animation loop relative to variable <code>$0</code>. Here <var>v1</var> and <var>v2</var> are initial and final values, <var>dv</var> is the increment.
-</p>
-</dd>
-<dt>`<samp><strong>##a</strong> val</samp>`</dt>
-<dd><p>Adds the parameter <var>val</var> to the list of animation relative to variable <code>$0</code>. You can use it several times (one parameter per line) or combine it with animation loop <strong>##c</strong>.
-</p>
-</dd>
-<dt>`<samp><strong>##d</strong> $I kind|label|par1|par2|...</samp>`</dt>
-<dd><p>Creates custom dialog for changing plot properties. Each line adds one widget to the dialog. Here <var>$I</var> is id ($0,$1...$9,$a,$b...$z), <var>label</var> is the label of widget, <var>kind</var> is the kind of the widget:
-</p><ul>
-<li> `e` for editor or input line (parameter is initial value) ,
-</li><li> `v` for spinner or counter (parameters are "ini|min|max|step|big_step"),
-</li><li> `s` for slider (parameters are "ini|min|max|step"),
-</li><li> `b` for check box (parameter is "ini"; also understand "on"=1),
-</li><li> `c` for choice (parameters are possible choices).
-</li></ul>
-<p>Now, it work in FLTK-based <code>mgllab</code> and <code>mglview</code> only.
-</p>
-
-</dd>
-</dl>
-
-
-<hr>
-<a name="LaTeX-package"></a>
-<div class="header">
-<p>
-Previous: <a href="#Special-comments" accesskey="p" rel="prev">Special comments</a>, Up: <a href="#MGL-scripts" accesskey="u" rel="up">MGL scripts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="LaTeX-package-1"></a>
-<h3 class="section">1.4 LaTeX package</h3>
-
-
-<p>There is LaTeX package <code>mgltex</code> (was made by Diego Sejas Viscarra) which allow one to make figures directly from MGL script located in LaTeX file.
-</p>
-<p>For using this package you need to specify <code>--shell-escape</code> option for <em>latex/pdflatex</em> or manually run <em>mglconv</em> tool with produced MGL scripts for generation of images. Don`t forgot to run <em>latex/pdflatex</em> second time to insert generated images into the output document. Also you need to run <em>pdflatex</em> third time to update converted from EPS images if you are using vector EPS output (default).
-</p>
-<p>The package may have following options: <code>draft</code>, <code>final</code> — the same as in the <em>graphicx</em> package; <code>on</code>, <code>off</code> — to activate/deactivate the creation of scripts and graphics; <code>comments</code>, <code>nocomments</code> — to make visible/invisible comments contained inside <code>mglcomment</code> environments; <code>jpg</code>, <code>jpeg</code>, <code>png</code> — to export graphics as JPEG/PNG images; <code>eps</code>, <code>epsz</code> — to export to uncompressed/compressed EPS format as primitives; <code>bps</code>, <code>bpsz</code> — to export to uncompressed/compressed EPS format as bitmap (doesn`t work with <em>pdflatex</em>); <code>pdf</code> — to export to 3D PDF; <code>tex</code> — to export to <em>LaTeX/tikz</em> document.
-</p>
-<p>The package defines the following environments:
-</p><dl compact="compact">
-<dt>`<samp>mgl</samp>`</dt>
-<dd><p>It writes its contents to a general script which has the same name as the LaTeX document, but its extension is <em>.mgl</em>. The code in this environment is compiled and the image produced is included. It takes exactly the same optional arguments as the <code>\includegraphics</code> command, plus an additional argument <var>imgext</var>, which specifies the extension to save the image.
-</p>
-<p>An example of usage of `<samp>mgl</samp>` environment would be:
-</p><pre class="verbatim">\begin{mglfunc}{prepare2d}
- new a 50 40 '0.6*sin(pi*(x+1))*sin(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
- new b 50 40 '0.6*cos(pi*(x+1))*cos(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-\end{mglfunc}
-
-\begin{figure}[!ht]
- \centering
- \begin{mgl}[width=0.85\textwidth,height=7.5cm]
- fog 0.5
- call 'prepare2d'
- subplot 2 2 0 : title 'Surf plot (default)' : rotate 50 60 : light on : box : surf a
-
- subplot 2 2 1 : title '"\#" style; meshnum 10' : rotate 50 60 : box
- surf a '#'; meshnum 10
-
- subplot 2 2 2 : title 'Mesh plot' : rotate 50 60 : box
- mesh a
-
- new x 50 40 '0.8*sin(pi*x)*sin(pi*(y+1)/2)'
- new y 50 40 '0.8*cos(pi*x)*sin(pi*(y+1)/2)'
- new z 50 40 '0.8*cos(pi*(y+1)/2)'
- subplot 2 2 3 : title 'parametric form' : rotate 50 60 : box
- surf x y z 'BbwrR'
- \end{mgl}
-\end{figure}
-</pre>
-</dd>
-<dt>`<samp>mgladdon</samp>`</dt>
-<dd><p>It adds its contents to the general script, without producing any image.
-</p></dd>
-<dt>`<samp>mglcode</samp>`</dt>
-<dd><p>Is exactly the same as `<samp>mgl</samp>`, but it writes its contents verbatim to its own file, whose name is specified as a mandatory argument.
-</p></dd>
-<dt>`<samp>mglscript</samp>`</dt>
-<dd><p>Is exactly the same as `<samp>mglcode</samp>`, but it doesn`t produce any image, nor accepts optional arguments. It is useful, for example, to create a MGL script, which can later be post processed by another package like "listings".
-</p></dd>
-<dt>`<samp>mglblock</samp>`</dt>
-<dd><p>It writes its contents verbatim to a file, specified as a mandatory argument, and to the LaTeX document, and numerates each line of code.
-</p>
-</dd>
-<dt>`<samp>mglverbatim</samp>`</dt>
-<dd><p>Exactly the same as `<samp>mglblock</samp>`, but it doesn`t write to a file. This environment doesn`t have arguments.
-</p></dd>
-<dt>`<samp>mglfunc</samp>`</dt>
-<dd><p>Is used to define MGL functions. It takes one mandatory argument, which is the name of the function, plus one additional argument, which specifies the number of arguments of the function. The environment needs to contain only the body of the function, since the first and last lines are appended automatically, and the resulting code is written at the end of the general script, after the <a href="#stop">stop</a> command, which is also written automatically. The warning is produced if 2 or more function with the same name is defined.
-</p></dd>
-<dt>`<samp>mglcomment</samp>`</dt>
-<dd><p>Is used to contain multiline comments. This comments will be visible/invisible in the output document, depending on the use of the package options <code>comments</code> and <code>nocomments</code> (see above), or the <code>\mglcomments</code> and <code>\mglnocomments</code> commands (see bellow).
-</p></dd>
-<dt>`<samp>mglsetup</samp>`</dt>
-<dd><p>If many scripts with the same code are to be written, the repetitive code can be written inside this environment only once, then this code will be used automatically every time the `<samp>\mglplot</samp>` command is used (see below). It takes one optional argument, which is a name to be associated to the corresponding contents of the environment; this name can be passed to the `<samp>\mglplot</samp>` command to use the corresponding block of code automatically (see below).
-</p></dd>
-</dl>
-
-<p>The package also defines the following commands:
-</p><dl compact="compact">
-<dt>`<samp>\mglplot</samp>`</dt>
-<dd><p>It takes one mandatory argument, which is MGL instructions separated by the symbol `<samp>:</samp>` this argument can be more than one line long. It takes the same optional arguments as the `<samp>mgl</samp>` environment, plus an additional argument <var>setup</var>, which indicates the name associated to a block of code inside a `<samp>mglsetup</samp>` environment. The code inside the mandatory argument will be appended to the block of code specified, and the resulting code will be written to the general script.
-</p>
-<p>An example of usage of `<samp>\mglplot</samp>` command would be:
-</p><pre class="verbatim">\begin{mglsetup}
- box '@{W9}' : axis
-\end{mglsetup}
-\begin{mglsetup}[2d]
- box : axis
- grid 'xy' ';k'
-\end{mglsetup}
-\begin{mglsetup}[3d]
- rotate 50 60
- box : axis : grid 'xyz' ';k'
-\end{mglsetup}
-\begin{figure}[!ht]
- \centering
- \mglplot[scale=0.5]{new a 200 'sin(pi*x)' : plot a '2B'}
-\end{figure}
-\begin{figure}[!ht]
- \centering
- \mglplot[scale=0.5,setup=2d]{
- fplot 'sin(pi*x)' '2B' :
- fplot 'cos(pi*x^2)' '2R'
- }
-\end{figure}
-\begin{figure}[!ht]
- \centering
- \mglplot[setup=3d]{fsurf 'sin(pi*x)+cos(pi*y)'}
-\end{figure}
-</pre>
-</dd>
-<dt>`<samp>\mglgraphics</samp>`</dt>
-<dd><p>This command takes the same optional arguments as the `<samp>mgl</samp>` environment, and one mandatory argument, which is the name of a MGL script. This command will compile the corresponding script and include the resulting image. It is useful when you have a script outside the LaTeX document, and you want to include the image, but you don`t want to type the script again.
-</p></dd>
-<dt>`<samp>\mglinclude</samp>`</dt>
-<dd><p>This is like `<samp>\mglgraphics</samp>` but, instead of creating/including the corresponding image, it writes the contents of the MGL script to the LaTeX document, and numerates the lines.
-</p></dd>
-<dt>`<samp>\mgldir</samp>`</dt>
-<dd><p>This command can be used in the preamble of the document to specify a directory where LaTeX will save the MGL scripts and generate the corresponding images. This directory is also where `<samp>\mglgraphics</samp>` and `<samp>\mglinclude</samp>` will look for scripts.
-</p></dd>
-<dt>`<samp>\mglquality</samp>`</dt>
-<dd><p>Adjust the quality of the MGL graphics produced similarly to <a href="#quality">quality</a>.
-</p></dd>
-<dt>`<samp>\mgltexon, \mgltexoff</samp>`</dt>
-<dd><p>Activate/deactivate the creation of MGL scripts and images. Notice these commands have local behavior in the sense that their effect is from the point they are called on.
-</p></dd>
-<dt>`<samp>\mglcomment, \mglnocomment</samp>`</dt>
-<dd><p>Make visible/invisible the contents of the <code>mglcomment</code> environments. These commands have local effect too.
-</p></dd>
-<dt>`<samp>\mglTeX</samp>`</dt>
-<dd><p>It just pretty prints the name of the package.
-</p></dd>
-</dl>
-
-<p>As an additional feature, when an image is not found or cannot be included, instead of issuing an error, <code>mgltex</code> prints a box with the word `<samp>MGL image not found</samp>` in the LaTeX document.
-</p>
-
-
-
-
-
-<hr>
-<a name="General-concepts"></a>
-<div class="header">
-<p>
-Next: <a href="#MathGL-core" accesskey="n" rel="next">MathGL core</a>, Previous: <a href="#MGL-scripts" accesskey="p" rel="prev">MGL scripts</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Osnovnye-principy"></a>
-<h2 class="chapter">2 Основные принципы</h2>
-
-
-<p>Возможности библиотеки MathGL довольно богаты - число только основных типов графиков превышает 50 видов. Кроме того, есть функции для обработки данных, настройки вида графика и пр. и пр. Тем не менее, я старался придерживаться единого стиля в порядке аргументов функций и способе их “настройки”. В основном все ниже сказанное относится к функциям рисования различных графиков.
-</p>
-<p>Всего основных концепций (базисных идей) шесть:
-</p><ol>
-<li> <strong>Все рисунки создаются в памяти.</strong> Это могут быть как растровые картинки (для <code>SetQuality(MGL_DRAW_LMEM)</code> или <code><a href="#quality">quality</a> 6</code>), так и векторные списки примитивов (по умолчанию). Дальнейшая судьба рисунков определяется пользователем: можно сохранить в файл, вывести на экран, создать анимацию/кино, дополнительно отредактировать и т.д. Такой подход обеспечивает высокую переносимость библиотеки - один и тот же программный код создаст в точности одинаковый рисунок на <em>любой</em> операционной системе. Кроме того, при таком подходе рисунки можно создавать непосредственно в консольной программе - графическое окно не нужно!
-</li><li> <strong>Все настройки графиков (стиль линий, цветовые схемы поверхностей, стиль и цвет текста) задаются строками.</strong> Это обеспечивает: удобство для пользователя - короткую строку легче читать и здесь тяжелее ошибиться, чем в большом списке параметров; переносимость - строки выглядят одинаково на всех платформах и не надо заботиться о типе и числе аргументов.
-</li><li> <strong>Все функции имеют “упрощенный” и “продвинутый” варианты.</strong> Сделано опять из-за удобства. В “упрощенном” варианте для построения графика нужны только один-два массив(а) данных, которые автоматически равнораспределяются в заданном диапазоне осей координат. В “продвинутой” версии можно не только указать явно диапазон построения графика, но и задать его параметрически. Последнее позволяет легко строить довольно сложные кривые и поверхности. В обоих вариантах функций порядок аргументов стандартен: сначала идут массивы данных, потом необязательный строковый параметр стиля графика, а далее строка опций для более точной настройки графика.
-</li><li> <strong>Все данные передаются через экземпляры класса mglData(A).</strong> Такой подход позволяет избежать ошибок при работе с памятью и единообразно передавать данные разных типов (float, double, данные из файла, заполненных пользователем и пр.) в функции рисования.
-</li><li> <strong>Все элементы рисунков векторные.</strong> Изначально библиотека MathGL была ориентированна на работу с научными данными, которые по своей природе векторные (линии, грани, матрицы и т.д.). Поэтому векторность используется во всех рисунках! Причем иногда даже в ущерб производительности (например, при выводе шрифтов). Помимо всего прочего, векторность позволяет легко масштабировать рисунок - измените размер картинки в 2 раза, и рисунок пропорционально растянется.
-</li><li> <strong>Новые графики не удаляют уже нарисованное.</strong> Этот, в чем-то неожиданный, подход позволяет создавать огромное количество “комбинированных” графиков. Например, поверхность с наложенными линиями уровня строится двумя последовательными вызовами функций рисования поверхности и линий уровня (в любом порядке). И совершенно не надо писать специальную функцию (как в Matlab и некоторых других программах) для рисования этого графика.
-</li></ol>
-
-<p>Кроме основных концепций я хотел бы остановиться на нескольких, как оказалось, нетривиальных моментах - способе указания положения графика, осей координат и строковых параметров линий, поверхностей, текста.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Coordinate-axes" accesskey="1">Coordinate axes</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Color-styles" accesskey="2">Color styles</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Line-styles" accesskey="3">Line styles</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Color-scheme" accesskey="4">Color scheme</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Font-styles" accesskey="5">Font styles</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Textual-formulas" accesskey="6">Textual formulas</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Command-options" accesskey="7">Command options</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Interfaces" accesskey="8">Interfaces</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Coordinate-axes"></a>
-<div class="header">
-<p>
-Next: <a href="#Color-styles" accesskey="n" rel="next">Color styles</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Osi-koordinat"></a>
-<h3 class="section">2.1 Оси координат</h3>
-
-
-<p>Представление системы координат в MathGL состоит из двух частей. Вначале координаты нормируются в диапазон изменения осей координат (see <a href="#Axis-settings">Axis settings</a>). Если флаг <code>SetCut()</code> установлен, то точки вне интервала отбрасываются, в противном случае, они проецируются на ограничивающий параллелепипед (см. <a href="#Cutting">Cutting</a>). Кроме того, отбрасываются точки внутри границ, определенных переменными <var>CutMin</var>x<var>CutMax</var> и точки, для которых значение функции <code>CutOff</code>() не равно нулю. После этого формулы перехода в криволинейную систему координат <code>SetFunc()</code>применяются к каждой точке. Наконец, точка данных отображается с помощью одной из графических функций.
-</p>
-<p>Диапазон изменения <em>x, y, z</em>-координат задается функциями <code>SetRange()</code> или <a href="#ranges">ranges</a>. Точка пересечения осей координат задается функцией <code>SetOrigin()</code>. При этом можно использовать NAN значения для автоматического выбора положения оси.
-</p>
-<p>Кроме привычных осей <em>x, y, z</em> есть еще одна ось - цветовая шкала - ось <em>c</em>. Она используется при окрашивании поверхностей и задает границы изменения функции при окрашивании. Ее границы автоматически устанавливаются равными диапазону z-оси при вызове <a href="#ranges">ranges</a>. Возможно и ручное изменение границ цветового интервала посредством вызова <code>SetRange('c', ...)</code>. Используйте <a href="#colorbar">colorbar</a> для отображения цветовой шкалы.
-</p>
-<p>Вид меток по осям определяется функцией <code>SetTicks()</code> (see <a href="#Ticks">Ticks</a>). Функция <var>SetTuneTicks</var> включает/выключает выделение общего множителя (большого или малого факторов в диапазоне) для меток осей координат. Наконец, если стандартный вид меток не устраивает пользователя, то их шаблон можно задать явно (можно использовать и ТеХ символы), воспользовавшись функцией <code>SetTickTempl()</code>. Кроме того, в качестве меток можно вывести произвольный текст использовав функцию <code>SetTicksVal()</code>.
-</p>
-
-<hr>
-<a name="Color-styles"></a>
-<div class="header">
-<p>
-Next: <a href="#Line-styles" accesskey="n" rel="next">Line styles</a>, Previous: <a href="#Coordinate-axes" accesskey="p" rel="prev">Coordinate axes</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Cveta"></a>
-<h3 class="section">2.2 Цвета</h3>
-
-
-<p>Base colors are defined by one of symbol `<samp>wkrgbcymhRGBCYMHWlenupqLENUPQ</samp>`.
-<p>Символы цвета: `<samp>k</samp>` - черный, `<samp>r</samp>` - <span style="color: rgb(255, 0, 0);">красный</span>, `<samp>R</samp>` - <span style="color: rgb(127, 0, 0);">темно красный</span>, `<samp>g</samp>` - <span style="color: rgb(0, 255, 0);">зеленый</span>, `<samp>G</samp>` - <span style="color: rgb(0, 127, 0);">темно зеленый</span>, `<samp>b</samp>` - <span style="color: rgb(0, 0, 255);">синий</span>, `<samp>B</samp>` - <span style="color: rgb(0, 0, 127);">темно синий</span>, `<samp>c</samp>` - <span style="color: rgb(0, 255, 255);">голубой</span>, `<samp>C</samp>` - <span style="color: rgb(0, 127, 127);">темно голубой</span>, `<samp>m</samp>` - <span style="color: rgb(255, 0, 255);">пурпурный</span>, `<samp>M</samp>` - <span style="color: rgb(127, 0, 127);">темно пурпурный</span>, `<samp>y</samp>` - <span style="color: rgb(255, 255, 0);">желтый</span>, `<samp>Y</samp>` - <span style="color: rgb(127, 127, 0);">темно желтый (золотой)</span>, `<samp>h</samp>` - <span style="color: rgb(127, 127, 127);">серый</span>, `<samp>H</samp>` - <span style="color: rgb(76, 76, 76);">темно серый</span>, `<samp>w</samp>` - белый, `<samp>W</samp>` - <span style="color: rgb(178, 178, 178);">светло серый</span>, `<samp>l</samp>` - <span style="color: rgb(0, 255, 127);">сине-зеленый</span>, `<samp>L</samp>` - <span style="color: rgb(0, 127, 63);">темно сине-зеленый</span>, `<samp>e</samp>` - <span style="color: rgb(127, 255, 0);">желто-зеленый</span>, `<samp>E</samp>` - <span style="color: rgb(63, 127, 0);">темно желто-зеленый</span>, `<samp>n</samp>` - <span style="color: rgb(0, 127, 255);">небесно-синий</span>, `<samp>N</samp>` - <span style="color: rgb(0, 63, 127);">темно небесно-синий</span>, `<samp>u</samp>` - <span style="color: rgb(127, 0, 255);">сине-фиолетовый</span>, `<samp>U</samp>` - <span style="color: rgb(63, 0, 127);">темно сине-фиолетовый</span>, `<samp>p</samp>` - <span style="color: rgb(255, 0, 127);">фиолетовый</span>, `<samp>P</samp>` - <span style="color: rgb(127, 0, 63);">темно фиолетовый</span>, `<samp>q</samp>` - <span style="color: rgb(255, 127, 0);">оранжевый</span>, `<samp>Q</samp>` - <span style="color: rgb(127, 63, 0);">темно оранжевый (коричневый)</span>.</p>
-</p>
-<p>В цветовой схеме можно использовать тональные (“подсвеченные”) цвета. Тональный цвет задается двумя символами в фигурных скобках `<samp>{cN}</samp>`: первый - обычный цвет, второй - его яркость цифрой. Цифра может быть в диапазоне `<samp>1</samp>`...`<samp>9</samp>`. При этом `<samp>5</samp>` соответствует нормальному цвету, `<samp>1</samp>` - очень темная версия цвета (почти черный), `<samp>9</samp>` - очень светлая версия цвета (почти белый). Например, цвета могут быть `<samp>{b2}</samp>` `<samp>{b7}</samp>` `<samp>{r7}</samp>` и т.д.
-</p>
-<p>Наконец, можно указать явно RGB или RGBA значения цвета, используя формат `<samp>{xRRGGBB}</samp>` или `<samp>{xRRGGBBAA}</samp>` соответственно. Например, `<samp>{xFF9966}</samp>` даст цвет
-<span style="color: rgb(255, 153, 102);">дыни</span>.
-</p>
-
-<hr>
-<a name="Line-styles"></a>
-<div class="header">
-<p>
-Next: <a href="#Color-scheme" accesskey="n" rel="next">Color scheme</a>, Previous: <a href="#Color-styles" accesskey="p" rel="prev">Color styles</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Stilx-linii"></a>
-<h3 class="section">2.3 Стиль линий</h3>
-
-
-<a name="index-Stilx-linii"></a>
-<a name="index-Stilx-markerov"></a>
-<a name="index-Stilx-strelok"></a>
-
-<p>Стиль линии задается строкой, которая может содержать символ цвета (`<samp>wkrgbcymhRGBCYMHWlenupqLENUPQ</samp>`), тип пунктира (`<samp>-|;:ji</samp>` или пробел), ширину линии (`<samp>0123456789</samp>`) и тип маркера (`<samp>o+xsd.^v</samp>` и модификатор `<samp>#</samp>`). Если пропущен цвет или тип пунктира, то используется значение по умолчанию с последним указанным цветом или значение из палитры (для see <a href="#g_t1D-plotting">1D plotting</a>).
-По умолчанию палитры содержит следующие цвета: <span style="color: rgb(76, 76, 76);">темно серый</span> `<samp>H</samp>`, <span style="color: rgb(0, 0, 255);">синий</span> `<samp>b</samp>`, <span style="color: rgb(0, 255, 0);">зеленый</span> `<samp>g</samp>`, <span style="color: rgb(255, 0, 0);">красный</span> `<samp>r</samp>`, <span style="color: rgb(0, 255, 255);">голубой</span> `<samp>c</samp>`, <span style="color: rgb(255, 0, 255);">пурпурный</span> `<samp>m</samp>`, <span style="color: rgb(255, 255, 0);">yellow</span> `<samp>y</samp>`, <span style="color: rgb(127, 127, 127);">серый</span> `<samp>h</samp>`, <span style="color: rgb(0, 255, 127);">сине-зеленый</span> `<samp>l</samp>`, <span style="color: rgb(0, 127, 255);">небесно-синий</span> `<samp>n</samp>`, <span style="color: rgb(255, 127, 0);">оранжевый</span> `<samp>q</samp>`, <span style="color: rgb(127, 255, 0);">желто-зеленый</span> `<samp>e</samp>`, <span style="color: rgb(127, 0, 255);">сине-фиолетовый</span> `<samp>u</samp>`, <span style="color: rgb(255, 0, 127);">фиолетовый</span> `<samp>p</samp>`.
-
-<p>Тип пунктира: пробел - нет линии (для рисования только маркеров), `<samp>-</samp>` - сплошная линия (■■■■■■■■■■■■■■■■), `<samp>|</samp>` - длинный пунктир (■■■■■■■■□□□□□□□□), `<samp>;</samp>` - пунктир (■■■■□□□□■■■■□□□□), `<samp>=</samp>` - короткий пунктир (■■□□■■□□■■□□■■□□), `<samp>:</samp>` - точки (■□□□■□□□■□□□■□□□), `<samp>j</samp>` - пунктир с точками (■■■■■■■□□□□■□□□□), `<samp>i</samp>` - мелкий пунктир с точками (■■■□□■□□■■■□□■□□), `<samp>{dNNNN}</samp>` - заданнÑ\8bй вÑ\80Ñ\83Ñ\87нÑ\83Ñ\8e Ñ\81Ñ\82илÑ\8c (длÑ\8f v.2.3 и поздниÑ\85, напÑ\80имеÑ\80 `<samp>{df090}</samp>` длÑ\8f (■■■■□□□□■□□■□□□□)).</p>
-</p>
-<p>Типы маркеров: `<samp>o</samp>` - окружность, `<samp>+</samp>` - крест, `<samp>x</samp>` - косой крест, `<samp>s</samp>` - квадрат, `<samp>d</samp>` - ромб, `<samp>.</samp>` - точка, `<samp>^</samp>` - треугольник вверх, `<samp>v</samp>` - треугольник вниз, `<samp><</samp>` - треугольник влево, `<samp>></samp>` - треугольник вправо, `<samp>#*</samp>` - знак Y, `<samp>#+</samp>` - крест в квадрате, `<samp>#x</samp>` - косой крест в квадрате, `<samp>#.</samp>` - точка в окружности. Если в строке присутствует символ `<samp>#</samp>`, то используются символы с заполнением.
-</p>
-<p>Вы можете определить собственные символы (см. <a href="#addsymbol">addsymbol</a>) для рисования маркеров при использовании стиля `<samp>&</samp>`. В частности, `<samp>&*</samp>`, `<samp>&o</samp>`, `<samp>&+</samp>`, `<samp>&x</samp>`, `<samp>&s</samp>`, `<samp>&d</samp>`, `<samp>&.</samp>`, `<samp>&^</samp>`, `<samp>&v</samp>`, `<samp>&<</samp>`, `<samp>&></samp>` нарисует определенный пользователем символ с именем `<samp>*o+xsd.^v<></samp>` соответственно; и
-`<samp>&#o</samp>`, `<samp>&#+</samp>`, `<samp>&#x</samp>`, `<samp>&#s</samp>`, `<samp>&#d</samp>`, `<samp>&#.</samp>`, `<samp>&#^</samp>`, `<samp>&#v</samp>`, `<samp>&#<</samp>`, `<samp>&#></samp>` нарисует определенный пользователем символ с именем `<samp>YOPXSDCTVLR</samp>` соответственно. Замечу, что будет нарисован только контур определенного пользователем символа если задан отрицательный размер маркера (см. <a href="#marksize">marksize</a> или опцию <code>size</code> в <a href="#Command-options">Command options</a>).
-</p>
-<p>На конце и в начале линии можно выводить специальный символ (стрелку), если в строке указать один из символов: `<samp>A</samp>` - стрелка наружу, `<samp>V</samp>` - стрелка внутрь, `<samp>I</samp>` - поперечная черта, `<samp>K</samp>` - стрелка с чертой, `<samp>T</samp>` - треугольник, `<samp>S</samp>` - квадрат, `<samp>D</samp>` - ромб, `<samp>O</samp>` - круг, `<samp>X</samp>` - косой крест, `<samp>_</samp>` - нет стрелки (по умолчанию). При этом действует следующее правило: первый символ определяет стрелку на конце линии, второй символ - стрелку в начале линии. Например, `<samp>r-A</samp>` - красная сплошная линия со стрелкой на конце, `<samp>b|AI</samp>` - синий пунктир со стрелкой на конце и чертой вначале, `<samp>_O</samp>` - линия с текущим стилем и кружком вначале. Эти стили действуют и при построении графиков (например, <a href="#g_t1D-plotting">1D plotting</a>).
-</p>
-<div align="center"><img src="png/style.png" alt="Color and line styles.">
-</div>
-
-<hr>
-<a name="Color-scheme"></a>
-<div class="header">
-<p>
-Next: <a href="#Font-styles" accesskey="n" rel="next">Font styles</a>, Previous: <a href="#Line-styles" accesskey="p" rel="prev">Line styles</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Cvetovaya-skhema"></a>
-<h3 class="section">2.4 Цветовая схема</h3>
-
-
-<a name="index-Cvetovaya-skhema"></a>
-
-<p>Цветовая схема используется для определения цвета поверхностей, линий уровня и пр. Цветовая схема задается строкой <em>s</em>, которая содержит символы цвета (see <a href="#Line-styles">Line styles</a>) или символы `<samp>#:|</samp>`. Символ `<samp>#</samp>` переключает рисование поверхности на сетчатое (для трехмерных поверхностей) или включает рисование сетки на поверхности. Символ `<samp>|</samp>` отключает интерполяцию цвета в цветовой схеме. Это может быть полезно для “резких” цветов, например, при рисовании матриц. Если в строке встречается символ `<samp>:</samp>`, то он принудительно заканчивает разбор строки для стиля поверхности. После этого символа могут идти описание стиля текста или оси вращения кривой/линий уровня. Цветовая схема может содержать до 32 значений цвета.
-</p>
-<p>При определении цвета по <em>амплитуде</em> (наиболее часто используется) окончательный цвет определяется путем линейной интерполяции массива цветов. Массив цветов формируется из цветов, указанных в строке спецификации. Аргумент - амплитуда, нормированная на диапазон изменения цвета (см. <a href="#Axis-settings">Axis settings</a>). Например, строка из 4 символов `<samp>bcyr</samp>` соответствует изменению цвета от синего (минимальное значение) через голубой и желтый (промежуточные значения) к красному (максимальное значение). Строка `<samp>kw</samp>` соответствует изменению цвета от черного (минимальное значение) к белому (максимальное значение). Строка из одного символа (например, `<samp>g</samp>`) соответствует однотонному цвету (в данному случае зеленому).
-</p>
-<p>Специальная двуосная цветовая схема (как в графике <a href="#map">map</a>) задается символом `<samp>%</samp>`. В ней второе направление (прозрачность) используется как вторая координата для цвета. При этом можно указать до 4 цветов для углов: {c1,a1}, {c2,a1}, {c1,a2}, {c2,a2}. Здесь диапазоны цвета и прозрачности равны {c1,c2} и {a1,a2}. Если указано меньше 4 цветов, то черный используется для угла {c1,a1}. Если задано только 2 цвета, то их сумма используется для угла {c2,a2}.
-</p>
-<p>Есть несколько полезных цветовых схем. Строка `<samp>kw</samp>` дает обычную серую (черно-белую) схему, когда большие значения светлее. Строка `<samp>wk</samp>` представляет обратную серую схему, когда большие значения темнее. Строки `<samp>kRryw</samp>`, `<samp>kGgw</samp>`, `<samp>kBbcw</samp>` представляют собой хорошо известные схемы <em>hot</em>, <em>summer</em> и <em>winter</em>. Строки `<samp>BbwrR</samp>` и `<samp>bBkRr</samp>` позволяют рисовать двухцветные фигуры на белом или черном фоне, когда отрицательные значения показаны синим цветом, а положительные - красным. Строка `<samp>BbcyrR</samp>` дает цветовую схему, близкую к хорошо известной схеме <em>jet</em>.
-</p>
-<p>Для более точно раскрашивания поверхностей можно изменить равномерное (по умолчанию) положение цветов в цветовой схеме. Формат следующий: `<samp>{CN,pos}</samp>`, `<samp>{CN,pos}</samp>` или `<samp>{xRRGGBB,pos}</samp>`. Здесь значение <var>pos</var> положения цвета должно быть в диапазоне [0, 1]. Отмечу, что альтернативным механизмом тонкой настройки цветовой схемы может служить использование формул для цветовой координаты (см. <a href="#Curved-coordinates">Curved coordinates</a>).
-</p>
-<div align="center"><img src="png/schemes.png" alt="Most popular color schemes.">
-</div>
-<p>При определении цвета по <em>положению точки в пространстве</em> (используется в <a href="#map">map</a>) окончательный цвет определяется по формуле c=x*c[1] + y*c[2]. Здесь c[1], c[2] - первые три цвета в цветовом массиве; x, y - координаты точки, нормированные в диапазон изменения осей координат.
-</p>
-
-<p>Дополнительно, MathGL может наложить маску при закраске граней для создания растрового изображения. Тип маски задается одним из символов `<samp>-+=;oOsS~<>jdD*^</samp>` в цветовой схеме. Маску можно повернуть на произвольный угол командой <a href="#mask">mask</a> или на один из улов +45, -45 или 90 градусов, используя символы `<samp>\/I</samp>` соответственно. Примеры масок по умолчанию показаны на рисунке ниже.
-</p>
-<div align="center"><img src="png/mask.png" alt="Example of masks for face coloring.">
-</div>
-<p>Однако, вы можете задать собственную маску (как матрицу 8*8) для любого из этих символов, используя второй аргумент команды <a href="#mask">mask</a>. Например, маска на правом нижнем подрисунке получается кодом<br>
-<code>mask '+' 'ff00182424f80000':dens a '3+'</code><br>
-или использовать явное задание маски (для v.2.3 и более поздних)<br>
-<code>dens a '3{s00ff00182424f800}'</code>
-</p>
-
-<hr>
-<a name="Font-styles"></a>
-<div class="header">
-<p>
-Next: <a href="#Textual-formulas" accesskey="n" rel="next">Textual formulas</a>, Previous: <a href="#Color-scheme" accesskey="p" rel="prev">Color scheme</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Stilx-teksta"></a>
-<h3 class="section">2.5 Стиль текста</h3>
-
-
-<a name="index-Stilx-teksta"></a>
-
-<p>Стиль текста задается строкой, которая может содержать цвет текста `<samp>wkrgbcymhRGBCYMHW</samp>` (см. <a href="#Color-styles">Color styles</a>), а также тип шрифта (`<samp>ribwou</samp>`) и/или выравнивания (`<samp>LRC</samp>`) после символа `<samp>:</samp>`. Например, `<samp>r:iCb</samp>` соответствует жирному (`<samp>b</samp>`) курсиву (`<samp>i</samp>`) с выравниванием по центру (`<samp>C</samp>` красного цвета (`<samp>r</samp>`). Начиная с MathGL версии 2.3, вы можете использовать не только один цвет для всего текста, но и задать цветовой градиент для выводимой строки (см. <a href="#Color-scheme">Color scheme</a>).
-</p>
-<p>Начертания шрифта: `<samp>r</samp>` - прямой шрифт, `<samp>i</samp>` - курсив, `<samp>b</samp>` - жирный. По умолчанию используется прямой шрифт. Типы выравнивания текста: `<samp>L</samp>` - по левому краю (по умолчанию), `<samp>C</samp>` - по центру, `<samp>R</samp>` - по правому краю, `<samp>T</samp>` - под текстом, `<samp>V</samp>` - по центру вертикально. Дополнительные эффекты шрифта: `<samp>w</samp>` - контурный, `<samp>o</samp>` - надчеркнутый, `<samp>u</samp>` - подчеркнутый.
-</p>
-<p>Синтаксический разбор LaTeX-их команд по умолчанию включен. Это команды смены стиля текста (например, \b для жирного текста): \a или \overline - надчеркивание, \b или \textbf - жирный, \i или \textit - курсив, \r или \textrm - прямой (отменяет стили жирного и курсива), \u или \underline - подчеркнутый, \w или \wire - контурный, \big - большего размера, @ - меньшего размера. Нижний и верхний индексы задаются символами `<samp>_</samp>` и `<samp>^</samp>`. При этом изменение стиля применяется только к следующему символу или к символам в фигурных скобках {}, которые понимаются как единый блок. Например, сравните строки `<samp>sin (x^{2^3})</samp>` и `<samp>sin (x^2^3)</samp>`. Можно также менять цвет текста внутри строки с помощью команд #? или \color?, где `<samp>?</samp>` - символ цвета (see <a href="#Line-styles">Line styles</a>). Например, слова `<samp>Blue</samp>` и `<samp>red</samp>` будут окрашены в соответствующий цвет в строке `<samp>#b{Blue} and \colorr{red} text</samp>`. Большинство функций понимает символ новой строки `<samp>\n</samp>` и позволяет выводить много строчный текст. Наконец, можно использовать символы с произвольным UTF кодом с помощью команды <code>\utf0x????</code>. Например, <code>\utf0x3b1</code> даст символ
-α.
-</p>
-<p>Распознаются также большинство символов TeX и AMSTeX, команды смены стиля текста (\textrm, \textbf, \textit, \textsc, \overline, \underline), акценты (\hat, \tilde, \dot, \ddot, \acute, \check, \grave, \bar, \breve) и корни (\sqrt, \sqrt3, \sqrt4). Полный список содержит около 2000 символов. Отмечу, что первый пробел (пробел, табуляция и пр.) после команды игнорируется, а все остальные пробелы печатаются обычным образом. Например, следующие строки дают одинаковый результат <em>\tilde a</em>: `<samp>\tilde{a}</samp>`; `<samp>\tilde a</samp>`; `<samp>\tilde{}a</samp>`.
-</p>
-В частности, распознаются греческие буквы: α - \alpha, β - \beta, γ - \gamma, δ - \delta, ε - \epsilon, η - \eta, ι - \iota, χ - \chi, κ - \kappa, λ - \lambda, μ - \mu, ν - \nu, o - \o, ω - \omega, ϕ - \phi, π - \pi, ψ - \psi, ρ - \rho, σ - \sigma, θ - \theta, τ - \tau, υ - \upsilon, ξ - \xi, ζ - \zeta, ς - \varsigma, ɛ - \varepsilon, ϑ - \vartheta, φ - \varphi, ϰ - \varkappa; A - \Alpha, B - \Beta, Γ - \Gamma, Δ - \Delta, E - \Epsilon, H - \Eta, I - \Iota, C - \Chi, K - \Kappa, Λ - \Lambda, M - \Mu, N - \Nu, O - \O, Ω - \Omega, Φ - \Phi, Π - \Pi, Ψ - \Psi, R - \Rho, Σ - \Sigma, Θ - \Theta, T - \Tau, Υ - \Upsilon, Ξ - \Xi, Z - \Zeta.
-
-<p>Еще примеры наиболее общеупотребительных TeX-их символов: ∠ - \angle, ⋅ - \cdot, ♣ - \clubsuit, ✓ - \checkmark, ∪ - \cup, ∩ - \cap, ♢ - \diamondsuit, ◇ - \diamond, ÷
- - \div,
-↓ - \downarrow, † - \dag, ‡ - \ddag, ≡ - \equiv, ∃ - \exists, ⌢ - \frown, ♭ - \flat, ≥ - \ge, ≥ - \geq, ≧ - \geqq, ← - \gets, ♡ - \heartsuit, ∞ - \infty, ∫ - \int, \Int, ℑ - \Im, ♢ - \lozenge, ⟨ - \langle, ≤ - \le, ≤ - \leq, ≦ - \leqq, ← - \leftarrow, ∓ - \mp, ∇ - \nabla, ≠ - \ne, ≠ - \neq, ♮ - \natural, ∮ - \oint, ⊙ - \odot, ⊕ - \oplus, ∂ - \partial, ∥ - \parallel, ⊥ -\perp, ± - \pm, ∝ - \propto, ∏ - \prod, ℜ - \Re, → - \rightarrow, ⟩ - \rangle, ♠ - \spadesuit, ~ - \sim, ⌣ - \smile, ⊂ - \subset, ⊃ - \supset, √ - \sqrt or \surd, § - \S, ♯ - \sharp, ∑ - \sum, × - \times, → - \to, ∴ - \therefore, ↑ - \uparrow, ℘ - \wp. </p>
-
-<p>Размер текста может быть задан явно (если <var>size</var>>0) или относительно базового размера шрифта для рисунка |<var>size</var>|*<var>FontSize</var> при <var>size</var><0. Значение <var>size</var>=0 указывает, что соответствующая строка выводиться не будет. Базовый размер шрифта измеряется во внутренних единицах. Специальные функции <code>SetFontSizePT(), SetFontSizeCM(), SetFontSizeIN()</code> позволяют задавать его в более “привычных” единицах.
-</p>
-
-<hr>
-<a name="Textual-formulas"></a>
-<div class="header">
-<p>
-Next: <a href="#Command-options" accesskey="n" rel="next">Command options</a>, Previous: <a href="#Font-styles" accesskey="p" rel="prev">Font styles</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Tekstovye-formuly"></a>
-<h3 class="section">2.6 Текстовые формулы</h3>
-
-<a name="index-Tekstovye-formuly"></a>
-
-<p>MathGL имеет быстрый парсер текстовых формул
-, понимающий большое число функций и операций. Базовые операции: `<samp>+</samp>` - сложение, `<samp>-</samp>` - вычитание, `<samp>*</samp>` - умножение, `<samp>/</samp>` - деление, `<samp>%</samp>` - остаток от деления, `<samp>^</samp>` - возведение в целосичленную степень. Также есть логические операции: `<samp><</samp>` - истина если if x<y, `<samp>></samp>` - истина если x>y, `<samp>=</samp>` - истина если x=y, `<samp>&</samp>` - истина если x и y оба не равны нулю, `<samp>|</samp>` - истина если x или y не нуль. Логические операции имеют наинизший приоритет и возвращают 1 если истина или 0 если ложно.
-</p>
-<p>Базовые функции: `<samp>sqrt(x)</samp>` - квадратный корень из <var>x</var>, `<samp>pow(x,y)</samp>` - <var>x</var> в степени <var>y</var>, `<samp>ln(x)</samp>` - натуральный логарифм <var>x</var>, `<samp>lg(x)</samp>` - десятичный логарифм <var>x</var>, `<samp>log(a,x)</samp>` - логарифм по основанию <var>a</var> от <var>x</var>, `<samp>abs(x)</samp>` - модуль <var>x</var>, `<samp>sign(x)</samp>` - знак <var>x</var>, `<samp>mod(x,y)</samp>` - остаток от деления <var>x</var> на <var>y</var>, `<samp>step(x)</samp>` - ступенчатая функция, `<samp>int(x)</samp>` - целая часть <var>x</var>, `<samp>rnd</samp>` - случайное число, `<samp>random(x)</samp>` - матрица случайный чисел размером как <var>x</var>, `<samp>hypot(x,y)</samp>`=sqrt(x^2+y^2) - гипотенуза, `<samp>cmplx(x,y)</samp>`=x+i*y - комплексное число, `<samp>pi</samp>` - число
-π = 3.1415926…, inf=∞
-</p>
-<p>Функции для работы с комплексными числами `<samp>real(x)</samp>`, `<samp>imag(x)</samp>`, `<samp>abs(x)</samp>`, `<samp>arg(x)</samp>`, `<samp>conj(x)</samp>`.
-</p>
-<p>Тригонометрические функции: `<samp>sin(x)</samp>`, `<samp>cos(x)</samp>`, `<samp>tan(x)</samp>` (или `<samp>tg(x)</samp>`). Обратные тригонометрические функции: `<samp>asin(x)</samp>`, `<samp>acos(x)</samp>`, `<samp>atan(x)</samp>`. Гиперболические функции: `<samp>sinh(x)</samp>` (или `<samp>sh(x)</samp>`), `<samp>cosh(x)</samp>` (или `<samp>ch(x)</samp>`), `<samp>tanh(x)</samp>` (или `<samp>th(x)</samp>`). Обратные гиперболические функции: `<samp>asinh(x)</samp>`, `<samp>acosh(x)</samp>`, `<samp>atanh(x)</samp>`.
-</p>
-<p>Специальные функции: `<samp>gamma(x)</samp>` - гамма функция Γ(x) = ∫<sub>0</sub><sup>∞</sup> t<sup>x-1</sup> exp(-t) dt, `<samp>gamma_inc(x,y)</samp>` - неполная гамма функция Γ(x,y) = ∫<sub>y</sub><sup>∞</sup> t<sup>x-1</sup> exp(-t) dt, `<samp>psi(x)</samp>` - дигамма функция ψ(x) = Γ′(x)/Γ(x) для x≠0, `<samp>ai(x)</samp>` - Эйри функция Ai(x), `<samp>bi(x)</samp>` - Эйри функция Bi(x), `<samp>cl(x)</samp>` - функция Клаузена, `<samp>li2(x)</samp>` (или `<samp>dilog(x)</samp>`) - дилогарифм Li<sub>2</sub>(x) = -ℜ∫<sub>0</sub><sup>x</sup>ds log(1-s)/s, `<samp>sinc(x)</samp>` - функция sinc(x) = sin(πx)/(πx) для любых x, `<samp>zeta(x)</samp>` - зета функция Римана ζ(s) = ∑<sub>k=1</sub><sup>∞</sup>k<sup>-s</sup> для s≠1, `<samp>eta(x)</samp>` - эта функция η(s) = (1 - 2<sup>1-s</sup>)ζ(s) для произвольного s, `<samp>lp(l,x)</samp>` - полином Лежандра P<sub>l</sub>(x), (|x|≤1, l≥0), `<samp>w0(x)</samp>`, `<samp>w1(x)</samp>` - функции Ламберта W. Функции W(x) определены как решение уравнения: W exp(W) = x. </p>
-
-<p>Экспоненциальные интегралы: `<samp>ci(x)</samp>` - cos-интеграл Ci(x) = ∫<sub>0</sub><sup>x</sup>dt cos(t)/t, `<samp>si(x)</samp>` - sin-интеграл Si(x) = ∫<sub>0</sub><sup>x</sup>dt sin(t)/t, `<samp>erf(x)</samp>` - функция ошибки erf(x) = (2/√π) ∫<sub>0</sub><sup>x</sup>dt exp(-t<sup>2</sup>) , `<samp>ei(x)</samp>` - интеграл Ei(x) = -PV(∫<sub>-x</sub><sup>∞</sup>dt exp(-t)/t) (где PV обозначает главное значение), `<samp>e1(x)</samp>` - интеграл E<sub>1</sub>(x) = ℜ∫<sub>1</sub><sup>∞</sup>dt exp(-xt)/t, `<samp>e2(x)</samp>` - интеграл E<sub>2</sub>(x) = ℜ∫<sub>1</sub>∞</sup>dt exp(-xt)/t<sup>2</sup>, `<samp>ei3(x)</samp>` - интеграл Ei<sub>3</sub>(x) = ∫<sub>0</sub><sup>x</sup>dt exp(-t<sup>3</sup>) для x≥0. </p>
-
-<p>Функции Бесселя: `<samp>j(nu,x)</samp>` - функция Бесселя первого рода, `<samp>y(nu,x)</samp>` - функция Бесселя второго рода, `<samp>i(nu,x)</samp>` - модифицированная функция Бесселя первого рода, `<samp>k(nu,x)</samp>` - модифицированная функция Бесселя второго рода. </p>
-
-<p>Эллиптические интегралы: `<samp>ee(k)</samp>` - полный эллиптический интеграл E(k) = E(π/2,k), `<samp>ek(k)</samp>` - полный эллиптический интеграл K(k) = F(π/2,k), `<samp>e(phi,k)</samp>` - эллиптический интеграл E(φ,k) = ∫<sub>0</sub><sup>φ</sup>dt √(1 - k<sup>2</sup>sin<sup>2</sup>(t)), `<samp>f(phi,k)</samp>` - эллиптический интеграл F(φ,k) = ∫<sub>0</sub><sup>φ</sup>dt 1/√(1 - k<sup>2</sup>sin<sup>2</sup>(t))</p>
-
-<p>Функции Якоби: `<samp>sn(u,m)</samp>`, `<samp>cn(u,m)</samp>`, `<samp>dn(u,m)</samp>`, `<samp>sc(u,m)</samp>`, `<samp>sd(u,m)</samp>`, `<samp>ns(u,m)</samp>`, `<samp>cs(u,m)</samp>`, `<samp>cd(u,m)</samp>`, `<samp>nc(u,m)</samp>`, `<samp>ds(u,m)</samp>`, `<samp>dc(u,m)</samp>`, `<samp>nd(u,m)</samp>`.
-</p>
-<p>Некоторые из функций могут быть недоступны если не была включена поддержка GSL при компиляции библиотеки MathGL.
-</p>
-<p>При разборе формул нет различия между верхним и нижним регистром. Если аргумент лежит вне области определения функции, то возвращается NaN.
-</p>
-
-<hr>
-<a name="Command-options"></a>
-<div class="header">
-<p>
-Next: <a href="#Interfaces" accesskey="n" rel="next">Interfaces</a>, Previous: <a href="#Textual-formulas" accesskey="p" rel="prev">Textual formulas</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Opcii-komand"></a>
-<h3 class="section">2.7 Опции команд</h3>
-
-
-<p>Опции команд позволяют легко настроить вид отдельного графика не меняя глобальных настроек для все рисунка. Каждая опция отделяется от предыдущей символом `<samp>;</samp>`. Опции работают так, что запоминают текущие настройки рисунка, применяют собственные настройки, выполняют команду и возвращают глобальные настройки обратно. Поэтому использование опций для команд обработки данных или настройки графика бесполезно.
-</p>
-<p>Наиболее часто используемые опции - <code>xrange, yrange, zrange</code>, устанавливают границы изменения осей координат (и тем самым автоматических массивов). Например, команда <code>Plot(y,"","xrange 0.1 0.9");</code> или <code>plot y; xrange 0.1 0.9</code> построит кривую с x-координатой равно распределенной в интервале 0.1 ... 0.9, а не вдоль текущей оси x. См. <a href="#Using-options">Using options</a>, для примеров кода и графика.
-</p>
-<p>Полный список опций:
-<a name="index-alpha"></a>
-<a name="index-alphadef"></a>
-</p><dl>
-<dt><a name="index-alpha-1"></a>Опция MGL: <strong>alpha</strong> <em><code>val</code></em></dt>
-<dd><p>Задает величину прозрачности поверхности. Значение должно быть в диапазоне [0, 1]. См. также <a href="#alphadef">alphadef</a>
-</p></dd></dl>
-
-<a name="index-xrange"></a>
-<dl>
-<dt><a name="index-xrange-1"></a>Опция MGL: <strong>xrange</strong> <em><code>val1 val2</code></em></dt>
-<dd><p>Задает границы изменения координаты x. См. также <a href="#xrange">xrange</a>
-</p></dd></dl>
-<a name="index-yrange"></a>
-<dl>
-<dt><a name="index-yrange-1"></a>Опция MGL: <strong>yrange</strong> <em><code>val1 val2</code></em></dt>
-<dd><p>Задает границы изменения координаты y. См. также <a href="#yrange">yrange</a>
-</p></dd></dl>
-<a name="index-zrange"></a>
-<dl>
-<dt><a name="index-zrange-1"></a>Опция MGL: <strong>zrange</strong> <em><code>val1 val2</code></em></dt>
-<dd><p>Задает границы изменения координаты z. См. также <a href="#zrange">zrange</a>
-</p></dd></dl>
-
-<a name="index-cut"></a>
-<dl>
-<dt><a name="index-cut-1"></a>Опция MGL: <strong>cut</strong> <em><code>val</code></em></dt>
-<dd><p>Задает обрезание точек за пределами осей координат. См. также <a href="#cut">cut</a>.
-</p></dd></dl>
-<a name="index-fontsize"></a>
-<dl>
-<dt><a name="index-size"></a>Опция MGL: <strong>size</strong> <em><code>val</code></em></dt>
-<dd><p>Задает размер текста, маркеров и стрелок. См. также <a href="#font">font</a>, <a href="#marksize">marksize</a>, <a href="#arrowsize">arrowsize</a>.
-</p></dd></dl>
-<a name="index-meshnum"></a>
-<dl>
-<dt><a name="index-meshnum-1"></a>Опция MGL: <strong>meshnum</strong> <em><code>val</code></em></dt>
-<dd><p>Задает ориентировочное число линий, стрелок, ячеек и пр. См. также <a href="#meshnum">meshnum</a>
-</p></dd></dl>
-
-<a name="index-legend"></a>
-<dl>
-<dt><a name="index-legend-1"></a>Опция MGL: <strong>legend</strong> <em>'txt'</em></dt>
-<dd><p>Добавляет строку `txt` во внутренний массив записей легенды. Стиль линии и маркера аргумента последней вызванной команды построения <a href="#g_t1D-plotting">1D plotting</a>. См. также <a href="#legend">legend</a>
-</p></dd></dl>
-<a name="index-value"></a>
-<dl>
-<dt><a name="index-value-1"></a>MGL option: <strong>value</strong> <em><code>val</code></em></dt>
-<dd><p>Задает значение, которое будет использовано как дополнительный числовой параметр при построении графика.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Interfaces"></a>
-<div class="header">
-<p>
-Previous: <a href="#Command-options" accesskey="p" rel="prev">Command options</a>, Up: <a href="#General-concepts" accesskey="u" rel="up">General concepts</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Interfeisy"></a>
-<h3 class="section">2.8 Интерфейсы</h3>
-
-
-<p>Вы можете использовать класс <code>mglParse</code> для выполнения MGL скриптов из других языков программирования.
-</p>
-
-
-
-<hr>
-<a name="MathGL-core"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-processing" accesskey="n" rel="next">Data processing</a>, Previous: <a href="#General-concepts" accesskey="p" rel="prev">General concepts</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="YAdro-MathGL"></a>
-<h2 class="chapter">3 Ядро MathGL</h2>
-
-<a name="index-mglGraph"></a>
-
-<p>Эта глава посвящена описанию множества команд построения графиков для 1D, 2D и 3D массивов данных. Сюда включены также команды настройки графика, вывода текста и примитивов, рисования осей координат и др. Дополнительную информацию о цвете, шрифтах, стилях линий и формулах можно найти в <a href="#General-concepts">General concepts</a>.
-</p>
-
-<p>Некоторые возможности MathGL доступны только в новых версиях библиотеки. Для проверки текущей версии MathGL можно использовать следующую функцию.
-<a name="version"></a></p><dl>
-<dt><a name="index-version"></a>Команда MGL: <em></em> <strong>version</strong> <em>'ver'</em></dt>
-<dd><p>Возвращает нулевое значение если версия MathGL подходит для требуемой в <var>ver</var>, т.е. если номер основной версии совпадает и "подверсия" больше или равна указанной в <var>ver</var>.
-</p></dd></dl>
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Constructor" accesskey="1">Constructor</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Graphics-setup" accesskey="2">Graphics setup</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Axis-settings" accesskey="3">Axis settings</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Subplots-and-rotation" accesskey="4">Subplots and rotation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Export-picture" accesskey="5">Export picture</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Background" accesskey="6">Background</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Primitives" accesskey="7">Primitives</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Text-printing" accesskey="8">Text printing</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Axis-and-Colorbar" accesskey="9">Axis and Colorbar</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Legend">Legend</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#g_t1D-plotting">1D plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#g_t2D-plotting">2D plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#g_t3D-plotting">3D plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Dual-plotting">Dual plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Vector-fields">Vector fields</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Other-plotting">Other plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Nonlinear-fitting">Nonlinear fitting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-manipulation">Data manipulation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Constructor"></a>
-<div class="header">
-<p>
-Next: <a href="#Graphics-setup" accesskey="n" rel="next">Graphics setup</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sozdanie-i-udalenie-graficheskogo-obwekta"></a>
-<h3 class="section">3.1 Создание и удаление графического объекта</h3>
-
-
-
-<p>MGL не требует создания данного типа объектов.
-</p>
-
-<hr>
-<a name="Graphics-setup"></a>
-<div class="header">
-<p>
-Next: <a href="#Axis-settings" accesskey="n" rel="next">Axis settings</a>, Previous: <a href="#Constructor" accesskey="p" rel="prev">Constructor</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Nastroika-grafika"></a>
-<h3 class="section">3.2 Настройка графика</h3>
-
-<a name="index-Nastroika-MathGL"></a>
-
-<p>Функции и переменные в этой группе влияют на вид всего рисунка. Соответственно они должны располагаться <em>перед</em> вызовом функций непосредственно рисующих графики.
-</p>
-<a name="reset"></a><dl>
-<dt><a name="index-reset"></a>Команда MGL: <em></em> <strong>reset</strong></dt>
-<dd><p>Устанавливает все настройки по умолчанию и очищает рисунок.
-</p></dd></dl>
-
-<a name="setup"></a><dl>
-<dt><a name="index-setup"></a>Команда MGL: <em></em> <strong>setup</strong> <em><code>val flag</code></em></dt>
-<dd><p>Устанавливает значение бинарного флага <var>flag</var> в <var>val</var>. Список флагов можно найти в <a href="https://sourceforge.net/p/mathgl/code/HEAD/tree/mathgl-2x/include/mgl2/define.h#l267">define.h</a>. Текущий список флагов:
-</p><pre class="verbatim">#define MGL_ENABLE_CUT 0x00000004 ///< Определяет способ рисования точек вне диапазона осей координат
-#define MGL_ENABLE_RTEXT 0x00000008 ///< Использовать вращение текста
-#define MGL_AUTO_FACTOR 0x00000010 ///< Разрешить автоматическое масштабирование графика
-#define MGL_ENABLE_ALPHA 0x00000020 ///< Использовать прозрачность
-#define MGL_ENABLE_LIGHT 0x00000040 ///< Использовать освещение
-#define MGL_TICKS_ROTATE 0x00000080 ///< Разрешить вращение меток осей
-#define MGL_TICKS_SKIP 0x00000100 ///< Разрешить пропуск меток осей
-#define MGL_DISABLE_SCALE 0x00000200 ///< Временный флаг, запрещающий изменение размеров
-#define MGL_FINISHED 0x00000400 ///< Флаг готовности окончательной картинки (т.е. mglCanvas::G)
-#define MGL_USE_GMTIME 0x00000800 ///< Использовать gmtime вместо localtime
-#define MGL_SHOW_POS 0x00001000 ///< Включить показ координат щелчка мыши
-#define MGL_CLF_ON_UPD 0x00002000 ///< Очищать график перед Update()
-#define MGL_NOSUBTICKS 0x00004000 ///< Запретить рисование subticks для bounding box
-#define MGL_LOCAL_LIGHT 0x00008000 ///< Сохранять источники освещения в каждом inplot
-#define MGL_VECT_FRAME 0x00010000 ///< Использовать DrwDat для сохранения всех данных в кадрах
-#define MGL_REDUCEACC 0x00020000 ///< Сокращать точность вывода точек (для уменьшения размера выходных файлов)
-#define MGL_PREFERVC 0x00040000 ///< Предпочитать цвета вершин вместо текстур если выходной формат поддерживает
-#define MGL_ONESIDED 0x00080000 ///< Выводить только переднюю сторону поверхностей если выходной формат поддерживает
-#define MGL_NO_ORIGIN 0x00100000 ///< Не рисовать метки в точке пересечения осей
-#define MGL_GRAY_MODE 0x00200000 ///< Преобразовать все цвета в оттенки серого
-#define MGL_FULL_CURV 0x00400000 ///< Запретить пропуск точек на прямолинейных участках
-#define MGL_NO_SCALE_REL 0x00800000 ///< Запретить изменение размера текста в относительных inplots
-</pre></dd></dl>
-
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Transparency" accesskey="1">Transparency</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Lighting" accesskey="2">Lighting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Fog" accesskey="3">Fog</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Default-sizes" accesskey="4">Default sizes</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Cutting" accesskey="5">Cutting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Font-settings" accesskey="6">Font settings</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Palette-and-colors" accesskey="7">Palette and colors</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Masks" accesskey="8">Masks</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Error-handling" accesskey="9">Error handling</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Stop-drawing">Stop drawing</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Transparency"></a>
-<div class="header">
-<p>
-Next: <a href="#Lighting" accesskey="n" rel="next">Lighting</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Prozrachnostx"></a>
-<h4 class="subsection">3.2.1 Прозрачность</h4>
-
-<a name="index-Alpha"></a>
-<a name="index-AlphaDef"></a>
-<a name="index-TranspType"></a>
-
-<p>Эти функции и переменные настраивают тип и степень прозрачности поверхностей. Главной является функция <a href="#alpha">alpha</a>, которая включает/выключает прозрачность для всего графика. Функция <a href="#alphadef">alphadef</a> устанавливает величину alpha-канала по умолчанию. Наконец, функция <a href="#transptype">transptype</a> задает тип прозрачности. См. <a href="#Transparency-and-lighting">Transparency and lighting</a>, для примеров кода и графика.
-</p>
-<a name="alpha"></a><dl>
-<dt><a name="index-alpha-2"></a>Команда MGL: <em></em> <strong>alpha</strong> <em><code>[val=on]</code></em></dt>
-<dd><p>Включает/выключает прозрачность и возвращает свое предыдущее состояние. По умолчанию прозрачность выключена. Функция включает прозрачность для <em>всего</em> рисунка.
-</p></dd></dl>
-
-<a name="alphadef"></a><dl>
-<dt><a name="index-alphadef-1"></a>Команда MGL: <em></em> <strong>alphadef</strong> <em><code>val</code></em></dt>
-<dd><p>Задает значение прозрачности по умолчанию для всех графиков. Значение по умолчанию 0.5.
-</p></dd></dl>
-
-<a name="transptype"></a><dl>
-<dt><a name="index-transptype"></a>Команда MGL: <em></em> <strong>transptype</strong> <em><code>val</code></em></dt>
-<dd><p>Задает тип прозрачности. Допустимые значения:
-</p><ul>
-<li> Обычная прозрачность (`<samp>0</samp>`) - "закрытые" объекты видны меньше чем закрывающие. Этот режим некорректно отображается в OpenGL (mglGraphGL) для нескольких перекрывающихся поверхностей.
-</li><li> "Стеклянная" прозрачность (`<samp>1</samp>`) - закрытые и закрывающие объекты единообразно ослабляют интенсивность света (по RGB каналам).
-</li><li> "Ламповая" прозрачность (`<samp>2</samp>`) - закрытые и закрывающие объекты являются источниками дополнительного освещения (рекомендую установить <code>SetAlphaDef(0.3)</code> или меньше в этом случае).
-</li></ul>
-<p>См. <a href="#Types-of-transparency">Types of transparency</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-<hr>
-<a name="Lighting"></a>
-<div class="header">
-<p>
-Next: <a href="#Fog" accesskey="n" rel="next">Fog</a>, Previous: <a href="#Transparency" accesskey="p" rel="prev">Transparency</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Osveshchenie"></a>
-<h4 class="subsection">3.2.2 Освещение</h4>
-
-<a name="index-Light"></a>
-<a name="index-Ambient"></a>
-
-<p>Эти функции настраивают освещение графика. Главная функция <a href="#light">light</a> включает/выключает освещение графиков построенных после ее вызова (в OpenGL работает сразу для всего рисунка). MathGL поддерживает до 10 независимых источников света. Но в режиме OpenGL можно использовать только первые 8 из них. Положение, цвет, яркость каждого источника света можно задавать по отдельности. По умолчанию включен только первый (с порядковым номером <code>0</code>) источник света белого цвета, расположенный сверху. См. <a href="#Lighting-sample">Lighting sample</a>, для примеров кода и графика.
-</p>
-<a name="light"></a><dl>
-<dt><a name="index-light"></a>Команда MGL: <em></em> <strong>light</strong> <em><code>[val=on]</code></em></dt>
-<dd><p>Включает/выключает освещение графика и возвращает предыдущее состояние. По умолчанию освещение выключено.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-light-1"></a>Команда MGL: <em></em> <strong>light</strong> <em><code>num</code> <code>val</code></em></dt>
-<dd><p>Включает/выключает <var>n</var>-ый источник света.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-light-2"></a>Команда MGL: <em></em> <strong>light</strong> <em><code>num xdir ydir zdir</code> ['col'='w' <code>br=0.5 ap=0</code>]</em></dt>
-<dt><a name="index-light-3"></a>Команда MGL: <em></em> <strong>light</strong> <em><code>num xdir ydir zdir xpos ypos zpos</code> ['col'='w' <code>br=0.5</code>]</em></dt>
-<dd><p>Добавляет источник света с номером <var>n</var> в положение <var>p</var> с цветом <var>c</var> и яркостью <var>bright</var>, которая должна быть в диапазоне [0,1]. Если указано положение источника <var>r</var> и оно не NAN, то источник считается локальным, иначе источник полагается бесконечно удалённым (для более быстрого рисования).
-</p></dd></dl>
-
-<a name="diffuse"></a><dl>
-<dt><a name="index-diffuse"></a>Команда MGL: <em></em> <strong>diffuse</strong> <em><code>val</code></em></dt>
-<dd><p>Задает яркость диффузного освещения (только для локальных источников света).
-</p></dd></dl>
-
-<a name="ambient"></a><dl>
-<dt><a name="index-ambient"></a>Команда MGL: <em></em> <strong>ambient</strong> <em><code>val</code></em></dt>
-<dd><p>Задает яркость рассеянного освещения. Значение должно быть в диапазоне [0,1].
-</p></dd></dl>
-
-<a name="attachlight"></a><dl>
-<dt><a name="index-attachlight"></a>Команда MGL: <em></em> <strong>attachlight</strong> <em><code>val</code></em></dt>
-<dd><p>Задает привязку настроек освещения к <a href="#inplot">inplot</a>/<a href="#subplot">subplot</a>. Отмечу, что OpenGL и некоторые выходные форматы не поддерживают эту возможность.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Fog"></a>
-<div class="header">
-<p>
-Next: <a href="#Default-sizes" accesskey="n" rel="next">Default sizes</a>, Previous: <a href="#Lighting" accesskey="p" rel="prev">Lighting</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Tuman"></a>
-<h4 class="subsection">3.2.3 Туман</h4>
-
-<a name="index-Fog"></a>
-
-<a name="fog"></a><dl>
-<dt><a name="index-fog"></a>Команда MGL: <em></em> <strong>fog</strong> <em><code>val [dz=0.25]</code></em></dt>
-<dd><p>Имитирует туман на графике. Туман начинается на относительном расстоянии <var>dz</var> от точки обзора и его плотность растет экспоненциально вглубь по закону ~ 1-exp(-<em>d*z</em>). Здесь <em>z</em> - нормализованная на 1 глубина графика. Если <var>d</var>=<code>0</code> то туман отсутствует. См. <a href="#Adding-fog">Adding fog</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-<hr>
-<a name="Default-sizes"></a>
-<div class="header">
-<p>
-Next: <a href="#Cutting" accesskey="n" rel="next">Cutting</a>, Previous: <a href="#Fog" accesskey="p" rel="prev">Fog</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Bazovye-razmery"></a>
-<h4 class="subsection">3.2.4 Базовые размеры</h4>
-
-<a name="index-BarWidth"></a>
-<a name="index-MarkSize"></a>
-<a name="index-ArrowSize"></a>
-<a name="index-MeshNum"></a>
-
-<p>Эти функции задают величины большинства параметров графика, включая размеры маркеров, стрелок, толщину линий и т.д. Как и любые другие настройки, они подействуют только на графики созданные после изменения настроек.
-</p>
-<a name="barwidth"></a><dl>
-<dt><a name="index-barwidth"></a>Команда MGL: <em></em> <strong>barwidth</strong> <em><code>val</code></em></dt>
-<dd><p>Задает относительный размер прямоугольников в <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#boxplot">boxplot</a>, <a href="#candle">candle</a>. Значение по умолчанию <code>0.7</code>.
-</p></dd></dl>
-
-<a name="marksize"></a><dl>
-<dt><a name="index-marksize"></a>Команда MGL: <em></em> <strong>marksize</strong> <em><code>val</code></em></dt>
-<dd><p>Задает размер маркеров для <a href="#g_t1D-plotting">1D plotting</a>. Значение по умолчанию <code>1</code>.
-</p></dd></dl>
-
-<a name="arrowsize"></a><dl>
-<dt><a name="index-arrowsize"></a>Команда MGL: <em></em> <strong>arrowsize</strong> <em><code>val</code></em></dt>
-<dd><p>Задает размер стрелок для <a href="#g_t1D-plotting">1D plotting</a>, линий и кривых (см. <a href="#Primitives">Primitives</a>). Значение по умолчанию <code>1</code>.
-</p></dd></dl>
-
-<a name="meshnum"></a><a name="MeshNum"></a><dl>
-<dt><a name="index-meshnum-2"></a>Команда MGL: <em></em> <strong>meshnum</strong> <em><code>val</code></em></dt>
-<dd><p>Задает ориентировочное число линий в <a href="#mesh">mesh</a>, <a href="#fall">fall</a>, и число стрелок (штрихов) в <a href="#vect">vect</a>, <a href="#dew">dew</a>, и число ячеек в <a href="#cloud">cloud</a>, и число маркеров в <a href="#plot">plot</a>, <a href="#tens">tens</a>, <a href="#step">step</a>, <a href="#mark">mark</a>, <a href="#textmark">textmark</a>. По умолчанию (=0) рисуются все линии, стрелки, ячейки и т.д.
-</p></dd></dl>
-
-<a name="facenum"></a><dl>
-<dt><a name="index-facenum"></a>Команда MGL: <em></em> <strong>facenum</strong> <em><code>val</code></em></dt>
-<dd><p>Задает ориентировочное число видимых граней. Может быть использована для ускорения рисования за счет более грубого рисунка. По умолчанию (=0) рисуются все грани.
-</p></dd></dl>
-
-<a name="plotid"></a><dl>
-<dt><a name="index-plotid"></a>Команда MGL: <em></em> <strong>plotid</strong> <em>'id'</em></dt>
-<dd><p>Задает имя графика для сохранения в файл (например, в окне FLTK).
-</p></dd></dl>
-
-
-<a name="pendelta"></a><dl>
-<dt><a name="index-pendelta"></a>Команда MGL: <em></em> <strong>pendelta</strong> <em><code>val</code></em></dt>
-<dd><p>Изменяет размытие около линий и текста (по умолчанию 1). Для <var>val</var>>1 текст и линии более резкие. Для <var>val</var><1 текст и линии более размытые.
-</p></dd></dl>
-
-
-<hr>
-<a name="Cutting"></a>
-<div class="header">
-<p>
-Next: <a href="#Font-settings" accesskey="n" rel="next">Font settings</a>, Previous: <a href="#Default-sizes" accesskey="p" rel="prev">Default sizes</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Obrezanie"></a>
-<h4 class="subsection">3.2.5 Обрезание</h4>
-
-<a name="index-Cut"></a>
-
-<p>Эти функции задают условия когда точка будет исключена (вырезана) из рисования. Замечу, что все точки со значением(-ями) NAN по одной из координат или амплитуде автоматически исключаются из рисования. См. <a href="#Cutting-sample">Cutting sample</a>, для примеров кода и графика.
-</p>
-<a name="cut"></a><dl>
-<dt><a name="index-cut-2"></a>Команда MGL: <em></em> <strong>cut</strong> <em><code>val</code></em></dt>
-<dd><p>Задает обрезание точек за пределами осей координат. Если <code>true</code> то такие точки исключаются из рисования (это по умолчанию) иначе они проецируются на ограничивающий прямоугольник.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-cut-3"></a>Команда MGL: <em></em> <strong>cut</strong> <em><code>x1 y1 z1 x2 y2 z2</code></em></dt>
-<dd><p>Задает границы параллелепипеда внутри которого точки не рисуются. Если границы одинаковы (переменные равны), то параллелепипеда считается пустым.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-cut-4"></a>Команда MGL: <em></em> <strong>cut</strong> <em>'cond'</em></dt>
-<dd><p>Задает условие обрезания по формуле <var>cond</var>. Это условие исключает точки из рисования если результат вычисления формулы не равен нулю. Установите аргумент <code>""</code> для выключения условия обрезания.
-</p></dd></dl>
-
-
-<hr>
-<a name="Font-settings"></a>
-<div class="header">
-<p>
-Next: <a href="#Palette-and-colors" accesskey="n" rel="next">Palette and colors</a>, Previous: <a href="#Cutting" accesskey="p" rel="prev">Cutting</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Shrifty"></a>
-<h4 class="subsection">3.2.6 Шрифты</h4>
-
-<a name="index-Font"></a>
-<a name="index-RotateText"></a>
-
-<a name="font"></a><dl>
-<dt><a name="index-font"></a>Команда MGL: <em></em> <strong>font</strong> <em>'fnt' [<code>val=6</code>]</em></dt>
-<dd><p>Задает стиль и размер шрифта. Вначале используется `<samp>:rC</samp>` - прямой шрифт с выравниванием по центру. По умолчанию размер подписей оси координат в 1.4 раза больше. См. также см. <a href="#Font-styles">Font styles</a>.
-</p></dd></dl>
-
-<a name="rotatetext"></a><dl>
-<dt><a name="index-rotatetext"></a>Команда MGL: <em></em> <strong>rotatetext</strong> <em><code>val</code></em></dt>
-<dd><p>Включает/выключает вращение меток и подписей осей координат вдоль оси.
-</p></dd></dl>
-
-<a name="scaletext"></a><dl>
-<dt><a name="index-scaletext"></a>Команда MGL: <em></em> <strong>scaletext</strong> <em><code>val</code></em></dt>
-<dd><p>Включает/выключает масштабирование текста в относительных <a href="#inplot">inplot</a>-ах (в том числе <a href="#columnplot">columnplot</a>, <a href="#gridplot">gridplot</a>, <a href="#stickplot">stickplot</a>, <a href="#shearplot">shearplot</a>).
-</p></dd></dl>
-
-<a name="loadfont"></a><dl>
-<dt><a name="index-loadfont"></a>Команда MGL: <em></em> <strong>loadfont</strong> <em>['name'='']</em></dt>
-<dd><p>Загружает начертание шрифта из файла <var>path</var>/<var>name</var>. Пустая строка загрузит шрифт по умолчанию.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Palette-and-colors"></a>
-<div class="header">
-<p>
-Next: <a href="#Masks" accesskey="n" rel="next">Masks</a>, Previous: <a href="#Font-settings" accesskey="p" rel="prev">Font settings</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Palitra-i-cveta"></a>
-<h4 class="subsection">3.2.7 Палитра и цвета</h4>
-
-<a name="index-Palette"></a>
-
-<a name="palette"></a><dl>
-<dt><a name="index-palette"></a>Команда MGL: <em></em> <strong>palette</strong> <em>'colors'</em></dt>
-<dd><p>Задает палитру как последовательность цветов. Значение по умолчанию <code>"Hbgrcmyhlnqeup"</code>, что соответствует цветам: темно серый `<samp>H</samp>`, синий `<samp>b</samp>`, зелёный `<samp>g</samp>`, красный `<samp>r</samp>`, голубой `<samp>c</samp>`, малиновый `<samp>m</samp>`, жёлтый `<samp>y</samp>`, серый `<samp>h</samp>`, сине-зелёный `<samp>l</samp>`, небесно-голубой `<samp>n</samp>`, оранжевый `<samp>q</samp>`, желто-зелёный `<samp>e</samp>`, сине-фиолетовый `<samp>u</samp>`, фиолетовый `<samp>p</samp>`. Палитра в основном используется в 1D графиках (см. <a href="#g_t1D-plotting">1D plotting</a>) для кривых с неопределённым стилем линии. Внутренний счетчик цвета будет сброшен при любом изменении палитры, включая скрытые (например, функциями <a href="#box">box</a> или <a href="#axis">axis</a>).
-</p></dd></dl>
-
-
-<a name="gray"></a><dl>
-<dt><a name="index-gray"></a>Команда MGL: <em></em> <strong>gray</strong> <em>[<code>val=on</code>]</em></dt>
-<dd><p>Включает/выключает вывод графика в оттенках серого.
-</p></dd></dl>
-
-
-<hr>
-<a name="Masks"></a>
-<div class="header">
-<p>
-Next: <a href="#Error-handling" accesskey="n" rel="next">Error handling</a>, Previous: <a href="#Palette-and-colors" accesskey="p" rel="prev">Palette and colors</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Maski"></a>
-<h4 class="subsection">3.2.8 Маски</h4>
-
-<a name="index-SetMask"></a>
-<a name="index-SetMaskAngle"></a>
-
-<a name="mask"></a><dl>
-<dt><a name="index-mask"></a>Команда MGL: <em></em> <strong>mask</strong> <em>'id' 'hex'</em></dt>
-<dt><a name="index-mask-1"></a>Команда MGL: <em></em> <strong>mask</strong> <em>'id' hex</em></dt>
-<dd><p>Задает новую матрицу <var>hex</var> размером 8*8 для маски с заданным <var>id</var>. Изменения действуют глобально для всех последующих использований данного <var>id</var>. Значения по умолчанию (см. <a href="#Color-scheme">Color scheme</a>): `<samp>-</samp>` - 000000FF00000000, `<samp>+</samp>` - 080808FF08080808, `<samp>=</samp>` - 0000FF00FF000000, `<samp>;</samp>` - 0000007700000000, `<samp>o</samp>` - 0000182424180000, `<samp>O</samp>` - 0000183C3C180000, `<samp>s</samp>` - 00003C24243C0000, `<samp>S</samp>` - 00003C3C3C3C0000, `<samp>~</samp>` - 0000060990600000, `<samp><</samp>` - 0060584658600000, `<samp>></samp>` - 00061A621A060000, `<samp>j</samp>` - 0000005F00000000, `<samp>d</samp>` - 0008142214080000, `<samp>D</samp>` - 00081C3E1C080000, `<samp>*</samp>` - 8142241818244281, `<samp>^</samp>` - 0000001824420000.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-mask-2"></a>Команда MGL: <em></em> <strong>mask</strong> <em>angle</em></dt>
-<dd><p>Задает угол поворота маски в градусах. Отмечу, что символы `<samp>\</samp>`, `<samp>/</samp>`, `<samp>I</samp>` в цветовой схеме задают угол поворота в 45, -45 и 90 градусов соответственно.
-</p></dd></dl>
-
-
-<hr>
-<a name="Error-handling"></a>
-<div class="header">
-<p>
-Next: <a href="#Stop-drawing" accesskey="n" rel="next">Stop drawing</a>, Previous: <a href="#Masks" accesskey="p" rel="prev">Masks</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Obrabotka-oshibok"></a>
-<h4 class="subsection">3.2.9 Обработка ошибок</h4>
-
-<p>Все сообщения будут выведены автоматически в специальном окне или в консоли.
-</p>
-
-<hr>
-<a name="Stop-drawing"></a>
-<div class="header">
-<p>
-Previous: <a href="#Error-handling" accesskey="p" rel="prev">Error handling</a>, Up: <a href="#Graphics-setup" accesskey="u" rel="up">Graphics setup</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Ostanovka-risovaniya"></a>
-<h4 class="subsection">3.2.10 Остановка рисования</h4>
-
-<p>Вы можете использовать команду <a href="#stop">stop</a> или соответствующую кнопку панели инструментов для остановки рисования и выполнения скрипта.
-</p>
-
-
-<hr>
-<a name="Axis-settings"></a>
-<div class="header">
-<p>
-Next: <a href="#Subplots-and-rotation" accesskey="n" rel="next">Subplots and rotation</a>, Previous: <a href="#Graphics-setup" accesskey="p" rel="prev">Graphics setup</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Nastroiki-osei-koordinat"></a>
-<h3 class="section">3.3 Настройки осей координат</h3>
-
-
-<p>Эти функции управляет видом и масштабом осей координат. Перед построением для каждой точки выполняются 3 преобразования: сначала определяется возможность рисования точки (см. <a href="#Cutting">Cutting</a>), далее применяются формулы перехода к криволинейным координатам и наконец точка отображается. Отмечу, что MathGL выдает предупреждение если масштабы осей координат лежат вне области определения формул преобразования координат.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Ranges-_0028bounding-box_0029" accesskey="1">Ranges (bounding box)</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Curved-coordinates" accesskey="2">Curved coordinates</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Ticks" accesskey="3">Ticks</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Ranges-_0028bounding-box_0029"></a>
-<div class="header">
-<p>
-Next: <a href="#Curved-coordinates" accesskey="n" rel="next">Curved coordinates</a>, Up: <a href="#Axis-settings" accesskey="u" rel="up">Axis settings</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Masshtab-osei-koordinat"></a>
-<h4 class="subsection">3.3.1 Масштаб осей координат</h4>
-
-<a name="index-CRange"></a>
-<a name="index-XRange"></a>
-<a name="index-YRange"></a>
-<a name="index-ZRange"></a>
-<a name="index-Ranges"></a>
-<a name="index-Origin"></a>
-
-<a name="xrange"></a><a name="yrange"></a><a name="zrange"></a><a name="crange"></a><dl>
-<dt><a name="index-xrange-2"></a>Команда MGL: <em></em> <strong>xrange</strong> <em><code>v1 v2</code> [<code>add=off</code>]</em></dt>
-<dt><a name="index-yrange-2"></a>Команда MGL: <em></em> <strong>yrange</strong> <em><code>v1 v2</code> [<code>add=off</code>]</em></dt>
-<dt><a name="index-zrange-2"></a>Команда MGL: <em></em> <strong>zrange</strong> <em><code>v1 v2</code> [<code>add=off</code>]</em></dt>
-<dt><a name="index-crange"></a>Команда MGL: <em></em> <strong>crange</strong> <em><code>v1 v2</code> [<code>add=off</code>]</em></dt>
-<dd><p>Задает диапазон изменения `<samp>x</samp>`-,`<samp>y</samp>`-,`<samp>z</samp>`-,`<samp>c</samp>`-координат. Если одно из значений равно <code>NAN</code>, то оно игнорируется. Параметр <code>add=on</code> указывает добавлять новый диапазон к существующему (не заменять его). См. также <a href="#ranges">ranges</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-xrange-3"></a>Команда MGL: <em></em> <strong>xrange</strong> <em>dat [<code>add=off</code>]</em></dt>
-<dt><a name="index-yrange-3"></a>Команда MGL: <em></em> <strong>yrange</strong> <em>dat [<code>add=off</code>]</em></dt>
-<dt><a name="index-zrange-3"></a>Команда MGL: <em></em> <strong>zrange</strong> <em>dat [<code>add=off</code>]</em></dt>
-<dt><a name="index-crange-1"></a>Команда MGL: <em></em> <strong>crange</strong> <em>dat [<code>add=off</code>]</em></dt>
-<dd><p>Задает диапазон изменения `<samp>x</samp>`-,`<samp>y</samp>`-,`<samp>z</samp>`-,`<samp>c</samp>`-координат как минимальное и максимальное значение массива <var>dat</var>. Параметр <code>add=on</code> указывает добавлять новый диапазон к существующему (не заменять его).
-</p></dd></dl>
-
-<a name="ranges"></a><dl>
-<dt><a name="index-ranges"></a>Команда MGL: <em></em> <strong>ranges</strong> <em><code>x1 x2 y1 y2 [z1=0 z2=0]</code></em></dt>
-<dd><p>Задает диапазон изменения координат. Если минимальное и максимальное значение координаты равны, то они игнорируются по данному направлению. Также устанавливает размер цветовой шкалы, аналогично команде <code>crange z1 z2</code>. Начальные диапазоны равны [-1, 1].
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-ranges-1"></a>Команда MGL: <em></em> <strong>ranges</strong> <em><code>xx yy [zz cc=zz]</code></em></dt>
-<dd><p>Задает диапазон изменения `<samp>x</samp>`-,`<samp>y</samp>`-,`<samp>z</samp>`-,`<samp>c</samp>`-координат как минимальное и максимальное значение массивов <var>xx</var>, <var>yy</var>, <var>zz</var>, <var>cc</var> соответственно.
-</p></dd></dl>
-
-
-<a name="origin"></a><dl>
-<dt><a name="index-origin"></a>Команда MGL: <em></em> <strong>origin</strong> <em><code>x0 y0 [z0=nan]</code></em></dt>
-<dd><p>Задает центр пересечения осей координат. Если одно из значений равно NAN, то MathGL попытается выбрать оптимальное положение осей координат по этому направлению.
-</p></dd></dl>
-
-<a name="zoomaxis"></a><dl>
-<dt><a name="index-zoomaxis"></a>Команда MGL: <em></em> <strong>zoomaxis</strong> <em><code>x1 x2</code></em></dt>
-<dt><a name="index-zoomaxis-1"></a>Команда MGL: <em></em> <strong>zoomaxis</strong> <em><code>x1 y1 x2 y2</code></em></dt>
-<dt><a name="index-zoomaxis-2"></a>Команда MGL: <em></em> <strong>zoomaxis</strong> <em><code>x1 y1 z1 x2 y2 z2</code></em></dt>
-<dt><a name="index-zoomaxis-3"></a>Команда MGL: <em></em> <strong>zoomaxis</strong> <em><code>x1 y1 z1 c1 x2 y2 z2 c2</code></em></dt>
-<dd><p>Дополнительно расширяет диапазон осей координат, задаваемый функциями <code>SetRange</code> или <code>SetRanges</code>, в соответствии с формулами <em>min += (max-min)*p1</em> и <em>max += (max-min)*p1</em> (или <em>min *= (max/min)^p1</em> и <em>max *= (max/min)^p1</em> для "логарифмических" диапазонов, когда <em>inf>max/min>100</em> или <em>0<max/min<0.01</em>). Начальные значения [0, 1]. Внимание! эти настройки не могут быть переписаны никакими другими функциями, включая <code>DefaultPlotParam()</code>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Curved-coordinates"></a>
-<div class="header">
-<p>
-Next: <a href="#Ticks" accesskey="n" rel="next">Ticks</a>, Previous: <a href="#Ranges-_0028bounding-box_0029" accesskey="p" rel="prev">Ranges (bounding box)</a>, Up: <a href="#Axis-settings" accesskey="u" rel="up">Axis settings</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Krivolineinye-koordinaty"></a>
-<h4 class="subsection">3.3.2 Криволинейные координаты</h4>
-
-<a name="index-Axis"></a>
-
-<dl>
-<dt><a name="index-axis"></a>Команда MGL: <em></em> <strong>axis</strong> <em>'fx' 'fy' 'fz' ['fa'='']</em></dt>
-<dd><p>Задает формулы перехода к криволинейным координатам. Каждая строка является математическим выражением, зависящим от старых координат `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>` и `<samp>a</samp>` или `<samp>c</samp>` для цветовой шкалы. Например, для цилиндрических координат будет <code>SetFunc("x*cos(y)", "x*sin(y)", "z");</code>. Для удаления формул соответствующий параметр должен быть пустым или <code>NULL</code>. Использование формул преобразования слегка замедляет программу. Параметр <var>EqA</var> задает аналогичную формулу для цветовой шкалы. See <a href="#Textual-formulas">Textual formulas</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-axis-1"></a>Команда MGL: <em></em> <strong>axis</strong> <em><code>how</code></em></dt>
-<dd><p>Устанавливает одну из предопределенных систем криволинейных координат в зависимости от параметра <var>how</var>:
-</p><dl compact="compact">
-<dt><code>mglCartesian=0</code></dt>
-<dd><p>декартова система (нет преобразования координат, {x,y,z});
-</p></dd>
-<dt><code>mglPolar=1</code></dt>
-<dd><p>полярные координаты: {x*cos(y),x*sin(y), z};
-</p></dd>
-<dt><code>mglSpherical=2</code></dt>
-<dd><p>сферические координаты: {x*sin(y)*cos(z), x*sin(y)*sin(z), x*cos(y)};
-</p></dd>
-<dt><code>mglParabolic=3</code></dt>
-<dd><p>параболические координаты: {x*y, (x*x-y*y)/2, z};
-</p></dd>
-<dt><code>mglParaboloidal=4</code></dt>
-<dd><p>Paraboloidal coordinates: {(x*x-y*y)*cos(z)/2, (x*x-y*y)*sin(z)/2, x*y};
-</p></dd>
-<dt><code>mglOblate=5</code></dt>
-<dd><p>Oblate coordinates: {cosh(x)*cos(y)*cos(z), cosh(x)*cos(y)*sin(z), sinh(x)*sin(y)};
-</p></dd>
-<dt><code>mglProlate=6</code></dt>
-<dd><p>Prolate coordinates: {sinh(x)*sin(y)*cos(z), sinh(x)*sin(y)*sin(z), cosh(x)*cos(y)};
-</p></dd>
-<dt><code>mglElliptic=7</code></dt>
-<dd><p>эллиптические координаты: {cosh(x)*cos(y), sinh(x)*sin(y), z};
-</p></dd>
-<dt><code>mglToroidal=8</code></dt>
-<dd><p>тороидальные координаты: {sinh(x)*cos(z)/(cosh(x)-cos(y)), sinh(x)*sin(z)/(cosh(x)-cos(y)), sin(y)/(cosh(x)-cos(y))};
-</p></dd>
-<dt><code>mglBispherical=9</code></dt>
-<dd><p>бисферические координаты: {sin(y)*cos(z)/(cosh(x)-cos(y)), sin(y)*sin(z)/(cosh(x)-cos(y)), sinh(x)/(cosh(x)-cos(y))};
-</p></dd>
-<dt><code>mglBipolar=10</code></dt>
-<dd><p>биполярные координаты: {sinh(x)/(cosh(x)-cos(y)), sin(y)/(cosh(x)-cos(y)), z};
-</p></dd>
-<dt><code>mglLogLog=11</code></dt>
-<dd><p>Log-log координаты: {lg(x), lg(y), lg(z)};
-</p></dd>
-<dt><code>mglLogX=12</code></dt>
-<dd><p>Log-x координаты: {lg(x), y, z};
-</p></dd>
-<dt><code>mglLogY=13</code></dt>
-<dd><p>Log-y координаты: {x, lg(y), z}.
-</p></dd>
-</dl>
-</dd></dl>
-
-<a name="ternary"></a><dl>
-<dt><a name="index-ternary"></a>Команда MGL: <em></em> <strong>ternary</strong> <em><code>val</code></em></dt>
-<dd><p>Задает рисование треугольных (Ternary, <var>tern</var>=<code>1</code>), пирамидальных (Quaternary, <var>tern</var>=<code>2</code>) осей координат и проекций осей координат (<var>tern</var>=<code>4,5,6</code>).
-</p>
-<p>Ternary - специальный тип графика для 3 зависимых координат (компонент) <var>a</var>, <var>b</var>, <var>c</var> таких, что <var>a</var>+<var>b</var>+<var>c</var>=1. MathGL использует только 2 независимые координаты <var>a</var>=x и <var>b</var>=y поскольку их достаточно для построения всех графиков. При этом третья координата z является независимым параметром для построения линий уровня, поверхностей и т.д.
-</p>
-<p>Соответственно Quaternary координаты - 4 зависимые координаты <var>a</var>, <var>b</var>, <var>c</var> и <var>d</var>, такие что <var>a</var>+<var>b</var>+<var>c</var>+<var>d</var>=1. MathGL использует только 2 независимые координаты <var>a</var>=x, <var>b</var>=y и <var>d</var>=z поскольку их достаточно для построения всех графиков.
-</p>
-<p>Проекции строятся если к переменной <var>tern</var> добавить число <code>4</code>. Так что <var>tern</var>=<code>4</code> нарисует проекции в декартовых координатах, <var>tern</var>=<code>5</code> нарисует проекции в треугольных координатах, <var>tern</var>=<code>6</code> нарисует проекции в пирамидальных координатах. Если добавить <code>8</code> вместо <code>4</code>, то текст не будет выводиться на проекциях.
-</p>
-<p>Используйте <code>Ternary(0)</code> для возвращения к привычным координатам. См. <a href="#Ternary-axis">Ternary axis</a>, для примеров кода и графика. См. <a href="#Axis-projection">Axis projection</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-<hr>
-<a name="Ticks"></a>
-<div class="header">
-<p>
-Previous: <a href="#Curved-coordinates" accesskey="p" rel="prev">Curved coordinates</a>, Up: <a href="#Axis-settings" accesskey="u" rel="up">Axis settings</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Metki-osei"></a>
-<h4 class="subsection">3.3.3 Метки осей</h4>
-
-<a name="index-AxisStl"></a>
-<a name="index-TickLen"></a>
-<a name="index-Adjust"></a>
-<a name="index-XTick"></a>
-<a name="index-YTick"></a>
-<a name="index-ZTick"></a>
-<a name="index-CTick"></a>
-
-<a name="adjust"></a><dl>
-<dt><a name="index-adjust"></a>Команда MGL: <em></em> <strong>adjust</strong> <em>['dir'='xyzc']</em></dt>
-<dd><p>Автоматически задает шаг меток осей, число подметок и начальное положение меток для осей координат <var>dir</var> в виде наиболее удобном для человека. Также задает <code>SetTuneTicks(true)</code>. Обычно не требуется вызывать эту функцию кроме случая возвращения настроек по умолчанию.
-</p></dd></dl>
-
-<a name="xtick"></a><a name="ytick"></a><a name="ztick"></a><a name="ctick"></a><dl>
-<dt><a name="index-xtick"></a>Команда MGL: <em></em> <strong>xtick</strong> <em><code>val [sub=0 org=nan 'fact'='']</code></em></dt>
-<dt><a name="index-ytick"></a>Команда MGL: <em></em> <strong>ytick</strong> <em><code>val [sub=0 org=nan 'fact'='']</code></em></dt>
-<dt><a name="index-ztick"></a>Команда MGL: <em></em> <strong>ztick</strong> <em><code>val [sub=0 org=nan 'fact'='']</code></em></dt>
-<dt><a name="index-ctick"></a>Команда MGL: <em></em> <strong>ctick</strong> <em><code>val [sub=0 org=nan 'fact'='']</code></em></dt>
-<dd><p>Задает шаг меток осей <var>d</var>, число подметок <var>ns</var> и начальное положение меток <var>org</var> для оси вдоль направления <var>dir</var> (используйте `c` для меток colorbar). Переменная <var>d</var> задает шаг меток (если положительна) или их число на оси (если отрицательна). Нулевое значение задает автоматическую расстановку меток. Если <var>org</var>=<code>NAN</code>, то используется значение из переменной <var>Org</var>. Параметр <var>fact</var> задает текст, которые будет напечатан после метки оси (например, "\pi" для <var>d</var>=M_PI).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-xtick-1"></a>Команда MGL: <em></em> <strong>xtick</strong> <em><code>val1</code> 'lbl1' [<code>val2</code> 'lbl2' ...]</em></dt>
-<dt><a name="index-ytick-1"></a>Команда MGL: <em></em> <strong>ytick</strong> <em><code>val1</code> 'lbl1' [<code>val2</code> 'lbl2' ...]</em></dt>
-<dt><a name="index-ztick-1"></a>Команда MGL: <em></em> <strong>ztick</strong> <em><code>val1</code> 'lbl1' [<code>val2</code> 'lbl2' ...]</em></dt>
-<dt><a name="index-xtick-2"></a>Команда MGL: <em></em> <strong>xtick</strong> <em>vdat 'lbls' [<code>add=off</code>]</em></dt>
-<dt><a name="index-ytick-2"></a>Команда MGL: <em></em> <strong>ytick</strong> <em>vdat 'lbls' [<code>add=off</code>]</em></dt>
-<dt><a name="index-ztick-2"></a>Команда MGL: <em></em> <strong>ztick</strong> <em>vdat 'lbls' [<code>add=off</code>]</em></dt>
-<dd><p>Задает явное положение <var>val</var> и подписи <var>lbl</var> для меток вдоль оси <var>dir</var>. Если массив <var>val</var> не указан, то используются значения равно распределённые в диапазоне осей координат. Метки разделяются символом `<samp>\n</samp>`. Если в команде MGL задано только одно значение, то метка будет <em>добавлена</em> к существующим меткам. Используйте <code>SetTicks()</code> для восстановления автоматических меток.
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-xtick-3"></a>Команда MGL: <em></em> <strong>xtick</strong> <em>'templ'</em></dt>
-<dt><a name="index-ytick-3"></a>Команда MGL: <em></em> <strong>ytick</strong> <em>'templ'</em></dt>
-<dt><a name="index-ztick-3"></a>Команда MGL: <em></em> <strong>ztick</strong> <em>'templ'</em></dt>
-<dt><a name="index-ctick-1"></a>Команда MGL: <em></em> <strong>ctick</strong> <em>'templ'</em></dt>
-<dd><p>Задает шаблон <var>templ</var> для меток вдоль x-,y-,z-оси или colorbar. Шаблон может содержать и символы TeX. Если <var>templ</var>=<code>""</code>, то используется шаблон по умолчанию (в простейшем случае `<samp>%.2g</samp>`). Если шаблон начинается с символа `<samp>&</samp>`, то будет использовано целое <code>long</code> вместо типа <code>double</code>. Установка шаблона выключает автоматическое улучшение вида меток.
-</p></dd></dl>
-
-<a name="ticktime"></a><dl>
-<dt><a name="index-ticktime"></a>Команда MGL: <em></em> <strong>ticktime</strong> <em>'dir' [<code>dv=0</code> 'tmpl'='']</em></dt>
-<dd><p>Задает метки времени с шагом <var>val</var> и шаблоном <var>templ</var> для меток вдоль x-,y-,z-оси или colorbar. Шаблон может содержать и символы TeX. Формат шаблона <var>templ</var> такой же как <a href="http://www.manpagez.com/man/3/strftime/">http://www.manpagez.com/man/3/strftime/</a>. Наиболее употребительные варианты: `<samp>%X</samp>` для национального представления времени, `<samp>%x</samp>` для национального представления даты, `<samp>%Y</samp>` для года с цифрами столетия. Если <var>val</var>=0 и/или <var>templ</var>="", то используется автоматическая расстановка меток и/или выбор шаблона. Вы можете использовать функцию <code>mgl_get_time</code>() для получения числа секунд с 1970 года до указанной даты/времени. Отмечу, что MS Visual Studio не может обрабатывать даты до 1970.
-</p></dd></dl>
-
-
-<a name="tuneticks"></a><dl>
-<dt><a name="index-tuneticks"></a>Команда MGL: <em></em> <strong>tuneticks</strong> <em><code>val</code> [<code>pos=1.15</code>]</em></dt>
-<dd><p>Включает/выключает улучшение вида меток осей путем вынесения общего множителя (для маленьких, типа 0.001...0.002, или больших, типа 1000...2000, значений координат) или общей компоненты (для узкого диапазона, типа 0.999...1.000). Также задает положение <var>pos</var> общего множителя на оси: =0 около минимального значения, =1 около максимального значения.
-</p></dd></dl>
-
-<a name="tickshift"></a><dl>
-<dt><a name="index-tickshift"></a>Команда MGL: <em></em> <strong>tickshift</strong> <em><code>dx [dy=0 dz=0 dc=0]</code></em></dt>
-<dd><p>Задает значение дополнительного сдвига меток осей координат.
-</p></dd></dl>
-
-
-<a name="origintick"></a><dl>
-<dt><a name="index-origintick"></a>Команда MGL: <em></em> <strong>origintick</strong> <em><code>val</code></em></dt>
-<dd><p>Разрешает/запрещает рисование меток в точке пересечения осей координат. В C/Fortran следует использовать <code>mgl_set_flag(gr,val, MGL_NO_ORIGIN);</code>.
-</p></dd></dl>
-
-<a name="ticklen"></a><dl>
-<dt><a name="index-ticklen"></a>Команда MGL: <em></em> <strong>ticklen</strong> <em><code>val</code> [<code>stt=1</code>]</em></dt>
-<dd><p>Задает относительную длину меток осей координат. Значение по умолчанию <code>0.1</code>. Параметр <var>stt</var>>0 задает относительную длину подметок, которые в <code>sqrt(1+stt)</code> раз меньше.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-axisstl"></a>Команда MGL: <em></em> <strong>axisstl</strong> <em>'stl' ['tck'='' 'sub'='']</em></dt>
-<dd><p>Задает стиль осей (<var>stl</var>), меток (<var>tck</var>) и подметок (<var>sub</var>) осей координат. Если <var>stl</var> пустая или ноль, то используется стиль по умолчанию (`<samp>k</samp>` или `<samp>w</samp>` в зависимости от типа прозрачности). Если <var>tck</var>, <var>sub</var> пустая или ноль, то используется стиль осей (т.е. <var>stl</var>).
-</p></dd></dl>
-
-
-<hr>
-<a name="Subplots-and-rotation"></a>
-<div class="header">
-<p>
-Next: <a href="#Export-picture" accesskey="n" rel="next">Export picture</a>, Previous: <a href="#Axis-settings" accesskey="p" rel="prev">Axis settings</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Matrica-preobrazovaniya"></a>
-<h3 class="section">3.4 Матрица преобразования</h3>
-
-<a name="index-Aspect"></a>
-<a name="index-Rotate"></a>
-<a name="index-RotateN"></a>
-<a name="index-SubPlot"></a>
-<a name="index-MultiPlot"></a>
-<a name="index-StickPlot"></a>
-<a name="index-ColumnPlot"></a>
-<a name="index-InPlot"></a>
-<a name="index-Title"></a>
-<a name="index-Perspective"></a>
-<a name="index-View"></a>
-<a name="index-Push"></a>
-<a name="index-Pop"></a>
-
-<p>Эти функции контролируют где и как график будет расположен. Существует определенный порядок вызова этих функций для лучшего вида графика. Вначале должны вызываться функции <a href="#subplot">subplot</a>, <a href="#multiplot">multiplot</a> или <a href="#inplot">inplot</a> для указания местоположения вывода. После них - функции вращения <a href="#rotate">rotate</a>, <a href="#shear">shear</a> и <a href="#aspect">aspect</a>. И наконец любые другие функции для рисования графика. Вместо вращения графика можно вызвать функцию <a href="#columnplot">columnplot</a>, <a href="#gridplot">gridplot</a>, <a href="#stickplot">stickplot</a>, <a href="#shearplot">shearplot</a> или относительную <a href="#inplot">inplot</a> для расположения графиков в столбец одного над другим без зазора между осями. См. <a href="#Subplots">Subplots</a>, для примеров кода и графика.
-</p>
-<a name="subplot"></a><dl>
-<dt><a name="index-subplot"></a>Команда MGL: <em></em> <strong>subplot</strong> <em><code>nx ny m</code> ['stl'='<>_^' <code>dx=0 dy=0</code>]</em></dt>
-<dd><p>Помещает последующий вывод в <var>m</var>-ую ячейку сетки размером <var>nx</var>*<var>ny</var> от всего рисунка. Функция сбрасывает матрицу трансформации (повороты и сжатие графика) и должна вызываться первой для создания "подграфика". С эстетической точки зрения не рекомендуется вызывать эту функцию с различными (или не кратными) размерами сетки. Дополнительное место для осей/colorbar резервируется только если строка <var>stl</var> содержит:
-</p><ul>
-<li> `<samp>L</samp>` или `<samp><</samp>` - с левого края,
-</li><li> `<samp>R</samp>` или `<samp>></samp>` - с правого края,
-</li><li> `<samp>A</samp>` или `<samp>^</samp>` - с верхнего края,
-</li><li> `<samp>U</samp>` или `<samp>_</samp>` - с нижнего края,
-</li><li> `<samp>#</samp>` - место резервироваться не будет - оси координат будут занимать все доступное пространство.
-</li></ul>
-<p>Ячейка может быть дополнительно сдвинута относительно своего обычного положения на относительный размер <var>dx</var>, <var>dy</var>. Отмечу, что colorbar может находиться за пределами рисунка если выбран пустой стиль `<samp></samp>`.
-</p></dd></dl>
-
-<a name="multiplot"></a><dl>
-<dt><a name="index-multiplot"></a>Команда MGL: <em></em> <strong>multiplot</strong> <em><code>nx ny m dx dy</code> ['style'='<>_^' sx sy]</em></dt>
-<dd><p>Помещает последующий вывод в прямоугольник из <var>dx</var>*<var>dy</var> ячеек, начиная с <var>m</var>-ой ячейки, сетки размером <var>nx</var>*<var>ny</var> от всего рисунка. Функция сбрасывает матрицу трансформации (повороты и сжатие графика) и должна вызываться первой для создания "подграфика". Дополнительное место для осей/colorbar резервируется если строка <var>stl</var> содержит:
-</p><ul>
-<li> `<samp>L</samp>` или `<samp><</samp>` - с левого края,
-</li><li> `<samp>R</samp>` или `<samp>></samp>` - с правого края,
-</li><li> `<samp>A</samp>` или `<samp>^</samp>` - с верхнего края,
-</li><li> `<samp>U</samp>` или `<samp>_</samp>` - с нижнего края,
-</li><li> `<samp>#</samp>` - место резервироваться не будет - оси координат будут занимать все доступное пространство.
-</li></ul>
-<p>Область вывода может быть дополнительно сдвинута относительно своего обычного положения на относительный размер <var>sx</var>, <var>sy</var>.
-</p></dd></dl>
-
-<a name="inplot"></a><dl>
-<dt><a name="index-inplot"></a>Команда MGL: <em></em> <strong>inplot</strong> <em><code>x1 x2 y1 y2 [rel=on]</code></em></dt>
-<dd><p>Помещает последующий вывод в прямоугольную область [<var>x1</var>, <var>x2</var>]*[<var>y1</var>, <var>y2</var>] (исходный размер [0,1]*[0,1]). Эта функция позволяет поместить график в произвольную область рисунка. Если параметр <var>rel</var>=<code>true</code>, то используется позиция относительно текущего <a href="#subplot">subplot</a> (или <a href="#inplot">inplot</a> с <var>rel</var>=<code>false</code>). Функция сбрасывает матрицу трансформации (повороты и сжатие графика) и должна вызываться первой для создания "подграфика".
-</p></dd></dl>
-
-<a name="columnplot"></a><dl>
-<dt><a name="index-columnplot"></a>Команда MGL: <em></em> <strong>columnplot</strong> <em><code>num ind [d=0]</code></em></dt>
-<dd><p>Помещает последующий вывод в <var>ind</var>-ую строку столбца из <var>num</var> строк. Положение столбца выбирается относительно последнего вызова <a href="#subplot">subplot</a> (или <a href="#inplot">inplot</a> с <var>rel</var>=<code>false</code>). Параметр <var>d</var> задает дополнительный зазор между строк.
-</p></dd></dl>
-
-<a name="gridplot"></a><dl>
-<dt><a name="index-gridplot"></a>Команда MGL: <em></em> <strong>gridplot</strong> <em><code>nx ny ind [d=0]</code></em></dt>
-<dd><p>Помещает последующий вывод в <var>ind</var>-ую ячейку таблицы <var>nx</var>*<var>ny</var>. Положение ячейки выбирается относительно последнего вызова <a href="#subplot">subplot</a> (или <a href="#inplot">inplot</a> с <var>rel</var>=<code>false</code>). Параметр <var>d</var> задает дополнительный зазор между ячеек.
-</p></dd></dl>
-
-<a name="stickplot"></a><dl>
-<dt><a name="index-stickplot"></a>Команда MGL: <em></em> <strong>stickplot</strong> <em><code>num ind tet phi</code></em></dt>
-<dd><p>Помещает последующий вывод в <var>ind</var>-ую ячейку "бруска" из <var>num</var> ячеек. При этом сам брусок повернут на углы <var>tet</var>, <var>phi</var>. Положение выбирается относительно последнего вызова <a href="#subplot">subplot</a> (или <a href="#inplot">inplot</a> с <var>rel</var>=<code>false</code>).
-</p></dd></dl>
-
-<a name="shearplot"></a><dl>
-<dt><a name="index-shearplot"></a>Команда MGL: <em></em> <strong>shearplot</strong> <em><code>num ind sx sy [xd yd]</code></em></dt>
-<dd><p>Помещает последующий вывод в <var>ind</var>-ую ячейку "бруска" из <var>num</var> ячеек. При этом сама ячейка скошена на <var>sx</var>, <var>sy</var>. Направление бруска задается переменными <var>xd</var> и <var>yd</var>. Положение выбирается относительно последнего вызова <a href="#subplot">subplot</a> (или <a href="#inplot">inplot</a> с <var>rel</var>=<code>false</code>).
-</p></dd></dl>
-
-<a name="title"></a><dl>
-<dt><a name="index-title"></a>Команда MGL: <em></em> <strong>title</strong> <em>'title' ['stl'='' <code>size=-2</code>]</em></dt>
-<dd><p>Выводит заголовок <var>title</var> для текущего "подграфика" шрифтом <var>stl</var> с размером <var>size</var>. Если строка <var>stl</var> содержит `<samp>#</samp>`, то рисуется обрамляющий прямоугольник. Функция сбрасывает матрицу трансформации (повороты и сжатие графика) и должна вызываться сразу после создания "подграфика".
-</p></dd></dl>
-
-<a name="rotate"></a><dl>
-<dt><a name="index-rotate"></a>Команда MGL: <em></em> <strong>rotate</strong> <em><code>tetx tetz [tety=0]</code></em></dt>
-<dd><p>Вращает систему координат относительно осей {x, z, y} последовательно на углы <var>TetX</var>, <var>TetZ</var>, <var>TetY</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-rotate-1"></a>Команда MGL: <em></em> <strong>rotate</strong> <em><code>tet x y z</code></em></dt>
-<dd><p>Вращает систему координат относительно вектора {<var>x</var>, <var>y</var>, <var>z</var>} на угол <var>Tet</var>.
-</p></dd></dl>
-
-
-<a name="shear"></a><dl>
-<dt><a name="index-shear"></a>Команда MGL: <em></em> <strong>shear</strong> <em><code>sx sy</code></em></dt>
-<dd><p>Сдвигает (скашивает) систему координат на значения <var>sx</var>, <var>sy</var>.
-</p></dd></dl>
-
-
-<a name="aspect"></a><dl>
-<dt><a name="index-aspect"></a>Команда MGL: <em></em> <strong>aspect</strong> <em><code>ax ay [az=1]</code></em></dt>
-<dd><p>Устанавливает соотношение размеров осей в отношении <var>Ax:Ay:Az</var>. Для лучшего вида следует вызывать после функции <a href="#rotate">rotate</a>. Если <var>Ax</var>=<code>NAN</code>, то функция выберет оптимальное соотношение размеров, чтобы шаг по осям x-y был одинаков. При этом, <var>Ay</var> задает фактор пропорциональности шага (обычно 1), или указывает на его автоматический выбор при <var>Ay</var>=<code>NAN</code>.
-</p></dd></dl>
-
-
-
-<p>Также есть 3 функции, которые управляют перспективой <code>Perspective()</code>, масштабированием <code>Zoom()</code> и вращением <code>View()</code> всего рисунка. Т.е. они действуют как ещё одна матрица трансформации. Они были введены для вращения/приближения графика с помощью мыши. Не рекомендуется вызывать их при рисовании графика.
-</p>
-<a name="perspective"></a><dl>
-<dt><a name="index-perspective"></a>Команда MGL: <em></em> <strong>perspective</strong> <em><code>val</code></em></dt>
-<dd><p>Добавляет (включает) перспективу для графика. Параметр <em>a = Depth/(Depth+dz) \in [0,1)</em>. По умолчанию (<code>a=0</code>) перспектива отключена.
-</p></dd></dl>
-
-<a name="view"></a><dl>
-<dt><a name="index-view"></a>Команда MGL: <em></em> <strong>view</strong> <em><code>tetx tetz [tety=0]</code></em></dt>
-<dd><p>Вращает систему координат относительно осей {x, z, y} последовательно на углы <var>TetX</var>, <var>TetZ</var>, <var>TetY</var>. Вращение происходит независимо от <a href="#rotate">rotate</a>. Внимание! эти настройки не могут быть переписаны функцией <code>DefaultPlotParam()</code>. Используйте <code>Zoom(0,0,1,1)</code> для возвращения к виду по умолчанию.
-</p></dd></dl>
-
-<a name="zoom"></a><dl>
-<dt><a name="index-zoom"></a>Команда MGL: <em></em> <strong>zoom</strong> <em><code>x1 y1 x2 y2</code></em></dt>
-<dd><p>Масштабирует весь рисунок. После вызова функции текущий график будет очищен и в дальнейшем рисунок будет содержать только область [x1,x2]*[y1,y2] от исходного рисунка. Координаты <var>x1</var>, <var>x2</var>, <var>y1</var>, <var>y2</var> меняются в диапазоне от 0 до 1. Внимание! эти настройки не могут быть переписаны никакими другими функциями, включая <code>DefaultPlotParam()</code>. Используйте <code>Zoom(0,0,1,1)</code> для возвращения к виду по умолчанию.
-</p></dd></dl>
-
-
-<hr>
-<a name="Export-picture"></a>
-<div class="header">
-<p>
-Next: <a href="#Background" accesskey="n" rel="next">Background</a>, Previous: <a href="#Subplots-and-rotation" accesskey="p" rel="prev">Subplots and rotation</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Eksport-risunka"></a>
-<h3 class="section">3.5 Экспорт рисунка</h3>
-
-<a name="index-SetSize"></a>
-
-<p>Функции в этой группе сохраняют или дают доступ к полученному рисунку. Поэтом обычно они должны вызываться в конце рисования.
-</p>
-<a name="setsize"></a><dl>
-<dt><a name="index-setsize"></a>Команда MGL: <em></em> <strong>setsize</strong> <em><code>w h</code></em></dt>
-<dd><p>Изменяет размер картинки в пикселях. Функция должна вызываться <strong>перед</strong> любыми функциями построения потому что полностью очищает содержимое рисунка при <var>clear</var>=<code>true</code>. Функция только очищает растровый рисунок и масштабирует примитивы при <var>clear</var>=<code>false</code>.
-</p></dd></dl>
-
-
-<a name="setsizescl"></a><dl>
-<dt><a name="index-setsizescl"></a>Команда MGL: <em></em> <strong>setsizescl</strong> <em><code>factor</code></em></dt>
-<dd><p>Задает множитель для высоты и ширины во всех последующих вызовах <a href="#setsize">setsize</a>.
-</p></dd></dl>
-
-
-<a name="quality"></a><dl>
-<dt><a name="index-quality"></a>Команда MGL: <em></em> <strong>quality</strong> <em>[<code>val</code>=2]</em></dt>
-<dd><p>Задает качество графика в зависимости от значения <var>val</var>: <code>MGL_DRAW_WIRE=0</code> - нет рисования граней (наиболее быстрый), <code>MGL_DRAW_FAST=1</code> - нет интерполяции цвета (быстрый), <code>MGL_DRAW_NORM=2</code> - высокое качество (нормальный), <code>MGL_DRAW_HIGH=3</code> - высокое качество с рисованием 3d примитивов (стрелок и маркеров). Если установлен бит <code>MGL_DRAW_LMEM=0x4</code>, то происходит прямое рисование в растровое изображение (меньше затраты памяти). Если установлен бит <code>MGL_DRAW_DOTS=0x8</code>, то рисуются точки вместо примитивов (очень быстро).
-</p></dd></dl>
-
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Export-to-file" accesskey="1">Export to file</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Frames_002fAnimation" accesskey="2">Frames/Animation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Bitmap-in-memory" accesskey="3">Bitmap in memory</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Parallelization" accesskey="4">Parallelization</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Export-to-file"></a>
-<div class="header">
-<p>
-Next: <a href="#Frames_002fAnimation" accesskey="n" rel="next">Frames/Animation</a>, Up: <a href="#Export-picture" accesskey="u" rel="up">Export picture</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Eksport-v-fail"></a>
-<h4 class="subsection">3.5.1 Экспорт в файл</h4>
-
-<a name="index-Write"></a>
-
-<p>Эти функции экспортируют текущую картинку (кадр) в файл. Имя файла <var>fname</var> должно иметь соответствующее расширение. Параметр <var>descr</var> дает краткое описание картинки. Пока прозрачность поддерживается только для форматов PNG, SVG, OBJ и PRC.
-</p>
-<a name="write"></a><dl>
-<dt><a name="index-write"></a>Команда MGL: <em></em> <strong>write</strong> <em>['fname'='']</em></dt>
-<dd><p>Экспортирует текущий кадр в файл <var>fname</var> с типом, определяемым по расширению. Параметр <var>descr</var> добавляет описание (может быть пустым). Если <var>fname</var> пустой, то используется имя `<samp>frame####.jpg</samp>`, где `<samp>####</samp>` - текущий номер кадра и имя `<samp>frame</samp>` определяется переменной <a href="#plotid">plotid</a>.
-</p></dd></dl>
-
-<a name="bbox"></a><dl>
-<dt><a name="index-bbox"></a>Команда MGL: <em></em> <strong>bbox</strong> <em>x1 y1 [x2=<code>-1</code> y2=<code>-1</code>]</em></dt>
-<dd><p>Задает область изображения, которая будет сохранена в файл 2D формата. Если <var>x2</var><0 (<var>y2</var><0), то исходная ширина (высота) рисунка будет использована. Если <var>x1</var><0 или <var>y1</var><0 или <var>x1</var>>=<var>x2</var>|Width или <var>y1</var>>=<var>y2</var>|Height, то обрезания рисунка не будет.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Frames_002fAnimation"></a>
-<div class="header">
-<p>
-Next: <a href="#Bitmap-in-memory" accesskey="n" rel="next">Bitmap in memory</a>, Previous: <a href="#Export-to-file" accesskey="p" rel="prev">Export to file</a>, Up: <a href="#Export-picture" accesskey="u" rel="up">Export picture</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Kadry_002fAnimaciya"></a>
-<h4 class="subsection">3.5.2 Кадры/Анимация</h4>
-
-
-<p>В MGL нет специальных команд для создания анимации. Однако можно воспользоваться возможностями утилит <code>mglconv</code> и <code>mglview</code>. Например, используя комментарии спеиального вида `<samp>##a </samp>` или `<samp>##c </samp>`.
-</p>
-
-
-<hr>
-<a name="Bitmap-in-memory"></a>
-<div class="header">
-<p>
-Next: <a href="#Parallelization" accesskey="n" rel="next">Parallelization</a>, Previous: <a href="#Frames_002fAnimation" accesskey="p" rel="prev">Frames/Animation</a>, Up: <a href="#Export-picture" accesskey="u" rel="up">Export picture</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Risovanie-v-pamyati"></a>
-<h4 class="subsection">3.5.3 Рисование в памяти</h4>
-
-
-
-
-<hr>
-<a name="Parallelization"></a>
-<div class="header">
-<p>
-Previous: <a href="#Bitmap-in-memory" accesskey="p" rel="prev">Bitmap in memory</a>, Up: <a href="#Export-picture" accesskey="u" rel="up">Export picture</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Rasparallelivanie"></a>
-<h4 class="subsection">3.5.4 Распараллеливание</h4>
-
-
-
-
-
-<hr>
-<a name="Background"></a>
-<div class="header">
-<p>
-Next: <a href="#Primitives" accesskey="n" rel="next">Primitives</a>, Previous: <a href="#Export-picture" accesskey="p" rel="prev">Export picture</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Fonovoe-izobrazhenie"></a>
-<h3 class="section">3.6 Фоновое изображение</h3>
-
-<a name="index-LoadBackground"></a>
-<a name="index-Clf"></a>
-<a name="index-Rasterize"></a>
-
-<p>These functions change background image.
-</p>
-<a name="clf"></a><dl>
-<dt><a name="index-clf"></a>Команда MGL: <em></em> <strong>clf</strong> <em>['col']</em></dt>
-<dt><a name="index-clf-1"></a>Команда MGL: <em></em> <strong>clf</strong> <em>r g b</em></dt>
-<dd><p>Очищает рисунок и заполняет фон заданным цветом.
-</p></dd></dl>
-
-<a name="rasterize"></a><dl>
-<dt><a name="index-rasterize"></a>Команда MGL: <em></em> <strong>rasterize</strong></dt>
-<dd><p>Завершает рисование графика и помещает результат в качестве фона. После этого, очищает список примитивов (как <a href="#clf">clf</a>). Функция полезна для сохранения части графика (например, поверхностей или векторных полей) в растровом виде, а другой части (кривых, осей и пр.) в векторном.
-</p></dd></dl>
-
-<a name="background"></a><dl>
-<dt><a name="index-background"></a>Команда MGL: <em></em> <strong>background</strong> <em>'fname' [<code>alpha=1</code>]</em></dt>
-<dd><p>Загружает PNG или JPEG файл <var>fname</var> в качестве фона для графика. Параметр <var>alpha</var> задает прозрачность фона вручную.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Primitives"></a>
-<div class="header">
-<p>
-Next: <a href="#Text-printing" accesskey="n" rel="next">Text printing</a>, Previous: <a href="#Export-picture" accesskey="p" rel="prev">Export picture</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Risovanie-primitivov"></a>
-<h3 class="section">3.7 Рисование примитивов</h3>
-
-<a name="index-Ball"></a>
-<a name="index-Line"></a>
-<a name="index-Curve"></a>
-<a name="index-Glyph"></a>
-<a name="index-Face"></a>
-<a name="index-FaceX"></a>
-<a name="index-FaceY"></a>
-<a name="index-FaceZ"></a>
-<a name="index-Cone"></a>
-<a name="index-Drop"></a>
-<a name="index-Sphere"></a>
-
-
-<p>Эти функции рисуют рисуют простые объекты типа линий, точек, сфер, капель, конусов, и т.д.
-</p>
-<a name="ball"></a><dl>
-<dt><a name="index-ball"></a>Команда MGL: <em></em> <strong>ball</strong> <em><code>x y</code> ['col'='r.']</em></dt>
-<dt><a name="index-ball-1"></a>Команда MGL: <em></em> <strong>ball</strong> <em><code>x y z</code> ['col'='r.']</em></dt>
-<dd><p>Рисует маркер (точку по умолчанию) с координатами <var>p</var>={<var>x</var>, <var>y</var>, <var>z</var>} и цветом <var>col</var>.
-</p></dd></dl>
-
-<a name="errbox"></a><dl>
-<dt><a name="index-errbox"></a>Команда MGL: <em></em> <strong>errbox</strong> <em><code>x y ex ey</code> ['stl'='']</em></dt>
-<dt><a name="index-errbox-1"></a>Команда MGL: <em></em> <strong>errbox</strong> <em><code>x y z ex ey ez</code> ['stl'='']</em></dt>
-<dd><p>Рисует 3d error box в точке <var>p</var>={<var>x</var>, <var>y</var>, <var>z</var>} размером <var>e</var>={<var>ex</var>, <var>ey</var>, <var>ez</var>} и стилем <var>stl</var>. Используйте NAN в компонентах <var>e</var> для уменьшения рисуемых элементов.
-</p></dd></dl>
-
-<a name="line"></a><dl>
-<dt><a name="index-line"></a>Команда MGL: <em></em> <strong>line</strong> <em><code>x1 y1 x2 y2</code> ['stl'='']</em></dt>
-<dt><a name="index-line-1"></a>Команда MGL: <em></em> <strong>line</strong> <em><code>x1 y1 z1 x2 y2 z2</code> ['stl'='']</em></dt>
-<dd><p>Рисует геодезическую линию (декартовых координатах - прямую) из точки <var>p1</var> в <var>p2</var> использую стиль линии <var>stl</var>. Параметр <var>num</var> определяет гладкость линии (число точек на линии). Если <var>num</var>=<code>2</code>, то рисуется прямая даже в криволинейных координатах (см. <a href="#Curved-coordinates">Curved coordinates</a>). Наоборот, для больших значений (например, =<code>100</code>) рисуется геодезическая линия (окружность в полярных координатах, парабола в параболических и т.д.). Линия рисуется даже если часть ее лежит вне диапазона осей координат.
-</p></dd></dl>
-
-<a name="curve"></a><dl>
-<dt><a name="index-curve"></a>Команда MGL: <em></em> <strong>curve</strong> <em><code>x1 y1 dx1 dy1 x2 y2 dx2 dy2</code> ['stl'='']</em></dt>
-<dt><a name="index-curve-1"></a>Команда MGL: <em></em> <strong>curve</strong> <em><code>x1 y1 z1 dx1 dy1 dz1 x2 y2 z2 dx2 dy2 dz2</code> ['stl'='']</em></dt>
-<dd><p>Рисует кривую Безье из точки <var>p1</var> в <var>p2</var> используя стиль линии <var>stl</var>. Касательные в точках пропорциональны <var>d1</var>, <var>d2</var>. Параметр <var>num</var> определяет гладкость линии (число точек на линии). Если <var>num</var>=<code>2</code>, то рисуется прямая даже в криволинейных координатах (см. <a href="#Curved-coordinates">Curved coordinates</a>). Наоборот, для больших значений (например, =<code>100</code>) рисуется геодезическая линия (окружность в полярных координатах, парабола в параболических и т.д.). Кривая рисуется даже если часть ее лежит вне диапазона осей координат.
-</p></dd></dl>
-
-<a name="face"></a><dl>
-<dt><a name="index-face"></a>Команда MGL: <em></em> <strong>face</strong> <em><code>x1 y1 x2 y2 x3 y3 x4 y4</code> ['stl'='']</em></dt>
-<dt><a name="index-face-1"></a>Команда MGL: <em></em> <strong>face</strong> <em><code>x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4</code> ['stl'='']</em></dt>
-<dd><p>Рисует заполненный четырехугольник (грань) с углами в точках <var>p1</var>, <var>p2</var>, <var>p3</var>, <var>p4</var> и цветом(-ами) <var>stl</var>. При этом цвет может быть один для всей грани, или различным если указаны все 4 цвета. Грань будет нарисована даже если часть ее лежит вне диапазона осей координат.
-</p></dd></dl>
-
-<a name="rect"></a><dl>
-<dt><a name="index-rect"></a>Команда MGL: <em></em> <strong>rect</strong> <em><code>x1 y1 x2 y2</code> ['stl'='']</em></dt>
-<dt><a name="index-rect-1"></a>Команда MGL: <em></em> <strong>rect</strong> <em><code>x1 y1 z1 x2 y2 z2</code> ['stl'='']</em></dt>
-<dd><p>Рисует закрашенный прямоугольник (грань) с вершинами {<var>x1</var>, <var>y1</var>, <var>z1</var>} и {<var>x2</var>, <var>y2</var>, <var>z2</var>} цветом <var>stl</var>. При этом цвет может быть один для всей грани, или различным для разных вершин если указаны все 4 цвета. Грань будет нарисована даже если часть ее лежит вне диапазона осей координат.
-</p></dd></dl>
-
-<a name="facex"></a><a name="facey"></a><a name="facez"></a><dl>
-<dt><a name="index-facex"></a>Команда MGL: <em></em> <strong>facex</strong> <em><code>x0 y0 z0 wy wz</code> ['stl'='' <code>d1=0 d2=0</code>]</em></dt>
-<dt><a name="index-facey"></a>Команда MGL: <em></em> <strong>facey</strong> <em><code>x0 y0 z0 wx wz</code> ['stl'='' <code>d1=0 d2=0</code>]</em></dt>
-<dt><a name="index-facez"></a>Команда MGL: <em></em> <strong>facez</strong> <em><code>x0 y0 z0 wx wy</code> ['stl'='' <code>d1=0 d2=0</code>]</em></dt>
-<dd><p>Рисует закрашенный прямоугольник (грань) перпендикулярно оси [x,y,z] в точке {<var>x0</var>, <var>y0</var>, <var>z0</var>} цветом <var>stl</var> и шириной <var>wx</var>, <var>wy</var>, <var>wz</var> вдоль соответствующего направления. При этом цвет может быть один для всей грани, или различным для разных вершин если указаны все 4 цвета. Параметры <var>d1</var>!=0, <var>d2</var>!=0 задают дополнительный сдвиг последней точки (т.е. рисуют четырехугольник). Грань будет нарисована даже если часть ее лежит вне диапазона осей координат.
-</p></dd></dl>
-
-<a name="sphere"></a><dl>
-<dt><a name="index-sphere"></a>Команда MGL: <em></em> <strong>sphere</strong> <em><code>x0 y0 r</code> ['col'='r']</em></dt>
-<dt><a name="index-sphere-1"></a>Команда MGL: <em></em> <strong>sphere</strong> <em><code>x0 y0 z0 r</code> ['col'='r']</em></dt>
-<dd><p>Рисует сферу радиуса <var>r</var> с центром в точке <var>p</var>={<var>x0</var>, <var>y0</var>, <var>z0</var>} цветом <var>stl</var>.
-</p></dd></dl>
-
-<a name="drop"></a><dl>
-<dt><a name="index-drop"></a>Команда MGL: <em></em> <strong>drop</strong> <em><code>x0 y0 dx dy r</code> ['col'='r' <code>sh=1 asp=1</code>]</em></dt>
-<dt><a name="index-drop-1"></a>Команда MGL: <em></em> <strong>drop</strong> <em><code>x0 y0 z0 dx dy dz r</code> ['col'='r' <code>sh=1 asp=1</code>]</em></dt>
-<dd><p>Рисует каплю радиуса <var>r</var> в точке <var>p</var> вытянутую вдоль направления <var>d</var> цветом <var>col</var>. Параметр <var>shift</var> определяет степень вытянутости: `<samp>0</samp>` - сфера, `<samp>1</samp>` - классическая капля. Параметр <var>ap</var> определяет относительную ширину капли (аналог "эллиптичности" для сферы).
-</p></dd></dl>
-
-<a name="cone"></a><dl>
-<dt><a name="index-cone"></a>Команда MGL: <em></em> <strong>cone</strong> <em><code>x1 y1 z1 x2 y2 z2 r1</code> [<code>r2=-1</code> 'stl'='' <code>edge=off</code>]</em></dt>
-<dd><p>Рисует трубу (или усеченный конус если <var>edge</var>=<code>false</code>) между точками <var>p1</var>, <var>p2</var> с радиусами на концах <var>r1</var>, <var>r2</var>. Если <var>r2</var><0, то полагается <var>r2</var>=<var>r1</var>. Цвет конуса задается строкой <var>stl</var>. Параметр <var>stl</var> может содержать:
-</p><ul>
-<li> `<samp>@</samp>` для рисования торцов;
-</li><li> `<samp>#</samp>` для сетчатой фигуры;
-</li><li> `<samp>t</samp>` для рисования цилиндра вместо конуса/призмы;
-</li><li> `<samp>4</samp>`, `<samp>6</samp>`, `<samp>8</samp>` для рисования квадратной, шестиугольной или восьмиугольной призмы вместо конуса.
-</li></ul>
-
-</dd></dl>
-
-<a name="circle"></a><dl>
-<dt><a name="index-circle"></a>Команда MGL: <em></em> <strong>circle</strong> <em><code>x0 y0 r</code> ['col'='r']</em></dt>
-<dt><a name="index-circle-1"></a>Команда MGL: <em></em> <strong>circle</strong> <em><code>x0 y0 z0 r</code> ['col'='r']</em></dt>
-<dd><p>Рисует круг радиуса <var>r</var> с центром в точке <var>p</var>={<var>x0</var>, <var>y0</var>, <var>z0</var>} цветом <var>stl</var>. Если <var>col</var> содержит: `<samp>#</samp>` то рисуется только граница, `<samp>@</samp>` то рисуется граница (вторым цветом из <var>col</var> или черными).
-</p></dd></dl>
-
-<a name="ellipse"></a><dl>
-<dt><a name="index-ellipse"></a>Команда MGL: <em></em> <strong>ellipse</strong> <em><code>x1 y1 x2 y2 r</code> ['col'='r']</em></dt>
-<dt><a name="index-ellipse-1"></a>Команда MGL: <em></em> <strong>ellipse</strong> <em><code>x1 y1 z1 x2 y2 z2 r</code> ['col'='r']</em></dt>
-<dd><p>Рисует эллипс радиуса <var>r</var> с фокусами в точках <var>p1</var>, <var>p2</var> цветом <var>stl</var>. Если <var>col</var> содержит: `<samp>#</samp>` то рисуется только граница, `<samp>@</samp>` то рисуется граница (вторым цветом из <var>col</var> или черными).
-</p></dd></dl>
-
-<a name="rhomb"></a><dl>
-<dt><a name="index-rhomb"></a>Команда MGL: <em></em> <strong>rhomb</strong> <em><code>x1 y1 x2 y2 r</code> ['col'='r']</em></dt>
-<dt><a name="index-rhomb-1"></a>Команда MGL: <em></em> <strong>rhomb</strong> <em><code>x1 y1 z1 x2 y2 z2 r</code> ['col'='r']</em></dt>
-<dd><p>Рисует ромб ширины <var>r</var> с вершинами в точках <var>p1</var>, <var>p2</var> цветом <var>stl</var>. Если <var>col</var> содержит: `<samp>#</samp>` то рисуется только граница, `<samp>@</samp>` то рисуется граница (вторым цветом из <var>col</var> или черными). Если <var>col</var> содержит 3 цвета, то используется градиентная заливка.
-</p></dd></dl>
-
-<a name="arc"></a><dl>
-<dt><a name="index-arc"></a>Команда MGL: <em></em> <strong>arc</strong> <em><code>x0 y0 x1 y1 a</code> ['col'='r']</em></dt>
-<dt><a name="index-arc-1"></a>Команда MGL: <em></em> <strong>arc</strong> <em><code>x0 y0 z0 x1 y1 a</code> ['col'='r']</em></dt>
-<dt><a name="index-arc-2"></a>Команда MGL: <em></em> <strong>arc</strong> <em><code>x0 y0 z0 xa ya za x1 y1 z1 a</code> ['col'='r']</em></dt>
-<dd><p>Рисует дугу вокруг оси <var>pa</var> (по умолчанию вокруг оси z <var>pa</var>={0,0,1}) с центром в <var>p0</var>, начиная с точки <var>p1</var>. Параметр <var>a</var> задает угол дуги в градусах. Строка <var>col</var> задает цвет дуги и тип стрелок на краях.
-</p></dd></dl>
-
-<a name="polygon"></a><dl>
-<dt><a name="index-polygon"></a>Команда MGL: <em></em> <strong>polygon</strong> <em><code>x0 y0 x1 y1 num</code> ['col'='r']</em></dt>
-<dt><a name="index-polygon-1"></a>Команда MGL: <em></em> <strong>polygon</strong> <em><code>x0 y0 z0 x1 y1 z1 num</code> ['col'='r']</em></dt>
-<dd><p>Рисует правильный <var>num</var>-угольник с центром в <var>p0</var> с первой вершиной в <var>p1</var> цветом <var>col</var>. Если <var>col</var> содержит: `<samp>#</samp>` то рисуется только граница, `<samp>@</samp>` то рисуется граница (вторым цветом из <var>col</var> или черными).
-</p></dd></dl>
-
-<a name="logo"></a><dl>
-<dt><a name="index-logo"></a>Команда MGL: <em></em> <strong>logo</strong> <em>'fname' [smooth=off]</em></dt>
-<dd><p>Draw bitmap (logo) along whole axis range, which can be changed by <a href="#Command-options">Command options</a>. Bitmap can be loaded from file or specified as RGBA values for pixels. Parameter <var>smooth</var> set to draw bitmap without or with color interpolation.
-</p></dd></dl>
-
-
-
-<a name="symbol"></a><dl>
-<dt><a name="index-symbol"></a>Команда MGL: <em></em> <strong>symbol</strong> <em><code>x y</code> 'id' ['fnt'='' <code>size=-1</code>]</em></dt>
-<dt><a name="index-symbol-1"></a>Команда MGL: <em></em> <strong>symbol</strong> <em><code>x y z</code> 'id' ['fnt'='' <code>size=-1</code>]</em></dt>
-<dd><p>Рисует определенный пользователем символ с именем <var>id</var> в точке <var>p</var> стилем <var>fnt</var>. Размер задается параметром <var>size</var> (по умолчанию <code>-1</code>). Строка <var>fnt</var> может содержать цвет (до разделителя `<samp>:</samp>`); стили `<samp>a</samp>` или `<samp>A</samp>` для вывода в абсолютной позиции ({<var>x</var>, <var>y</var>} полагаются в диапазоне [0,1]) относительно рисунка (для `<samp>A</samp>`) или subplot/inplot (для `<samp>a</samp>`); и стиль `<samp>w</samp>` для рисования только контура символа.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-symbol-2"></a>Команда MGL: <em></em> <strong>symbol</strong> <em><code>x y dx dy</code> 'id' ['fnt'=':L' <code>size=-1</code>]</em></dt>
-<dt><a name="index-symbol-3"></a>Команда MGL: <em></em> <strong>symbol</strong> <em><code>x y z dx dy dz</code> 'id' ['fnt'=':L' <code>size=-1</code>]</em></dt>
-<dd><p>Аналогично предыдущему, но символ рисуется в повернутым в направлении <var>d</var>.
-</p></dd></dl>
-
-<a name="addsymbol"></a><dl>
-<dt><a name="index-addsymbol"></a>Команда MGL: <em></em> <strong>addsymbol</strong> <em>'id' xdat ydat</em></dt>
-<dd><p>Добавляет определенный пользователем символ с именем <var>id</var> и границей {<var>xdat</var>, <var>ydat</var>}. Значения <code>NAN</code> задают разрыв (скачок) граничной кривой.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Text-printing"></a>
-<div class="header">
-<p>
-Next: <a href="#Axis-and-Colorbar" accesskey="n" rel="next">Axis and Colorbar</a>, Previous: <a href="#Primitives" accesskey="p" rel="prev">Primitives</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Vyvod-teksta"></a>
-<h3 class="section">3.8 Вывод текста</h3>
-
-<a name="index-Text"></a>
-<a name="index-fgets"></a>
-
-<p>Функции для вывода текста позволяют вывести строку текста в произвольном месте рисунка, в произвольном направлении и вдоль произвольной кривой. MathGL позволяет использовать произвольное начертание шрифта и многие ТеХ-ие команды (детальнее см. <a href="#Font-styles">Font styles</a>). Все функции вывода текста имеют варианты для 8-bit строк (<code>char *</code>) и для Unicode строк (<code>wchar_t *</code>). В первом случае используется конверсия из текущей локали, т.е. иногда вам требуется явно указать локаль с помощью функции <code>setlocale()</code>. Аргумент <var>size</var> определяет размер текста: размер шрифта если положителен или относительный размер (=-<var>size</var>*<code>SetFontSize()</code>) если отрицателен. Начертание шрифта (STIX, arial, courier, times и др.) можно изменить с помощью функции LoadFont(). See <a href="#Font-settings">Font settings</a>.
-</p>
-<p>Параметры шрифта задаются строкой, которая может содержать символы цвета `<samp>wkrgbcymhRGBCYMHW</samp>` (см. <a href="#Color-styles">Color styles</a>). Также после символа `<samp>:</samp>` можно указать символы стиля (`<samp>rbiwou</samp>`) и/или выравнивания (`<samp>LRCTV</samp>`). Стили шрифта: `<samp>r</samp>` - прямой, `<samp>i</samp>` - курсив, `<samp>b</samp>` - жирный, `<samp>w</samp>` - контурный, `<samp>o</samp>` - надчеркнутый, `<samp>u</samp>` - подчеркнутый. По умолчанию используется прямой шрифт. Типы выравнивания: `<samp>L</samp>` - по левому краю (по умолчанию), `<samp>C</samp>` - по центру, `<samp>R</samp>` - по правому краю, `<samp>T</samp>` - под текстом, `<samp>V</samp>` - по центру вертикально. Например, строка `<samp>b:iC</samp>` соответствует курсиву синего цвета с выравниванием по центру. Начиная с MathGL версии 2.3, вы можете задать цветовой градиент для выводимой строки (см. <a href="#Color-scheme">Color scheme</a>).
-</p>
-<p>Если строка содержит символы `<samp>aA</samp>`, то текст выводится в абсолютных координатах (полагаются в диапазоне [0,1]). При этом используются координаты относительно рисунка (если указано `<samp>A</samp>`) или относительно последнего subplot/inplot (если указано `<samp>a</samp>`). Если строка содержит символ `<samp>@</samp>`, то вокруг текста рисуется прямоугольник.
-</p>
-<p>См. <a href="#Text-features">Text features</a>, для примеров кода и графика.
-</p>
-<a name="text"></a><dl>
-<dt><a name="index-text"></a>Команда MGL: <em></em> <strong>text</strong> <em><code>x y</code> 'text' ['fnt'='' <code>size=-1</code>]</em></dt>
-<dt><a name="index-text-1"></a>Команда MGL: <em></em> <strong>text</strong> <em><code>x y z</code> 'text' ['fnt'='' <code>size=-1</code>]</em></dt>
-<dd><p>Выводит строку <var>text</var> от точки <var>p</var> шрифтом определяемым строкой <var>fnt</var>. Размер шрифта задается параметром <var>size</var> (по умолчанию <code>-1</code>).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-text-2"></a>Команда MGL: <em></em> <strong>text</strong> <em><code>x y dx dy</code> 'text' ['fnt'=':L' <code>size=-1</code>]</em></dt>
-<dt><a name="index-text-3"></a>Команда MGL: <em></em> <strong>text</strong> <em><code>x y z dx dy dz</code> 'text' ['fnt'=':L' <code>size=-1</code>]</em></dt>
-<dd><p>Выводит строку <var>text</var> от точки <var>p</var> вдоль направления <var>d</var>. Параметр <var>fnt</var> задает стиль текста и указывает выводить текст под линией (`<samp>T</samp>`) или над ней (`<samp>t</samp>`).
-</p></dd></dl>
-
-<a name="fgets"></a><dl>
-<dt><a name="index-fgets-1"></a>Команда MGL: <em></em> <strong>fgets</strong> <em><code>x y</code> 'fname' [<code>n=0</code> 'fnt'='' <code>size=-1.4</code>]</em></dt>
-<dt><a name="index-fgets-2"></a>Команда MGL: <em></em> <strong>fgets</strong> <em><code>x y z</code> 'fname' [<code>n=0</code> 'fnt'='' <code>size=-1.4</code>]</em></dt>
-<dd><p>Выводит <var>n</var>-ую строку файла <var>fname</var> от точки {<var>x</var>,<var>y</var>,<var>z</var>} шрифтом <var>fnt</var> и размером <var>size</var>. По умолчанию используются параметры заданные командой <a href="#font">font</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-text-4"></a>Команда MGL: <em></em> <strong>text</strong> <em>ydat 'text' ['fnt'='']</em></dt>
-<dt><a name="index-text-5"></a>Команда MGL: <em></em> <strong>text</strong> <em>xdat ydat 'text' ['fnt'='' <code>size=-1 zval=nan</code>]</em></dt>
-<dt><a name="index-text-6"></a>Команда MGL: <em></em> <strong>text</strong> <em>xdat ydat zdat 'text' ['fnt'='' <code>size=-1</code>]</em></dt>
-<dd><p>Выводит строку <var>text</var> вдоль кривой {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]} шрифтом <var>fnt</var>. Строка <var>fnt</var> может содержать символы: `<samp>t</samp>` для вывода текста под кривой (по умолчанию), или `<samp>T</samp>` для вывода текста под кривой. Размеры по 1-ой размерности должны быть одинаковы для всех массивов <code>x.nx=y.nx=z.nx</code>. Если массив <var>x</var> не указан, то используется "автоматический" массив со значениями в диапазоне осей координат (см. <a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a>). Если массив <var>z</var> не указан, то используется минимальное значение оси z. Строка <var>opt</var> содержит опции команды (см. <a href="#Command-options">Command options</a>).
-</p></dd></dl>
-
-
-<hr>
-<a name="Axis-and-Colorbar"></a>
-<div class="header">
-<p>
-Next: <a href="#Legend" accesskey="n" rel="next">Legend</a>, Previous: <a href="#Text-printing" accesskey="p" rel="prev">Text printing</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Osi-i-Colorbar"></a>
-<h3 class="section">3.9 Оси и Colorbar</h3>
-
-<a name="index-Axis-1"></a>
-<a name="index-Box"></a>
-<a name="index-Grid"></a>
-<a name="index-Colorbar"></a>
-<a name="index-Label"></a>
-
-<p>Эти функции рисуют объекты для "измерения" типа осей координат, цветовой таблицы (colorbar), сетку по осям, обрамляющий параллелепипед и подписи по осям координат. См. также см. <a href="#Axis-settings">Axis settings</a>.
-</p>
-<a name="axis"></a><dl>
-<dt><a name="index-axis-2"></a>Команда MGL: <em></em> <strong>axis</strong> <em>['dir'='xyz' 'stl'='']</em></dt>
-<dd><p>Рисует оси координат и метки на них (см. <a href="#Axis-settings">Axis settings</a>) в направлениях `<samp>xyz</samp>`, указанных строкой <var>dir</var>. Строка <var>dir</var> может содержать:
-</p><ul>
-<li> `<samp>xyz</samp>` для рисования соответствующих осей;
-</li><li> `<samp>XYZ</samp>` для рисования соответствующих осей с метками с другой стороны;
-</li><li> `<samp>~</samp>` или `<samp>_</samp>` для осей без подписей;
-</li><li> `<samp>U</samp>` для невращаемых подписей;
-</li><li> `<samp>^</samp>` для инвертирования положения по умолчанию;
-</li><li> `<samp>!</samp>` для отключения улучшения вида меток (см. <a href="#tuneticks">tuneticks</a>);
-</li><li> `<samp>AKDTVISO</samp>` для вывода стрелки на конце оси;
-</li><li> `<samp>a</samp>` для принудительной автоматической расстановки меток;
-</li><li> `<samp>:</samp>` для рисования линий через точку (0,0,0);
-</li><li> `<samp>f</samp>` для вывода чисел в фиксированном формате;
-</li><li> `<samp>E</samp>` для вывода `<samp>E</samp>` вместо `<samp>e</samp>`;
-</li><li> `<samp>F</samp>` для вывода в формате LaTeX;
-</li><li> `<samp>+</samp>` для вывода `<samp>+</samp>` для положительных чисел;
-</li><li> `<samp>-</samp>` для вывода обычного `<samp>-</samp>`;
-</li><li> `<samp>0123456789</samp>` для задания точности при выводе чисел.
-</li></ul>
-<p>Стиль меток и оси(ей) задается строкой <var>stl</var>. Опция <code>value</code> задает угол вращения меток оси. См. <a href="#Axis-and-ticks">Axis and ticks</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="colorbar"></a><dl>
-<dt><a name="index-colorbar"></a>Команда MGL: <em></em> <strong>colorbar</strong> <em>['sch'='']</em></dt>
-<dd><p>Рисует полосу соответствия цвета и числовых значений (colorbar) для цветовой схемы <var>sch</var> (используется текущая для <code>sch=""</code>) с краю от графика. Строка <var>sch</var> также может содержать:
-</p><ul>
-<li> `<samp><>^_</samp>` для расположения слева, справа, сверху или снизу соответственно;
-</li><li> `<samp>I</samp>` для расположения около осей (по умолчанию, на краях subplot);
-</li><li> `<samp>A</samp>` для использования абсолютных координат (относительно рисунка);
-</li><li> `<samp>~</samp>` для colorbar без подписей;
-</li><li> `<samp>!</samp>` для отключения улучшения вида меток (см. <a href="#tuneticks">tuneticks</a>);
-</li><li> `<samp>a</samp>` для принудительной автоматической расстановки меток;
-</li><li> `<samp>f</samp>` для вывода чисел в фиксированном формате;
-</li><li> `<samp>E</samp>` для вывода `<samp>E</samp>` вместо `<samp>e</samp>`;
-</li><li> `<samp>F</samp>` для вывода в формате LaTeX;
-</li><li> `<samp>+</samp>` для вывода `<samp>+</samp>` для положительных чисел;
-</li><li> `<samp>-</samp>` для вывода обычного `<samp>-</samp>`;
-</li><li> `<samp>0123456789</samp>` для задания точности при выводе чисел.
-</li></ul>
-<p>См. <a href="#Colorbars">Colorbars</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-colorbar-1"></a>Команда MGL: <em></em> <strong>colorbar</strong> <em>vdat ['sch'='']</em></dt>
-<dd><p>Аналогично предыдущему, но для цветовой схемы без сглаживания с заданными значениями <var>v</var>. См. <a href="#contd-sample">contd sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-colorbar-2"></a>Команда MGL: <em></em> <strong>colorbar</strong> <em>'sch' <code>x y [w=1 h=1]</code></em></dt>
-<dd><p>Аналогично первому, но в произвольном месте графика {<var>x</var>, <var>y</var>} (полагаются в диапазоне [0,1]). Параметры <var>w</var>, <var>h</var> задают относительную ширину и высоту colorbar.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-colorbar-3"></a>Команда MGL: <em></em> <strong>colorbar</strong> <em>vdat 'sch' <code>x y [w=1 h=1]</code></em></dt>
-<dd><p>Аналогично предыдущему, но для цветовой схемы <var>sch</var> без сглаживания с заданными значениями <var>v</var>. См. <a href="#contd-sample">contd sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="grid"></a><dl>
-<dt><a name="index-grid"></a>Команда MGL: <em></em> <strong>grid</strong> <em>['dir'='xyz' 'pen'='B']</em></dt>
-<dd><p>Рисует линии сетки в направлениях перпендикулярным <var>dir</var>. Если <var>dir</var> содержит `<samp>!</samp>`, то линии рисуются также и для координат под-меток. Шаг сетки такой же как у меток осей координат. Стиль линий задается параметром <var>pen</var> (по умолчанию - сплошная темно синяя линия `<samp>B-</samp>`).
-</p></dd></dl>
-
-<a name="box"></a><dl>
-<dt><a name="index-box"></a>Команда MGL: <em></em> <strong>box</strong> <em>['stl'='k' <code>ticks=on</code>]</em></dt>
-<dd><p>Рисует ограничивающий параллелепипед цветом <var>col</var>. Если <var>col</var> содержит `<samp>@</samp>`, то рисуются закрашенные задние грани. При этом первый цвет используется для граней (по умолчанию светло жёлтый), а последний для рёбер и меток.
-</p></dd></dl>
-
-<a name="xlabel"></a><a name="ylabel"></a><a name="zlabel"></a><a name="tlabel"></a><dl>
-<dt><a name="index-xlabel"></a>Команда MGL: <em></em> <strong>xlabel</strong> <em>'text' [<code>pos=1</code>]</em></dt>
-<dt><a name="index-ylabel"></a>Команда MGL: <em></em> <strong>ylabel</strong> <em>'text' [<code>pos=1</code>]</em></dt>
-<dt><a name="index-zlabel"></a>Команда MGL: <em></em> <strong>zlabel</strong> <em>'text' [<code>pos=1</code>]</em></dt>
-<dt><a name="index-tlabel"></a>Команда MGL: <em></em> <strong>tlabel</strong> <em>'text' [<code>pos=1</code>]</em></dt>
-<dd><p>Выводит подпись <var>text</var> для оси <var>dir</var>=`<samp>x</samp>`,`<samp>y</samp>`,`<samp>z</samp>`,`<samp>t</samp>` (где `<samp>t</samp>` - “тернарная” ось <em>t=1-x-y</em>). Параметр <var>pos</var> задает положение подписи: при <var>pos</var>=0 - по центру оси, при <var>pos</var>>0 - около максимальных значений, при <var>pos</var><0 - около минимальных значений. Опция <code>value</code> задает дополнительный сдвиг текста. See <a href="#Text-printing">Text printing</a>.
-</p></dd></dl>
-
-
-<hr>
-<a name="Legend"></a>
-<div class="header">
-<p>
-Next: <a href="#g_t1D-plotting" accesskey="n" rel="next">1D plotting</a>, Previous: <a href="#Axis-and-Colorbar" accesskey="p" rel="prev">Axis and Colorbar</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Legenda"></a>
-<h3 class="section">3.10 Легенда</h3>
-
-<a name="index-Legend"></a>
-<a name="index-AddLegend"></a>
-<a name="index-ClearLegend"></a>
-<a name="index-SetLegendBox"></a>
-<a name="index-SetLegendMarks"></a>
-
-<p>Эти функции обеспечивают рисование легенды графика (полезно для <a href="#g_t1D-plotting">1D plotting</a>). Запись в легенде состоит из двух строк: одна для стиля линии и маркеров, другая с текстом описания (с включенным разбором TeX-их команд). Можно использовать непосредственно массивы строк, или накопление во внутренние массивы с помощью функции AddLegend() с последующим отображением. Положение легенды можно задать автоматически или вручную. Параметры <var>fnt</var> и <var>size</var> задают стиль и размер шрифта (см. <a href="#Font-settings">Font settings</a>). Опция <code>value</code> задает зазор между примером линии и текстом (по умолчанию 0.1). Опция <code>size</code> задает размер текста. Если стиль линии пустой, то соответствующий текст печатается без отступа. Строка <var>fnt</var> может содержать:
-</p><ul>
-<li> стиль текста для записей;
-</li><li> `<samp>A</samp>` для расположения относительно всего рисунка, а не текущего subplot;
-</li><li> `<samp>^</samp>` для размещения снаружи от указанных координат;
-</li><li> `<samp>#</samp>` для вывода прямоугольника вокруг легенды;
-</li><li> `<samp>-</samp>` для горизонтального расположения записей;
-</li><li> цвета для заливки (1-ый), для границы (2-ой) и для текста записей (3-ий). Если указано меньше трех цветов, то цвет границы черный (для 2 и менее цветов), и цвет заливки белый (для 1 и менее цвета).
-</li></ul>
-<p>См. <a href="#Legend-sample">Legend sample</a>, для примеров кода и графика.
-</p>
-<a name="legend"></a><dl>
-<dt><a name="index-legend-2"></a>Команда MGL: <em></em> <strong>legend</strong> <em>[<code>pos=3</code> 'fnt'='#']</em></dt>
-<dd><p>Рисует легенду из накопленных записей шрифтом <var>fnt</var>. Параметр <var>pos</var> задает положение легенды: `<samp>0</samp>` - в нижнем левом углу, `<samp>1</samp>` - нижнем правом углу, `<samp>2</samp>` - верхнем левом углу, `<samp>3</samp>` - верхнем правом углу (по умолчанию). Опция <code>value</code> задает зазор между примером линии и текстом (по умолчанию 0.1).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-legend-3"></a>Команда MGL: <em></em> <strong>legend</strong> <em><code>x y</code> ['fnt'='#']</em></dt>
-<dd><p>Рисует легенду из накопленных записей шрифтом <var>fnt</var>. Положение легенды задается параметрами <var>x</var>, <var>y</var>, которые полагаются нормированными в диапазоне [0,1]. Опция <code>value</code> задает зазор между примером линии и текстом (по умолчанию 0.1).
-</p></dd></dl>
-
-<a name="addlegend"></a><dl>
-<dt><a name="index-addlegend"></a>Команда MGL: <em></em> <strong>addlegend</strong> <em>'text' 'stl'</em></dt>
-<dd><p>Добавляет описание <var>text</var> кривой со стилем <var>style</var> (см. <a href="#Line-styles">Line styles</a>) во внутренний массив записей легенды.
-</p></dd></dl>
-
-<a name="clearlegend"></a><dl>
-<dt><a name="index-clearlegend"></a>Команда MGL: <em></em> <strong>clearlegend</strong></dt>
-<dd><p>Очищает внутренний массив записей легенды.
-</p></dd></dl>
-
-<a name="legendmarks"></a><dl>
-<dt><a name="index-legendmarks"></a>Команда MGL: <em></em> <strong>legendmarks</strong> <em><code>val</code></em></dt>
-<dd><p>Задает число маркеров в легенде. По умолчанию используется 1 маркер.
-</p></dd></dl>
-
-
-<hr>
-<a name="g_t1D-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#g_t2D-plotting" accesskey="n" rel="next">2D plotting</a>, Previous: <a href="#Legend" accesskey="p" rel="prev">Legend</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="g_t1D-grafiki"></a>
-<h3 class="section">3.11 1D графики</h3>
-
-<a name="index-Plot"></a>
-<a name="index-Radar"></a>
-<a name="index-Tens"></a>
-<a name="index-Area"></a>
-<a name="index-Region"></a>
-<a name="index-Stem"></a>
-<a name="index-Bars"></a>
-<a name="index-Barh"></a>
-<a name="index-Chart"></a>
-<a name="index-Step"></a>
-<a name="index-Torus"></a>
-<a name="index-Tube"></a>
-<a name="index-Mark"></a>
-<a name="index-TextMark"></a>
-<a name="index-Error"></a>
-<a name="index-BoxPlot"></a>
-<a name="index-Candle"></a>
-<a name="index-Tape"></a>
-<a name="index-Label-1"></a>
-<a name="index-Cones"></a>
-
-<p>Эти функции строят графики для одномерных (1D) массивов. Одномерными считаются массивы, зависящие только от одного параметра (индекса) подобно кривой в параметрической форме {x(i),y(i),z(i)}, i=1...n. По умолчанию (если отсутствуют) значения <var>x</var>[i] равно распределены в диапазоне оси х, и <var>z</var>[i] равно минимальному значению оси z. Графики рисуются для каждой строки массива данных если он двумерный. Размер по 1-ой координате <strong>должен быть одинаков</strong> для всех массивов <code>x.nx=y.nx=z.nx</code>.
-</p>
-<p>Строка <var>pen</var> задает цвет и стиль линии и маркеров (см. <a href="#Line-styles">Line styles</a>). По умолчанию (<code>pen=""</code>) рисуется сплошная линия с текущим цветом из палитры (см. <a href="#Palette-and-colors">Palette and colors</a>). Символ `<samp>!</samp>` в строке задает использование нового цвета из палитры для каждой точки данных (не для всей кривой, как по умолчанию). Строка <var>opt</var> задает опции графика (см. <a href="#Command-options">Command options</a>).
-</p>
-<a name="plot"></a><dl>
-<dt><a name="index-plot"></a>Команда MGL: <em></em> <strong>plot</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-plot-1"></a>Команда MGL: <em></em> <strong>plot</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-plot-2"></a>Команда MGL: <em></em> <strong>plot</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dd><p>Функции рисуют ломанную линию по точкам {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Если <var>pen</var> содержит `<samp>a</samp>`, то рисуются и сегменты между точками вне диапазона осей координат. Если <var>pen</var> содержит `<samp>~</samp>`, то число сегментов уменьшается для квази-линейных участков. См. также <a href="#area">area</a>, <a href="#step">step</a>, <a href="#stem">stem</a>, <a href="#tube">tube</a>, <a href="#mark">mark</a>, <a href="#error">error</a>, <a href="#belt">belt</a>, <a href="#tens">tens</a>, <a href="#tape">tape</a>, <a href="#meshnum">meshnum</a>. См. <a href="#plot-sample">plot sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="radar"></a><dl>
-<dt><a name="index-radar"></a>Команда MGL: <em></em> <strong>radar</strong> <em>adat ['stl'='']</em></dt>
-<dd><p>Функции рисуют radar chart, представляющий собой ломанную с вершинами на радиальных линиях (типа ломанной в полярных координатах). Параметр <code>value</code> в опциях <var>opt</var> задает дополнительный сдвиг данных (т.е. использование <var>a</var>+<code>value</code> вместо <var>a</var>). Если <var>pen</var> содержит `<samp>#</samp>`, то рисуется "сетка" (радиальные линии). Если <var>pen</var> содержит `<samp>a</samp>`, то рисуются и сегменты между точками вне диапазона осей координат. См. также <a href="#plot">plot</a>, <a href="#meshnum">meshnum</a>. См. <a href="#radar-sample">radar sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="step"></a><dl>
-<dt><a name="index-step"></a>Команда MGL: <em></em> <strong>step</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-step-1"></a>Команда MGL: <em></em> <strong>step</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-step-2"></a>Команда MGL: <em></em> <strong>step</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dd><p>Функции рисуют ступеньки для точек массива. Если <var>x</var>.nx><var>y</var>.nx, то массив <var>x</var> задает границы ступенек, а не их конец. См. также <a href="#plot">plot</a>, <a href="#stem">stem</a>, <a href="#tile">tile</a>, <a href="#boxs">boxs</a>, <a href="#meshnum">meshnum</a>. См. <a href="#step-sample">step sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="tens"></a><dl>
-<dt><a name="index-tens"></a>Команда MGL: <em></em> <strong>tens</strong> <em>ydat cdat ['stl'='']</em></dt>
-<dt><a name="index-tens-1"></a>Команда MGL: <em></em> <strong>tens</strong> <em>xdat ydat cdat ['stl'='']</em></dt>
-<dt><a name="index-tens-2"></a>Команда MGL: <em></em> <strong>tens</strong> <em>xdat ydat zdat cdat ['stl'='']</em></dt>
-<dd><p>Функции рисуют ломанную линию по точкам с цветом, определяемым массивом <var>c</var> (типа графика натяжений). Строка <var>pen</var> задает цветовую схему (см. <a href="#Color-scheme">Color scheme</a>) и стиль линий и/или маркеров (см. <a href="#Line-styles">Line styles</a>). Если <var>pen</var> содержит `<samp>a</samp>`, то рисуются и сегменты между точками вне диапазона осей координат. Если <var>pen</var> содержит `<samp>~</samp>`, то число сегментов уменьшается для квази-линейных участков. См. также <a href="#plot">plot</a>, <a href="#mesh">mesh</a>, <a href="#fall">fall</a>, <a href="#meshnum">meshnum</a>. См. <a href="#tens-sample">tens sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="tape"></a><dl>
-<dt><a name="index-tape"></a>Команда MGL: <em></em> <strong>tape</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-tape-1"></a>Команда MGL: <em></em> <strong>tape</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-tape-2"></a>Команда MGL: <em></em> <strong>tape</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dd><p>Функции рисуют ленты, которые вращаются вокруг кривой {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]} как её нормали. Начальная лента(ы) выбираются в плоскости x-y (для `<samp>x</samp>` в <var>pen</var>) и/или y-z (для `<samp>x</samp>` в <var>pen</var>). Ширина лент пропорциональна <a href="#barwidth">barwidth</a>, а также может быть изменена опцией <code>value</code>. См. также <a href="#plot">plot</a>, <a href="#flow">flow</a>, <a href="#barwidth">barwidth</a>. См. <a href="#tape-sample">tape sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="area"></a><dl>
-<dt><a name="index-area"></a>Команда MGL: <em></em> <strong>area</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-area-1"></a>Команда MGL: <em></em> <strong>area</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-area-2"></a>Команда MGL: <em></em> <strong>area</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dd><p>Функции рисуют ломанную линию между точками и закрашивает её вниз до плоскости осей координат. Градиентная заливка используется если число цветов равно удвоенному число кривых. Если <var>pen</var> содержит `<samp>#</samp>`, то рисуется только каркас. Если <var>pen</var> содержит `<samp>a</samp>`, то рисуются и сегменты между точками вне диапазона осей координат. См. также <a href="#plot">plot</a>, <a href="#bars">bars</a>, <a href="#stem">stem</a>, <a href="#region">region</a>. См. <a href="#area-sample">area sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="region"></a><dl>
-<dt><a name="index-region"></a>Команда MGL: <em></em> <strong>region</strong> <em>ydat1 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-region-1"></a>Команда MGL: <em></em> <strong>region</strong> <em>xdat ydat1 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-region-2"></a>Команда MGL: <em></em> <strong>region</strong> <em>xdat1 ydat1 xdat2 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-region-3"></a>Команда MGL: <em></em> <strong>region</strong> <em>xdat1 ydat1 zdat1 xdat2 ydat2 zdat2 ['stl'='']</em></dt>
-<dd><p>Функции закрашивают область между 2 кривыми. Градиентная заливка используется если число цветов равно удвоенному число кривых. Если в 2d версии <var>pen</var> содержит `<samp>i</samp>`, то закрашивается только область y1<y<y2, в противном случае будет закрашена и область y2<y<y1. Если <var>pen</var> содержит `<samp>#</samp>`, то рисуется только каркас. Если <var>pen</var> содержит `<samp>a</samp>`, то рисуются и сегменты между точками вне диапазона осей координат. См. также <a href="#area">area</a>, <a href="#bars">bars</a>, <a href="#stem">stem</a>. См. <a href="#region-sample">region sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="stem"></a><dl>
-<dt><a name="index-stem"></a>Команда MGL: <em></em> <strong>stem</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-stem-1"></a>Команда MGL: <em></em> <strong>stem</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-stem-2"></a>Команда MGL: <em></em> <strong>stem</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dd><p>Функции рисуют вертикальные линии из точек до плоскости осей координат. См. также <a href="#area">area</a>, <a href="#bars">bars</a>, <a href="#plot">plot</a>, <a href="#mark">mark</a>. См. <a href="#stem-sample">stem sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="bars"></a><dl>
-<dt><a name="index-bars"></a>Команда MGL: <em></em> <strong>bars</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-bars-1"></a>Команда MGL: <em></em> <strong>bars</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-bars-2"></a>Команда MGL: <em></em> <strong>bars</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dd><p>Функции рисуют вертикальные полосы (прямоугольники) из точек до плоскости осей координат. Строка <var>pen</var> может содержать:
-</p><ul>
-<li> `<samp>a</samp>` для вывода линий одной поверх другой (как при суммировании);
-</li><li> `<samp>f</samp>` для определения кумулятивного эффекта последовательности положительных и отрицательных значений (график типа waterfall);
-</li><li> `<samp>F</samp>` для использования одинаковой (минимальной) ширины полосок;
-</li><li> `<samp><</samp>`, `<samp>^</samp>` or `<samp>></samp>` для выравнивания полосок влево, вправо или центрирования относительно их координат.
-</li></ul>
-<p>Можно использовать разные цвета для положительных и отрицательных значений если число указанных цветов равно удвоенному числу кривых для построения. Если <var>x</var>.nx><var>y</var>.nx, то массив <var>x</var> задает границы полос, а не их центр. См. также <a href="#barh">barh</a>, <a href="#cones">cones</a>, <a href="#area">area</a>, <a href="#stem">stem</a>, <a href="#chart">chart</a>, <a href="#barwidth">barwidth</a>. См. <a href="#bars-sample">bars sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="barh"></a><dl>
-<dt><a name="index-barh"></a>Команда MGL: <em></em> <strong>barh</strong> <em>vdat ['stl'='']</em></dt>
-<dt><a name="index-barh-1"></a>Команда MGL: <em></em> <strong>barh</strong> <em>ydat vdat ['stl'='']</em></dt>
-<dd><p>Функции рисуют горизонтальные полосы (прямоугольники) из точек до плоскости осей координат. Строка <var>pen</var> может содержать:
-</p><ul>
-<li> `<samp>a</samp>` для вывода линий одной поверх другой (как при суммировании);
-</li><li> `<samp>f</samp>` для определения кумулятивного эффекта последовательности положительных и отрицательных значений (график типа waterfall);
-</li><li> `<samp>F</samp>` для использования одинаковой (минимальной) ширины полосок;
-</li><li> `<samp><</samp>`, `<samp>^</samp>` or `<samp>></samp>` для выравнивания полосок влево, вправо или центрирования относительно их координат.
-</li></ul>
-<p>Можно использовать разные цвета для положительных и отрицательных значений если число указанных цветов равно удвоенному числу кривых для построения. Если <var>x</var>.nx><var>y</var>.nx, то массив <var>x</var> задает границы полос, а не их центр. См. также <a href="#bars">bars</a>, <a href="#barwidth">barwidth</a>. См. <a href="#barh-sample">barh sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="cones"></a><dl>
-<dt><a name="index-cones"></a>Команда MGL: <em></em> <strong>cones</strong> <em>ydat ['stl'='']</em></dt>
-<dt><a name="index-cones-1"></a>Команда MGL: <em></em> <strong>cones</strong> <em>xdat ydat ['stl'='']</em></dt>
-<dt><a name="index-cones-2"></a>Команда MGL: <em></em> <strong>cones</strong> <em>xdat ydat zdat ['stl'='']</em></dt>
-<dd><p>Функции рисуют конусы из точек до плоскости осей координат. Если строка <var>pen</var> содержит символ `<samp>a</samp>`, то линии рисуются одна поверх другой. Можно использовать разные цвета для положительных и отрицательных значений если число указанных цветов равно удвоенному числу кривых для построения. Параметр <var>pen</var> может содержать:
-</p><ul>
-<li> `<samp>@</samp>` для рисования торцов;
-</li><li> `<samp>#</samp>` для сетчатой фигуры;
-</li><li> `<samp>t</samp>` для рисования цилиндра вместо конуса/призмы;
-</li><li> `<samp>4</samp>`, `<samp>6</samp>`, `<samp>8</samp>` для рисования квадратной, шестиугольной или восьмиугольной призмы вместо конуса;
-</li><li> `<samp><</samp>`, `<samp>^</samp>` или `<samp>></samp>` для выравнивания конусов влево, вправо или по центру относительно их координат.
-</li></ul>
-<p>См. также <a href="#bars">bars</a>, <a href="#cone">cone</a>, <a href="#barwidth">barwidth</a>. См. <a href="#cones-sample">cones sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-
-<a name="chart"></a><dl>
-<dt><a name="index-chart"></a>Команда MGL: <em></em> <strong>chart</strong> <em>adat ['col'='']</em></dt>
-<dd><p>Рисует цветные полосы (пояса) для массива данных <var>a</var>. Число полос равно числу строк <var>a</var> (равно <var>a.ny</var>). Цвет полос поочерёдно меняется из цветов указанных в <var>col</var> или в палитре (см. <a href="#Palette-and-colors">Palette and colors</a>). Пробел в цветах соответствует прозрачному "цвету", т.е. если <var>col</var> содержит пробел(ы), то соответствующая полоса не рисуется. Ширина полосы пропорциональна значению элемента в <var>a</var>. График строится только для массивов не содержащих отрицательных значений. Если строка <var>col</var> содержит `<samp>#</samp>`, то рисуется также чёрная граница полос. График выглядит лучше в (после вращения системы координат) и/или в полярной системе координат (становится Pie chart). См. <a href="#chart-sample">chart sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="boxplot"></a><dl>
-<dt><a name="index-boxplot"></a>Команда MGL: <em></em> <strong>boxplot</strong> <em>adat ['stl'='']</em></dt>
-<dt><a name="index-boxplot-1"></a>Команда MGL: <em></em> <strong>boxplot</strong> <em>xdat adat ['stl'='']</em></dt>
-<dd><p>Функции рисуют boxplot (называемый также как box-and-whisker diagram или как "ящик с усами") в точках <var>x</var>[i] на плоскости <var>z</var> = <var>zVal</var> (по умолчанию <var>z</var> равно минимальному значению оси z). Это график, компактно изображающий распределение вероятностей <var>a</var>[i,j] (минимум, нижний квартиль (Q1), медиана (Q2), верхний квартиль (Q3) и максимум) вдоль второго (j-го) направления. Если <var>pen</var> содержит `<samp><</samp>`, `<samp>^</samp>` или `<samp>></samp>`, то полоски будут выровнены влево, вправо или центрированы относительно их координат. См. также <a href="#plot">plot</a>, <a href="#error">error</a>, <a href="#bars">bars</a>, <a href="#barwidth">barwidth</a>. См. <a href="#boxplot-sample">boxplot sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="candle"></a><dl>
-<dt><a name="index-candle"></a>Команда MGL: <em></em> <strong>candle</strong> <em>vdat1 ['stl'='']</em></dt>
-<dt><a name="index-candle-1"></a>Команда MGL: <em></em> <strong>candle</strong> <em>vdat1 vdat2 ['stl'='']</em></dt>
-<dt><a name="index-candle-2"></a>Команда MGL: <em></em> <strong>candle</strong> <em>vdat1 ydat1 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-candle-3"></a>Команда MGL: <em></em> <strong>candle</strong> <em>vdat1 vdat2 ydat1 ydat2 ['stl'='']</em></dt>
-<dt><a name="index-candle-4"></a>Команда MGL: <em></em> <strong>candle</strong> <em>xdat vdat1 vdat2 ydat1 ydat2 ['stl'='']</em></dt>
-<dd><p>Функции рисуют candlestick chart в точках <var>x</var>[i]. Этот график показывает прямоугольником ("свечой") диапазон изменения величины. Прозрачная (белая) свеча соответствует росту величины <var>v1</var>[i]<<var>v2</var>[i], чёрная - уменьшению. "Тени" показывают минимальное <var>y1</var> и максимальное <var>y2</var> значения. Если <var>v2</var> отсутствует, то он определяется как <var>v2</var>[i]=<var>v1</var>[i+1]. Можно использовать разные цвета для растущих и падающих дней если число указанных цветов равно удвоенному числу кривых для построения. Если <var>pen</var> содержит `<samp>#</samp>`, то прозрачная свеча будет использована и при 2-цветной схеме. См. также <a href="#plot">plot</a>, <a href="#bars">bars</a>, <a href="#ohlc">ohlc</a>, <a href="#barwidth">barwidth</a>. См. <a href="#candle-sample">candle sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="ohlc"></a><dl>
-<dt><a name="index-ohlc"></a>Команда MGL: <em></em> <strong>ohlc</strong> <em>odat hdat ldat cdat ['stl'='']</em></dt>
-<dt><a name="index-ohlc-1"></a>Команда MGL: <em></em> <strong>ohlc</strong> <em>xdat odat hdat ldat cdat ['stl'='']</em></dt>
-<dd><p>Функции рисуют Open-High-Low-Close диаграмму. Этот график содержит вертикальные линии между максимальным <var>h</var> и минимальным <var>l</var> значениями, и горизонтальные линии перед/после вертикальной линии для начального <var>o</var> и конечного <var>c</var> значений процесса (обычно цены). Можно использовать разные цвета для растущих и падающих дней если число указанных цветов равно удвоенному числу кривых для построения. См. также <a href="#candle">candle</a>, <a href="#plot">plot</a>, <a href="#barwidth">barwidth</a>. См. <a href="#ohlc-sample">ohlc sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-<a name="error"></a><dl>
-<dt><a name="index-error"></a>Команда MGL: <em></em> <strong>error</strong> <em>ydat yerr ['stl'='']</em></dt>
-<dt><a name="index-error-1"></a>Команда MGL: <em></em> <strong>error</strong> <em>xdat ydat yerr ['stl'='']</em></dt>
-<dt><a name="index-error-2"></a>Команда MGL: <em></em> <strong>error</strong> <em>xdat ydat xerr yerr ['stl'='']</em></dt>
-<dd><p>Функции рисуют размер ошибки {<var>ex</var>[i], <var>ey</var>[i]} в точках {<var>x</var>[i], <var>y</var>[i]} на плоскости <var>z</var> = <var>zVal</var> (по умолчанию <var>z</var> равно минимальному значению оси z). Такой график полезен для отображения ошибки эксперимента, вычислений и пр. Если <var>pen</var> содержит `<samp>@</samp>`, то будут использованы большие полупрозрачные маркеры. См. также <a href="#plot">plot</a>, <a href="#mark">mark</a>. См. <a href="#error-sample">error sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="mark"></a><dl>
-<dt><a name="index-mark"></a>Команда MGL: <em></em> <strong>mark</strong> <em>ydat rdat ['stl'='']</em></dt>
-<dt><a name="index-mark-1"></a>Команда MGL: <em></em> <strong>mark</strong> <em>xdat ydat rdat ['stl'='']</em></dt>
-<dt><a name="index-mark-2"></a>Команда MGL: <em></em> <strong>mark</strong> <em>xdat ydat zdat rdat ['stl'='']</em></dt>
-<dd><p>Функции рисуют маркеры размером <var>r</var>[i]*<a href="#marksize">marksize</a> (см. <a href="#Default-sizes">Default sizes</a>) в точках {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Для рисования маркеров одинакового размера можно использовать функцию <a href="#plot">plot</a> с невидимой линией (со стилем содержащим `<samp> </samp>`). Для маркеров с размером как у координат можно использовать <a href="#error">error</a> со стилем `<samp>@</samp>`. См. также <a href="#plot">plot</a>, <a href="#textmark">textmark</a>, <a href="#error">error</a>, <a href="#stem">stem</a>, <a href="#meshnum">meshnum</a>. См. <a href="#mark-sample">mark sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="textmark"></a><dl>
-<dt><a name="index-textmark"></a>Команда MGL: <em></em> <strong>textmark</strong> <em>ydat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-textmark-1"></a>Команда MGL: <em></em> <strong>textmark</strong> <em>ydat rdat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-textmark-2"></a>Команда MGL: <em></em> <strong>textmark</strong> <em>xdat ydat rdat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-textmark-3"></a>Команда MGL: <em></em> <strong>textmark</strong> <em>xdat ydat zdat rdat 'txt' ['stl'='']</em></dt>
-<dd><p>Функции рисуют текст <var>txt</var> как маркер с размером пропорциональным <var>r</var>[i]*<var>marksize</var> в точках {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. См. также <a href="#plot">plot</a>, <a href="#mark">mark</a>, <a href="#stem">stem</a>, <a href="#meshnum">meshnum</a>. См. <a href="#textmark-sample">textmark sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="label"></a><dl>
-<dt><a name="index-label"></a>Команда MGL: <em></em> <strong>label</strong> <em>ydat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-label-1"></a>Команда MGL: <em></em> <strong>label</strong> <em>xdat ydat 'txt' ['stl'='']</em></dt>
-<dt><a name="index-label-2"></a>Команда MGL: <em></em> <strong>label</strong> <em>xdat ydat zdat 'txt' ['stl'='']</em></dt>
-<dd><p>Функции выводят текстовую строку <var>txt</var> в точках {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Если строка <var>txt</var> содержит `<samp>%x</samp>`, `<samp>%y</samp>`, `<samp>%z</samp>` или `<samp>%n</samp>`, то они будут заменены на значения соответствующих координат или на номер точки. Строка <var>fnt</var> может содержать:
-</p><ul>
-<li> стиль текста <a href="#Font-styles">Font styles</a>;
-</li><li> `<samp>f</samp>` для вывода чисел в фиксированном формате;
-</li><li> `<samp>E</samp>` для вывода `<samp>E</samp>` вместо `<samp>e</samp>`;
-</li><li> `<samp>F</samp>` для вывода в формате LaTeX;
-</li><li> `<samp>+</samp>` для вывода `<samp>+</samp>` для положительных чисел;
-</li><li> `<samp>-</samp>` для вывода обычного `<samp>-</samp>`;
-</li><li> `<samp>0123456789</samp>` для задания точности при выводе чисел.
-</li></ul>
-<p>См. также <a href="#plot">plot</a>, <a href="#mark">mark</a>, <a href="#textmark">textmark</a>, <a href="#table">table</a>. См. <a href="#label-sample">label sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="table"></a><dl>
-<dt><a name="index-table"></a>Команда MGL: <em></em> <strong>table</strong> <em>vdat 'txt' ['stl'='#']</em></dt>
-<dt><a name="index-table-1"></a>Команда MGL: <em></em> <strong>table</strong> <em>x y vdat 'txt' ['stl'='#']</em></dt>
-<dd><p>Рисует таблицу значений массива <var>val</var> с заголовками <var>txt</var> (разделенными символом новой строки `<samp>\n</samp>`) в точке {<var>x</var>, <var>y</var>} (по умолчанию {0,0}) относительно текущего subplot. Строка <var>fnt</var> может содержать:
-</p><ul>
-<li> стиль текста <a href="#Font-styles">Font styles</a>;
-</li><li> `<samp>#</samp>` для рисования границ ячеек;
-</li><li> `<samp>=</samp>` для одинаковой ширины всех ячеек;
-</li><li> `<samp>|</samp>` для ограничения ширины таблицы шириной subplot (эквивалентно опции `<samp>value 1</samp>`);
-</li><li> `<samp>f</samp>` для вывода чисел в фиксированном формате;
-</li><li> `<samp>E</samp>` для вывода `<samp>E</samp>` вместо `<samp>e</samp>`;
-</li><li> `<samp>F</samp>` для вывода в формате LaTeX;
-</li><li> `<samp>+</samp>` для вывода `<samp>+</samp>` для положительных чисел;
-</li><li> `<samp>-</samp>` для вывода обычного `<samp>-</samp>`;
-</li><li> `<samp>0123456789</samp>` для задания точности при выводе чисел.
-</li></ul>
-<p>Опция <code>value</code> задает ширину таблицы (по умолчанию 1). См. также <a href="#plot">plot</a>, <a href="#label">label</a>. См. <a href="#table-sample">table sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="iris"></a><dl>
-<dt><a name="index-iris"></a>Команда MGL: <em></em> <strong>iris</strong> <em>dats 'ids' ['stl'='']</em></dt>
-<dt><a name="index-iris-1"></a>Команда MGL: <em></em> <strong>iris</strong> <em>dats rngs 'ids' ['stl'='']</em></dt>
-<dd><p>Рисует Ирисы Фишера для определения зависимостей данных <var>dats</var> друг от друга (см. <a href="http://en.wikipedia.org/wiki/Iris_flower_data_set">http://en.wikipedia.org/wiki/Iris_flower_data_set</a>). Массив <var>rngs</var> размером 2*<var>dats</var>.nx задает диапазон изменения осей для каждой из колонки. Строка <var>ids</var> содержит имена колонок данных, разделенных символом `<samp>;</samp>`. Опция <code>value</code> задает размер текста для имен данных. На график можно добавить новый набор данных если указать тот же размер <var>rngs</var> и использовать пустую строку имен <var>ids</var>. См. также <a href="#plot">plot</a>. См. <a href="#iris-sample">iris sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="tube"></a><dl>
-<dt><a name="index-tube"></a>Команда MGL: <em></em> <strong>tube</strong> <em>ydat rdat ['stl'='']</em></dt>
-<dt><a name="index-tube-1"></a>Команда MGL: <em></em> <strong>tube</strong> <em>ydat <code>rval</code> ['stl'='']</em></dt>
-<dt><a name="index-tube-2"></a>Команда MGL: <em></em> <strong>tube</strong> <em>xdat ydat rdat ['stl'='']</em></dt>
-<dt><a name="index-tube-3"></a>Команда MGL: <em></em> <strong>tube</strong> <em>xdat ydat <code>rval</code> ['stl'='']</em></dt>
-<dt><a name="index-tube-4"></a>Команда MGL: <em></em> <strong>tube</strong> <em>xdat ydat zdat rdat ['stl'='']</em></dt>
-<dt><a name="index-tube-5"></a>Команда MGL: <em></em> <strong>tube</strong> <em>xdat ydat zdat <code>rval</code> ['stl'='']</em></dt>
-<dd><p>Функции рисуют трубу радиуса <var>r</var>[i] вдоль кривой между точками {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Опция <code>value</code> число сегментов в поперечном сечении (по умолчанию 25). См. также <a href="#plot">plot</a>. См. <a href="#tube-sample">tube sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="torus"></a><dl>
-<dt><a name="index-torus"></a>Команда MGL: <em></em> <strong>torus</strong> <em>rdat zdat ['stl'='']</em></dt>
-<dd><p>Функции рисуют поверхность вращения кривой {<var>r</var>, <var>z</var>} относительно оси. Если строка <var>pen</var> содержит `<samp>x</samp>` или `<samp>z</samp>`, то ось вращения будет выбрана в указанном направлении (по умолчанию вдоль оси y). Если <var>sch</var> содержит `<samp>#</samp>`, то рисуется сетчатая поверхность. Если <var>sch</var> содержит `<samp>.</samp>`, то рисуется поверхность из точек. См. также <a href="#plot">plot</a>, <a href="#axial">axial</a>. См. <a href="#torus-sample">torus sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-
-<a name="lamerey"></a><dl>
-<dt><a name="index-lamerey"></a>Команда MGL: <em></em> <strong>lamerey</strong> <em><code>x0</code> ydat ['stl'='']</em></dt>
-<dt><a name="index-lamerey-1"></a>Команда MGL: <em></em> <strong>lamerey</strong> <em><code>x0</code> 'y(x)' ['stl'='']</em></dt>
-<dd><p>Функции рисуют диаграмму Ламерея для точечного отображения x_new = y(x_old) начиная с точки <var>x0</var>. Строка <var>stl</var> может содержать стиль линии, символ `<samp>v</samp>` для стрелок, символ `<samp>~</samp>` для исключения первого сегмента. Опция <code>value</code> задает число сегментов для рисования (по умолчанию 20). См. также <a href="#plot">plot</a>, <a href="#fplot">fplot</a>, <a href="#bifurcation">bifurcation</a>, <a href="#pmap">pmap</a>. См. <a href="#lamerey-sample">lamerey sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="bifurcation"></a><dl>
-<dt><a name="index-bifurcation"></a>Команда MGL: <em></em> <strong>bifurcation</strong> <em><code>dx</code> ydat ['stl'='']</em></dt>
-<dt><a name="index-bifurcation-1"></a>Команда MGL: <em></em> <strong>bifurcation</strong> <em><code>dx</code> 'y(x)' ['stl'='']</em></dt>
-<dd><p>Функции рисуют бифуркационную диаграмму (диаграмму удвоения периода) для точечного отображения x_new = y(x_old). Параметр <var>dx</var> задает точность по оси x. Строка <var>stl</var> задает цвет. Опция <code>value</code> задает число учитываемых стационарных точек (по умолчанию 1024). См. также <a href="#plot">plot</a>, <a href="#fplot">fplot</a>, <a href="#lamerey">lamerey</a>. См. <a href="#bifurcation-sample">bifurcation sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="pmap"></a><dl>
-<dt><a name="index-pmap"></a>Команда MGL: <em></em> <strong>pmap</strong> <em>ydat sdat ['stl'='']</em></dt>
-<dt><a name="index-pmap-1"></a>Команда MGL: <em></em> <strong>pmap</strong> <em>xdat ydat sdat ['stl'='']</em></dt>
-<dt><a name="index-pmap-2"></a>Команда MGL: <em></em> <strong>pmap</strong> <em>xdat ydat zdat sdat ['stl'='']</em></dt>
-<dd><p>Функции рисуют отображение Пуанкаре для кривой {<var>x</var>, <var>y</var>, <var>z</var>} при условии <var>s</var>=0. Проще говоря, рисуются точки пересечения кривой и поверхности. Строка <var>stl</var> задает стиль маркеров. См. также <a href="#plot">plot</a>, <a href="#mark">mark</a>, <a href="#lamerey">lamerey</a>. См. <a href="#pmap-sample">pmap sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="g_t2D-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#g_t3D-plotting" accesskey="n" rel="next">3D plotting</a>, Previous: <a href="#g_t1D-plotting" accesskey="p" rel="prev">1D plotting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="g_t2D-grafiki"></a>
-<h3 class="section">3.12 2D графики</h3>
-
-<a name="index-Mesh"></a>
-<a name="index-Fall"></a>
-<a name="index-Belt"></a>
-<a name="index-Surf"></a>
-<a name="index-Boxs"></a>
-<a name="index-Tile"></a>
-<a name="index-Dens"></a>
-<a name="index-Cont"></a>
-<a name="index-ContF"></a>
-<a name="index-ContD"></a>
-<a name="index-Axial"></a>
-<a name="index-Grad"></a>
-<a name="index-Grid-1"></a>
-
-<p>Эти функции строят графики для двумерных (2D) массивов. Двумерными считаются массивы, зависящие только от двух параметров (индексов) подобно матрице <em>f(x_i,y_j), i=1...n, j=1...m</em>. По умолчанию (если отсутствуют) значения <var>x</var>, <var>y</var> равно распределены в диапазоне осей координат. Младшие размерности массивов <var>x</var>, <var>y</var>, <var>z</var> должны быть одинаковы <code>x.nx=z.nx && y.nx=z.ny</code> или <code>x.nx=y.nx=z.nx && x.ny=y.ny=z.ny</code>. Массивы <var>x</var> и <var>y</var> могут быть векторами (не матрицами как <var>z</var>). График строится для каждого z среза данных. Строка <var>sch</var> задает цветовую схему (см. <a href="#Color-scheme">Color scheme</a>). Строка <var>opt</var> задает опции графика (см. <a href="#Command-options">Command options</a>).
-</p>
-<a name="surf"></a><dl>
-<dt><a name="index-surf"></a>Команда MGL: <em></em> <strong>surf</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-surf-1"></a>Команда MGL: <em></em> <strong>surf</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>Рисует параметрически заданную поверхность {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. Если <var>sch</var> содержит `<samp>#</samp>`, то рисуется сетка на поверхности. Если <var>sch</var> содержит `<samp>.</samp>`, то рисуется поверхность из точек. См. также <a href="#mesh">mesh</a>, <a href="#dens">dens</a>, <a href="#belt">belt</a>, <a href="#tile">tile</a>, <a href="#boxs">boxs</a>, <a href="#surfc">surfc</a>, <a href="#surfa">surfa</a>. См. <a href="#surf-sample">surf sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="mesh"></a><dl>
-<dt><a name="index-mesh"></a>Команда MGL: <em></em> <strong>mesh</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-mesh-1"></a>Команда MGL: <em></em> <strong>mesh</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>Рисует сетчатую поверхность, заданную параметрически {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. См. также <a href="#surf">surf</a>, <a href="#fall">fall</a>, <a href="#meshnum">meshnum</a>, <a href="#cont">cont</a>, <a href="#tens">tens</a>. См. <a href="#mesh-sample">mesh sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="fall"></a><dl>
-<dt><a name="index-fall"></a>Команда MGL: <em></em> <strong>fall</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-fall-1"></a>Команда MGL: <em></em> <strong>fall</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>Рисует водопад для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. График удобен для построения нескольких кривых, сдвинутых вглубь друг относительно друга. Если <var>sch</var> содержит `<samp>x</samp>`, то линии рисуются вдоль оси x, иначе (по умолчанию) вдоль оси y. См. также <a href="#belt">belt</a>, <a href="#mesh">mesh</a>, <a href="#tens">tens</a>, <a href="#meshnum">meshnum</a>. См. <a href="#fall-sample">fall sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="belt"></a><dl>
-<dt><a name="index-belt"></a>Команда MGL: <em></em> <strong>belt</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-belt-1"></a>Команда MGL: <em></em> <strong>belt</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>Рисует ленточки для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. График может использоваться как 3d обобщение графика <a href="#plot">plot</a>. Если <var>sch</var> содержит `<samp>x</samp>`, то ленточки рисуются вдоль оси x, иначе (по умолчанию) вдоль оси y. См. также <a href="#fall">fall</a>, <a href="#surf">surf</a>, <a href="#beltc">beltc</a>, <a href="#plot">plot</a>, <a href="#meshnum">meshnum</a>. См. <a href="#belt-sample">belt sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="boxs"></a><dl>
-<dt><a name="index-boxs"></a>Команда MGL: <em></em> <strong>boxs</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-boxs-1"></a>Команда MGL: <em></em> <strong>boxs</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>Рисует вертикальные ящики для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. См. также <a href="#surf">surf</a>, <a href="#dens">dens</a>, <a href="#tile">tile</a>, <a href="#step">step</a>. См. <a href="#boxs-sample">boxs sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="tile"></a><dl>
-<dt><a name="index-tile"></a>Команда MGL: <em></em> <strong>tile</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-tile-1"></a>Команда MGL: <em></em> <strong>tile</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-tile-2"></a>Команда MGL: <em></em> <strong>tile</strong> <em>xdat ydat zdat cdat ['sch'='']</em></dt>
-<dd><p>Рисует плитки для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} с цветом, заданным массивом <var>c</var>[i,j]. Если строка <var>sch</var> содержит стиль `<samp>x</samp>` или `<samp>y</samp>`, то плитки будут ориентированы перпендикулярно x- или y-оси. График может использоваться как 3d обобщение <a href="#step">step</a>. См. также <a href="#surf">surf</a>, <a href="#boxs">boxs</a>, <a href="#step">step</a>, <a href="#tiles">tiles</a>. См. <a href="#tile-sample">tile sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="dens"></a><dl>
-<dt><a name="index-dens"></a>Команда MGL: <em></em> <strong>dens</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-dens-1"></a>Команда MGL: <em></em> <strong>dens</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>Рисует график плотности для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} при <var>z</var> равном минимальному значению оси z. Если <var>sch</var> содержит `<samp>#</samp>`, то рисуется сетка. Если <var>sch</var> содержит `<samp>.</samp>`, то рисуется поверхность из точек. См. также <a href="#surf">surf</a>, <a href="#cont">cont</a>, <a href="#contf">contf</a>, <a href="#boxs">boxs</a>, <a href="#tile">tile</a>, <code>dens[xyz]</code>. См. <a href="#dens-sample">dens sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="cont"></a><dl>
-<dt><a name="index-cont"></a>Команда MGL: <em></em> <strong>cont</strong> <em>vdat zdat ['sch'='']</em></dt>
-<dt><a name="index-cont-1"></a>Команда MGL: <em></em> <strong>cont</strong> <em>vdat xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>Рисует линии уровня для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} при <var>z=v</var>[k] или при <var>z</var> равном минимальному значению оси z если <var>sch</var> содержит `<samp>_</samp>`. Линии уровня рисуются для <var>z</var>[i,j]=<var>v</var>[k]. Если <var>sch</var> содержит `<samp>t</samp>` или `<samp>T</samp>`, то значения <var>v</var>[k] будут выведены вдоль контуров над (или под) кривой. См. также <a href="#dens">dens</a>, <a href="#contf">contf</a>, <a href="#contd">contd</a>, <a href="#axial">axial</a>, <code>cont[xyz]</code>. См. <a href="#cont-sample">cont sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-cont-2"></a>Команда MGL: <em></em> <strong>cont</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-cont-3"></a>Команда MGL: <em></em> <strong>cont</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>Как предыдущий с вектором <var>v</var> из <var>num</var> элементов равно распределенных в диапазоне изменения цвета. Здесь <var>num</var> равен значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 7). Если <var>sch</var> содержит `<samp>.</samp>`, то будут строится только контуры по уровням седловых точек.
-</p></dd></dl>
-
-<a name="contf"></a><dl>
-<dt><a name="index-contf"></a>Команда MGL: <em></em> <strong>contf</strong> <em>vdat zdat ['sch'='']</em></dt>
-<dt><a name="index-contf-1"></a>Команда MGL: <em></em> <strong>contf</strong> <em>vdat xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>Рисует закрашенные линии (контуры) уровня для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} при <var>z=v</var>[k] или при <var>z</var> равном минимальному значению оси z если <var>sch</var> содержит `<samp>_</samp>`. Линии уровня рисуются для <var>z</var>[i,j]=<var>v</var>[k]. См. также <a href="#dens">dens</a>, <a href="#cont">cont</a>, <a href="#contd">contd</a>, <code>contf[xyz]</code>. См. <a href="#contf-sample">contf sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-contf-2"></a>Команда MGL: <em></em> <strong>contf</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-contf-3"></a>Команда MGL: <em></em> <strong>contf</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>Как предыдущий с вектором <var>v</var> из <var>num</var> элементов равно распределенных в диапазоне изменения цвета. Здесь <var>num</var> равен значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 7).
-</p></dd></dl>
-
-<a name="contd"></a><dl>
-<dt><a name="index-contd"></a>Команда MGL: <em></em> <strong>contd</strong> <em>vdat zdat ['sch'='']</em></dt>
-<dt><a name="index-contd-1"></a>Команда MGL: <em></em> <strong>contd</strong> <em>vdat xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>Рисует закрашенные линии (контуры) уровня для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} при <var>z=v</var>[k] или при <var>z</var> равном минимальному значению оси z если <var>sch</var> содержит `<samp>_</samp>`. Линии уровня рисуются для <var>z</var>[i,j]=<var>v</var>[k]. Строка <var>sch</var> задает цвета контуров: цвет k-го контура определяется как k-ый цвет строки. См. также <a href="#dens">dens</a>, <a href="#cont">cont</a>, <a href="#contf">contf</a>. См. <a href="#contd-sample">contd sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-contd-2"></a>Команда MGL: <em></em> <strong>contd</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-contd-3"></a>Команда MGL: <em></em> <strong>contd</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>Как предыдущий с вектором <var>v</var> из <var>num</var> элементов равно распределенных в диапазоне изменения цвета. Здесь <var>num</var> равен значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 7).
-</p></dd></dl>
-
-
-<a name="contp"></a><dl>
-<dt><a name="index-contp"></a>Команда MGL: <em></em> <strong>contp</strong> <em>vdat xdat ydat zdat adat ['sch'='']</em></dt>
-<dd><p>Рисует линии уровня для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. Линии уровня рисуются для <var>a</var>[i,j]=<var>v</var>[k]. Если <var>sch</var> содержит `<samp>t</samp>` или `<samp>T</samp>`, то значения <var>v</var>[k] будут выведены вдоль контуров над (или под) кривой. Если <var>sch</var> содержит `<samp>f</samp>`, то контуры будут закрашены. См. также <a href="#cont">cont</a>, <a href="#contf">contf</a>, <a href="#surfc">surfc</a>, <code>cont[xyz]</code>. </p></dd></dl>
-
-<dl>
-<dt><a name="index-contp-1"></a>Команда MGL: <em></em> <strong>contp</strong> <em>xdat ydat zdat adat ['sch'='']</em></dt>
-<dd><p>Как предыдущий с вектором <var>v</var> из <var>num</var> элементов равно распределенных в диапазоне изменения цвета. Здесь <var>num</var> равен значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 7).
-</p></dd></dl>
-
-<a name="contv"></a><dl>
-<dt><a name="index-contv"></a>Команда MGL: <em></em> <strong>contv</strong> <em>vdat zdat ['sch'='']</em></dt>
-<dt><a name="index-contv-1"></a>Команда MGL: <em></em> <strong>contv</strong> <em>vdat xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>Рисует вертикальные цилиндры от линий уровня для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} при <var>z</var>=<var>v</var>[k] или при <var>z</var> равном минимальному значению оси z если <var>sch</var> содержит `<samp>_</samp>`. Линии уровня рисуются для <var>z</var>[i,j]=<var>v</var>[k]. См. также <a href="#cont">cont</a>, <a href="#contf">contf</a>. См. <a href="#contv-sample">contv sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-contv-2"></a>Команда MGL: <em></em> <strong>contv</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-contv-3"></a>Команда MGL: <em></em> <strong>contv</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>Как предыдущий с вектором <var>v</var> из <var>num</var> элементов равно распределенных в диапазоне изменения цвета. Здесь <var>num</var> равен значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 7).
-</p></dd></dl>
-
-<a name="axial"></a><dl>
-<dt><a name="index-axial"></a>Команда MGL: <em></em> <strong>axial</strong> <em>vdat zdat ['sch'='']</em></dt>
-<dt><a name="index-axial-1"></a>Команда MGL: <em></em> <strong>axial</strong> <em>vdat xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>Рисует поверхность вращения линии уровня для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. Линии уровня рисуются для <var>z</var>[i,j]=<var>v</var>[k]. Если <var>sch</var> содержит `<samp>#</samp>`, то рисуется сетчатая поверхность. Если <var>sch</var> содержит `<samp>.</samp>`, то рисуется поверхность из точек. Если строка содержит символы `<samp>x</samp>` или `<samp>z</samp>`, то ось вращения устанавливается в указанное направление (по умолчанию вдоль `<samp>y</samp>`). См. также <a href="#cont">cont</a>, <a href="#contf">contf</a>, <a href="#torus">torus</a>, <a href="#surf3">surf3</a>. См. <a href="#axial-sample">axial sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-axial-2"></a>Команда MGL: <em></em> <strong>axial</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-axial-3"></a>Команда MGL: <em></em> <strong>axial</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>Как предыдущий с вектором <var>v</var> из <var>num</var> элементов равно распределенных в диапазоне изменения цвета. Здесь <var>num</var> равен значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 3).
-</p></dd></dl>
-
-<a name="grid2"></a><dl>
-<dt><a name="index-grid2"></a>Команда MGL: <em></em> <strong>grid2</strong> <em>zdat ['sch'='']</em></dt>
-<dt><a name="index-grid2-1"></a>Команда MGL: <em></em> <strong>grid2</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>Рисует плоскую сету для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} при <var>z</var> равном минимальному значению оси z. См. также <a href="#dens">dens</a>, <a href="#cont">cont</a>, <a href="#contf">contf</a>, <a href="#grid3">grid3</a>, <a href="#meshnum">meshnum</a>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="g_t3D-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#Dual-plotting" accesskey="n" rel="next">Dual plotting</a>, Previous: <a href="#g_t2D-plotting" accesskey="p" rel="prev">2D plotting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="g_t3D-grafiki"></a>
-<h3 class="section">3.13 3D графики</h3>
-
-<a name="index-Surf3"></a>
-<a name="index-Dens3"></a>
-<a name="index-Cont3"></a>
-<a name="index-ContF3"></a>
-<a name="index-Grid3"></a>
-<a name="index-Cloud"></a>
-<a name="index-Beam"></a>
-
-<p>Эти функции строят графики для трехмерных (3D) массивов. Трёхмерными считаются массивы, зависящие от трёх параметров (индексов) подобно матрице <em>f(x_i,y_j,z_k), i=1...n, j=1...m, k=1...l</em>. По умолчанию (если отсутствуют) значения <var>x</var>, <var>y</var>, <var>z</var> равно распределены в диапазоне осей координат. Младшие размерности массивов <var>x</var>, <var>y</var>, <var>z</var> должны быть одинаковы <code>x.nx=a.nx && y.nx=a.ny && z.nz=a.nz</code> или <code>x.nx=y.nx=z.nx=a.nx && x.ny=y.ny=z.ny=a.ny && x.nz=y.nz=z.nz=a.nz</code>. Массивы <var>x</var>, <var>y</var> и <var>z</var> могут быть векторами (не матрицами как <var>a</var>). Строка <var>sch</var> задает цветовую схему (см. <a href="#Color-scheme">Color scheme</a>). Строка <var>opt</var> задает опции графика (см. <a href="#Command-options">Command options</a>).
-</p>
-
-<a name="surf3"></a><dl>
-<dt><a name="index-surf3"></a>Команда MGL: <em></em> <strong>surf3</strong> <em>adat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-surf3-1"></a>Команда MGL: <em></em> <strong>surf3</strong> <em>xdat ydat zdat adat <code>val</code> ['sch'='']</em></dt>
-<dd><p>Рисует поверхность уровня для 3d массива, заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) при <var>a</var>(x,y,z)=<var>val</var>. Если <var>sch</var> содержит `<samp>#</samp>`, то рисуется сетчатая поверхность. Если <var>sch</var> содержит `<samp>.</samp>`, то рисуется поверхность из точек. Замечу, что возможно некорректная отрисовка граней вследствие неопределённости построения сечения если поверхность пересекает ячейку данных 2 и более раз. См. также <a href="#cloud">cloud</a>, <a href="#dens3">dens3</a>, <a href="#surf3c">surf3c</a>, <a href="#surf3a">surf3a</a>, <a href="#axial">axial</a>. См. <a href="#surf3-sample">surf3 sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-surf3-2"></a>Команда MGL: <em></em> <strong>surf3</strong> <em>adat ['sch'='']</em></dt>
-<dt><a name="index-surf3-3"></a>Команда MGL: <em></em> <strong>surf3</strong> <em>xdat ydat zdat adat ['sch'='']</em></dt>
-<dd><p>Аналогично предыдущему для <var>num</var> поверхностей уровня равномерно распределённых в диапазоне изменения цвета. Величина <var>num</var> равна значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 3).
-</p></dd></dl>
-
-<a name="cloud"></a><dl>
-<dt><a name="index-cloud"></a>Команда MGL: <em></em> <strong>cloud</strong> <em>adat ['sch'='']</em></dt>
-<dt><a name="index-cloud-1"></a>Команда MGL: <em></em> <strong>cloud</strong> <em>xdat ydat zdat adat ['sch'='']</em></dt>
-<dd><p>Рисует облачный график для 3d массива, заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). График состоит из кубиков с цветом и прозрачностью пропорциональной значениям <var>a</var>. Результат похож на облако - малые значения прозрачны, а большие нет. Число кубиков зависит от <a href="#meshnum">meshnum</a>. Если <var>sch</var> содержит `<samp>.</samp>`, то будет построен график более низкого качества, но с заметно меньшим использованием памяти. Если <var>sch</var> содержит `<samp>i</samp>`, то прозрачность будет инвертирована, т.е. области с более высокими значениями будут более прозрачны, а с более низким - менее прозрачны. См. также <a href="#surf3">surf3</a>, <a href="#meshnum">meshnum</a>. См. <a href="#cloud-sample">cloud sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="dens3"></a><dl>
-<dt><a name="index-dens3"></a>Команда MGL: <em></em> <strong>dens3</strong> <em>adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-dens3-1"></a>Команда MGL: <em></em> <strong>dens3</strong> <em>xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dd><p>Рисует график плотности для 3d массива, заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). График рисуется на срезе <var>sVal</var> в направлении {`<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`}, указанном в строке <var>sch</var> (по умолчанию, в напралении `<samp>y</samp>`). Если <var>sch</var> содержит `<samp>#</samp>`, то на срезе рисуется сетка. См. также <a href="#cont3">cont3</a>, <a href="#contf3">contf3</a>, <a href="#dens">dens</a>, <a href="#grid3">grid3</a>. См. <a href="#dens3-sample">dens3 sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="cont3"></a><dl>
-<dt><a name="index-cont3"></a>Команда MGL: <em></em> <strong>cont3</strong> <em>vdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-cont3-1"></a>Команда MGL: <em></em> <strong>cont3</strong> <em>vdat xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dd><p>Рисует линии уровня для 3d массива, заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). Линии рисуются для значений из массива <var>v</var> на срезе <var>sVal</var> в направлении {`<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`}, указанном в строке <var>sch</var> (по умолчанию, в напралении `<samp>y</samp>`). Если <var>sch</var> содержит `<samp>#</samp>`, то на срезе рисуется сетка. Если <var>sch</var> содержит `<samp>t</samp>` или `<samp>T</samp>`, то значения <var>v</var>[k] будут выведены вдоль контуров над (или под) кривой. См. также <a href="#dens3">dens3</a>, <a href="#contf3">contf3</a>, <a href="#cont">cont</a>, <a href="#grid3">grid3</a>. См. <a href="#cont3-sample">cont3 sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-cont3-2"></a>Команда MGL: <em></em> <strong>cont3</strong> <em>adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-cont3-3"></a>Команда MGL: <em></em> <strong>cont3</strong> <em>xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dd><p>Аналогично предыдущему для <var>num</var> линий уровня равномерно распределённых в диапазоне изменения цвета. Величина <var>num</var> равна значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 7).
-</p></dd></dl>
-
-<a name="contf3"></a><dl>
-<dt><a name="index-contf3"></a>Команда MGL: <em></em> <strong>contf3</strong> <em>vdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-contf3-1"></a>Команда MGL: <em></em> <strong>contf3</strong> <em>vdat xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dd><p>Рисует закрашенные линии (контуры) уровня для 3d массива, заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). Линии рисуются для значений из массива <var>v</var> на срезе <var>sVal</var> в направлении {`<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`}, указанном в строке <var>sch</var> (по умолчанию, в напралении `<samp>y</samp>`). Если <var>sch</var> содержит `<samp>#</samp>`, то на срезе рисуется сетка. См. также <a href="#dens3">dens3</a>, <a href="#cont3">cont3</a>, <a href="#contf">contf</a>, <a href="#grid3">grid3</a>. См. <a href="#contf3-sample">contf3 sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-contf3-2"></a>Команда MGL: <em></em> <strong>contf3</strong> <em>adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-contf3-3"></a>Команда MGL: <em></em> <strong>contf3</strong> <em>xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dd><p>Аналогично предыдущему для <var>num</var> закрашенных линий (контуров) уровня равномерно распределённых в диапазоне изменения цвета. Величина <var>num</var> равна значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 7).
-</p></dd></dl>
-
-<a name="grid3"></a><dl>
-<dt><a name="index-grid3"></a>Команда MGL: <em></em> <strong>grid3</strong> <em>adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dt><a name="index-grid3-1"></a>Команда MGL: <em></em> <strong>grid3</strong> <em>xdat ydat zdat adat ['sch'='' <code>sval=-1</code>]</em></dt>
-<dd><p>Рисует сетку для 3d массива, заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). График рисуется на срезе <var>sVal</var> в направлении {`<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`}, указанном в строке <var>sch</var> (по умолчанию, в напралении `<samp>y</samp>`). См. также <a href="#cont3">cont3</a>, <a href="#contf3">contf3</a>, <a href="#dens3">dens3</a>, <a href="#grid2">grid2</a>, <a href="#meshnum">meshnum</a>.
-</p></dd></dl>
-
-<a name="beam"></a><dl>
-<dt><a name="index-beam"></a>Команда MGL: <em></em> <strong>beam</strong> <em>tr g1 g2 adat <code>rval</code> ['sch'='' <code>flag=0 num=3</code>]</em></dt>
-<dd><p>Рисует поверхность уровня для 3d массива <var>a</var> при постоянном значении <var>a</var>=<var>val</var>. Это специальный тип графика для <var>a</var> заданного в сопровождающей системе координат вдоль кривой <var>tr</var> с ортами <var>g1</var>, <var>g2</var> и с поперечным размером <var>r</var>. Переменная <var>flag</var> - битовый флаг: `<samp>0x1</samp>` - рисовать в сопровождающих (не лабораторных) координатах; `<samp>0x2</samp>` - рисовать проекцию на плоскость <em>\rho-z</em>; `<samp>0x4</samp>` - рисовать нормированное в каждом сечении поле. Размеры массивов по 1-му индексу <var>tr</var>, <var>g1</var>, <var>g2</var> должны быть nx>2. Размеры массивов по 2-му индексу <var>tr</var>, <var>g1</var>, <var>g2</var> и размер по 3-му индексу массива <var>a</var> должны быть одинаковы. См. также <a href="#surf3">surf3</a>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Dual-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#Vector-fields" accesskey="n" rel="next">Vector fields</a>, Previous: <a href="#g_t3D-plotting" accesskey="p" rel="prev">3D plotting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Parnye-grafiki"></a>
-<h3 class="section">3.14 Парные графики</h3>
-
-<a name="index-SurfC"></a>
-<a name="index-SurfA"></a>
-<a name="index-Surf3C"></a>
-<a name="index-Surf3A"></a>
-<a name="index-TileS"></a>
-<a name="index-Map"></a>
-<a name="index-STFA"></a>
-
-<p>Эти функции строят графики для двух связанных массивов. Есть несколько основных типов 3D графиков: поверхность и поверхность уровня с окраской по второму массиву (SurfC, Surf3C), поверхность и поверхность уровня с прозрачностью по второму массиву (SurfA, Surf3A), плитки переменного размера (TileS), диаграмма точечного отображения (Map), STFA диаграмма (STFA). По умолчанию (если отсутствуют) значения <var>x</var>, <var>y</var> (и <var>z</var> для <code>Surf3C, Surf3A</code>) равно распределены в диапазоне осей координат. Младшие размерности массивов <var>x</var>, <var>y</var>, <var>z</var>, <var>c</var> должны быть одинаковы <code>x.nx=a.nx && y.nx=a.ny && z.nz=a.nz</code> или <code>x.nx=y.nx=z.nx=a.nx && x.ny=y.ny=z.ny=a.ny && x.nz=y.nz=z.nz=a.nz</code>. Массивы <var>x</var>, <var>y</var> (и <var>z</var> для <code>Surf3C, Surf3A</code>) могут быть векторами (не матрицами как <var>c</var>). Строка <var>sch</var> задает цветовую схему (см. <a href="#Color-scheme">Color scheme</a>). Строка <var>opt</var> задает опции графика (см. <a href="#Command-options">Command options</a>).
-</p>
-
-<a name="surfc"></a><dl>
-<dt><a name="index-surfc"></a>Команда MGL: <em></em> <strong>surfc</strong> <em>zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-surfc-1"></a>Команда MGL: <em></em> <strong>surfc</strong> <em>xdat ydat zdat cdat ['sch'='']</em></dt>
-<dd><p>Рисует параметрически заданную поверхность {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} с цветом, заданным массивом <var>c</var>[i,j]. Если <var>sch</var> содержит `<samp>#</samp>`, то на поверхности рисуется сетка. Если <var>sch</var> содержит `<samp>.</samp>`, то рисуется поверхность из точек. Размерность массивов <var>z</var> и <var>c</var> должна быть одинакова. График строится для каждого z среза данных. См. также <a href="#surf">surf</a>, <a href="#surfa">surfa</a>, <a href="#beltc">beltc</a>, <a href="#surf3c">surf3c</a>. См. <a href="#surfc-sample">surfc sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-<a name="beltc"></a><dl>
-<dt><a name="index-beltc"></a>Команда MGL: <em></em> <strong>beltc</strong> <em>zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-beltc-1"></a>Команда MGL: <em></em> <strong>beltc</strong> <em>xdat ydat zdat cdat ['sch'='']</em></dt>
-<dd><p>Рисует ленточки для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} с цветом, заданным массивом <var>c</var>[i,j]. График может использоваться как 3d обобщение графика <a href="#plot">plot</a>. Если <var>sch</var> содержит `<samp>x</samp>`, то ленточки рисуются вдоль оси x, иначе (по умолчанию) вдоль оси y. См. также <a href="#belt">belt</a>, <a href="#surfc">surfc</a>, <a href="#meshnum">meshnum</a>. </p></dd></dl>
-
-
-<a name="surf3c"></a><dl>
-<dt><a name="index-surf3c"></a>Команда MGL: <em></em> <strong>surf3c</strong> <em>adat cdat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-surf3c-1"></a>Команда MGL: <em></em> <strong>surf3c</strong> <em>xdat ydat zdat adat cdat <code>val</code> ['sch'='']</em></dt>
-<dd><p>Рисует поверхность уровня для 3d массива, заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) при <var>a</var>(x,y,z)=<var>val</var>. Аналогично <a href="#surf3">surf3</a>, но цвет задается массивом <var>c</var>. Если <var>sch</var> содержит `<samp>#</samp>`, то рисуется сетчатая поверхность. Если <var>sch</var> содержит `<samp>.</samp>`, то рисуется поверхность из точек. См. также <a href="#surf3">surf3</a>, <a href="#surfc">surfc</a>, <a href="#surf3a">surf3a</a>. См. <a href="#surf3c-sample">surf3c sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-surf3c-2"></a>Команда MGL: <em></em> <strong>surf3c</strong> <em>adat cdat ['sch'='']</em></dt>
-<dt><a name="index-surf3c-3"></a>Команда MGL: <em></em> <strong>surf3c</strong> <em>xdat ydat zdat adat cdat ['sch'='']</em></dt>
-<dd><p>Аналогично предыдущему для <var>num</var> поверхностей уровня равномерно распределённых в диапазоне изменения цвета. Величина <var>num</var> равна значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 3).
-</p></dd></dl>
-
-
-<a name="surfa"></a><dl>
-<dt><a name="index-surfa"></a>Команда MGL: <em></em> <strong>surfa</strong> <em>zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-surfa-1"></a>Команда MGL: <em></em> <strong>surfa</strong> <em>xdat ydat zdat cdat ['sch'='']</em></dt>
-<dd><p>Рисует параметрически заданную поверхность {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} с прозрачностью, заданной массивом <var>c</var>[i,j]. Если <var>sch</var> содержит `<samp>#</samp>`, то на поверхности рисуется сетка. Если <var>sch</var> содержит `<samp>.</samp>`, то рисуется поверхность из точек. Размерность массивов <var>z</var> и <var>c</var> должна быть одинакова. График строится для каждого z среза данных. См. также <a href="#surf">surf</a>, <a href="#surfc">surfc</a>, <a href="#surf3a">surf3a</a>. См. <a href="#surfa-sample">surfa sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="surf3a"></a><dl>
-<dt><a name="index-surf3a"></a>Команда MGL: <em></em> <strong>surf3a</strong> <em>adat cdat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-surf3a-1"></a>Команда MGL: <em></em> <strong>surf3a</strong> <em>xdat ydat zdat adat cdat <code>val</code> ['sch'='']</em></dt>
-<dd><p>Рисует поверхность уровня для 3d массива, заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) при <var>a</var>(x,y,z)=<var>val</var>. Аналогично <a href="#surf3">surf3</a>, но прозрачность задается массивом <var>c</var>. Если <var>sch</var> содержит `<samp>#</samp>`, то рисуется сетчатая поверхность. Если <var>sch</var> содержит `<samp>.</samp>`, то рисуется поверхность из точек. См. также <a href="#surf3">surf3</a>, <a href="#surfc">surfc</a>, <a href="#surf3a">surf3a</a>. См. <a href="#surf3a-sample">surf3a sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-surf3a-2"></a>Команда MGL: <em></em> <strong>surf3a</strong> <em>adat cdat ['sch'='']</em></dt>
-<dt><a name="index-surf3a-3"></a>Команда MGL: <em></em> <strong>surf3a</strong> <em>xdat ydat zdat adat cdat ['sch'='']</em></dt>
-<dd><p>Аналогично предыдущему для <var>num</var> поверхностей уровня равномерно распределённых в диапазоне изменения цвета. При этом массив <var>c</var> может быть вектором со значениями прозрачности и <var>num</var>=<var>c</var>.nx. В противном случае величина <var>num</var> равна значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 3).
-</p></dd></dl>
-
-
-
-<a name="surfca"></a><dl>
-<dt><a name="index-surfca"></a>Команда MGL: <em></em> <strong>surfca</strong> <em>zdat cdat adat ['sch'='']</em></dt>
-<dt><a name="index-surfca-1"></a>Команда MGL: <em></em> <strong>surfca</strong> <em>xdat ydat zdat cdat adat ['sch'='']</em></dt>
-<dd><p>Рисует параметрически заданную поверхность {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} с цветом и прозрачностью, заданными массивами <var>c</var>[i,j] и <var>a</var>[i,j] соответственно. Если <var>sch</var> содержит `<samp>#</samp>`, то на поверхности рисуется сетка. Если <var>sch</var> содержит `<samp>.</samp>`, то рисуется поверхность из точек. Размерность массивов <var>z</var> и <var>c</var> должна быть одинакова. График строится для каждого z среза данных. См. также <a href="#surf">surf</a>, <a href="#surfc">surfc</a>, <a href="#surfa">surfa</a>, <a href="#surf3ca">surf3ca</a>. См. <a href="#surfca-sample">surfca sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="surf3ca"></a><dl>
-<dt><a name="index-surf3ca"></a>Команда MGL: <em></em> <strong>surf3ca</strong> <em>adat cdat bdat <code>val</code> ['sch'='']</em></dt>
-<dt><a name="index-surf3ca-1"></a>Команда MGL: <em></em> <strong>surf3ca</strong> <em>xdat ydat zdat adat cdat bdat <code>val</code> ['sch'='']</em></dt>
-<dd><p>Рисует поверхность уровня для 3d массива, заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) при <var>a</var>(x,y,z)=<var>val</var>. Аналогично <a href="#surf3">surf3</a>, но цвет и прозрачность задается массивами <var>c</var> и <var>b</var> соответственно. Если <var>sch</var> содержит `<samp>#</samp>`, то рисуется сетчатая поверхность. Если <var>sch</var> содержит `<samp>.</samp>`, то рисуется поверхность из точек. См. также <a href="#surf3">surf3</a>, <a href="#surfc">surfc</a>, <a href="#surf3a">surf3a</a>. См. <a href="#surf3a-sample">surf3a sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-surf3ca-2"></a>Команда MGL: <em></em> <strong>surf3ca</strong> <em>adat cdat ['sch'='']</em></dt>
-<dt><a name="index-surf3ca-3"></a>Команда MGL: <em></em> <strong>surf3ca</strong> <em>xdat ydat zdat adat cdat ['sch'='']</em></dt>
-<dd><p>Аналогично предыдущему для <var>num</var> поверхностей уровня равномерно распределённых в диапазоне изменения цвета. Здесь величина <var>num</var> равна значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 3).
-</p></dd></dl>
-
-
-<a name="tiles"></a><dl>
-<dt><a name="index-tiles"></a>Команда MGL: <em></em> <strong>tiles</strong> <em>zdat rdat ['sch'='']</em></dt>
-<dt><a name="index-tiles-1"></a>Команда MGL: <em></em> <strong>tiles</strong> <em>xdat ydat zdat rdat ['sch'='']</em></dt>
-<dt><a name="index-tiles-2"></a>Команда MGL: <em></em> <strong>tiles</strong> <em>xdat ydat zdat rdat cdat ['sch'='']</em></dt>
-<dd><p>Рисует плитки для параметрически заданной поверхности {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} с цветом, заданным массивом <var>c</var>[i,j]. Аналогично Tile(), но размер плиток задается массивов <var>r</var>. Если строка <var>sch</var> содержит стиль `<samp>x</samp>` или `<samp>y</samp>`, то плитки будут ориентированы перпендикулярно x- или y-оси. Это создает эффект "прозрачности" при экспорте в файлы EPS. График строится для каждого z среза данных. См. также <a href="#surfa">surfa</a>, <a href="#tile">tile</a>. См. <a href="#tiles-sample">tiles sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="map"></a><dl>
-<dt><a name="index-map"></a>Команда MGL: <em></em> <strong>map</strong> <em>udat vdat ['sch'='']</em></dt>
-<dt><a name="index-map-1"></a>Команда MGL: <em></em> <strong>map</strong> <em>xdat ydat udat vdat ['sch'='']</em></dt>
-<dd><p>Рисует точечное отображение для матриц {<var>ax</var>, <var>ay</var> } параметрически зависящих от координат <var>x</var>, <var>y</var>. Исходное положение ячейки задает ее цвет. Высота пропорциональна якобиану J(ax,ay). График является аналогом диаграммы Арнольда ??? Если <var>sch</var> содержит `<samp>.</samp>`, то цветные точки рисуются в узлах матриц (полезно для "запутанного" отображения), иначе рисуются грани. См. <a href="#Mapping-visualization">Mapping visualization</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="stfa"></a><dl>
-<dt><a name="index-stfa"></a>Команда MGL: <em></em> <strong>stfa</strong> <em>re im <code>dn</code> ['sch'='']</em></dt>
-<dt><a name="index-stfa-1"></a>Команда MGL: <em></em> <strong>stfa</strong> <em>xdat ydat re im <code>dn</code> ['sch'='']</em></dt>
-<dd><p>Рисует спектрограмму комплексного массива <var>re</var>+i*<var>im</var> для Фурье размером <var>dn</var> точек в плоскости <var>z</var> равно минимальному значению оси z. Параметр <var>dn</var> - любое чётное число. Например в 1D случае, результатом будет график плотности от массива <em>res[i,j]=|\sum_d^dn exp(I*j*d)*(re[i*dn+d]+I*im[i*dn+d])|/dn</em> размером {int(nx/dn), dn, ny}. Массивы <var>re</var>, <var>im</var> параметрически зависят от координат <var>x</var>, <var>y</var>. Все размеры массивов <var>re</var> и <var>im</var> должны быть одинаковы. Младшие размерности массивов <var>x</var>, <var>y</var>, <var>re</var> должны быть одинаковы. Массивы <var>x</var> и <var>y</var> могут быть векторами (не матрицами как <var>re</var>). См. <a href="#stfa-sample">stfa sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Vector-fields"></a>
-<div class="header">
-<p>
-Next: <a href="#Other-plotting" accesskey="n" rel="next">Other plotting</a>, Previous: <a href="#Dual-plotting" accesskey="p" rel="prev">Dual plotting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Vektornye-polya"></a>
-<h3 class="section">3.15 Векторные поля</h3>
-
-<a name="index-Traj"></a>
-<a name="index-Vect"></a>
-<a name="index-Dew"></a>
-<a name="index-Flow"></a>
-<a name="index-FlowP"></a>
-<a name="index-Pipe"></a>
-
-<p>Эти функции рисуют графики для 2D и 3D векторных полей. Есть несколько типов графиков: просто векторное поле (Vect), вектора вдоль траектории (Traj), векторное поле каплями (Dew), нити тока (Flow, FlowP), трубки тока (Pipe). По умолчанию (если отсутствуют) значения <var>x</var>, <var>y</var> и <var>z</var> равно распределены в диапазоне осей координат. Младшие размерности массивов <var>x</var>, <var>y</var>, <var>z</var> и <var>ax</var> должны быть одинаковы. Размеры массивов <var>ax</var>, <var>ay</var> и <var>az</var> должны быть одинаковы. Массивы <var>x</var>, <var>y</var> и <var>z</var> могут быть векторами (не матрицами как <var>ax</var>). Строка <var>sch</var> задает цветовую схему (см. <a href="#Color-scheme">Color scheme</a>). Строка <var>opt</var> задает опции графика (см. <a href="#Command-options">Command options</a>).
-</p>
-<a name="traj"></a><dl>
-<dt><a name="index-traj"></a>Команда MGL: <em></em> <strong>traj</strong> <em>xdat ydat udat vdat ['sch'='']</em></dt>
-<dt><a name="index-traj-1"></a>Команда MGL: <em></em> <strong>traj</strong> <em>xdat ydat zdat udat vdat wdat ['sch'='']</em></dt>
-<dd><p>Рисует вектора {<var>ax</var>, <var>ay</var>, <var>az</var>} вдоль кривой {<var>x</var>, <var>y</var>, <var>z</var>}. Длина векторов пропорциональна <em>\sqrt{ax^2+ay^2+az^2}</em>. Строка <var>pen</var> задает цвет (см. <a href="#Line-styles">Line styles</a>). По умолчанию (<code>pen=""</code>) используется текущий цвет из палитры (см. <a href="#Palette-and-colors">Palette and colors</a>). Опция <code>value</code> задает фактор длины векторов (если не нуль) или выбирать длину пропорционально расстоянию между точками кривой (если <code>value=0</code>). Размер по 1-му индексу должен быть 2 или больше. График рисуется для каждой строки если один из массивов матрица. См. также <a href="#vect">vect</a>. См. <a href="#traj-sample">traj sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="vect"></a><dl>
-<dt><a name="index-vect"></a>Команда MGL: <em></em> <strong>vect</strong> <em>udat vdat ['sch'='']</em></dt>
-<dt><a name="index-vect-1"></a>Команда MGL: <em></em> <strong>vect</strong> <em>xdat ydat udat vdat ['sch'='']</em></dt>
-<dd><p>Рисует векторное поле {<var>ax</var>, <var>ay</var>} параметрически зависящее от координат <var>x</var>, <var>y</var> на плоскости при <var>z</var> равном минимальному значению оси z. Длина и цвет векторов пропорциональна <em>\sqrt{ax^2+ay^2}</em>. Число рисуемых векторов зависит от <a href="#meshnum">meshnum</a>. Вид стрелок/штрихов может быть изменён символами:
-</p><ul>
-<li> `<samp>f</samp>` для стрелок одинаковой длины,
-</li><li> `<samp>></samp>`, `<samp><</samp>` для стрелок начинающихся или заканчивающихся в ячейке сетки (по умолчанию центрированы),
-</li><li> `<samp>.</samp>` для рисования штрихов с точкой в начале вместо стрелок,
-</li><li> `<samp>=</samp>` для использования градиента цвета вдоль стрелок.
-</li></ul>
-<p>См. также <a href="#flow">flow</a>, <a href="#dew">dew</a>. См. <a href="#vect-sample">vect sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-vect-2"></a>Команда MGL: <em></em> <strong>vect</strong> <em>udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-vect-3"></a>Команда MGL: <em></em> <strong>vect</strong> <em>xdat ydat zdat udat vdat wdat ['sch'='']</em></dt>
-<dd><p>Это 3d версия графика. Здесь массивы <var>ax</var>, <var>ay</var>, <var>az</var> должны трёхмерными тензорами и длина вектора пропорциональна <em>\sqrt{ax^2+ay^2+az^2}</em>.
-</p></dd></dl>
-
-<a name="vect3"></a><dl>
-<dt><a name="index-vect3"></a>Команда MGL: <em></em> <strong>vect3</strong> <em>udat vdat wdat ['sch'='' sval]</em></dt>
-<dt><a name="index-vect3-1"></a>Команда MGL: <em></em> <strong>vect3</strong> <em>xdat ydat zdat udat vdat wdat ['sch'='' sval]</em></dt>
-<dd><p>Рисует 3D векторное поле {<var>ax</var>, <var>ay</var>, <var>az</var>} параметрически зависящее от координат <var>x</var>, <var>y</var>, <var>z</var>. График рисуется на срезе <var>sVal</var> в направлении {`<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`}, указанном в строке <var>sch</var> (по умолчанию, в напралении `<samp>y</samp>`). Длина и цвет векторов пропорциональна <em>\sqrt{ax^2+ay^2+az^2}</em>. Число рисуемых векторов зависит от <a href="#meshnum">meshnum</a>. Вид стрелок/штрихов может быть изменён символами:
-</p><ul>
-<li> `<samp>f</samp>` для стрелок одинаковой длины,
-</li><li> `<samp>></samp>`, `<samp><</samp>` для стрелок начинающихся или заканчивающихся в ячейке сетки (по умолчанию центрированы),
-</li><li> `<samp>.</samp>` для рисования штрихов с точкой в начале вместо стрелок,
-</li><li> `<samp>=</samp>` для использования градиента цвета вдоль стрелок.
-</li></ul>
-<p>См. также <a href="#vect">vect</a>, <a href="#flow">flow</a>, <a href="#dew">dew</a>. См. <a href="#vect-sample">vect sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="dew"></a><dl>
-<dt><a name="index-dew"></a>Команда MGL: <em></em> <strong>dew</strong> <em>udat vdat ['sch'='']</em></dt>
-<dt><a name="index-dew-1"></a>Команда MGL: <em></em> <strong>dew</strong> <em>xdat ydat udat vdat ['sch'='']</em></dt>
-<dd><p>Рисует капли для векторного поля {<var>ax</var>, <var>ay</var>}, параметрически зависящего от координат <var>x</var>, <var>y</var> при <var>z</var> равном минимальному значению оси z. Замечу, что график требует много памяти и процессорного времени для своего создания! Цвет капель пропорционален <em>\sqrt{ax^2+ay^2}</em>. Число капель определяется <a href="#meshnum">meshnum</a>. См. также <a href="#vect">vect</a>. См. <a href="#dew-sample">dew sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="flow"></a><dl>
-<dt><a name="index-flow"></a>Команда MGL: <em></em> <strong>flow</strong> <em>udat vdat ['sch'='']</em></dt>
-<dt><a name="index-flow-1"></a>Команда MGL: <em></em> <strong>flow</strong> <em>xdat ydat udat vdat ['sch'='']</em></dt>
-<dd><p>Рисует нити тока для векторного поля {<var>ax</var>, <var>ay</var>}, параметрически зависящего от координат <var>x</var>, <var>y</var> на плоскости при <var>z</var> равном минимальному значению оси z. Число нитей пропорционально значению опции <code>value</code> (по умолчанию 5). Цвет нитей пропорционален <em>\sqrt{ax^2+ay^2}</em>. Строка <var>sch</var> может содержать
-</p><ul>
-<li> цветовую схему - тёплые цвета соответствуют нормальному току (типа стока), холодные цвета соответствуют обратному току (типа источника);
-</li><li> `<samp>#</samp>` для использования нитей, начинающихся только на границе;
-</li><li> `<samp>.</samp>` для рисования сепаратрис (нитей из/в стационарных точек).
-</li><li> `<samp>*</samp>` для использования нитей, начинающихся с двумерной сетки внутри данных;
-</li><li> `<samp>v</samp>` для рисования стрелок на нитях;
-</li><li> `<samp>x</samp>`, `<samp>z</samp>` для рисования лент нормалей, начинающихся в плоскостях x-y и y-z соответственно.
-</li></ul>
-<p>См. также <a href="#pipe">pipe</a>, <a href="#vect">vect</a>, <a href="#tape">tape</a>, <a href="#flow3">flow3</a>, <a href="#barwidth">barwidth</a>. См. <a href="#flow-sample">flow sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-flow-2"></a>Команда MGL: <em></em> <strong>flow</strong> <em>udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-flow-3"></a>Команда MGL: <em></em> <strong>flow</strong> <em>xdat ydat zdat udat vdat wdat ['sch'='']</em></dt>
-<dd><p>Это 3d версия графика. Здесь массивы должны трёхмерными тензорами и цвет пропорционален <em>\sqrt{ax^2+ay^2+az^2}</em>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-flow-4"></a>Команда MGL: <em></em> <strong>flow</strong> <em><code>x0 y0</code> udat vdat ['sch'='']</em></dt>
-<dt><a name="index-flow-5"></a>Команда MGL: <em></em> <strong>flow</strong> <em><code>x0 y0</code> xdat ydat udat vdat ['sch'='']</em></dt>
-<dd><p>Аналогично <a href="#flow">flow</a>, но рисует одну нить из точки <var>p0</var>={<var>x0</var>,<var>y0</var>,<var>z0</var>}.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-flow-6"></a>Команда MGL: <em></em> <strong>flow</strong> <em><code>x0 y0 z0</code> udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-flow-7"></a>Команда MGL: <em></em> <strong>flow</strong> <em><code>x0 y0 z0</code> xdat ydat zdat udat vdat wdat ['sch'='']</em></dt>
-<dd><p>Это 3d версия графика.
-</p></dd></dl>
-
-<a name="flow3"></a><dl>
-<dt><a name="index-flow3"></a>MGL command: <em></em> <strong>flow3</strong> <em>udat vdat wdat ['sch'='']</em></dt>
-<dt><a name="index-flow3-1"></a>MGL command: <em></em> <strong>flow3</strong> <em>xdat ydat zdat udat vdat ['sch'='']</em></dt>
-<dd><p>The function draws flow threads for the 3D vector field {<var>ax</var>, <var>ay</var>, <var>az</var>} parametrically depending on coordinates <var>x</var>, <var>y</var>, <var>z</var>. Flow threads starts from given plane. Option <code>value</code> set the approximate number of threads (default is 5). String <var>sch</var> may contain:
-</p><ul>
-<li> color scheme - up-half (warm) corresponds to normal flow (like attractor), bottom-half (cold) corresponds to inverse flow (like source);
-</li><li> `<samp>x</samp>`, `<samp>z</samp>` for normal of starting plane (default is y-direction);
-</li><li> `<samp>v</samp>` for drawing arrows on the threads;
-</li><li> `<samp>t</samp>` for drawing tapes of normals in x-y and y-z planes.
-</li></ul>
-<p>See also <a href="#flow">flow</a>, <a href="#pipe">pipe</a>, <a href="#vect">vect</a>. См. <a href="#flow3-sample">flow3 sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-<a name="grad"></a><dl>
-<dt><a name="index-grad"></a>Команда MGL: <em></em> <strong>grad</strong> <em>pdat ['sch'='']</em></dt>
-<dt><a name="index-grad-1"></a>Команда MGL: <em></em> <strong>grad</strong> <em>xdat ydat pdat ['sch'='']</em></dt>
-<dt><a name="index-grad-2"></a>Команда MGL: <em></em> <strong>grad</strong> <em>xdat ydat zdat pdat ['sch'='']</em></dt>
-<dd><p>Рисует линии градиента скалярного поля <var>phi</var>[i,j] (или <var>phi</var>[i,j,k] в 3d случае) заданного параметрически {<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]}. Число линий пропорционально значению опции <code>value</code> (по умолчанию 5). См. также <a href="#dens">dens</a>, <a href="#cont">cont</a>, <a href="#flow">flow</a>.
-</p></dd></dl>
-
-<a name="pipe"></a><dl>
-<dt><a name="index-pipe"></a>Команда MGL: <em></em> <strong>pipe</strong> <em>udat vdat ['sch'='' <code>r0=0.05</code>]</em></dt>
-<dt><a name="index-pipe-1"></a>Команда MGL: <em></em> <strong>pipe</strong> <em>xdat ydat udat vdat ['sch'='' <code>r0=0.05</code>]</em></dt>
-<dd><p>Рисует трубки тока для векторного поля {<var>ax</var>, <var>ay</var>}, параметрически зависящего от координат <var>x</var>, <var>y</var> на плоскости при <var>z</var> равном минимальному значению оси z. Число трубок пропорционально значению опции <code>value</code>. Цвет и радиус трубок пропорционален <em>\sqrt{ax^2+ay^2}</em>. Тёплые цвета соответствуют нормальному току (типа стока). Холодные цвета соответствуют обратному току (типа источника). Параметр <var>r0</var> задает радиус трубок. При <var>r0</var><0 радиус трубок обратно пропорционален их амплитуде. См. также <a href="#flow">flow</a>, <a href="#vect">vect</a>. См. <a href="#pipe-sample">pipe sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-pipe-2"></a>Команда MGL: <em></em> <strong>pipe</strong> <em>udat vdat wdat ['sch'='' <code>r0=0.05</code>]</em></dt>
-<dt><a name="index-pipe-3"></a>Команда MGL: <em></em> <strong>pipe</strong> <em>xdat ydat zdat udat vdat wdat ['sch'='' <code>r0=0.05</code>]</em></dt>
-<dd><p>Это 3d версия графика. Здесь массивы <var>ax</var>, <var>ay</var>, <var>az</var> должны трёхмерными тензорами и цвет пропорционален <em>\sqrt{ax^2+ay^2+az^2}</em>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Other-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#Nonlinear-fitting" accesskey="n" rel="next">Nonlinear fitting</a>, Previous: <a href="#Vector-fields" accesskey="p" rel="prev">Vector fields</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Prochie-grafiki"></a>
-<h3 class="section">3.16 Прочие графики</h3>
-
-<a name="index-DensXYZ"></a>
-<a name="index-ContXYZ"></a>
-<a name="index-ContFXYZ"></a>
-<a name="index-Dots"></a>
-<a name="index-Crust"></a>
-<a name="index-TriPlot"></a>
-<a name="index-TriCont"></a>
-<a name="index-QuadPlot"></a>
-<a name="index-FPlot"></a>
-<a name="index-FSurf"></a>
-
-<p>Это функции, не относящиеся к какой-то специальной категории. Сюда входят функции построения графиков по текстовым формулам (FPlot и FSurf), рисования поверхностей из треугольников и четырёхугольников (TriPlot, TriCont, QuadPlot), произвольных точек в пространстве (Dots) и реконструкции по ним поверхности (Crust), графики плотности и линии уровня на плоскостях, перпендикулярных осям x, y или z (Dens[XYZ], Cont[XYZ], ContF[XYZ]). Каждый тип графика имеет похожий интерфейс. Есть версия для рисования одного массива с автоматическими координатами и версия для параметрически заданного массива. Параметры цветовой схемы задаются строкой. See <a href="#Color-scheme">Color scheme</a>.
-</p>
-<a name="densz"></a><a name="densy"></a><a name="densx"></a><a name="DensXYZ"></a><dl>
-<dt><a name="index-densx"></a>Команда MGL: <em></em> <strong>densx</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-densy"></a>Команда MGL: <em></em> <strong>densy</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-densz"></a>Команда MGL: <em></em> <strong>densz</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dd><p>Эти функции рисуют график плотности на x, y или z плоскостях. Если <var>a</var> - 3d массив, то выполняется интерполяция к заданному срезу <var>sVal</var>. Функции полезны для создания проекций 3D массивов на оси координат. См. также <a href="#ContXYZ">ContXYZ</a>, <a href="#ContFXYZ">ContFXYZ</a>, <a href="#dens">dens</a>, <a href="#Data-manipulation">Data manipulation</a>. См. <a href="#dens_005fxyz-sample">dens_xyz sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="contz"></a><a name="conty"></a><a name="contx"></a><a name="ContXYZ"></a><dl>
-<dt><a name="index-contx"></a>Команда MGL: <em></em> <strong>contx</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-conty"></a>Команда MGL: <em></em> <strong>conty</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-contz"></a>Команда MGL: <em></em> <strong>contz</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dd><p>Эти функции рисуют линии уровня на x, y или z плоскостях. Если <var>a</var> - 3d массив, то выполняется интерполяция к заданному срезу <var>sVal</var>. Опция <code>value</code> задает число контуров. Функции полезны для создания проекций 3D массивов на оси координат. См. также <a href="#ContFXYZ">ContFXYZ</a>, <a href="#DensXYZ">DensXYZ</a>, <a href="#cont">cont</a>, <a href="#Data-manipulation">Data manipulation</a>. См. <a href="#cont_005fxyz-sample">cont_xyz sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-<a name="contfz"></a><a name="contfy"></a><a name="contfx"></a><a name="ContFXYZ"></a><dl>
-<dt><a name="index-contfx"></a>Команда MGL: <em></em> <strong>contfx</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-contfy"></a>Команда MGL: <em></em> <strong>contfy</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dt><a name="index-contfz"></a>Команда MGL: <em></em> <strong>contfz</strong> <em>dat ['sch'='' <code>sval=nan</code>]</em></dt>
-<dd><p>Эти функции рисуют закрашенные контуры уровня на x, y или z плоскостях. Если <var>a</var> - 3d массив, то выполняется интерполяция к заданному срезу <var>sVal</var>. Опция <code>value</code> задает число контуров. Функции полезны для создания проекций 3D массивов на оси координат. См. также <a href="#ContFXYZ">ContFXYZ</a>, <a href="#DensXYZ">DensXYZ</a>, <a href="#cont">cont</a>, <a href="#Data-manipulation">Data manipulation</a>. См. <a href="#contf_005fxyz-sample">contf_xyz sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-<a name="fplot"></a><dl>
-<dt><a name="index-fplot"></a>Команда MGL: <em></em> <strong>fplot</strong> <em>'y(x)' ['pen'='']</em></dt>
-<dd><p>Рисует функцию `<samp>eqY(x)</samp>` в плоскости <var>z</var> равно минимальному значению оси z с координатой `<samp>x</samp>` в диапазоне осей координат. Опция <code>value</code> задает начальное число точек. См. также <a href="#plot">plot</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-fplot-1"></a>Команда MGL: <em></em> <strong>fplot</strong> <em>'x(t)' 'y(t)' 'z(t)' ['pen'='']</em></dt>
-<dd><p>Рисует параметрическую кривую {`<samp>eqX(t)</samp>`, `<samp>eqY(t)</samp>`, `<samp>eqZ(t)</samp>`}, где координата `<samp>t</samp>` меняется в диапазоне [0, 1]. Опция <code>value</code> задает начальное число точек. См. также <a href="#plot">plot</a>.
-</p></dd></dl>
-
-<a name="fsurf"></a><dl>
-<dt><a name="index-fsurf"></a>Команда MGL: <em></em> <strong>fsurf</strong> <em>'z(x,y)' ['sch'='']</em></dt>
-<dd><p>Рисует поверхность `<samp>eqY(x,y)</samp>` с координатами `<samp>x</samp>`, `<samp>y</samp>` в диапазоне <code>xrange, yrange</code>. Опция <code>value</code> задает число точек. См. также <a href="#surf">surf</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-fsurf-1"></a>Команда MGL: <em></em> <strong>fsurf</strong> <em>'x(u,v)' 'y(u,v)' 'z(u,v)' ['sch'='']</em></dt>
-<dd><p>Рисует параметрическую поверхность {`<samp>eqX(u,v)</samp>`, `<samp>eqY(u,v)</samp>`, `<samp>eqZ(u,v)</samp>`}, где координаты `<samp>u</samp>`, `<samp>v</samp>` меняются в диапазоне [0, 1]. Опция <code>value</code> задает число точек. См. также <a href="#surf">surf</a>.
-</p></dd></dl>
-
-<a name="triplot"></a><dl>
-<dt><a name="index-triplot"></a>Команда MGL: <em></em> <strong>triplot</strong> <em>idat xdat ydat ['sch'='']</em></dt>
-<dt><a name="index-triplot-1"></a>Команда MGL: <em></em> <strong>triplot</strong> <em>idat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-triplot-2"></a>Команда MGL: <em></em> <strong>triplot</strong> <em>idat xdat ydat zdat cdat ['sch'='']</em></dt>
-<dd><p>Рисует поверхность из треугольников. Вершины треугольников задаются индексами <var>id</var> в массиве точек {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Строка <var>sch</var> задает цветовую схему. Если строка содержит `<samp>#</samp>`, то рисуется сетчатая поверхность. Размер по 1-му индексу массива <var>id</var> должен быть 3 или больше. Массивы <var>x</var>, <var>y</var>, <var>z</var> должны иметь одинаковые размеры. Массив <var>c</var> задает цвет треугольников (если <var>id</var>.ny=<var>c</var>.nx) или цвет вершин (если <var>x</var>.nx=<var>c</var>.nx). См. также <a href="#dots">dots</a>, <a href="#crust">crust</a>, <a href="#quadplot">quadplot</a>, <a href="#triangulation">triangulation</a>. См. <a href="#triplot-sample">triplot sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="tricont"></a><dl>
-<dt><a name="index-tricont"></a>Команда MGL: <em></em> <strong>tricont</strong> <em>vdat idat xdat ydat zdat cdat ['sch'='']</em></dt>
-<dt><a name="index-tricont-1"></a>Команда MGL: <em></em> <strong>tricont</strong> <em>vdat idat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-tricont-2"></a>Команда MGL: <em></em> <strong>tricont</strong> <em>idat xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>Рисует линии уровня поверхности из треугольников при <var>z</var>=<var>v</var>[k] (или при <var>z</var> равном минимальному значению оси z если <var>sch</var> содержит `<samp>_</samp>`). Вершины треугольников задаются индексами <var>id</var> в массиве точек {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Если аргуент <var>v</var> не задан, то используется массив из <var>num</var> элементов равно распределенных в диапазоне изменения цвета. Здесь <var>num</var> равен значению параметра <code>value</code> в опциях <var>opt</var> (по умолчанию 7). Строка <var>sch</var> задает цветовую схему. Размер по 1-му индексу массива <var>id</var> должен быть 3 или больше. Массивы <var>x</var>, <var>y</var>, <var>z</var> должны иметь одинаковые размеры. Массив <var>c</var> задает цвет треугольников (если <var>id</var>.ny=<var>c</var>.nx) или цвет вершин (если <var>x</var>.nx=<var>c</var>.nx). См. также <a href="#triplot">triplot</a>, <a href="#cont">cont</a>, <a href="#triangulation">triangulation</a>.
-</p></dd></dl>
-
-<a name="quadplot"></a><dl>
-<dt><a name="index-quadplot"></a>Команда MGL: <em></em> <strong>quadplot</strong> <em>idat xdat ydat ['sch'='']</em></dt>
-<dt><a name="index-quadplot-1"></a>Команда MGL: <em></em> <strong>quadplot</strong> <em>idat xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-quadplot-2"></a>Команда MGL: <em></em> <strong>quadplot</strong> <em>idat xdat ydat zdat cdat ['sch'='']</em></dt>
-<dd><p>Рисует поверхность из четырёхугольников. Вершины четырёхугольников задаются индексами <var>id</var> в массиве точек {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Строка <var>sch</var> задает цветовую схему. Если строка содержит `<samp>#</samp>`, то рисуется сетчатая поверхность. Размер по 1-му индексу массива <var>id</var> должен быть 4 или больше. Массивы <var>x</var>, <var>y</var>, <var>z</var> должны иметь одинаковые размеры. Массив <var>c</var> задает цвет четырёхугольников (если <var>id</var>.ny=<var>c</var>.nx) или цвет вершин (если <var>x</var>.nx=<var>c</var>.nx). См. также <a href="#triplot">triplot</a>. См. <a href="#triplot-sample">triplot sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="dots"></a><dl>
-<dt><a name="index-dots"></a>Команда MGL: <em></em> <strong>dots</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dt><a name="index-dots-1"></a>Команда MGL: <em></em> <strong>dots</strong> <em>xdat ydat zdat adat ['sch'='']</em></dt>
-<dd><p>Рисует произвольно расположенные точки {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Строка <var>sch</var> задает цветовую схему и тип маркеров. Если определёны массивы <var>c</var>, <var>a</var> то они задают цвет и прозрачность точек соответственно. Непрозрачные точки с заданным цветом можно нарисовать с помощью <a href="#tens">tens</a>, используя стиль `<samp> .</samp>`. Массивы <var>x</var>, <var>y</var>, <var>z</var>, <var>a</var> должны иметь одинаковые размеры. См. также <a href="#crust">crust</a>, <a href="#tens">tens</a>, <a href="#mark">mark</a>, <a href="#plot">plot</a>. См. <a href="#dots-sample">dots sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="crust"></a><dl>
-<dt><a name="index-crust"></a>Команда MGL: <em></em> <strong>crust</strong> <em>xdat ydat zdat ['sch'='']</em></dt>
-<dd><p>Реконструирует и рисует поверхность по произвольно расположенным точкам {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Опция <var>value</var> задает радиус ошибки (увеличите для удаления дыр). Строка <var>sch</var> задает цветовую схему. Если строка содержит `<samp>#</samp>`, то рисуется сетчатая поверхность. Массивы <var>x</var>, <var>y</var>, <var>z</var> должны иметь одинаковые размеры. См. также <a href="#dots">dots</a>, <a href="#triplot">triplot</a>. </p></dd></dl>
-
-
-<hr>
-<a name="Nonlinear-fitting"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-manipulation" accesskey="n" rel="next">Data manipulation</a>, Previous: <a href="#Other-plotting" accesskey="p" rel="prev">Other plotting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Nonlinear-fitting-1"></a>
-<h3 class="section">3.17 Nonlinear fitting</h3>
-
-<a name="index-Fit"></a>
-<a name="index-FitS"></a>
-<a name="index-PutsFit"></a>
-<a name="index-mglFitPnts"></a>
-<a name="index-Fit2"></a>
-<a name="index-Fit3"></a>
-
-<p>Эти функции подбирают параметры функции для наилучшей аппроксимации данных, т.е. минимизируют сумму <em>\sum_i (f(x_i, y_i, z_i) - a_i)^2/s_i^2</em>. При этом аппроксимирующая функция `<samp>f</samp>` может зависеть от одного аргумента `<samp>x</samp>` (1D случай), от двух аргументов `<samp>x,y</samp>` (2D случай) или от трех аргументов `<samp>x,y,z</samp>` (3D случай). Функция `<samp>f</samp>` также может зависеть от параметров. Список параметров задается строкой <var>var</var> (например, `<samp>abcd</samp>`). Обычно пользователь должен предоставить начальные значения параметров в переменной <var>ini</var>. Однако, при его отсутствии используются нулевые значения. Параметр <var>print</var>=<code>true</code> включает вывод найденной формулы в <var>Message</var> (см. <a href="#Error-handling">Error handling</a>).
-</p>
-<p>Функции Fit() и FitS() не рисуют полученные массивы. Они заполняют массив <var>fit</var> по формуле `<samp>f</samp>` с найденными коэффициентами и возвращают <em>\chi^2</em> ошибку аппроксимации. При этом, координаты `<samp>x,y,z</samp>` равно распределены в диапазоне осей координат. Число точек в <var>fit</var> определяется опцией <code>value</code> (по умолчанию <var>mglFitPnts</var>=100). Функции используют библиотеку GSL. См. <a href="#Nonlinear-fitting-hints">Nonlinear fitting hints</a>, для примеров кода и графика.
-</p>
-<a name="fits"></a><dl>
-<dt><a name="index-fits"></a>Команда MGL: <em></em> <strong>fits</strong> <em>res adat sdat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fits-1"></a>Команда MGL: <em></em> <strong>fits</strong> <em>res xdat adat sdat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fits-2"></a>Команда MGL: <em></em> <strong>fits</strong> <em>res xdat ydat adat sdat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fits-3"></a>Команда MGL: <em></em> <strong>fits</strong> <em>res xdat ydat zdat adat sdat 'func' 'var' [ini=0]</em></dt>
-<dd><p>"Подгоняют" формулу вдоль x-, y- и z-направлений для 3d массива заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) с весовым множителем <var>s</var>[i,j,k].
-</p></dd></dl>
-
-<a name="fit"></a><dl>
-<dt><a name="index-fit"></a>Команда MGL: <em></em> <strong>fit</strong> <em>res adat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fit-1"></a>Команда MGL: <em></em> <strong>fit</strong> <em>res xdat adat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fit-2"></a>Команда MGL: <em></em> <strong>fit</strong> <em>res xdat ydat adat 'func' 'var' [ini=0]</em></dt>
-<dt><a name="index-fit-3"></a>Команда MGL: <em></em> <strong>fit</strong> <em>res xdat ydat zdat adat 'func' 'var' [ini=0]</em></dt>
-<dd><p>"Подгоняют" формулу вдоль x-, y- и z-направлений для 3d массива заданного параметрически <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) с весовым множителем 1.
-</p></dd></dl>
-
-
-
-<a name="putsfit"></a><dl>
-<dt><a name="index-putsfit"></a>Команда MGL: <em></em> <strong>putsfit</strong> <em><code>x y</code> ['pre'='' 'fnt'='' <code>size=-1</code>]</em></dt>
-<dd><p>Печатает последнюю подобранную формулу с найденными коэффициентами в точке <var>p0</var>. Строка <var>prefix</var> будет напечатана перед формулой. Все другие параметры такие же как в <a href="#Text-printing">Text printing</a>.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Data-manipulation"></a>
-<div class="header">
-<p>
-Previous: <a href="#Nonlinear-fitting" accesskey="p" rel="prev">Nonlinear fitting</a>, Up: <a href="#MathGL-core" accesskey="u" rel="up">MathGL core</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Raspredelenie-dannykh"></a>
-<h3 class="section">3.18 Распределение данных</h3>
-
-<a name="index-Hist"></a>
-<a name="index-Fill"></a>
-<a name="index-DataGrid"></a>
-
-<dl>
-<dt><a name="index-hist"></a>Команда MGL: <em></em> <strong>hist</strong> <em><small>RES</small> xdat adat</em></dt>
-<dt><a name="index-hist-1"></a>Команда MGL: <em></em> <strong>hist</strong> <em><small>RES</small> xdat ydat adat</em></dt>
-<dt><a name="index-hist-2"></a>Команда MGL: <em></em> <strong>hist</strong> <em><small>RES</small> xdat ydat zdat adat</em></dt>
-<dd><p>Создают распределения данных. Они не рисуют данные. Функции могут быть полезны в случае когда данные пользователя определены на случайно расположенных точка (например, после PIC расчетов) и он хочет построить график, требующий регулярных данных (данных на сетках). Диапазон сеток равен диапазону осей координат. Массивы <var>x</var>, <var>y</var>, <var>z</var> определяют положение (координаты) точек. Массив <var>a</var> задает значения данных. Число точек в результате <var>res</var> определяется опцией <code>value</code> (по умолчанию <var>mglFitPnts</var>=100).
-</p></dd></dl>
-
-
-<dl>
-<dt><a name="index-fill"></a>Команда MGL: <em></em> <strong>fill</strong> <em>dat 'eq'</em></dt>
-<dt><a name="index-fill-1"></a>Команда MGL: <em></em> <strong>fill</strong> <em>dat 'eq' vdat</em></dt>
-<dt><a name="index-fill-2"></a>Команда MGL: <em></em> <strong>fill</strong> <em>dat 'eq' vdat wdat</em></dt>
-<dd><p>Заполняют значения массива `<samp>u</samp>` в соответствии с формулой в строке <var>eq</var>. Формула - произвольное выражение, зависящее от переменных `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`, `<samp>u</samp>`, `<samp>v</samp>`, `<samp>w</samp>`. Координаты `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>` полагаются в диапазоне изменения осей координат. Переменная `<samp>u</samp>` - значение исходного массива. Переменные `<samp>v</samp>` и `<samp>w</samp>` - значения массивов <var>v</var>, <var>w</var>, которые могут быть <code>NULL</code> (т.е. могут быть опущены).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-datagrid"></a>Команда MGL: <em></em> <strong>datagrid</strong> <em>dat xdat ydat zdat</em></dt>
-<dd><p>Заполняет значения массива `<samp>u</samp>` результатом линейной интерполяции по триангулированной поверхности, найденной по произвольно расположенным точкам `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`. NAN значение используется для точек сетки вне триангулированной поверхности. См. <a href="#Making-regular-data">Making regular data</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-refill"></a>Команда MGL: <em></em> <strong>refill</strong> <em>dat xdat vdat [sl=-1]</em></dt>
-<dt><a name="index-refill-1"></a>Команда MGL: <em></em> <strong>refill</strong> <em>dat xdat ydat vdat [sl=-1]</em></dt>
-<dt><a name="index-refill-2"></a>Команда MGL: <em></em> <strong>refill</strong> <em>dat xdat ydat zdat vdat</em></dt>
-<dd><p>Заполняет значениями интерполяции массива <var>v</var> в точках {<var>x</var>, <var>y</var>, <var>z</var>}={<code>X[i], Y[j], Z[k]</code>} (или {<var>x</var>, <var>y</var>, <var>z</var>}={<code>X[i,j,k], Y[i,j,k], Z[i,j,k]</code>} если <var>x</var>, <var>y</var>, <var>z</var> не 1d массивы), где <code>X,Y,Z</code> равномерно распределены в диапазоне осей координат и имеют такой же размер как и массив <var>dat</var>. Если параметр <var>sl</var> равен 0 или положительный, то изменятся будет только <var>sl</var>-ый срез.
-</p></dd></dl>
-
-
-
-<dl>
-<dt><a name="index-pde"></a>Команда MGL: <em></em> <strong>pde</strong> <em><small>RES</small> 'ham' ini_re ini_im [<code>dz=0.1 k0=100</code>]</em></dt>
-<dd><p>Решает уравнение в частных производных du/dz = i*k0*<var>ham</var>(p,q,x,y,z,|u|)[u], где p=-i/k0*d/dx, q=-i/k0*d/dy - псевдо-дифференциальные оперторы. Параметры <var>ini_re</var>, <var>ini_im</var> задают действительную и мнимую часть начального распределения поля. Координаты `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>` полагаются в диапазоне изменения осей координат. Отмечу, ято в действительности этот диапазон увеличен на 3/2 для уменьшения отражения от границ сетки. Параметр <var>dz</var> задает шаг по эволюционной координате z. Сейчас используется упрощенный вид функции <var>ham</var> - исключены все “смешанные” члены (типа `<samp>x*p</samp>`->x*d/dx). Например, в 2D случае это функция вида <em>ham = f(p,z) + g(x,z,u)</em>. Однако, коммутирующие члены (типа `<samp>x*q</samp>`->x*d/dy) разрешены. Переменная `<samp>u</samp>` используется для амплитуды поля |u|, что позволяет решать нелинейные задачи - например уравнение Шредингера <code>ham="p^2 + q^2 - u^2"</code>. Вы можете задавать мнимую часть для поглощения волн, например <code>ham = "p^2 + i*x*(x>0)"</code>, но только для линейной зависимости от переменной `<samp>i</samp>` (т.е. <em>ham = hre+i*him</em>). См. <a href="#PDE-solving-hints">PDE solving hints</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-
-
-
-
-
-
-
-<hr>
-<a name="Data-processing"></a>
-<div class="header">
-<p>
-Next: <a href="#Examples" accesskey="n" rel="next">Examples</a>, Previous: <a href="#MathGL-core" accesskey="p" rel="prev">MathGL core</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Obrabotka-dannykh"></a>
-<h2 class="chapter">4 Обработка данных</h2>
-
-
-<p>В данной главе описываются команды для работы с массивами данных. Они включают команды для выделения памяти и изменения размера данных, чтения данных из файла, численного дифференцирования, интегрирования, интерполяции и пр., заполнения по текстовой формуле и т.д. Класс позволяет работать с данными размерности не более 3 (как функции от трёх переменных - x,y,z). Массивы которые могут быть созданы командами MGL отображаются Small Caps шрифтом (например, <small>DAT</small>).
-</p>
-
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Public-variables" accesskey="1">Public variables</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-constructor" accesskey="2">Data constructor</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-resizing" accesskey="3">Data resizing</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-filling" accesskey="4">Data filling</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#File-I_002fO" accesskey="5">File I/O</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Make-another-data" accesskey="6">Make another data</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-changing" accesskey="7">Data changing</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Interpolation" accesskey="8">Interpolation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-information" accesskey="9">Data information</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Operators">Operators</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Global-functions">Global functions</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Evaluate-expression">Evaluate expression</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Special-data-classes">Special data classes</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Public-variables"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-constructor" accesskey="n" rel="next">Data constructor</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Peremennye"></a>
-<h3 class="section">4.1 Переменные</h3>
-
-
-<p>MGL не поддерживает прямой доступ к элементам массива. См. раздел <a href="#Data-filling">Data filling</a>
-</p>
-
-
-<hr>
-<a name="Data-constructor"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-resizing" accesskey="n" rel="next">Data resizing</a>, Previous: <a href="#Public-variables" accesskey="p" rel="prev">Public variables</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sozdanie-i-udalenie-dannykh"></a>
-<h3 class="section">4.2 Создание и удаление данных</h3>
-
-<a name="index-mglData"></a>
-
-<p>There are many functions, which can create data for output (see <a href="#Data-filling">Data filling</a>, <a href="#File-I_002fO">File I/O</a>, <a href="#Make-another-data">Make another data</a>, <a href="#Global-functions">Global functions</a>). Here I put most useful of them.
-</p>
-<a name="new"></a><dl>
-<dt><a name="index-new"></a>Команда MGL: <em></em> <strong>new</strong> <em><small>DAT</small> [<code>nx=1</code> 'eq']</em></dt>
-<dt><a name="index-new-1"></a>Команда MGL: <em></em> <strong>new</strong> <em><small>DAT</small> <code>nx ny</code> ['eq']</em></dt>
-<dt><a name="index-new-2"></a>Команда MGL: <em></em> <strong>new</strong> <em><small>DAT</small> <code>nx ny nz</code> ['eq']</em></dt>
-<dd><p>Выделяет память для массива данных и заполняет её нулями. Если указана формула <var>eq</var>, то данные заполняются также как при использовании <a href="#fill">fill</a>.
-</p></dd></dl>
-
-<a name="copy"></a><dl>
-<dt><a name="index-copy"></a>Команда MGL: <em></em> <strong>copy</strong> <em><small>DAT</small> dat2 ['eq'='']</em></dt>
-<dt><a name="index-copy-1"></a>Команда MGL: <em></em> <strong>copy</strong> <em><small>DAT</small> <code>val</code></em></dt>
-<dd><p>Копирует данные из другого экземпляра данных. Если указана формула <var>eq</var>, то данные заполняются также как при использовании <a href="#fill">fill</a>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-copy-2"></a>Команда MGL: <em></em> <strong>copy</strong> <em><small>REDAT</small> <small>IMDAT</small> dat2</em></dt>
-<dd><p>Копирует действительную и мнимую часть данных из комплексного массива данных <var>dat2</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-copy-3"></a>Команда MGL: <em></em> <strong>copy</strong> <em><small>DAT</small> 'name'</em></dt>
-<dd><p>Копирует данные из другого экземпляра данных с именем <var>name</var>. При этом имя <var>name</var> может быть некорректным с точки зрения MGL (например, взятым из HDF5 файла).
-</p></dd></dl>
-
-
-
-<dl>
-<dt><a name="index-read"></a>Команда MGL: <em></em> <strong>read</strong> <em><small>DAT</small> 'fname'</em></dt>
-<dd><p>Читает данные из текстового файла с автоматическим определением размеров массива.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-delete"></a>Команда MGL: <em></em> <strong>delete</strong> <em>dat</em></dt>
-<dt><a name="index-delete-1"></a>Команда MGL: <em></em> <strong>delete</strong> <em>'name'</em></dt>
-<dd><p>Удаляет массив данных из памяти.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Data-resizing"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-filling" accesskey="n" rel="next">Data filling</a>, Previous: <a href="#Data-constructor" accesskey="p" rel="prev">Data constructor</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Izmenenie-razmerov-dannykh"></a>
-<h3 class="section">4.3 Изменение размеров данных</h3>
-
-<a name="index-Create"></a>
-<a name="index-Rearrange"></a>
-<a name="index-Extend"></a>
-<a name="index-Transpose"></a>
-<a name="index-Squeeze"></a>
-<a name="index-Crop"></a>
-<a name="index-Insert"></a>
-<a name="index-Delete"></a>
-<a name="index-Sort"></a>
-<a name="index-Clean"></a>
-<a name="index-Join"></a>
-
-
-<dl>
-<dt><a name="index-new-3"></a>Команда MGL: <em></em> <strong>new</strong> <em><small>DAT</small> [<code>nx=1 ny=1 nz=1</code>]</em></dt>
-<dd><p>Создает/пересоздает массив данных указанного размера и заполняет его нулями. Ничего не делает при <var>mx</var>, <var>my</var>, <var>mz</var> отрицательных или равных нулю.
-</p></dd></dl>
-
-<a name="rearrange"></a><dl>
-<dt><a name="index-rearrange"></a>Команда MGL: <em></em> <strong>rearrange</strong> <em>dat <code>mx [my=0 mz=0]</code></em></dt>
-<dd><p>Изменяет размерность данных без изменения самого массива данных, так что результирующий массив <var>mx</var>*<var>my</var>*<var>mz</var> < nx*ny*nz. Если один из параметров <var>my</var> или <var>mz</var> ноль, то он будет выбран оптимальным образом. Например, если <var>my</var>=0, то будет <var>my</var>=nx*ny*nz/<var>mx</var> и <var>mz</var>=1.
-</p></dd></dl>
-
-<a name="transpose"></a><dl>
-<dt><a name="index-transpose"></a>Команда MGL: <em></em> <strong>transpose</strong> <em>dat ['dim'='yxz']</em></dt>
-<dd><p>Транспонирует (меняет порядок размерностей) массив данных. Новый порядок размерностей задается строкой <var>dim</var>. Функция может быть полезна для транспонирования одномерных (или квазиодномерных) массивов после чтения их из файла.
-</p></dd></dl>
-
-<a name="extend"></a><dl>
-<dt><a name="index-extend"></a>Команда MGL: <em></em> <strong>extend</strong> <em>dat <code>n1 [n2=0]</code></em></dt>
-<dd><p>Увеличивает размер данных путем вставки (|<var>n1</var>|+1) новых срезов после (для <var>n1</var>>0) или перед (для <var>n1</var><0) существующими данными. Можно добавить сразу 2 размерности для 1d массива, используя второй параметр <var>n2</var>. Данные в новые срезы будут скопированы из существующих. Например, для <var>n1</var>>0 новый массив будет
-a_ij^new = a_i^old where j=0...<var>n1</var>. Соответственно, для <var>n1</var><0 новый массив будет a_ij^new = a_j^old, где i=0...|<var>n1</var>|.
-</p></dd></dl>
-
-<a name="squeeze"></a><dl>
-<dt><a name="index-squeeze"></a>Команда MGL: <em></em> <strong>squeeze</strong> <em>dat <code>rx [ry=1 rz=1 sm=off]</code></em></dt>
-<dd><p>Уменьшает размер данных путём удаления элементов с индексами не кратными <var>rx</var>, <var>ry</var>, <var>rz</var> соответственно. Параметр <var>smooth</var> задает использовать сглаживания
-(т.е. out[i]=\sum_{j=i,i+r} a[j]/r) или нет (т.е. out[i]=a[j*r]).
-</p></dd></dl>
-
-<a name="crop"></a><dl>
-<dt><a name="index-crop"></a>Команда MGL: <em></em> <strong>crop</strong> <em>dat <code>n1 n2</code> 'dir'</em></dt>
-<dd><p>Обрезает границы данных при <var>i</var><<var>n1</var> и <var>i</var>><var>n2</var> (при <var>n2</var>>0) или <var>i</var>><code>n[xyz]</code>-<var>n2</var> (при <var>n2</var><=0) вдоль направления <var>dir</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-crop-1"></a>Команда MGL: <em></em> <strong>crop</strong> <em>dat 'how'</em></dt>
-<dd><p>Обрезает дальний край данных, чтобы сделать их более оптимальным для быстрого преобразования Фурье. Размер массива будет равен наиболее близким к исходному из 2^n*3^m*5^l. Строка <var>how</var> может содержать: `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>` для направлений, и `<samp>2</samp>`, `<samp>3</samp>`, `<samp>5</samp>` для использования соответствующего основания.
-</p></dd></dl>
-
-<a name="insert"></a><dl>
-<dt><a name="index-insert"></a>Команда MGL: <em></em> <strong>insert</strong> <em>dat 'dir' <code>[pos=off num=0]</code></em></dt>
-<dd><p>Вставляет <var>num</var> срезов вдоль направления <var>dir</var> с позиции <var>pos</var> и заполняет их нулями.
-</p></dd></dl>
-
-<a name="delete"></a><dl>
-<dt><a name="index-delete-2"></a>Команда MGL: <em></em> <strong>delete</strong> <em>dat 'dir' <code>[pos=off num=0]</code></em></dt>
-<dd><p>Удаляет <var>num</var> срезов вдоль направления <var>dir</var> с позиции <var>pos</var>.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-delete-3"></a>Команда MGL: <em></em> <strong>delete</strong> <em>dat</em></dt>
-<dt><a name="index-delete-4"></a>Команда MGL: <em></em> <strong>delete</strong> <em>'name'</em></dt>
-<dd><p>Удаляет массив данных из памяти.
-</p></dd></dl>
-
-<a name="sort"></a><dl>
-<dt><a name="index-sort"></a>Команда MGL: <em></em> <strong>sort</strong> <em>dat <code>idx [idy=-1]</code></em></dt>
-<dd><p>Сортирует строки (или срезы в 3D случае) по значениям в указанной колонке <var>idx</var> (или ячейках {<var>idx</var>,<var>idy</var>} для 3D случая). Не используйте в многопоточных функциях!
-</p></dd></dl>
-
-<a name="clean"></a><dl>
-<dt><a name="index-clean"></a>Команда MGL: <em></em> <strong>clean</strong> <em>dat <code>idx</code></em></dt>
-<dd><p>Удаляет строки в которых значения для заданной колонки <var>idx</var> совпадают со значениями в следующей строке.
-</p></dd></dl>
-
-
-<a name="join"></a><dl>
-<dt><a name="index-join"></a>Команда MGL: <em></em> <strong>join</strong> <em>dat vdat [v2dat ...]</em></dt>
-<dd><p>Объединяет данные из массива <var>vdat</var> с данными массива <var>dat</var>. При этом, функция увеличивает размер массива <var>dat</var>: в z-направлении для массивов с одинаковыми размерами по x и y; в y-направлении для массивов с одинаковыми размерами по x; в x-направлении в остальных случаях.
-</p></dd></dl>
-
-
-<hr>
-<a name="Data-filling"></a>
-<div class="header">
-<p>
-Next: <a href="#File-I_002fO" accesskey="n" rel="next">File I/O</a>, Previous: <a href="#Data-resizing" accesskey="p" rel="prev">Data resizing</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Zapolnenie-dannykh"></a>
-<h3 class="section">4.4 Заполнение данных</h3>
-
-<a name="index-Fill-1"></a>
-<a name="index-Modify"></a>
-<a name="index-Set"></a>
-<a name="index-List"></a>
-<a name="index-Var"></a>
-<a name="index-Refill"></a>
-
-<a name="list"></a><dl>
-<dt><a name="index-list"></a>Команда MGL: <em></em> <strong>list</strong> <em><small>DAT</small> <code>v1 ...</code></em></dt>
-<dd><p>Создает новый массив данных <var>dat</var> и заполняет его числовыми значениями аргументов <code>v1 ...</code>. Команда может создавать одно- и двухмерные массивы с произвольными значениями. Для создания 2d массива следует использовать разделитель `<samp>|</samp>`, который означает начало новой строки данных. Размер массива данных будет [maximal of row sizes * number of rows]. Например, команда <code>list 1 | 2 3</code> создаст массив [1 0; 2 3]. Замечу, что максимальное число аргументов равно 1000.
-</p></dd></dl>
-<dl>
-<dt><a name="index-list-1"></a>Команда MGL: <em></em> <strong>list</strong> <em><small>DAT</small> d1 ...</em></dt>
-<dd><p>Создает новый массив данных <var>dat</var> и заполняет его значениями из массивов <var>d1 ...</var>. Команда может создавать двух- и трёхмерные (если аргументы - двумерные массивы) массивы. Меньшая размерность всех массивов в аргументах должна совпадать. В противном случае аргумент (массив) будет пропущен.
-</p></dd></dl>
-
-
-<a name="var"></a><dl>
-<dt><a name="index-var"></a>Команда MGL: <em></em> <strong>var</strong> <em><small>DAT</small> <code>num v1 [v2=nan]</code></em></dt>
-<dd><p>Создает новый одномерный массив данных <var>dat</var> размером <var>num</var>, и заполняет его равномерно в диапазоне [<var>v1</var>, <var>v2</var>]. Если <var>v2</var>=<code>nan</code>, то используется <var>v2=v1</var>.
-</p></dd></dl>
-
-<a name="fill"></a><dl>
-<dt><a name="index-fill-3"></a>Команда MGL: <em></em> <strong>fill</strong> <em>dat v1 v2 ['dir'='x']</em></dt>
-<dd><p>Заполняет значениями равно распределёнными в диапазоне [<var>x1</var>, <var>x2</var>] в направлении <var>dir</var>={`<samp>x</samp>`,`<samp>y</samp>`,`<samp>z</samp>`}.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-fill-4"></a>Команда MGL: <em></em> <strong>fill</strong> <em>dat 'eq'[vdat wdat]</em></dt>
-<dd><p>Заполняет значениями вычисленными по формуле <var>eq</var>. Формула представляет собой произвольное выражение, зависящее от переменных `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`, `<samp>u</samp>`, `<samp>v</samp>`, `<samp>w</samp>`. Координаты `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>` полагаются меняющимися в диапазоне <var>Min</var> x <var>Max</var> (в отличие от функции <code>Modify</code>). Переменная `<samp>u</samp>` - значения исходного массива, переменные `<samp>v</samp>`, `<samp>w</samp>` - значения массивов <var>vdat</var>, <var>wdat</var>. Последние могут быть <code>NULL</code>, т.е. опущены.
-</p></dd></dl>
-
-<a name="modify"></a><dl>
-<dt><a name="index-modify"></a>Команда MGL: <em></em> <strong>modify</strong> <em>dat 'eq' [<code>dim=0</code>]</em></dt>
-<dt><a name="index-modify-1"></a>Команда MGL: <em></em> <strong>modify</strong> <em>dat 'eq' vdat [wdat]</em></dt>
-<dd><p>Аналогично предыдущему с координатами `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`, меняющимися в диапазоне [0,1]. Если указан <var>dim</var>>0, то изменяются только слои >=<var>dim</var>.
-</p></dd></dl>
-
-<a name="fillsample"></a><dl>
-<dt><a name="index-fillsample"></a>Команда MGL: <em></em> <strong>fillsample</strong> <em>dat 'how'</em></dt>
-<dd><p>Заполняет массив данных `x` или `k` значениями для преобразований Ханкеля (`h`) или Фурье (`f`).
-</p></dd></dl>
-
-
-<a name="datagrid"></a><dl>
-<dt><a name="index-datagrid-1"></a>Команда MGL: <em></em> <strong>datagrid</strong> <em>dat xdat ydat zdat</em></dt>
-<dd><p>Заполняет значения массива результатом линейной интерполяции (считая координаты равнораспределенными в диапазоне осей координат или в диапазоне [x1,x2]*[y1,y2]) по триангулированной поверхности, найденной по произвольно расположенным точкам `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`. NAN значение используется для точек сетки вне триангулированной поверхности. См. <a href="#Making-regular-data">Making regular data</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-<a name="put"></a><dl>
-<dt><a name="index-put"></a>Команда MGL: <em></em> <strong>put</strong> <em>dat <code>val [i=all j=all k=all]</code></em></dt>
-<dd><p>Присваивает значения (под-)массива <var>dat</var>[<var>i</var>, <var>j</var>, <var>k</var>] = <var>val</var>. Индексы <var>i</var>, <var>j</var>, <var>k</var> равные `<samp>-1</samp>` задают значения <var>val</var> для всего диапазона соответствующего направления(ий). Например, <code>Put(val,-1,0,-1);</code> задает a[i,0,j]=<var>val</var> для i=0...(nx-1), j=0...(nz-1).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-put-1"></a>Команда MGL: <em></em> <strong>put</strong> <em>dat vdat [<code>i=all j=all k=all</code>]</em></dt>
-<dd><p>Копирует значения из массива <var>v</var> в диапазон значений данного массива. Индексы <var>i</var>, <var>j</var>, <var>k</var> равные `<samp>-1</samp>` задают диапазон изменения значений в соответствующих направление(ях). Младшие размерности массива <var>v</var> должны быть больше выбранного диапазона массива. Например, <code>Put(v,-1,0,-1);</code> присвоит a[i,0,j]=<var>v</var>.ny>nz ? <var>v</var>.a[i,j] : <var>v</var>.a[i], где i=0...(nx-1), j=0...(nz-1) и условие v.nx>=nx выполнено.
-</p></dd></dl>
-
-<a name="refill"></a><dl>
-<dt><a name="index-refill-3"></a>Команда MGL: <em></em> <strong>refill</strong> <em>dat xdat vdat [sl=-1]</em></dt>
-<dt><a name="index-refill-4"></a>Команда MGL: <em></em> <strong>refill</strong> <em>dat xdat ydat vdat [sl=-1]</em></dt>
-<dt><a name="index-refill-5"></a>Команда MGL: <em></em> <strong>refill</strong> <em>dat xdat ydat zdat vdat</em></dt>
-<dd><p>Заполняет значениями интерполяции массива <var>v</var> в точках {<var>x</var>, <var>y</var>, <var>z</var>}={<code>X[i], Y[j], Z[k]</code>} (или {<var>x</var>, <var>y</var>, <var>z</var>}={<code>X[i,j,k], Y[i,j,k], Z[i,j,k]</code>} если <var>x</var>, <var>y</var>, <var>z</var> не 1d массивы), где <code>X,Y,Z</code> равномерно распределены в диапазоне [<var>x1</var>,<var>x2</var>]*[<var>y1</var>,<var>y2</var>]*[<var>z1</var>,<var>z2</var>] и имеют такой же размер как и заполняемый массив. Если параметр <var>sl</var> равен 0 или положительный, то изменятся будет только <var>sl</var>-ый срез.
-</p></dd></dl>
-
-<a name="gspline"></a><dl>
-<dt><a name="index-gspline"></a>Команда MGL: <em></em> <strong>gspline</strong> <em>dat xdat vdat [sl=-1]</em></dt>
-<dd><p>Заполняет значениями глобального кубического сплайна для массива <var>v</var> в точках <var>x</var>=<code>X[i]</code>, где <code>X</code> равномерно распределен в диапазоне [<var>x1</var>,<var>x2</var>] и имеет такой же размер как и заполняемый массив. Если параметр <var>sl</var> равен 0 или положительный, то изменятся будет только <var>sl</var>-ый срез.
-</p></dd></dl>
-
-<a name="idset"></a><dl>
-<dt><a name="index-idset"></a>Команда MGL: <em></em> <strong>idset</strong> <em>dat 'ids'</em></dt>
-<dd><p>Задает названия <var>ids</var> для колонок массива данных. Строка должна содержать один символ `a`...`z` на колонку. Эти названия используются в функции <a href="#column">column</a>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="File-I_002fO"></a>
-<div class="header">
-<p>
-Next: <a href="#Make-another-data" accesskey="n" rel="next">Make another data</a>, Previous: <a href="#Data-filling" accesskey="p" rel="prev">Data filling</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Chtenie_002fsokhranenie-dannykh"></a>
-<h3 class="section">4.5 Чтение/сохранение данных</h3>
-
-<a name="index-Read"></a>
-<a name="index-ReadMat"></a>
-<a name="index-ReadRange"></a>
-<a name="index-ReadAll"></a>
-<a name="index-Save"></a>
-<a name="index-ReadHDF"></a>
-<a name="index-SaveHDF"></a>
-<a name="index-Import"></a>
-<a name="index-Export"></a>
-
-<a name="read"></a><dl>
-<dt><a name="index-read-1"></a>Команда MGL: <em></em> <strong>read</strong> <em><small>DAT</small> 'fname'</em></dt>
-<dt><a name="index-read-2"></a>Команда MGL: <em></em> <strong>read</strong> <em><small>REDAT</small> <small>IMDAT</small> 'fname'</em></dt>
-<dd><p>Читает данные из текстового файла с разделителями символом пробела/табуляции с автоматическим определением размера массива. Двойной перевод строки начинает новый срез данных (по направлению z).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-read-3"></a>Команда MGL: <em></em> <strong>read</strong> <em><small>DAT</small> 'fname' <code>mx [my=1 mz=1]</code></em></dt>
-<dt><a name="index-read-4"></a>Команда MGL: <em></em> <strong>read</strong> <em><small>REDAT</small> <small>IMDAT</small> 'fname' <code>mx [my=1 mz=1]</code></em></dt>
-<dd><p>Читает данные из текстового файла с заданными размерами. Ничего не делается если параметры <var>mx</var>, <var>my</var> или <var>mz</var> равны нулю или отрицательны.
-</p></dd></dl>
-
-<a name="readmat"></a><dl>
-<dt><a name="index-readmat"></a>Команда MGL: <em></em> <strong>readmat</strong> <em><small>DAT</small> 'fname' [<code>dim=2</code>]</em></dt>
-<dd><p>Читает данные из текстового файла с размерами, указанными в первых <var>dim</var> числах файла. При этом переменная <var>dim</var> задает размерность (1d, 2d, 3d) данных.
-</p></dd></dl>
-
-<a name="readall"></a><dl>
-<dt><a name="index-readall"></a>Команда MGL: <em></em> <strong>readall</strong> <em><small>DAT</small> 'templ' <code>v1 v2 [dv=1 slice=off]</code></em></dt>
-<dd><p>Объединяет данные из нескольких текстовых файлов. Имена файлов определяются вызовом функции <code>sprintf(fname,templ,val);</code>, где <var>val</var> меняется от <var>from</var> до <var>to</var> с шагом <var>step</var>. Данные загружаются один за другим в один и тот же срез данных (при <var>as_slice</var>=<code>false</code>) или срез-за-срезом (при <var>as_slice</var>=<code>true</code>).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-readall-1"></a>Команда MGL: <em></em> <strong>readall</strong> <em><small>DAT</small> 'templ' <code>[slice=off]</code></em></dt>
-<dd><p>Объединяет данные из нескольких текстовых файлов, чьи имена удовлетворяют шаблону <var>templ</var> (например, <var>templ</var>=<code>"t_*.dat"</code>). Данные загружаются один за другим в один и тот же срез данных (при <var>as_slice</var>=<code>false</code>) или срез-за-срезом (при <var>as_slice</var>=<code>true</code>).
-</p></dd></dl>
-
-<a name="scanfile"></a><dl>
-<dt><a name="index-scanfile"></a>Команда MGL: <em></em> <strong>scanfile</strong> <em><small>DAT</small> 'fname' 'templ'</em></dt>
-<dd><p>Читает файл <var>fname</var> построчно и каждую строку сканирует на соответствие шаблону <var>templ</var>. Полученные числа (обозначаются как `<samp>%g</samp>` в шаблоне) сохраняются. См. <a href="#Saving-and-scanning-file">Saving and scanning file</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="save"></a><dl>
-<dt><a name="index-save"></a>Команда MGL: <em></em> <strong>save</strong> <em>dat 'fname'</em></dt>
-<dd><p>Сохраняет весь массив данных при <var>ns</var>=<code>-1</code> или только <var>ns</var>-ый срез в текстовый файл.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-save-1"></a>Команда MGL: <em></em> <strong>save</strong> <em>'str' 'fname' ['mode'='a']</em></dt>
-<dd><p>Сохраняет строку <var>str</var> в файл <var>fname</var>. Для параметра <var>mode</var>=`<samp>a</samp>` происходит добавление строки (по умолчанию): для <var>mode</var>=`<samp>w</samp>` файл будет перезаписан. См. <a href="#Saving-and-scanning-file">Saving and scanning file</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="readhdf"></a><dl>
-<dt><a name="index-readhdf"></a>Команда MGL: <em></em> <strong>readhdf</strong> <em><small>DAT</small> 'fname' 'dname'</em></dt>
-<dd><p>Читает массив с именем <var>dname</var> из HDF5 или HDF4 файла <var>fname</var>. Функция ничего не делает если библиотека была собрана без поддержки HDF5|HDF4.
-</p></dd></dl>
-
-<a name="savehdf"></a><dl>
-<dt><a name="index-savehdf"></a>Команда MGL: <em></em> <strong>savehdf</strong> <em>dat 'fname' 'dname' [<code>rewrite</code>=<code>off</code>]</em></dt>
-<dd><p>Сохраняет массив под именем <var>dname</var> в HDF5 или HDF4 файл <var>fname</var>. Функция ничего не делает если библиотека была собрана без поддержки HDF5|HDF4.
-</p></dd></dl>
-
-<a name="datas"></a><dl>
-<dt><a name="index-datas"></a>Команда MGL: <em></em> <strong>datas</strong> <em>'fname'</em></dt>
-<dd><p>Помещает имена массивов данных в HDF5 файле <var>fname</var> в строку <var>buf</var> разделёнными символом табуляции `\t`. В версии MGL имена массивов будут выведены как сообщение. Функция ничего не делает если библиотека была собрана без поддержки HDF5.
-</p></dd></dl>
-
-<a name="openhdf"></a><dl>
-<dt><a name="index-openhdf"></a>Команда MGL: <em></em> <strong>openhdf</strong> <em>'fname'</em></dt>
-<dd><p>Читает все массивы данных из HDF5 файла <var>fname</var> и создает переменные MGL с соответствующими именами. Если имя данных начинается с `<samp>!</samp>`, то будут созданы комплексные массивы.
-</p></dd></dl>
-
-
-<a name="import"></a><dl>
-<dt><a name="index-import"></a>Команда MGL: <em></em> <strong>import</strong> <em><small>DAT</small> 'fname' 'sch' [<code>v1=0 v2=1</code>]</em></dt>
-<dd><p>Читает данные из растрового файла. RGB значения пикселов преобразуются в число в диапазоне [<var>v1</var>, <var>v2</var>] используя цветовую схему <var>sch</var> (see <a href="#Color-scheme">Color scheme</a>).
-</p></dd></dl>
-
-<a name="export"></a><dl>
-<dt><a name="index-export"></a>Команда MGL: <em></em> <strong>export</strong> <em>dat 'fname' 'sch' [<code>v1=0 v2=0</code>]</em></dt>
-<dd><p>Сохраняет данные в растровый файл. Числовые значения, нормированные в диапазон [<var>v1</var>, <var>v2</var>], преобразуются в RGB значения пикселов, используя цветовую схему <var>sch</var> (see <a href="#Color-scheme">Color scheme</a>). Если <var>v1</var>>=<var>v2</var>, то значения <var>v1</var>, <var>v2</var> определяются автоматически как минимальное и максимальное значение данных.
-</p></dd></dl>
-
-
-<hr>
-<a name="Make-another-data"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-changing" accesskey="n" rel="next">Data changing</a>, Previous: <a href="#File-I_002fO" accesskey="p" rel="prev">File I/O</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Make-another-data-1"></a>
-<h3 class="section">4.6 Make another data</h3>
-
-<a name="index-SubData"></a>
-<a name="index-Column"></a>
-<a name="index-Trace"></a>
-<a name="index-Hist-1"></a>
-<a name="index-Resize"></a>
-<a name="index-Evaluate"></a>
-<a name="index-Combine"></a>
-<a name="index-Momentum"></a>
-<a name="index-Sum"></a>
-<a name="index-Min"></a>
-<a name="index-Max"></a>
-<a name="index-Roots"></a>
-<a name="index-Correl"></a>
-<a name="index-AutoCorrel"></a>
-
-<a name="subdata"></a><dl>
-<dt><a name="index-subdata"></a>Команда MGL: <em></em> <strong>subdata</strong> <em><small>RES</small> dat <code>xx [yy=all zz=all]</code></em></dt>
-<dd><p>Возвращает в <var>res</var> подмассив массива данных <var>dat</var> с фиксированными значениями индексов с положительными значениями. Например, <code>SubData(-1,2)</code> выделяет третью строку (индексы начинаются с нуля), <code>SubData(4,-1)</code> выделяет 5-ую колонку, <code>SubData(-1,-1,3)</code> выделяет 4-ый срез и т.д. В MGL скриптах обычно используется упрощенная версия <code>dat(xx,yy,zz)</code>. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-subdata-1"></a>Команда MGL: <em></em> <strong>subdata</strong> <em><small>RES</small> dat xdat [ydat zdat]</em></dt>
-<dd><p>Возвращает в <var>res</var> подмассив массива данных <var>dat</var> с индексами, заданными в массивах <var>xx</var>, <var>yy</var>, <var>zz</var> (косвенная адресация). Результат будет иметь размерность массивов с индексами. Размеры массивов <var>xx</var>, <var>yy</var>, <var>zz</var> с индексами должна быть одинакова, либо должны быть "скаляром" (т.е. 1*1*1). В MGL скриптах обычно используется упрощенная версия <code>dat(xx,yy,zz)</code>. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="column"></a><dl>
-<dt><a name="index-column"></a>Команда MGL: <em></em> <strong>column</strong> <em><small>RES</small> dat 'eq'</em></dt>
-<dd><p>Возвращает массив данных заполненный по формуле <var>eq</var>, вычисленной для именованных колонок (или срезов). Например, <code>Column("n*w^2/exp(t)");</code>. Имена колонок должны быть предварительно заданы функцией <a href="#idset">idset</a> или при чтении файлов данных. В MGL скриптах обычно используется упрощенная версия <code>dat('eq')</code>. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="resize"></a><dl>
-<dt><a name="index-resize"></a>Команда MGL: <em></em> <strong>resize</strong> <em><small>RES</small> dat <code>mx [my=1 mz=1]</code></em></dt>
-<dd><p>Возвращает массив данных размером <var>mx</var>, <var>my</var>, <var>mz</var> со значениями полученными интерполяцией значений из части [<var>x1</var>,<var>x2</var>] x [<var>y1</var>,<var>y2</var>] x [<var>z1</var>,<var>z2</var>] исходного массива. Величины x,y,z полагаются нормированными в диапазоне [0,1]. Если значение <var>mx</var>, <var>my</var> или <var>mz</var> равно 0, то исходный размер используется. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="evaluate"></a><dl>
-<dt><a name="index-evaluate"></a>Команда MGL: <em></em> <strong>evaluate</strong> <em><small>RES</small> dat idat [<code>norm=on</code>]</em></dt>
-<dt><a name="index-evaluate-1"></a>Команда MGL: <em></em> <strong>evaluate</strong> <em><small>RES</small> dat idat jdat [<code>norm=on</code>]</em></dt>
-<dt><a name="index-evaluate-2"></a>Команда MGL: <em></em> <strong>evaluate</strong> <em><small>RES</small> dat idat jdat kdat [<code>norm=on</code>]</em></dt>
-<dd><p>Возвращает массив данных, полученный в результате интерполяции исходного массива в точках других массивов (например, res[i,j]=dat[idat[i,j],jdat[i,j]]). Размеры массивов <var>idat</var>, <var>jdat</var>, <var>kdat</var> должны совпадать. Координаты в <var>idat</var>, <var>jdat</var>, <var>kdat</var> полагаются нормированными в диапазон [0,1] (при <var>norm</var>=<code>true</code>) или в диапазоны [0,nx], [0,ny], [0,nz] соответственно. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="section"></a><dl>
-<dt><a name="index-section"></a>Команда MGL: <em></em> <strong>section</strong> <em><small>RES</small> dat ids ['dir'='y' <code>val=nan</code>]</em></dt>
-<dt><a name="index-section-1"></a>Команда MGL: <em></em> <strong>section</strong> <em><small>RES</small> dat <code>id</code> ['dir'='y' <code>val=nan</code>]</em></dt>
-<dd><p>Возвращает массив данных, являющийся <var>id</var>-ой секцией (диапазоном срезов, разделенных значениями <var>val</var>) исходного массива <var>dat</var>. Для <var>id</var><0 используется обратный порядок (т.e. -1 даст последнюю секцию). Если указано несколько <var>ids</var>, то выходной массив будет результатом последовательного объединения секций.
-</p></dd></dl>
-
-<a name="solve"></a><dl>
-<dt><a name="index-solve"></a>Команда MGL: <em></em> <strong>solve</strong> <em><small>RES</small> dat <code>val</code> 'dir' [<code>norm=on</code>]</em></dt>
-<dt><a name="index-solve-1"></a>Команда MGL: <em></em> <strong>solve</strong> <em><small>RES</small> dat <code>val</code> 'dir' idat [<code>norm=on</code>]</em></dt>
-<dd><p>Возвращает массив индексов (корней) вдоль выбранного направления <var>dir</var> в которых значения массива <var>dat</var> равны <var>val</var>. Выходной массив будет иметь размеры массива <var>dat</var> в направлениях поперечных <var>dir</var>. Если предоставлен массив <var>idat</var>, то его значения используются как стартовые при поиске. Это позволяет найти несколько веток с помощью последовательного вызова функции. Индексы полагаются нормированными в диапазон [0,1] (при <var>norm</var>=<code>true</code>) или в диапазоны [0,nx], [0,ny], [0,nz] соответственно. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов. См. <a href="#Solve-sample">Solve sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="roots"></a><dl>
-<dt><a name="index-roots"></a>Команда MGL: <em></em> <strong>roots</strong> <em><small>RES</small> 'func' ini ['var'='x']</em></dt>
-<dt><a name="index-roots-1"></a>Команда MGL: <em></em> <strong>roots</strong> <em><small>RES</small> 'func' <code>ini</code> ['var'='x']</em></dt>
-<dd><p>Возвращает массив корней уравнения `func`=0 для переменной <var>var</var> с начальными положениями <var>ini</var>. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-roots-2"></a>Команда MGL: <em></em> <strong>roots</strong> <em><small>RES</small> 'funcs' 'vars' ini</em></dt>
-<dd><p>Возвращает массив корней системы уравнений `funcs`=0 для переменных <var>vars</var> с начальными значениями <var>ini</var>. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="detect"></a><dl>
-<dt><a name="index-detect"></a>Команда MGL: <em></em> <strong>detect</strong> <em><small>RES</small> dat <code>lvl dj [di=0 minlen=0]</code></em></dt>
-<dd><p>Возвращает массив кривых {x,y}, разделенных NAN значениями, для локальных максимумов массива <var>dat</var> как функцию координаты x. Шумы амплитудой меньше <var>lvl</var> игнорируются. Параметр <var>dj</var> (в диапазоне [0,ny]) задает область "притяжения" точек в y-направлении к кривой. Аналогично, <var>di</var> продолжает кривые в x-направлении через разрывы длиной менее <var>di</var> точек. Кривые с минимальной длинной менее <var>minlen</var> игнорируются.
-</p></dd></dl>
-
-<a name="hist"></a><dl>
-<dt><a name="index-hist-3"></a>Команда MGL: <em></em> <strong>hist</strong> <em><small>RES</small> dat <code>num v1 v2 [nsub=0]</code></em></dt>
-<dt><a name="index-hist-4"></a>Команда MGL: <em></em> <strong>hist</strong> <em><small>RES</small> dat wdat <code>num v1 v2 [nsub=0]</code></em></dt>
-<dd><p>Возвращает распределение (гистограмму) из <var>n</var> точек от значений массива в диапазоне [<var>v1</var>, <var>v2</var>]. Массив <var>w</var> задает веса элементов (по умолчанию все веса равны 1). Параметр <var>nsub</var> задает число дополнительных точек интерполяции (для сглаживания получившейся гистограммы). Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов. См. также <a href="#Data-manipulation">Data manipulation</a>
-</p></dd></dl>
-
-<a name="momentum"></a><dl>
-<dt><a name="index-momentum"></a>Команда MGL: <em></em> <strong>momentum</strong> <em><small>RES</small> dat 'how' ['dir'='z']</em></dt>
-<dd><p>Возвращает момент (1d массив) данных вдоль направления <var>dir</var>. Строка <var>how</var> определяет тип момента. Момент определяется как
-res_k = \sum_ij how(x_i,y_j,z_k) a_ij/ \sum_ij a_ij
-если <var>dir</var>=`<samp>z</samp>` и т.д. Координаты `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>` - индексы массива в диапазоне [0,1]. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="sum"></a><dl>
-<dt><a name="index-sum"></a>Команда MGL: <em></em> <strong>sum</strong> <em><small>RES</small> dat 'dir'</em></dt>
-<dd><p>Возвращает результат суммирования данных вдоль направления(ий) <var>dir</var>. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="max"></a><dl>
-<dt><a name="index-max"></a>Команда MGL: <em></em> <strong>max</strong> <em><small>RES</small> dat 'dir'</em></dt>
-<dd><p>Возвращает максимальное значение данных вдоль направления(ий) <var>dir</var>. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="min"></a><dl>
-<dt><a name="index-min"></a>Команда MGL: <em></em> <strong>min</strong> <em><small>RES</small> dat 'dir'</em></dt>
-<dd><p>Возвращает минимальное значение данных вдоль направления(ий) <var>dir</var>. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="combine"></a><dl>
-<dt><a name="index-combine"></a>Команда MGL: <em></em> <strong>combine</strong> <em><small>RES</small> adat bdat</em></dt>
-<dd><p>Возвращает прямое произведение массивов (наподобие, res[i,j] = adat[i]*bdat[j] и т.д.). Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="trace"></a><dl>
-<dt><a name="index-trace"></a>Команда MGL: <em></em> <strong>trace</strong> <em><small>RES</small> dat</em></dt>
-<dd><p>Возвращает массив диагональных элементов a[i,i] (для 2D данных) или a[i,i,i] (для 3D данных) где i=0...nx-1. В 1D случае возвращается сам массив данных. Размеры массива данных должен быть ny,nz >= nx или ny,nz = 1. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-<a name="correl"></a><dl>
-<dt><a name="index-correl"></a>Команда MGL: <em></em> <strong>correl</strong> <em><small>RES</small> adat bdat 'dir'</em></dt>
-<dd><p>Возвращает корреляцию массивов <var>a</var> (или this в C++) и <var>b</var> вдоль направлений <var>dir</var>. При вычислении используется преобразование Фурье. Поэтому может потребоваться вызов функций <a href="#swap">swap</a> и/или <a href="#norm">norm</a> перед построением. Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов.
-</p></dd></dl>
-
-
-<a name="pulse"></a><dl>
-<dt><a name="index-pulse"></a>Команда MGL: <em></em> <strong>pulse</strong> <em><small>RES</small> dat 'dir'</em></dt>
-<dd><p>Находит параметры импульса вдоль направления <var>dir</var>: максимальное значение (в колонке 0), его положение (в колонке 1), ширина по параболлической аппроксимации (в колонке 3) и по полувысоте (в колонке 2), энергию около максимума (в колонке 4). NAN значения используются для ширин если максимум расположен вблизи границ массива. Отмечу, что для комплексных массивов есть неопределенность определения параметров. Обычно следует использовать квадрат абсолютного значения амплитуды (т.е. |dat[i]|^2). Поэтому MathGL не включает эту функцию в <code>mglDataC</code>, хотя формально C функция будет работать и для них, но будет использовать абсолютное значение амплитуды (т.е. |dat[i]|). Функция возвращает NULL или пустой массив если данные не могут быть созданы при данных значениях аргументов. См. также <a href="#max">max</a>, <a href="#min">min</a>, <a href="#momentum">momentum</a>, <a href="#sum">sum</a>. См. <a href="#Pulse-properties">Pulse properties</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-<hr>
-<a name="Data-changing"></a>
-<div class="header">
-<p>
-Next: <a href="#Interpolation" accesskey="n" rel="next">Interpolation</a>, Previous: <a href="#Make-another-data" accesskey="p" rel="prev">Make another data</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Izmenenie-dannykh"></a>
-<h3 class="section">4.7 Изменение данных</h3>
-
-<a name="index-CumSum"></a>
-<a name="index-Integral"></a>
-<a name="index-Diff"></a>
-<a name="index-Diff2"></a>
-<a name="index-SinFFT"></a>
-<a name="index-CosFFT"></a>
-<a name="index-Hankel"></a>
-<a name="index-Swap"></a>
-<a name="index-Roll"></a>
-<a name="index-Mirror"></a>
-<a name="index-Sew"></a>
-<a name="index-Smooth"></a>
-<a name="index-Envelop"></a>
-<a name="index-Norm"></a>
-<a name="index-NormSl"></a>
-
-<p>These functions change the data in some direction like differentiations, integrations and so on. The direction in which the change will applied is specified by the string parameter, which may contain `<samp>x</samp>`, `<samp>y</samp>` or `<samp>z</samp>` characters for 1-st, 2-nd and 3-d dimension correspondingly.
-</p>
-<a name="cumsum"></a><dl>
-<dt><a name="index-cumsum"></a>Команда MGL: <em></em> <strong>cumsum</strong> <em>dat 'dir'</em></dt>
-<dd><p>Суммирует с накоплением в выбранном направлении(ях).
-</p></dd></dl>
-
-<a name="integrate"></a><dl>
-<dt><a name="index-integrate"></a>Команда MGL: <em></em> <strong>integrate</strong> <em>dat 'dir'</em></dt>
-<dd><p>Выполняет интегрирование (методом трапеций) в выбранном направлении(ях).
-</p></dd></dl>
-
-<a name="diff"></a><dl>
-<dt><a name="index-diff"></a>Команда MGL: <em></em> <strong>diff</strong> <em>dat 'dir'</em></dt>
-<dd><p>Выполняет дифференцирование в выбранном направлении(ях).
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-diff-1"></a>Команда MGL: <em></em> <strong>diff</strong> <em>dat xdat ydat [zdat]</em></dt>
-<dd><p>Выполняет дифференцирование данных, параметрически зависящих от координат, в направлении <var>x</var> с <var>y</var>, <var>z</var>=constant. Параметр <var>z</var> может быть опущен, что соответствует 2D случаю. Используются следующие формулы (2D случай): <em>da/dx = (a_j*y_i-a_i*y_j)/(x_j*y_i-x_i*y_j)</em>, где <em>a_i=da/di, a_j=da/dj</em> обозначает дифференцирование вдоль 1-ой и 2-ой размерности. Похожие формулы используются и в 3D случае. Порядок аргументов можно менять - например, если данные a(i,j) зависят от координат {x(i,j), y(i,j)}, то обычная производная по `<samp>x</samp>` будет равна <code>Diff(x,y);</code>, а обычная производная по `<samp>y</samp>` будет равна <code>Diff(y,x);</code>.
-</p></dd></dl>
-
-<a name="diff2"></a><dl>
-<dt><a name="index-diff2"></a>Команда MGL: <em></em> <strong>diff2</strong> <em>dat 'dir'</em></dt>
-<dd><p>Выполняет двойное дифференцирование (как в операторе Лапласа) в выбранном направлении(ях).
-</p></dd></dl>
-
-<a name="sinfft"></a><dl>
-<dt><a name="index-sinfft"></a>Команда MGL: <em></em> <strong>sinfft</strong> <em>dat 'dir'</em></dt>
-<dd><p>Выполняет синус преобразование в выбранном направлении(ях). Синус преобразование есть <em>\sum a_j \sin(k j)</em> (см. <a href="http://en.wikipedia.org/wiki/Discrete_sine_transform#DST-I">http://en.wikipedia.org/wiki/Discrete_sine_transform#DST-I</a>).
-</p></dd></dl>
-
-<a name="cosfft"></a><dl>
-<dt><a name="index-cosfft"></a>Команда MGL: <em></em> <strong>cosfft</strong> <em>dat 'dir'</em></dt>
-<dd><p>Выполняет косинус преобразование в выбранном направлении(ях). Синус преобразование есть <em>\sum a_j \cos(k j)</em> (см. <a href="http://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-I">http://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-I</a>).
-</p></dd></dl>
-
-
-<a name="hankel"></a><dl>
-<dt><a name="index-hankel"></a>Команда MGL: <em></em> <strong>hankel</strong> <em>dat 'dir'</em></dt>
-<dd><p>Выполняет преобразование Ханкеля в выбранном направлении(ях). Преобразование Ханкеля есть <em>\sum a_j J_0(k j)</em> (см. <a href="http://en.wikipedia.org/wiki/Hankel_transform">http://en.wikipedia.org/wiki/Hankel_transform</a>).
-</p></dd></dl>
-
-<a name="wavelet"></a><dl>
-<dt><a name="index-wavelet"></a>Команда MGL: <em></em> <strong>wavelet</strong> <em>dat 'dir' <code>k</code></em></dt>
-<dd><p>Выполняет преобразование wavelet в выбранном направлении(ях). Параметр <var>dir</var> задает тип:
-`<samp>d</samp>` для daubechies, `<samp>D</samp>` для центрированного daubechies, `<samp>h</samp>` для haar, `<samp>H</samp>` для центрированного haar, `<samp>b</samp>` для bspline, `<samp>B</samp>` для центрированного bspline. Если указан символ `<samp>i</samp>`, то выполняется обратное преобразование. Параметр <var>k</var> задает размер преобразования.
-</p></dd></dl>
-
-<a name="swap"></a><dl>
-<dt><a name="index-swap"></a>Команда MGL: <em></em> <strong>swap</strong> <em>dat 'dir'</em></dt>
-<dd><p>Меняет местами левую и правую части данных в выбранном направлении(ях). Полезно для отображения результата FFT.
-</p></dd></dl>
-
-<a name="roll"></a><dl>
-<dt><a name="index-roll"></a>Команда MGL: <em></em> <strong>roll</strong> <em>dat 'dir' num</em></dt>
-<dd><p>Сдвигает данные на <var>num</var> ячеек в выбранном направлении(ях). Соответствует замене индекса на <var>i</var>->(i+<var>num</var>)%nx при <code>dir='x'</code>.
-</p></dd></dl>
-
-<a name="mirror"></a><dl>
-<dt><a name="index-mirror"></a>Команда MGL: <em></em> <strong>mirror</strong> <em>dat 'dir'</em></dt>
-<dd><p>Отражает данные в выбранном направлении(ях). Соответствует замене индекса на <var>i</var>-><var>n</var>-<var>i</var>. Отмечу, что похожего эффекта на графике можно достичь используя опции (see <a href="#Command-options">Command options</a>), например, <code>surf dat; xrange 1 -1</code>.
-</p></dd></dl>
-
-<a name="sew"></a><dl>
-<dt><a name="index-sew"></a>Команда MGL: <em></em> <strong>sew</strong> <em>dat ['dir'='xyz' <code>da=2*pi</code>]</em></dt>
-<dd><p>Удаляет скачки данных (например, скачки фазы после обратных тригонометрических функций) с периодом <var>da</var> в выбранном направлении(ях).
-</p></dd></dl>
-
-<a name="smooth"></a><dl>
-<dt><a name="index-smooth"></a>Команда MGL: <em></em> <strong>smooth</strong> <em>data ['dir'='xyz']</em></dt>
-<dd><p>Сглаживает данные в выбранном направлении(ях) <var>dir</var>. Строка <var>dirs</var> задает направления вдоль которых будет производиться сглаживание. Строка <var>dir</var> может содержать:
-</p><ul>
-<li> `<samp>xyz</samp>` - сглаживание по x-,y-,z-направлениям,
-</li><li> `<samp>0</samp>` - ничего не делает,
-</li><li> `<samp>3</samp>` - линейное усреднение по 3 точкам,
-</li><li> `<samp>5</samp>` - линейное усреднение по 5 точкам,
-</li><li> `<samp>d1</samp>`...`<samp>d9</samp>` - линейное усреднение по (2*N+1) точкам.
-</li></ul>
-<p>По умолчанию используется квадратичное усреднение по 5 точкам.
-</p></dd></dl>
-
-<a name="envelop"></a><dl>
-<dt><a name="index-envelop"></a>Команда MGL: <em></em> <strong>envelop</strong> <em>dat ['dir'='x']</em></dt>
-<dd><p>Находит огибающую данных в выбранном направлении <var>dir</var>.
-</p></dd></dl>
-
-<a name="diffract"></a><dl>
-<dt><a name="index-diffract"></a>Команда MGL: <em></em> <strong>diffract</strong> <em>dat 'how' <code>q</code></em></dt>
-<dd><p>Вычисляет один шаг диффракции в конечно-разностной схеме с параметром <var>q</var>=<em>\delta t/\delta x^2</em> используя метод третьего порядка точности. Параметр <var>how</var> может содержать:
-</p><ul>
-<li> `<samp>xyz</samp>` для расчета вдоль x-,y-,z-направления;
-</li><li> `<samp>r</samp>` для аксиально симметричного лапласиана по направлению x;
-</li><li> `<samp>0</samp>` для нулевых граничных условий;
-</li><li> `<samp>1</samp>` для постоянных граничных условий;
-</li><li> `<samp>2</samp>` для линейных граничных условий;
-</li><li> `<samp>3</samp>` для параболлических граничных условий;
-</li><li> `<samp>4</samp>` для экспоненциальных граничных условий;
-</li><li> `<samp>5</samp>` для гауссовых граничных условий.
-</li></ul>
-</dd></dl>
-
-<a name="norm"></a><dl>
-<dt><a name="index-norm"></a>Команда MGL: <em></em> <strong>norm</strong> <em>dat <code>v1 v2 [sym=off dim=0]</code></em></dt>
-<dd><p>Нормирует данные в интервал [<var>v1</var>,<var>v2</var>]. Если <var>sym</var>=<code>true</code>, то используется симметричный интервал [-max(|v1|,|v2|), max(|v1|,|v2|)]. Изменения применяются только к срезам >=<var>dim</var>.
-</p></dd></dl>
-
-<a name="normsl"></a><dl>
-<dt><a name="index-normsl"></a>Команда MGL: <em></em> <strong>normsl</strong> <em>dat <code>v1 v2</code> ['dir'='z' <code>keep=on sym=off</code>]</em></dt>
-<dd><p>Нормирует данные срез-за-срезом в выбранном направлении <var>dir</var> в интервал [<var>v1</var>,<var>v2</var>]. Если <var>sym</var>=<code>true</code>, то используется симметричный интервал [-max(|v1|,|v2|), max(|v1|,|v2|)]. Если <var>keep</var>=<code>true</code>, то максимальное значение k-го среза ограничено величиной
-<em>\sqrt{\sum a_ij(k)/\sum a_ij(0)}</em>.
-</p></dd></dl>
-
-<a name="limit"></a><dl>
-<dt><a name="index-limit"></a>Команда MGL: <em></em> <strong>limit</strong> <em>dat <code>val</code></em></dt>
-<dd><p>Ограничивает амплитуду данных диапазоном [-<var>val</var>,<var>val</var>]. При этом сохраняется исходный знак (фаза для комплексных чисел). Эквивалентно операции <code>a[i] *= abs(a[i])<val?1.:val/abs(a[i]);</code>.
-</p></dd></dl>
-
-<a name="coil"></a><dl>
-<dt><a name="index-coil"></a>Команда MGL: <em></em> <strong>coil</strong> <em>dat <code>v1 v2 [sep=on]</code></em></dt>
-<dd><p>Проецирует периодические данные на диапазон [<var>v1</var>,<var>v2</var>] (аналогично функции <code>mod()</code>). Разделяет ветки по значениям равным <code>NAN</code> если <var>sep</var>=<code>true</code>.
-</p></dd></dl>
-
-<a name="dilate"></a><dl>
-<dt><a name="index-dilate"></a>Команда MGL: <em></em> <strong>dilate</strong> <em>dat <code>[val=1 step=1]</code></em></dt>
-<dd><p>Возвращает "расширенный" на <var>step</var> ячеек массив из 0 и 1 для данных больших порогового значения <var>val</var>. </p></dd></dl>
-
-<a name="erode"></a><dl>
-<dt><a name="index-erode"></a>Команда MGL: <em></em> <strong>erode</strong> <em>dat <code>[val=1 step=1]</code></em></dt>
-<dd><p>Возвращает "суженный" на <var>step</var> ячеек массив из 0 и 1 для данных больших порогового значения <var>val</var>. </p></dd></dl>
-
-
-<hr>
-<a name="Interpolation"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-information" accesskey="n" rel="next">Data information</a>, Previous: <a href="#Data-changing" accesskey="p" rel="prev">Data changing</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Interpolyaciya"></a>
-<h3 class="section">4.8 Интерполяция</h3>
-
-
-<p>Скрипты MGL могут использовать интерполяцию кубическими сплайнами с помощью команд <a href="#evaluate">evaluate</a> или <a href="#refill">refill</a>. Также можно использовать <a href="#resize">resize</a> для массива с новыми размерами.
-</p>
-
-
-<hr>
-<a name="Data-information"></a>
-<div class="header">
-<p>
-Next: <a href="#Operators" accesskey="n" rel="next">Operators</a>, Previous: <a href="#Interpolation" accesskey="p" rel="prev">Interpolation</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Informacionnye-funkcii"></a>
-<h3 class="section">4.9 Информационные функции</h3>
-
-
-<p>В MathGL есть ряд функций для получения свойств массива данных. В MGL скриптах большинство из них реализовано в виде "суффиксов". Суффиксы дают числовое значение некоторой характеристики массива данных. Например, его размер, минимальное и максимальное значение, сумму элементов и т.д. Суффиксы начинаются с точки `<samp>.</samp>` сразу после массива (без пробелов). Например, <code>a.nx</code> даст размер массива <var>a</var> вдоль x, <code>b(1).max</code> даст максимальное значение второй колонки массива <var>b</var>, <code>(c(:,0)^2).sum</code> даст сумму квадратов в первой строке массива <var>c</var> и т.д.
-</p>
-
-<a name="index-PrintInfo"></a>
-<a name="info"></a><dl>
-<dt><a name="index-info"></a>Команда MGL: <em></em> <strong>info</strong> <em>dat</em></dt>
-<dd><p>Возвращает строку с информацией о данных (размеры, моменты и пр.) или пишет её в файл. В MGL скрипте печатает её как сообщение.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-info-1"></a>Команда MGL: <em></em> <strong>info</strong> <em>'txt'</em></dt>
-<dd><p>Печатает строку <var>txt</var> как сообщение.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-info-2"></a>Команда MGL: <em></em> <strong>info</strong> <em>val</em></dt>
-<dd><p>Печатает значение числа <var>val</var> как сообщение.
-</p></dd></dl>
-
-<a name="print"></a><dl>
-<dt><a name="index-print"></a>Команда MGL: <em></em> <strong>print</strong> <em>dat</em></dt>
-<dt><a name="index-print-1"></a>Команда MGL: <em></em> <strong>print</strong> <em>'txt'</em></dt>
-<dt><a name="index-print-2"></a>Команда MGL: <em></em> <strong>print</strong> <em>val</em></dt>
-<dd><p>Аналогично <a href="#info">info</a>, но сразу выводит в stdout.
-</p></dd></dl>
-
-<a name="echo"></a><dl>
-<dt><a name="index-echo"></a>Команда MGL: <em></em> <strong>echo</strong> <em>dat</em></dt>
-<dd><p>Печатает все значения массива <var>dat</var> как сообщение.
-</p></dd></dl>
-
-<a name="progress"></a><dl>
-<dt><a name="index-progress"></a>Команда MGL: <em></em> <strong>progress</strong> <em><code>val max</code></em></dt>
-<dd><p>Отображает прогресс чего-либо как заполненную полоску с относительной длиной <var>val</var>/<var>max</var>. На данный момент работает только в консоли и основанных на FLTK программах, включая <code>mgllab</code> и <code>mglview</code>.
-</p></dd></dl>
-
-
-<a name="index-GetNx"></a>
-<a name="index-GetNy"></a>
-<a name="index-GetNz"></a>
-<a name="g_t_002enx"></a><a name="g_t_002eny"></a><a name="g_t_002enz"></a><dl>
-<dt><a name="index-_002enx"></a>MGL suffix: <em>(dat)</em> <strong>.nx</strong></dt>
-<dt><a name="index-_002eny"></a>MGL suffix: <em>(dat)</em> <strong>.ny</strong></dt>
-<dt><a name="index-_002enz"></a>MGL suffix: <em>(dat)</em> <strong>.nz</strong></dt>
-<dd><p>Возвращает размер данных в направлении x, y и z соответственно.
-</p></dd></dl>
-
-
-
-<a name="index-Maximal"></a>
-<a name="g_t_002emax"></a><dl>
-<dt><a name="index-_002emax"></a>MGL suffix: <em>(dat)</em> <strong>.max</strong></dt>
-<dd><p>Возвращает максимальное значение массива данных.
-</p></dd></dl>
-
-<a name="index-Minimal"></a>
-<a name="g_t_002emin"></a><dl>
-<dt><a name="index-_002emin"></a>MGL suffix: <em>(dat)</em> <strong>.min</strong></dt>
-<dd><p>Возвращает минимальное значение массива данных.
-</p></dd></dl>
-
-
-<a name="g_t_002emx"></a><a name="g_t_002emy"></a><a name="g_t_002emz"></a><dl>
-<dt><a name="index-_002emx"></a>MGL suffix: <em>(dat)</em> <strong>.mx</strong></dt>
-<dt><a name="index-_002emy"></a>MGL suffix: <em>(dat)</em> <strong>.my</strong></dt>
-<dt><a name="index-_002emz"></a>MGL suffix: <em>(dat)</em> <strong>.mz</strong></dt>
-<dd><p>Возвращает минимальное значение массива данных и его приближенное (интерполированное) положение в переменные <var>x</var>, <var>y</var>, <var>z</var>.
-</p></dd></dl>
-
-<a name="g_t_002emxf"></a><a name="g_t_002emyf"></a><a name="g_t_002emzf"></a><a name="g_t_002emxl"></a><a name="g_t_002emyl"></a><a name="g_t_002emzl"></a><dl>
-<dt><a name="index-_002emxf"></a>MGL suffix: <em>(dat)</em> <strong>.mxf</strong></dt>
-<dt><a name="index-_002emyf"></a>MGL suffix: <em>(dat)</em> <strong>.myf</strong></dt>
-<dt><a name="index-_002emzf"></a>MGL suffix: <em>(dat)</em> <strong>.mzf</strong></dt>
-<dt><a name="index-_002emxl"></a>MGL suffix: <em>(dat)</em> <strong>.mxl</strong></dt>
-<dt><a name="index-_002emyl"></a>MGL suffix: <em>(dat)</em> <strong>.myl</strong></dt>
-<dt><a name="index-_002emzl"></a>MGL suffix: <em>(dat)</em> <strong>.mzl</strong></dt>
-<dd><p>Возвращает положение первого (последнего при <var>from</var><0) максимума в направлении <var>dir</var>, начиная с позиции <var>from</var>. Положение остальных координат для максимума сохраняется в <var>p1</var>, <var>p2</var>.
-</p></dd></dl>
-
-
-<a name="index-Momentum-1"></a>
-<a name="g_t_002eax"></a><a name="g_t_002eay"></a><a name="g_t_002eaz"></a><a name="g_t_002eaa"></a><a name="g_t_002esum"></a><a name="g_t_002ewx"></a><a name="g_t_002ewy"></a><a name="g_t_002ewz"></a><a name="g_t_002ewa"></a><a name="g_t_002esx"></a><a name="g_t_002esy"></a><a name="g_t_002esz"></a><a name="g_t_002esa"></a><a name="g_t_002ekx"></a><a name="g_t_002eky"></a><a name="g_t_002ekz"></a><a name="g_t_002eka"></a><dl>
-<dt><a name="index-_002esum"></a>MGL suffix: <em>(dat)</em> <strong>.sum</strong></dt>
-<dt><a name="index-_002eax"></a>MGL suffix: <em>(dat)</em> <strong>.ax</strong></dt>
-<dt><a name="index-_002eay"></a>MGL suffix: <em>(dat)</em> <strong>.ay</strong></dt>
-<dt><a name="index-_002eaz"></a>MGL suffix: <em>(dat)</em> <strong>.az</strong></dt>
-<dt><a name="index-_002eaa"></a>MGL suffix: <em>(dat)</em> <strong>.aa</strong></dt>
-<dt><a name="index-_002ewx"></a>MGL suffix: <em>(dat)</em> <strong>.wx</strong></dt>
-<dt><a name="index-_002ewy"></a>MGL suffix: <em>(dat)</em> <strong>.wy</strong></dt>
-<dt><a name="index-_002ewz"></a>MGL suffix: <em>(dat)</em> <strong>.wz</strong></dt>
-<dt><a name="index-_002ewa"></a>MGL suffix: <em>(dat)</em> <strong>.wa</strong></dt>
-<dt><a name="index-_002esx"></a>MGL suffix: <em>(dat)</em> <strong>.sx</strong></dt>
-<dt><a name="index-_002esy"></a>MGL suffix: <em>(dat)</em> <strong>.sy</strong></dt>
-<dt><a name="index-_002esz"></a>MGL suffix: <em>(dat)</em> <strong>.sz</strong></dt>
-<dt><a name="index-_002esa"></a>MGL suffix: <em>(dat)</em> <strong>.sa</strong></dt>
-<dt><a name="index-_002ekx"></a>MGL suffix: <em>(dat)</em> <strong>.kx</strong></dt>
-<dt><a name="index-_002eky"></a>MGL suffix: <em>(dat)</em> <strong>.ky</strong></dt>
-<dt><a name="index-_002ekz"></a>MGL suffix: <em>(dat)</em> <strong>.kz</strong></dt>
-<dt><a name="index-_002eka"></a>MGL suffix: <em>(dat)</em> <strong>.ka</strong></dt>
-<dd><p>Возвращает нулевой момент (энергию, <em>I=\sum a_i</em>) и записывает первый (среднее, <em>m = \sum \xi_i a_i/I</em>), второй (ширину, <em>w^2 = \sum (\xi_i-m)^2 a_i/I</em>), третий (асимметрия, <em>s = \sum (\xi_i-m)^3 a_i/ I w^3</em>) и четвёртый моменты (эксцесс, <em>k = \sum (\xi_i-m)^4 a_i / 3 I w^4</em>)). Здесь <em>\xi</em> - соответствующая координата если <var>dir</var> равно `<samp>'x'</samp>`, `<samp>'y'</samp>`, `<samp>'z'</samp>`. В противном случае среднее, ширина, асимметрия, эксцесс равны <em>m = \sum a_i/N</em>, <em>w^2 = \sum (a_i-m)^2/N</em> и т.д.
-</p></dd></dl>
-
-<a name="g_t_002efst"></a><dl>
-<dt><a name="index-_002efst"></a>MGL suffix: <em>(dat)</em> <strong>.fst</strong></dt>
-<dd><p>Находит положение (после заданного в <var>i</var>, <var>j</var>, <var>k</var>) первого не нулевого значения формулы <var>cond</var>. Функция возвращает найденное значение и записывает его положение в <var>i</var>, <var>j</var>, <var>k</var>.
-</p></dd></dl>
-
-<a name="g_t_002elst"></a><dl>
-<dt><a name="index-_002elst"></a>MGL suffix: <em>(dat)</em> <strong>.lst</strong></dt>
-<dd><p>Находит положение (перед заданного в <var>i</var>, <var>j</var>, <var>k</var>) последнего не нулевого значения формулы <var>cond</var>. Функция возвращает найденное значение и записывает его положение в <var>i</var>, <var>j</var>, <var>k</var>.
-</p></dd></dl>
-
-
-<a name="g_t_002ea"></a><dl>
-<dt><a name="index-_002ea"></a>MGL suffix: <em>(dat)</em> <strong>.a</strong></dt>
-<dd><p>Возвращает первое число массива (для <code>.a</code> это <code>dat->a[0]</code>).
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Operators"></a>
-<div class="header">
-<p>
-Next: <a href="#Global-functions" accesskey="n" rel="next">Global functions</a>, Previous: <a href="#Data-information" accesskey="p" rel="prev">Data information</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Operatory"></a>
-<h3 class="section">4.10 Операторы</h3>
-
-
-<dl>
-<dt><a name="index-copy-4"></a>Команда MGL: <em></em> <strong>copy</strong> <em><small>DAT</small> dat2 ['eq'='']</em></dt>
-<dd><p>Копирует данные из другого экземпляра.
-</p></dd></dl>
-
-<dl>
-<dt><a name="index-copy-5"></a>Команда MGL: <em></em> <strong>copy</strong> <em>dat <code>val</code></em></dt>
-<dd><p>Устанавливает все значения массива равными <var>val</var>.
-</p></dd></dl>
-
-<a name="multo"></a><dl>
-<dt><a name="index-multo"></a>Команда MGL: <em></em> <strong>multo</strong> <em>dat dat2</em></dt>
-<dt><a name="index-multo-1"></a>Команда MGL: <em></em> <strong>multo</strong> <em>dat <code>val</code></em></dt>
-<dd><p>Поэлементно умножает на массив <var>d</var> или на число <var>val</var>.
-</p></dd></dl>
-
-<a name="divto"></a><dl>
-<dt><a name="index-divto"></a>Команда MGL: <em></em> <strong>divto</strong> <em>dat dat2</em></dt>
-<dt><a name="index-divto-1"></a>Команда MGL: <em></em> <strong>divto</strong> <em>dat <code>val</code></em></dt>
-<dd><p>Поэлементно делит на массив <var>d</var> или на число <var>val</var>.
-</p></dd></dl>
-
-<a name="addto"></a><dl>
-<dt><a name="index-addto"></a>Команда MGL: <em></em> <strong>addto</strong> <em>dat dat2</em></dt>
-<dt><a name="index-addto-1"></a>Команда MGL: <em></em> <strong>addto</strong> <em>dat <code>val</code></em></dt>
-<dd><p>Поэлементно прибавляет <var>d</var> или число <var>val</var>.
-</p></dd></dl>
-
-<a name="subto"></a><dl>
-<dt><a name="index-subto"></a>Команда MGL: <em></em> <strong>subto</strong> <em>dat dat2</em></dt>
-<dt><a name="index-subto-1"></a>Команда MGL: <em></em> <strong>subto</strong> <em>dat <code>val</code></em></dt>
-<dd><p>Поэлементно вычитает <var>d</var> или число <var>val</var>.
-</p></dd></dl>
-
-
-
-<hr>
-<a name="Global-functions"></a>
-<div class="header">
-<p>
-Next: <a href="#Evaluate-expression" accesskey="n" rel="next">Evaluate expression</a>, Previous: <a href="#Operators" accesskey="p" rel="prev">Operators</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Globalxnye-funkcii"></a>
-<h3 class="section">4.11 Глобальные функции</h3>
-
-
-
-<a name="transform"></a><dl>
-<dt><a name="index-transform"></a>Команда MGL: <em></em> <strong>transform</strong> <em><small>DAT</small> 'type' real imag</em></dt>
-<dd><p>Выполняет интегральное преобразование комплексных данных <var>real</var>, <var>imag</var> в выбранном направлении и возвращает модуль результата. Порядок и тип преобразований задается строкой <var>type</var>: первый символ для x-направления, второй для y-направления, третий для z-направления. Возможные символы: `<samp>f</samp>` - прямое преобразование Фурье, `<samp>i</samp>` - обратное преобразование Фурье, `<samp>s</samp>` - синус преобразование, `<samp>c</samp>` - косинус преобразование, `<samp>h</samp>` - преобразование Ханкеля, `<samp>n</samp>` или `<samp> </samp>` - нет преобразования.
-</p></dd></dl>
-
-<a name="transforma"></a><dl>
-<dt><a name="index-transforma"></a>Команда MGL: <em></em> <strong>transforma</strong> <em><small>DAT</small> 'type' ampl phase</em></dt>
-<dd><p>Аналогично предыдущему с заданными амплитудой <var>ampl</var> и фазой <var>phase</var> комплексных чисел.
-</p></dd></dl>
-
-<a name="fourier"></a><dl>
-<dt><a name="index-fourier"></a>Команда MGL: <em></em> <strong>fourier</strong> <em>reDat imDat 'dir'</em></dt>
-<dt><a name="index-fourier-1"></a>Команда MGL: <em></em> <strong>fourier</strong> <em>complexDat 'dir'</em></dt>
-<dd><p>Выполняет Фурье преобразование для комплексных данных <var>re</var>+i*<var>im</var> в направлениях <var>dir</var>. Результат помещается обратно в массивы <var>re</var> и <var>im</var>. Если <var>dir</var> содержит `<samp>i</samp>`, то выполняется обратное преобразование Фурье.
-</p></dd></dl>
-
-<a name="stfad"></a><dl>
-<dt><a name="index-stfad"></a>Команда MGL: <em></em> <strong>stfad</strong> <em><small>RES</small> real imag <code>dn</code> ['dir'='x']</em></dt>
-<dd><p>Выполняет оконное преобразование Фурье длиной <var>dn</var> для комплексных данных <var>real</var>, <var>imag</var> и возвращает модуль результата. Например, для <var>dir</var>=`<samp>x</samp>` результат будет иметь размер {int(nx/dn), dn, ny} и будет равен <em>res[i,j,k]=|\sum_d^dn exp(I*j*d)*(real[i*dn+d,k]+I*imag[i*dn+d,k])|/dn</em>.
-</p></dd></dl>
-
-
-<a name="triangulate"></a><dl>
-<dt><a name="index-triangulate"></a>Команда MGL: <em></em> <strong>triangulate</strong> <em>dat xdat ydat</em></dt>
-<dd><p>Выполняет триангуляцию Делоне для точек на плоскости и возвращает массив, пригодный для <a href="#triplot">triplot</a> и <a href="#tricont">tricont</a>. См. <a href="#Making-regular-data">Making regular data</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="tridmat"></a><dl>
-<dt><a name="index-tridmat"></a>Команда MGL: <em></em> <strong>tridmat</strong> <em><small>RES ADAT BDAT CDAT DDAT</small> 'how'</em></dt>
-<dd><p>Возвращает решение трехдиагональной системы уравнений <var>A</var>[i]*x[i-1]+<var>B</var>[i]*x[i]+<var>C</var>[i]*x[i+1]=<var>D</var>[i]. Строка <var>how</var> может содержать:
-</p><ul>
-<li> `<samp>xyz</samp>` для решения вдоль x-,y-,z-направлений;
-</li><li> `<samp>h</samp>` для решения вдоль диагонали на плоскости x-y (требует квадратную матрицу);
-</li><li> `<samp>c</samp>` для использования периодических граничных условий;
-</li><li> `<samp>d</samp>` для расчета диффракции/диффузии (т.е. для использования -<var>A</var>[i]*<var>D</var>[i-1]+(2-<var>B</var>[i])*<var>D</var>[i]-<var>C</var>[i]*<var>D</var>[i+1] в правой частиц вместо <var>D</var>[i]).
-</li></ul>
-<p>Размеры массивов <var>A</var>, <var>B</var>, <var>C</var> должны быть одинаковы. Также их размерности должны совпадать со всеми или с "младшими" размерностями массива <var>D</var>. См. <a href="#PDE-solving-hints">PDE solving hints</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="pde"></a><dl>
-<dt><a name="index-pde-1"></a>Команда MGL: <em></em> <strong>pde</strong> <em><small>RES</small> 'ham' ini_re ini_im [<code>dz=0.1 k0=100</code>]</em></dt>
-<dd><p>Решает уравнение в частных производных du/dz = i*k0*<var>ham</var>(p,q,x,y,z,|u|)[u], где p=-i/k0*d/dx, q=-i/k0*d/dy - псевдо-дифференциальные операторы. Параметры <var>ini_re</var>, <var>ini_im</var> задают начальное распределение поля. Координаты в уравнении и в решении полагаются в диапазоне осей координат. Замечу, что внутри этот диапазон увеличивается в 3/2 раза для уменьшения отражения от границ расчетного интервала. Параметр <var>dz</var> задает шаг по эволюционной координате z. В данный момент использован упрощенный алгоритм, когда все “смешанные” члена (типа `<samp>x*p</samp>`->x*d/dx) исключаются. Например, в 2D случае это функции типа <em>ham = f(p,z) + g(x,z,u)</em>. При этом допускаются коммутирующие комбинации (типа `<samp>x*q</samp>`->x*d/dy). Переменная `<samp>u</samp>` используется для обозначения амплитуды поля |u|. Это позволяет решать нелинейные задачи - например, нелинейное уравнение Шредингера <code>ham='p^2+q^2-u^2'</code>. Также можно указать мнимую часть для поглощения (типа <code>ham = 'p^2+i*x*(x>0)'</code>). См. также <a href="#apde">apde</a>, <a href="#qo2d">qo2d</a>, <a href="#qo3d">qo3d</a>. См. <a href="#PDE-solving-hints">PDE solving hints</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="apde"></a><dl>
-<dt><a name="index-apde"></a>Команда MGL: <em></em> <strong>apde</strong> <em><small>RES</small> 'ham' ini_re ini_im [<code>dz=0.1 k0=100</code>]</em></dt>
-<dd><p>Решает уравнение в частных производных du/dz = i*k0*<var>ham</var>(p,q,x,y,z,|u|)[u], где p=-i/k0*d/dx, q=-i/k0*d/dy - псевдо-дифференциальные операторы. Параметры <var>ini_re</var>, <var>ini_im</var> задают начальное распределение поля. Координаты в уравнении и в решении полагаются в диапазоне осей координат. Замечу, что внутри этот диапазон увеличивается в 3/2 раза для уменьшения отражения от границ расчетного интервала. Параметр <var>dz</var> задает шаг по эволюционной координате z. Используется достаточно сложный и медленный алгоритм, способный учесть одновременное влияние пространственной дисперсии и неоднородности среды [см. А.А. Балакин, Е.Д. Господчиков, А.Г. Шалашов, Письма ЖЭТФ 104, 701 (2016)]. Переменная `<samp>u</samp>` используется для обозначения амплитуды поля |u|. Это позволяет решать нелинейные задачи - например, нелинейное уравнение Шредингера <code>ham='p^2+q^2-u^2'</code>. Также можно указать мнимую часть для поглощения (типа <code>ham = 'p^2+i*x*(x>0)'</code>). См. также <a href="#apde">apde</a>. См. <a href="#PDE-solving-hints">PDE solving hints</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="ray"></a><dl>
-<dt><a name="index-ray"></a>Команда MGL: <em></em> <strong>ray</strong> <em><small>RES</small> 'ham' <code>x0 y0 z0 p0 q0 v0 [dt=0.1 tmax=10]</code></em></dt>
-<dd><p>Решает систему геометрооптических уравнений d<em>r</em>/dt = d <var>ham</var>/d<em>p</em>, d<em>p</em>/dt = -d <var>ham</var>/d<em>r</em>. Это гамильтоновы уравнения для траектории частицы в 3D случае. Гамильтониан <var>ham</var> может зависеть от координат `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`, импульсов `<samp>p</samp>`=px, `<samp>q</samp>`=py, `<samp>v</samp>`=pz и времени `<samp>t</samp>`: <em>ham = H(x,y,z,p,q,v,t)</em>. Начальная точка (при <code>t=0</code>) задается переменными {<var>x0</var>, <var>y0</var>, <var>z0</var>, <var>p0</var>, <var>q0</var>, <var>v0</var>}. Параметры <var>dt</var> и <var>tmax</var> задают шаг и максимальное время интегрирования. Результат - массив {x,y,z,p,q,v,t} с размером {7 * int(<var>tmax</var>/<var>dt</var>+1) }.
-</p></dd></dl>
-
-<a name="ode"></a><dl>
-<dt><a name="index-ode"></a>Команда MGL: <em></em> <strong>ode</strong> <em><small>RES</small> 'df' 'var' ini [<code>dt=0.1 tmax=10</code>]</em></dt>
-<dd><p>Решает систему обыкновенных дифференциальных уравнений dx/dt = df(x). Функции <var>df</var> могут быть заданны строкой с разделенными `;` формулами (аргумент <var>var</var> задает символы для переменных x[i]) или указателем на функцию, которая заполняет <code>dx</code> по заданным значениям <code>x</code>. Параметры <var>ini</var>, <var>dt</var>, <var>tmax</var> задают начальные значения, шаг и максимальное время интегрирования. Функция обрывает расчет при появлении значений <code>NAN</code> или <code>INF</code>. Результат - массив размером {<var>n</var> * <var>Nt</var>}, где <var>Nt</var> <= int(<var>tmax</var>/<var>dt</var>+1).
-</p></dd></dl>
-
-<a name="qo2d"></a><dl>
-<dt><a name="index-qo2d"></a>Команда MGL: <em></em> <strong>qo2d</strong> <em><small>RES</small> 'ham' ini_re ini_im ray [<code>r=1 k0=100</code> xx yy]</em></dt>
-<dd><p>Решает уравнение в частных производных du/dt = i*k0*<var>ham</var>(p,q,x,y,|u|)[u] в сопровождающей системе координат, где p=-i/k0*d/dx, q=-i/k0*d/dy - псевдо-дифференциальные операторы. Параметры <var>ini_re</var>, <var>ini_im</var> задают начальное распределение поля. Параметр <var>ray</var> задает опорный луч для сопровождающей системы координат. Можно использовать луч найденный с помощью <a href="#ray">ray</a>. Опорный луч должен быть достаточно гладкий, чтобы система координат была однозначной и для исключения ошибок интегрирования. Если массивы <var>xx</var> и <var>yy</var> указаны, то в них записываются декартовы координаты для каждой точки найденного решения. См. также <a href="#pde">pde</a>, <a href="#qo3d">qo3d</a>. См. <a href="#PDE-solving-hints">PDE solving hints</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="qo3d"></a><dl>
-<dt><a name="index-qo3d"></a>Команда MGL: <em></em> <strong>qo3d</strong> <em><small>RES</small> 'ham' ini_re ini_im ray [<code>r=1 k0=100</code> xx yy zz]</em></dt>
-<dd><p>Решает уравнение в частных производных du/dt = i*k0*<var>ham</var>(p,q,v,x,y,z,|u|)[u] в сопровождающей системе координат, где p=-i/k0*d/dx, q=-i/k0*d/dy, v=-i/k0*d/dz - псевдо-дифференциальные операторы. Параметры <var>ini_re</var>, <var>ini_im</var> задают начальное распределение поля. Параметр <var>ray</var> задает опорный луч для сопровождающей системы координат. Можно использовать луч найденный с помощью <a href="#ray">ray</a>. Опорный луч должен быть достаточно гладкий, чтобы система координат была однозначной и для исключения ошибок интегрирования. Если массивы <var>xx</var>, <var>yy</var> и <var>zz</var> указаны, то в них записываются декартовы координаты для каждой точки найденного решения. См. также <a href="#pde">pde</a>, <a href="#qo2d">qo2d</a>.
-</p></dd></dl>
-
-<a name="jacobian"></a><dl>
-<dt><a name="index-jacobian"></a>Команда MGL: <em></em> <strong>jacobian</strong> <em><small>RES</small> xdat ydat [zdat]</em></dt>
-<dd><p>Вычисляет якобиан преобразования {i,j,k} в {<var>x</var>,<var>y</var>,<var>z</var>}, где координаты {i,j,k} полагаются нормированными в интервал [0,1]. Якобиан находится по формуле det||<em>dr_\alpha/d\xi_\beta</em>||, где <em>r</em>={<var>x</var>,<var>y</var>,<var>z</var>} и <em>\xi</em>={i,j,k}. Все размерности всех массивов должны быть одинаковы. Данные должны быть трехмерными если указаны все 3 массива {<var>x</var>,<var>y</var>,<var>z</var>} или двумерными если только 2 массива {<var>x</var>,<var>y</var>}.
-</p></dd></dl>
-
-<a name="triangulation"></a><dl>
-<dt><a name="index-triangulation"></a>Команда MGL: <em></em> <strong>triangulation</strong> <em><small>RES</small> xdat ydat [zdat]</em></dt>
-<dd><p>Выполняет триангуляцию для произвольно расположенных точек с координатами {<var>x</var>,<var>y</var>,<var>z</var>} (т.е. находит треугольники, соединяющие точки). Первая размерность всех массивов должна быть одинакова <code>x.nx=y.nx=z.nx</code>. Получившийся массив можно использовать в <a href="#triplot">triplot</a> или <a href="#tricont">tricont</a> для визуализации реконструированной поверхности. См. <a href="#Making-regular-data">Making regular data</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-
-<a name="ifs2d"></a><dl>
-<dt><a name="index-ifs2d"></a>Команда MGL: <em></em> <strong>ifs2d</strong> <em><small>RES</small> dat <code>num</code> [<code>skip=20</code>]</em></dt>
-<dd><p>Находит <var>num</var> точек {x[i]=res[0,i], y[i]=res[1,i]} фрактала с использованием итерационной системы функций (IFS). Матрица <var>dat</var> используется для генерации в соответствии с формулами
-</p><pre class="verbatim">x[i+1] = dat[0,i]*x[i] + dat[1,i]*y[i] + dat[4,i];
-y[i+1] = dat[2,i]*x[i] + dat[3,i]*y[i] + dat[5,i];
-</pre><p>Значение <code>dat[6,i]</code> - весовой коэффициент для i-ой строки матрицы <var>dat</var>. Первые <var>skip</var> итераций будут опущены. Массив <var>dat</var> должен иметь размер по x больше или равный 7. См. также <a href="#ifs3d">ifs3d</a>, <a href="#flame2d">flame2d</a>. См. <a href="#ifs2d-sample">ifs2d sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="ifs3d"></a><dl>
-<dt><a name="index-ifs3d"></a>Команда MGL: <em></em> <strong>ifs3d</strong> <em><small>RES</small> dat <code>num</code> [<code>skip=20</code>]</em></dt>
-<dd><p>Находит <var>num</var> точек {x[i]=res[0,i], y[i]=res[1,i], z[i]=res[2,i]} фрактала с использованием итерационной системы функций (IFS). Матрица <var>dat</var> используется для генерации в соответствии с формулами
-</p><pre class="verbatim">x[i+1] = dat[0,i]*x[i] + dat[1,i]*y[i] + dat[2,i]*z[i] + dat[9,i];
-y[i+1] = dat[3,i]*x[i] + dat[4,i]*y[i] + dat[5,i]*z[i] + dat[10,i];
-z[i+1] = dat[6,i]*x[i] + dat[7,i]*y[i] + dat[8,i]*z[i] + dat[11,i];
-</pre><p>Значение <code>dat[12,i]</code> - весовой коэффициент для i-ой строки матрицы <var>dat</var>. Первые <var>skip</var> итераций будут опущены. Массив <var>dat</var> должен иметь размер по x больше или равный 13. См. также <a href="#ifs2d">ifs2d</a>. См. <a href="#ifs3d-sample">ifs3d sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-<a name="ifsfile"></a><dl>
-<dt><a name="index-ifsfile"></a>Команда MGL: <em></em> <strong>ifsfile</strong> <em><small>RES</small> 'fname' 'name' <code>num</code> [<code>skip=20</code>]</em></dt>
-<dd><p>Считывает параметры фрактала <var>name</var> из файла <var>fname</var> и находит <var>num</var> точек для него. Первые <var>skip</var> итераций будут опущены. См. также <a href="#ifs2d">ifs2d</a>, <a href="#ifs3d">ifs3d</a>.
-</p>
-<p>Файл IFS может содержать несколько записей. Каждая запись содержит имя фрактала (`<samp>binary</samp>` в примере ниже) и тело в фигурных скобках {} с параметрами фрактала. Символ `<samp>;</samp>` начинает комментарий. Если имя содержит `<samp>(3D)</samp>` или `<samp>(3d)</samp>`, то определен 3d IFS фрактал. Пример содержит два фрактала: `<samp>binary</samp>` - обычный 2d фрактал, и `<samp>3dfern (3D)</samp>` - 3d фрактал. См. также <a href="#ifs2d">ifs2d</a>, <a href="#ifs3d">ifs3d</a>.
-</p>
-<pre class="verbatim"> binary
- { ; comment allowed here
- ; and here
- .5 .0 .0 .5 -2.563477 -0.000003 .333333 ; also comment allowed here
- .5 .0 .0 .5 2.436544 -0.000003 .333333
- .0 -.5 .5 .0 4.873085 7.563492 .333333
- }
-
- 3dfern (3D) {
- .00 .00 0 .0 .18 .0 0 0.0 0.00 0 0.0 0 .01
- .85 .00 0 .0 .85 .1 0 -0.1 0.85 0 1.6 0 .85
- .20 -.20 0 .2 .20 .0 0 0.0 0.30 0 0.8 0 .07
- -.20 .20 0 .2 .20 .0 0 0.0 0.30 0 0.8 0 .07
- }
-</pre></dd></dl>
-
-<a name="flame2d"></a><dl>
-<dt><a name="index-flame2d"></a>Команда MGL: <em></em> <strong>flame2d</strong> <em><small>RES</small> dat func <code>num</code> [<code>skip=20</code>]</em></dt>
-<dd><p>Находит <var>num</var> точек {x[i]=res[0,i], y[i]=res[1,i]} фрактала с использованием итерационной системы функций (IFS). Массив <var>func</var> задает идентификатор функции (<var>func</var>[0,i,j]), ее вес (<var>func</var>[0,i,j]) и аргументы (<var>func</var>[2 ... 5,i,j]). Матрица <var>dat</var> используется для преобразования координат для аргументов функции. Результирующее преобразование имеет вид:
-</p><pre class="verbatim">xx = dat[0,i]*x[j] + dat[1,j]*y[i] + dat[4,j];
-yy = dat[2,i]*x[j] + dat[3,j]*y[i] + dat[5,j];
-x[j+1] = sum_i @var{func}[1,i,j]*@var{func}[0,i,j]_x(xx, yy; @var{func}[2,i,j],...,@var{func}[5,i,j]);
-y[j+1] = sum_i @var{func}[1,i,j]*@var{func}[0,i,j]_y(xx, yy; @var{func}[2,i,j],...,@var{func}[5,i,j]);
-</pre><p>Значение <code>dat[6,i]</code> - весовой коэффициент для i-ой строки матрицы <var>dat</var>. Первые <var>skip</var> итераций будут опущены. Массив <var>dat</var> должен иметь размер по x больше или равный 7.
-Доступные идентификаторы функций: <code>mglFlame2d_linear=0, mglFlame2d_sinusoidal, mglFlame2d_spherical, mglFlame2d_swirl, mglFlame2d_horseshoe,
- mglFlame2d_polar, mglFlame2d_handkerchief,mglFlame2d_heart, mglFlame2d_disc, mglFlame2d_spiral,
- mglFlame2d_hyperbolic, mglFlame2d_diamond, mglFlame2d_ex, mglFlame2d_julia, mglFlame2d_bent,
- mglFlame2d_waves, mglFlame2d_fisheye, mglFlame2d_popcorn, mglFlame2d_exponential, mglFlame2d_power,
- mglFlame2d_cosine, mglFlame2d_rings, mglFlame2d_fan, mglFlame2d_blob, mglFlame2d_pdj,
- mglFlame2d_fan2, mglFlame2d_rings2, mglFlame2d_eyefish, mglFlame2d_bubble, mglFlame2d_cylinder,
- mglFlame2d_perspective, mglFlame2d_noise, mglFlame2d_juliaN, mglFlame2d_juliaScope, mglFlame2d_blur,
- mglFlame2d_gaussian, mglFlame2d_radialBlur, mglFlame2d_pie, mglFlame2d_ngon, mglFlame2d_curl,
- mglFlame2d_rectangles, mglFlame2d_arch, mglFlame2d_tangent, mglFlame2d_square, mglFlame2d_blade,
- mglFlame2d_secant, mglFlame2d_rays, mglFlame2d_twintrian, mglFlame2d_cross, mglFlame2d_disc2,
- mglFlame2d_supershape, mglFlame2d_flower, mglFlame2d_conic, mglFlame2d_parabola, mglFlame2d_bent2,
- mglFlame2d_bipolar, mglFlame2d_boarders, mglFlame2d_butterfly, mglFlame2d_cell, mglFlame2d_cpow,
- mglFlame2d_curve, mglFlame2d_edisc, mglFlame2d_elliptic, mglFlame2d_escher, mglFlame2d_foci,
- mglFlame2d_lazySusan, mglFlame2d_loonie, mglFlame2d_preBlur, mglFlame2d_modulus, mglFlame2d_oscope,
- mglFlame2d_polar2, mglFlame2d_popcorn2, mglFlame2d_scry, mglFlame2d_separation, mglFlame2d_split,
- mglFlame2d_splits, mglFlame2d_stripes, mglFlame2d_wedge, mglFlame2d_wedgeJulia, mglFlame2d_wedgeSph,
- mglFlame2d_whorl, mglFlame2d_waves2, mglFlame2d_exp, mglFlame2d_log, mglFlame2d_sin,
- mglFlame2d_cos, mglFlame2d_tan, mglFlame2d_sec, mglFlame2d_csc, mglFlame2d_cot,
- mglFlame2d_sinh, mglFlame2d_cosh, mglFlame2d_tanh, mglFlame2d_sech, mglFlame2d_csch,
- mglFlame2d_coth, mglFlame2d_auger, mglFlame2d_flux.</code>
-Значение <code>dat[6,i]</code> - весовой коэффициент для i-ой строки матрицы <var>dat</var>. Первые <var>skip</var> итераций будут опущены. Размеры массивов должны удовлетворять требованиям: <var>dat</var>.nx>=7, <var>func</var>.nx>=2 и <var>func</var>.nz=<var>dat</var>.ny. См. также <a href="#ifs2d">ifs2d</a>, <a href="#ifs3d">ifs3d</a>. См. <a href="#flame2d-sample">flame2d sample</a>, для примеров кода и графика.
-</p></dd></dl>
-
-
-
-
-<hr>
-<a name="Evaluate-expression"></a>
-<div class="header">
-<p>
-Next: <a href="#Special-data-classes" accesskey="n" rel="next">Special data classes</a>, Previous: <a href="#Global-functions" accesskey="p" rel="prev">Global functions</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Vychislenie-vyrazhenii"></a>
-<h3 class="section">4.12 Вычисление выражений</h3>
-
-
-<p>В MGL скриптах в качестве аргументов команд можно использовать произвольные формулы от существующих массивов данных и констант. Есть только 2 ограничения: формула не должна содержать пробелов (чтобы распознаваться как один аргумент), формула не может быть аргументом, который может быть пересоздан при выполнении скрипта.
-</p>
-
-
-<hr>
-<a name="Special-data-classes"></a>
-<div class="header">
-<p>
-Previous: <a href="#Evaluate-expression" accesskey="p" rel="prev">Evaluate expression</a>, Up: <a href="#Data-processing" accesskey="u" rel="up">Data processing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Special-data-classes-1"></a>
-<h3 class="section">4.13 Special data classes</h3>
-
-
-<p>MGL использует специальные классы автоматически.
-</p>
-
-
-
-<hr>
-<a name="Examples"></a>
-<div class="header">
-<p>
-Next: <a href="#All-samples" accesskey="n" rel="next">All samples</a>, Previous: <a href="#Data-processing" accesskey="p" rel="prev">Data processing</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="MathGL-examples"></a>
-<h2 class="chapter">5 MathGL examples</h2>
-
-
-<p>This chapter contain information about basic and advanced MathGL, hints and samples for all types of graphics. I recommend you read first 2 sections one after another and at least look on <a href="#Hints">Hints</a> section. Also I recommend you to look at <a href="#General-concepts">General concepts</a> and <a href="#FAQ">FAQ</a>.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Basic-usage" accesskey="1">Basic usage</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Advanced-usage" accesskey="2">Advanced usage</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-handling" accesskey="3">Data handling</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-plotting" accesskey="4">Data plotting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Hints" accesskey="5">Hints</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#FAQ" accesskey="6">FAQ</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Basic-usage"></a>
-<div class="header">
-<p>
-Next: <a href="#Advanced-usage" accesskey="n" rel="next">Advanced usage</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Basic-usage-1"></a>
-<h3 class="section">5.1 Basic usage</h3>
-
-
-<p>MGL script can be used by several manners. Each has positive and negative sides:
-</p><ul>
-<li> <em>Using UDAV.</em>
-
-<p>Positive sides are possibilities to view the plot at once and to modify it, rotate, zoom or switch on transparency or lighting by hands or by mouse. Negative side is the needness of the X-terminal. </p>
-</li><li> <em>Using command line tools.</em>
-
-<p>Positive aspects are: batch processing of similar data set, for example, a set of resulting data files for different calculation parameters), running from the console program, including the cluster calculation), fast and automated drawing, saving pictures for further analysis, or demonstration). Negative sides are: the usage of the external program for picture viewing. Also, the data plotting is non-visual. So, you have to imagine the picture, view angles, lighting and so on) before the plotting. I recommend to use graphical window for determining the optimal parameters of plotting on the base of some typical data set. And later use these parameters for batch processing in console program.
-</p>
-<p>In this case you can use the program: <code>mglconv</code> or <code>mglview</code> for viewing.
-</p>
-</li><li> <em>Using C/C++/... code.</em>
-
-<p>You can easily execute MGL script within C/C++/Fortan code. This can be useful for fast data plotting, for example, in web applications, where textual string (MGL script) may contain all necessary information for plot. The basic C++ code may look as following
-</p><pre class="verbatim">const char *mgl_script; // script itself, can be of type const wchar_t*
-mglGraph gr;
-mglParse pr;
-pr.Execute(&gr, mgl_script);
-</pre></li></ul>
-
-<p>The simplest script is
-</p><pre class="verbatim">box # draw bounding box
-axis # draw axis
-fplot 'x^3' # draw some function
-</pre>
-<p>Just type it in UDAV and press F5. Also you can save it in text file `<samp>test.mgl</samp>` and type in the console <code>mglconv test.mgl</code> what produce file `<samp>test.mgl.png</samp>` with resulting picture.
-</p>
-
-<hr>
-<a name="Advanced-usage"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-handling" accesskey="n" rel="next">Data handling</a>, Previous: <a href="#Basic-usage" accesskey="p" rel="prev">Basic usage</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Advanced-usage-1"></a>
-<h3 class="section">5.2 Advanced usage</h3>
-
-
-<p>Now I show several non-obvious features of MGL: several subplots in a single picture, curvilinear coordinates, text printing and so on. Generally you may miss this section at first reading, but I don`t recommend it.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Subplots" accesskey="1">Subplots</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Axis-and-ticks" accesskey="2">Axis and ticks</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Curvilinear-coordinates" accesskey="3">Curvilinear coordinates</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Colorbars" accesskey="4">Colorbars</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Bounding-box" accesskey="5">Bounding box</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Ternary-axis" accesskey="6">Ternary axis</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Text-features" accesskey="7">Text features</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Legend-sample" accesskey="8">Legend sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Cutting-sample" accesskey="9">Cutting sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Subplots"></a>
-<div class="header">
-<p>
-Next: <a href="#Axis-and-ticks" accesskey="n" rel="next">Axis and ticks</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Subplots-1"></a>
-<h4 class="subsection">5.2.1 Subplots</h4>
-
-
-<p>Let me demonstrate possibilities of plot positioning and rotation. MathGL has a set of functions: <a href="#subplot">subplot</a>, <a href="#inplot">inplot</a>, <a href="#title">title</a>, <a href="#aspect">aspect</a> and <a href="#rotate">rotate</a> and so on (see <a href="#Subplots-and-rotation">Subplots and rotation</a>). The order of their calling is strictly determined. First, one changes the position of plot in image area (functions <a href="#subplot">subplot</a>, <a href="#inplot">inplot</a> and <a href="#multiplot">multiplot</a>). Secondly, you can add the title of plot by <a href="#title">title</a> function. After that one may rotate the plot (command <a href="#rotate">rotate</a>). Finally, one may change aspects of axes (command <a href="#aspect">aspect</a>). The following code illustrates the aforesaid it:
-</p><pre class="verbatim">subplot 2 2 0
-box:text -1 1.1 'Just box' ':L'
-inplot 0.2 0.5 0.7 1 off
-box:text 0 1.2 'InPlot example'
-
-subplot 2 2 1:title 'Rotate only'
-rotate 50 60:box
-
-subplot 2 2 2:title 'Rotate and Aspect'
-rotate 50 60:aspect 1 1 2:box
-
-subplot 2 2 3:title 'Shear'
-box 'c':shear 0.2 0.1:box
-</pre><p>Here I used function <code>Puts</code> for printing the text in arbitrary position of picture (see <a href="#Text-printing">Text printing</a>). Text coordinates and size are connected with axes. However, text coordinates may be everywhere, including the outside the bounding box. I`ll show its features later in <a href="#Text-features">Text features</a>.
-</p>
-<p>Note that several commands can be placed in a string if they are separated by `<samp>:</samp>` symbol.
-</p>
-<div align="center"><img src="png/aspect.png" alt="Example of several subplots on the single picture.">
-</div>
-<p>More complicated sample show how to use most of positioning functions:
-</p><pre class="verbatim">subplot 3 2 0:title 'StickPlot'
-stickplot 3 0 20 30:box 'r':text 0 0 0 '0' 'r'
-stickplot 3 1 20 30:box 'g':text 0 0 0 '1' 'g'
-stickplot 3 2 20 30:box 'b':text 0 0 0 '2' 'b'
-
-subplot 3 2 3 '':title 'ColumnPlot'
-columnplot 3 0:box 'r':text 0 0 '0' 'r'
-columnplot 3 1:box 'g':text 0 0 '1' 'g'
-columnplot 3 2:box 'b':text 0 0 '2' 'b'
-
-subplot 3 2 4 '':title 'GridPlot'
-gridplot 2 2 0:box 'r':text 0 0 '0' 'r'
-gridplot 2 2 1:box 'g':text 0 0 '1' 'g'
-gridplot 2 2 2:box 'b':text 0 0 '2' 'b'
-gridplot 2 2 3:box 'm':text 0 0 '3' 'm'
-
-subplot 3 2 5 '':title 'InPlot':box
-inplot 0.4 1 0.6 1 on:box 'r'
-
-multiplot 3 2 1 2 1 '':title 'MultiPlot and ShearPlot':box
-shearplot 3 0 0.2 0.1:box 'r':text 0 0 '0' 'r'
-shearplot 3 1 0.2 0.1:box 'g':text 0 0 '1' 'g'
-shearplot 3 2 0.2 0.1:box 'b':text 0 0 '2' 'b'
-</pre>
-<div align="center"><img src="png/inplot.png" alt="Example for most of positioning functions.">
-</div>
-
-<hr>
-<a name="Axis-and-ticks"></a>
-<div class="header">
-<p>
-Next: <a href="#Curvilinear-coordinates" accesskey="n" rel="next">Curvilinear coordinates</a>, Previous: <a href="#Subplots" accesskey="p" rel="prev">Subplots</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Axis-and-ticks-1"></a>
-<h4 class="subsection">5.2.2 Axis and ticks</h4>
-
-
-<p>MathGL library can draw not only the bounding box but also the axes, grids, labels and so on. The ranges of axes and their origin (the point of intersection) are determined by functions <code>SetRange()</code>, <code>SetRanges()</code>, <code>SetOrigin()</code> (see <a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a>). Ticks on axis are specified by function <code>SetTicks</code>, <code>SetTicksVal</code>, <code>SetTicksTime</code> (see <a href="#Ticks">Ticks</a>). But usually
-</p>
-<p>Command <a href="#axis">axis</a> draws axes. Its textual string shows in which directions the axis or axes will be drawn (by default <code>"xyz"</code>, function draws axes in all directions). Command <a href="#grid">grid</a> draws grid perpendicularly to specified directions. Example of axes and grid drawing is:
-</p><pre class="verbatim">subplot 2 2 0:title 'Axis origin, Grid'
-origin 0 0:axis:grid:fplot 'x^3'
-
-subplot 2 2 1:title '2 axis'
-ranges -1 1 -1 1:origin -1 -1:axis
-ylabel 'axis_1':fplot 'sin(pi*x)' 'r2'
-ranges 0 1 0 1:origin 1 1:axis
-ylabel 'axis_2':fplot 'cos(pi*x)'
-
-subplot 2 2 3:title 'More axis'
-origin nan nan:xrange -1 1:axis
-xlabel 'x' 0:ylabel 'y_1' 0:fplot 'x^2' 'k'
-yrange -1 1:origin -1.3 -1:axis 'y' 'r'
-ylabel '#r{y_2}' 0.2:fplot 'x^3' 'r'
-
-subplot 2 2 2:title '4 segments, inverted axis':origin 0 0:
-inplot 0.5 1 0.5 1 on:ranges 0 10 0 2:axis
-fplot 'sqrt(x/2)':xlabel 'W' 1:ylabel 'U' 1
-inplot 0 0.5 0.5 1 on:ranges 1 0 0 2:axis 'x'
-fplot 'sqrt(x)+x^3':xlabel '\tau' 1
-inplot 0.5 1 0 0.5 on:ranges 0 10 4 0:axis 'y'
-fplot 'x/4':ylabel 'L' -1
-inplot 0 0.5 0 0.5 on:ranges 1 0 4 0:fplot '4*x^2'
-</pre>
-<p>Note, that MathGL can draw not only single axis (which is default). But also several axis on the plot (see right plots). The idea is that the change of settings does not influence on the already drawn graphics. So, for 2-axes I setup the first axis and draw everything concerning it. Then I setup the second axis and draw things for the second axis. Generally, the similar idea allows one to draw rather complicated plot of 4 axis with different ranges (see bottom left plot).
-</p>
-<p>At this inverted axis can be created by 2 methods. First one is used in this sample - just specify minimal axis value to be large than maximal one. This method work well for 2D axis, but can wrongly place labels in 3D case. Second method is more general and work in 3D case too - just use <a href="#aspect">aspect</a> function with negative arguments. For example, following code will produce exactly the same result for 2D case, but 2nd variant will look better in 3D.
-</p><pre class="verbatim"># variant 1
-ranges 0 10 4 0:axis
-
-# variant 2
-ranges 0 10 0 4:aspect 1 -1:axis
-</pre>
-<div align="center"><img src="png/axis.png" alt="Example of axis.">
-</div>
-<p>Another MathGL feature is fine ticks tunning. By default (if it is not changed by <code>SetTicks</code> function), MathGL try to adjust ticks positioning, so that they looks most human readable. At this, MathGL try to extract common factor for too large or too small axis ranges, as well as for too narrow ranges. Last one is non-common notation and can be disabled by <code>SetTuneTicks</code> function.
-</p>
-<p>Also, one can specify its own ticks with arbitrary labels by help of <code>SetTicksVal</code> function. Or one can set ticks in time format. In last case MathGL will try to select optimal format for labels with automatic switching between years, months/days, hours/minutes/seconds or microseconds. However, you can specify its own time representation using formats described in <a href="http://www.manpagez.com/man/3/strftime/">http://www.manpagez.com/man/3/strftime/</a>. Most common variants are `<samp>%X</samp>` for national representation of time, `<samp>%x</samp>` for national representation of date, `<samp>%Y</samp>` for year with century.
-</p>
-<p>The sample code, demonstrated ticks feature is
-</p><pre class="verbatim">subplot 3 3 0:title 'Usual axis'
-axis
-
-subplot 3 3 1:title 'Too big/small range'
-ranges -1000 1000 0 0.001:axis
-
-subplot 3 3 2:title 'LaTeX-like labels'
-axis 'F!'
-
-subplot 3 3 3:title 'Too narrow range'
-ranges 100 100.1 10 10.01:axis
-
-subplot 3 3 4:title 'No tuning, manual "+"'
-axis '+!'
-# for version <2.3 you can use
-#tuneticks off:axis
-
-subplot 3 3 5:title 'Template for ticks'
-xtick 'xxx:%g':ytick 'y:%g'
-axis
-
-xtick '':ytick '' # switch it off for other plots
-
-subplot 3 3 6:title 'No tuning, higher precision'
-axis '!4'
-
-subplot 3 3 7:title 'Manual ticks'
-ranges -pi pi 0 2
-xtick pi 3 '\pi'
-xtick 0.886 'x^*' on # note this will disable subticks drawing
-# or you can use
-#xtick -pi '\pi' -pi/2 '-\pi/2' 0 '0' 0.886 'x^*' pi/2 '\pi/2' pi 'pi'
-# or you can use
-#list v -pi -pi/2 0 0.886 pi/2 pi:xtick v '-\pi\n-\pi/2\n{}0\n{}x^*\n\pi/2\n\pi'
-axis:grid:fplot '2*cos(x^2)^2' 'r2'
-
-subplot 3 3 8:title 'Time ticks'
-xrange 0 3e5:ticktime 'x':axis
-</pre>
-<div align="center"><img src="png/ticks.png" alt="Features of axis ticks.">
-</div>
-<p>The last sample I want to show in this subsection is Log-axis. From MathGL`s point of view, the log-axis is particular case of general curvilinear coordinates. So, we need first define new coordinates (see also <a href="#Curvilinear-coordinates">Curvilinear coordinates</a>) by help of <code>SetFunc</code> or <code>SetCoor</code> functions. At this one should wary about proper axis range. So the code looks as following:
-</p><pre class="verbatim">subplot 2 2 0 '<_':title 'Semi-log axis'
-ranges 0.01 100 -1 1:axis 'lg(x)' '' ''
-axis:grid 'xy' 'g':fplot 'sin(1/x)'
-xlabel 'x' 0:ylabel 'y = sin 1/x' 0
-
-subplot 2 2 1 '<_':title 'Log-log axis'
-ranges 0.01 100 0.1 100:axis 'lg(x)' 'lg(y)' ''
-axis:grid '!' 'h=':grid:fplot 'sqrt(1+x^2)'
-xlabel 'x' 0:ylabel 'y = \sqrt{1+x^2}' 0
-
-subplot 2 2 2 '<_':title 'Minus-log axis'
-ranges -100 -0.01 -100 -0.1:axis '-lg(-x)' '-lg(-y)' ''
-axis:fplot '-sqrt(1+x^2)'
-xlabel 'x' 0:ylabel 'y = -\sqrt{1+x^2}' 0
-
-subplot 2 2 3 '<_':title 'Log-ticks'
-ranges 0.01 100 0 100:axis 'sqrt(x)' '' ''
-axis:fplot 'x'
-xlabel 'x' 1:ylabel 'y = x' 0
-</pre>
-<div align="center"><img src="png/loglog.png" alt="Features of axis ticks.">
-</div>
-<p>You can see that MathGL automatically switch to log-ticks as we define log-axis formula (in difference from v.1.*). Moreover, it switch to log-ticks for any formula if axis range will be large enough (see right bottom plot). Another interesting feature is that you not necessary define usual log-axis (i.e. when coordinates are positive), but you can define “minus-log” axis when coordinate is negative (see left bottom plot).
-</p>
-
-<hr>
-<a name="Curvilinear-coordinates"></a>
-<div class="header">
-<p>
-Next: <a href="#Colorbars" accesskey="n" rel="next">Colorbars</a>, Previous: <a href="#Axis-and-ticks" accesskey="p" rel="prev">Axis and ticks</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Curvilinear-coordinates-1"></a>
-<h4 class="subsection">5.2.3 Curvilinear coordinates</h4>
-
-
-<p>As I noted in previous subsection, MathGL support curvilinear coordinates. In difference from other plotting programs and libraries, MathGL uses textual formulas for connection of the old (data) and new (output) coordinates. This allows one to plot in arbitrary coordinates. The following code plots the line <var>y</var>=0, <var>z</var>=0 in Cartesian, polar, parabolic and spiral coordinates:
-</p><pre class="verbatim">origin -1 1 -1
-subplot 2 2 0:title 'Cartesian':rotate 50 60
-fplot '2*t-1' '0.5' '0' '2r':axis:grid
-
-axis 'y*sin(pi*x)' 'y*cos(pi*x)' '':
-subplot 2 2 1:title 'Cylindrical':rotate 50 60
-fplot '2*t-1' '0.5' '0' '2r':axis:grid
-
-axis '2*y*x' 'y*y - x*x' ''
-subplot 2 2 2:title 'Parabolic':rotate 50 60
-fplot '2*t-1' '0.5' '0' '2r':axis:grid
-
-axis 'y*sin(pi*x)' 'y*cos(pi*x)' 'x+z'
-subplot 2 2 3:title 'Spiral':rotate 50 60
-fplot '2*t-1' '0.5' '0' '2r':axis:grid
-</pre>
-<div align="center"><img src="png/curvcoor.png" alt="Example of curvilinear coordinates">
-</div>
-
-
-<hr>
-<a name="Colorbars"></a>
-<div class="header">
-<p>
-Next: <a href="#Bounding-box" accesskey="n" rel="next">Bounding box</a>, Previous: <a href="#Curvilinear-coordinates" accesskey="p" rel="prev">Curvilinear coordinates</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Colorbars-1"></a>
-<h4 class="subsection">5.2.4 Colorbars</h4>
-
-
-<p>MathGL handle <a href="#colorbar">colorbar</a> as special kind of axis. So, most of functions for axis and ticks setup will work for colorbar too. Colorbars can be in log-scale, and generally as arbitrary function scale; common factor of colorbar labels can be separated; and so on.
-</p>
-<p>But of course, there are differences - colorbars usually located out of bounding box. At this, colorbars can be at subplot boundaries (by default), or at bounding box (if symbol `<samp>I</samp>` is specified). Colorbars can handle sharp colors. And they can be located at arbitrary position too. The sample code, which demonstrate colorbar features is:
-</p><pre class="verbatim">call 'prepare2d'
-new v 9 'x'
-
-subplot 2 2 0:title 'Colorbar out of box':box
-colorbar '<':colorbar '>':colorbar '_':colorbar '^'
-
-subplot 2 2 1:title 'Colorbar near box':box
-colorbar '<I':colorbar '>I':colorbar '_I':colorbar '^I'
-
-subplot 2 2 2:title 'manual colors':box:contd v a
-colorbar v '<':colorbar v '>':colorbar v '_':colorbar v '^'
-
-subplot 2 2 3:title '':text -0.5 1.55 'Color positions' ':C' -2
-
-colorbar 'bwr>' 0.25 0:text -0.9 1.2 'Default'
-colorbar 'b{w,0.3}r>' 0.5 0:text -0.1 1.2 'Manual'
-
-crange 0.01 1e3
-colorbar '>' 0.75 0:text 0.65 1.2 'Normal scale'
-colorbar '>':text 1.35 1.2 'Log scale'
-</pre>
-<div align="center"><img src="png/colorbar.png" alt="Example of colorbars">
-</div>
-
-
-<hr>
-<a name="Bounding-box"></a>
-<div class="header">
-<p>
-Next: <a href="#Ternary-axis" accesskey="n" rel="next">Ternary axis</a>, Previous: <a href="#Colorbars" accesskey="p" rel="prev">Colorbars</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Bounding-box-1"></a>
-<h4 class="subsection">5.2.5 Bounding box</h4>
-
-
-<p>Box around the plot is rather useful thing because it allows one to: see the plot boundaries, and better estimate points position since box contain another set of ticks. MathGL provide special function for drawing such box - <a href="#box">box</a> function. By default, it draw black or white box with ticks (color depend on transparency type, see <a href="#Types-of-transparency">Types of transparency</a>). However, you can change the color of box, or add drawing of rectangles at rear faces of box. Also you can disable ticks drawing, but I don`t know why anybody will want it. The sample code, which demonstrate <a href="#box">box</a> features is:
-</p><pre class="verbatim">subplot 2 2 0:title 'Box (default)':rotate 50 60:box
-
-subplot 2 2 1:title 'colored':rotate 50 60:box 'r'
-
-subplot 2 2 2:title 'with faces':rotate 50 60:box '@'
-
-subplot 2 2 3:title 'both':rotate 50 60:box '@cm'
-</pre>
-<div align="center"><img src="png/box.png" alt="Example of Box()">
-</div>
-
-
-<hr>
-<a name="Ternary-axis"></a>
-<div class="header">
-<p>
-Next: <a href="#Text-features" accesskey="n" rel="next">Text features</a>, Previous: <a href="#Bounding-box" accesskey="p" rel="prev">Bounding box</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Ternary-axis-1"></a>
-<h4 class="subsection">5.2.6 Ternary axis</h4>
-
-
-<p>There are another unusual axis types which are supported by MathGL. These are ternary and quaternary axis. Ternary axis is special axis of 3 coordinates <var>a</var>, <var>b</var>, <var>c</var> which satisfy relation <var>a</var>+<var>b</var>+<var>c</var>=1. Correspondingly, quaternary axis is special axis of 4 coordinates <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> which satisfy relation <var>a</var>+<var>b</var>+<var>c</var>+<var>d</var>=1.
-</p>
-<p>Generally speaking, only 2 of coordinates (3 for quaternary) are independent. So, MathGL just introduce some special transformation formulas which treat <var>a</var> as `<samp>x</samp>`, <var>b</var> as `<samp>y</samp>` (and <var>c</var> as `<samp>z</samp>` for quaternary). As result, all plotting functions (curves, surfaces, contours and so on) work as usual, but in new axis. You should use <a href="#ternary">ternary</a> function for switching to ternary/quaternary coordinates. The sample code is:
-</p><pre class="verbatim">ranges 0 1 0 1 0 1
-new x 50 '0.25*(1+cos(2*pi*x))'
-new y 50 '0.25*(1+sin(2*pi*x))'
-new z 50 'x'
-new a 20 30 '30*x*y*(1-x-y)^2*(x+y<1)'
-new rx 10 'rnd':copy ry (1-rx)*rnd
-light on
-
-subplot 2 2 0:title 'Ordinary axis 3D':rotate 50 60
-box:axis:grid
-plot x y z 'r2':surf a '#'
-xlabel 'B':ylabel 'C':zlabel 'Z'
-
-subplot 2 2 1:title 'Ternary axis (x+y+t=1)':ternary 1
-box:axis:grid 'xyz' 'B;'
-plot x y 'r2':plot rx ry 'q^ ':cont a:line 0.5 0 0 0.75 'g2'
-xlabel 'B':ylabel 'C':tlabel 'A'
-
-subplot 2 2 2:title 'Quaternary axis 3D':rotate 50 60:ternary 2
-box:axis:grid 'xyz' 'B;'
-plot x y z 'r2':surf a '#'
-xlabel 'B':ylabel 'C':tlabel 'A':zlabel 'D'
-
-subplot 2 2 3:title 'Ternary axis 3D':rotate 50 60:ternary 1
-box:axis:grid 'xyz' 'B;'
-plot x y z 'r2':surf a '#'
-xlabel 'B':ylabel 'C':tlabel 'A':zlabel 'Z'
-</pre>
-<div align="center"><img src="png/ternary.png" alt="Ternary and Quaternary axis">
-</div>
-
-<hr>
-<a name="Text-features"></a>
-<div class="header">
-<p>
-Next: <a href="#Legend-sample" accesskey="n" rel="next">Legend sample</a>, Previous: <a href="#Ternary-axis" accesskey="p" rel="prev">Ternary axis</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Text-features-1"></a>
-<h4 class="subsection">5.2.7 Text features</h4>
-
-
-<p>MathGL prints text by vector font. There are functions for manual specifying of text position (like <code>Puts</code>) and for its automatic selection (like <code>Label</code>, <code>Legend</code> and so on). MathGL prints text always in specified position even if it lies outside the bounding box. The default size of font is specified by functions <var>SetFontSize*</var> (see <a href="#Font-settings">Font settings</a>). However, the actual size of output string depends on subplot size (depends on functions <code>SubPlot</code>, <code>InPlot</code>). The switching of the font style (italic, bold, wire and so on) can be done for the whole string (by function parameter) or inside the string. By default MathGL parses TeX-like commands for symbols and indexes (see <a href="#Font-styles">Font styles</a>).
-</p>
-<p>Text can be printed as usual one (from left to right), along some direction (rotated text), or along a curve. Text can be printed on several lines, divided by new line symbol `<samp>\n</samp>`.
-</p>
-<p>Example of MathGL font drawing is:
-</p><pre class="verbatim">call 'prepare1d'
-
-subplot 2 2 0 ''
-text 0 1 'Text can be in ASCII and in Unicode'
-text 0 0.6 'It can be \wire{wire}, \big{big} or #r{colored}'
-text 0 0.2 'One can change style in string: \b{bold}, \i{italic, \b{both}}'
-text 0 -0.2 'Easy to \a{overline} or \u{underline}'
-text 0 -0.6 'Easy to change indexes ^{up} _{down} @{center}'
-text 0 -1 'It parse TeX: \int \alpha \cdot \
-\sqrt3{sin(\pi x)^2 + \gamma_{i_k}} dx'
-
-subplot 2 2 1 ''
- text 0 0.5 '\sqrt{\frac{\alpha^{\gamma^2}+\overset 1{\big\infty}}{\sqrt3{2+b}}}' '@' -2
-text 0 -0.5 'Text can be printed\n{}on several lines'
-
-subplot 2 2 2 '':box:plot y(:,0)
-text y 'This is very very long string drawn along a curve' 'k'
-text y 'Another string drawn under a curve' 'Tr'
-
-subplot 2 2 3 '':line -1 -1 1 -1 'rA':text 0 -1 1 -1 'Horizontal'
-line -1 -1 1 1 'rA':text 0 0 1 1 'At angle' '@'
-line -1 -1 -1 1 'rA':text -1 0 -1 1 'Vertical'
-</pre>
-<div align="center"><img src="png/text.png" alt="Example of text printing">
-</div>
-<p>You can change font faces by loading font files by function <a href="#loadfont">loadfont</a>. Note, that this is long-run procedure. Font faces can be downloaded from <a href="http://mathgl.sourceforge.net/download.html">MathGL website</a> or from <a href="http://sourceforge.net/project/showfiles.php?group_id=152187&package_id=267177">here</a>. The sample code is:
-</p><pre class="verbatim">define d 0.25
-loadfont 'STIX':text 0 1.1 'default font (STIX)'
-loadfont 'adventor':text 0 1.1-d 'adventor font'
-loadfont 'bonum':text 0 1.1-2*d 'bonum font'
-loadfont 'chorus':text 0 1.1-3*d 'chorus font'
-loadfont 'cursor':text 0 1.1-4*d 'cursor font'
-loadfont 'heros':text 0 1.1-5*d 'heros font'
-loadfont 'heroscn':text 0 1.1-6*d 'heroscn font'
-loadfont 'pagella':text 0 1.1-7*d 'pagella font'
-loadfont 'schola':text 0 1.1-8*d 'schola font'
-loadfont 'termes':text 0 1.1-9*d 'termes font'
-</pre>
-<div align="center"><img src="png/fonts.png" alt="Example of font faces">
-</div>
-
-<hr>
-<a name="Legend-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#Cutting-sample" accesskey="n" rel="next">Cutting sample</a>, Previous: <a href="#Text-features" accesskey="p" rel="prev">Text features</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Legend-sample-1"></a>
-<h4 class="subsection">5.2.8 Legend sample</h4>
-
-
-<p>Legend is one of standard ways to show plot annotations. Basically you need to connect the plot style (line style, marker and color) with some text. In MathGL, you can do it by 2 methods: manually using <a href="#addlegend">addlegend</a> function; or use `<samp>legend</samp>` option (see <a href="#Command-options">Command options</a>), which will use last plot style. In both cases, legend entries will be added into internal accumulator, which later used for legend drawing itself. <a href="#clearlegend">clearlegend</a> function allow you to remove all saved legend entries.
-</p>
-<p>There are 2 features. If plot style is empty then text will be printed without indent. If you want to plot the text with indent but without plot sample then you need to use space `<samp> </samp>` as plot style. Such style `<samp> </samp>` will draw a plot sample (line with marker(s)) which is invisible line (i.e. nothing) and print the text with indent as usual one.
-</p>
-<p>Command <a href="#legend">legend</a> draw legend on the plot. The position of the legend can be selected automatic or manually. You can change the size and style of text labels, as well as setup the plot sample. The sample code demonstrating legend features is:
-</p><pre class="verbatim">addlegend 'sin(\pi {x^2})' 'b'
-addlegend 'sin(\pi x)' 'g*'
-addlegend 'sin(\pi \sqrt{x})' 'rd'
-addlegend 'jsut text' ' '
-addlegend 'no indent for this' ''
-
-subplot 2 2 0 '':title 'Legend (default)':box
-legend
-
-text 0.75 0.65 'Absolute position' 'A'
-legend 3 'A#'
-
-subplot 2 2 2 '':title 'coloring':box
-legend 0 'r#':legend 1 'Wb#':legend 2 'ygr#'
-
-subplot 2 2 3 '':title 'manual position':box
-legend 0.5 1:text 0.5 0.55 'at x=0.5, y=1' 'a'
-legend 1 '#-':text 0.75 0.25 'Horizontal legend' 'a'
-</pre>
-<div align="center"><img src="png/legend.png" alt="Example of legend">
-</div>
-
-<hr>
-<a name="Cutting-sample"></a>
-<div class="header">
-<p>
-Previous: <a href="#Legend-sample" accesskey="p" rel="prev">Legend sample</a>, Up: <a href="#Advanced-usage" accesskey="u" rel="up">Advanced usage</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Cutting-sample-1"></a>
-<h4 class="subsection">5.2.9 Cutting sample</h4>
-
-
-<p>The last common thing which I want to show in this section is how one can cut off points from plot. There are 4 mechanism for that.
-</p><ul>
-<li> You can set one of coordinate to NAN value. All points with NAN values will be omitted.
-
-</li><li> You can enable cutting at edges by <code>SetCut</code> function. As result all points out of bounding box will be omitted.
-
-</li><li> You can set cutting box by <code>SetCutBox</code> function. All points inside this box will be omitted.
-
-</li><li> You can define cutting formula by <code>SetCutOff</code> function. All points for which the value of formula is nonzero will be omitted. Note, that this is the slowest variant.
-</li></ul>
-
-<p>Below I place the code which demonstrate last 3 possibilities:
-</p><pre class="verbatim">call 'prepare2d'
-call 'prepare3d'
-
-subplot 2 2 0:title 'Cut on (default)':rotate 50 60
-light on:box:surf a; zrange -1 0.5
-
-subplot 2 2 1:title 'Cut off':rotate 50 60
-box:surf a; zrange -1 0.5; cut off
-
-subplot 2 2 2:title 'Cut in box':rotate 50 60:box:alpha on
-cut 0 -1 -1 1 0 1.1:surf3 c
-cut 0 0 0 0 0 0 # restore back
-
-subplot 2 2 3:title 'Cut by formula':rotate 50 60:box
-cut '(z>(x+0.5*y-1)^2-1) & (z>(x-0.5*y-1)^2-1)':surf3 c
-</pre>
-<div align="center"><img src="png/cut.png" alt="Example of point cutting">
-</div>
-
-
-
-<hr>
-<a name="Data-handling"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-plotting" accesskey="n" rel="next">Data plotting</a>, Previous: <a href="#Advanced-usage" accesskey="p" rel="prev">Advanced usage</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-handling-1"></a>
-<h3 class="section">5.3 Data handling</h3>
-
-
-<p>Class <code>mglData</code> contains all functions for the data handling in MathGL (see <a href="#Data-processing">Data processing</a>). There are several matters why I use class <code>mglData</code> but not a single array: it does not depend on type of data (mreal or double), sizes of data arrays are kept with data, memory working is simpler and safer.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Array-creation" accesskey="1">Array creation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Change-data" accesskey="2">Change data</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Array-creation"></a>
-<div class="header">
-<p>
-Next: <a href="#Change-data" accesskey="n" rel="next">Change data</a>, Up: <a href="#Data-handling" accesskey="u" rel="up">Data handling</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Array-creation-1"></a>
-<h4 class="subsection">5.3.1 Array creation</h4>
-
-
-<p>One can put numbers into the data instance by several ways. Let us do it for square function:
-</p><ul>
-<li> one can create array by <code>list</code> command
-<pre class="verbatim">list a 0 0.04 0.16 0.36 0.64 1
-</pre>
-</li><li> another way is to copy from “inline” array
-<pre class="verbatim">copy a [0,0.04,0.16,0.36,0.64,1]
-</pre>
-</li><li> next way is to fill the data by textual formula with the help of <code>modify</code> function
-<pre class="verbatim">new a 6
-modify a 'x^2'
-</pre>
-</li><li> or one may fill the array in some interval and modify it later
-<pre class="verbatim">new a 6
-fill a 0 1
-modify a 'u^2'
-</pre>
-</li><li> or fill the array using current axis range
-<pre class="verbatim">new a 6
-fill a '(x+1)^2/4'
-</pre><p>or use single line
-</p><pre class="verbatim">new a 6 '(x+1)^2/4'
-</pre>
-</li><li> finally it can be loaded from file
-<pre class="verbatim">new s 6 '(x+1)^2/4'
-save s 'sqr.dat' # create file first
-read a 'sqr.dat' # load it
-</pre>
-</li><li> at this one can read only part of data
-<pre class="verbatim">new s 6 '(x+1)^2/4'
-save s 'sqr.dat' # create file first
-read a 'sqr.dat' 5 # load it
-</pre></li></ul>
-
-<p>Creation of 2d- and 3d-arrays is mostly the same. One can use direct data filling by <code>list</code> command
-</p><pre class="verbatim">list a 11 12 13 | 21 22 23 | 31 32 33
-</pre><p>or by inline arrays
-</p><pre class="verbatim">copy a [[11,12,13],[21,22,23],[31,32,33]]
-</pre><p>Also data can be filled by formula
-</p><pre class="verbatim">new z 30 40 'sin(pi*x)*cos(pi*y)'
-</pre><p>or loaded from a file.
-</p>
-
-<hr>
-<a name="Change-data"></a>
-<div class="header">
-<p>
-Previous: <a href="#Array-creation" accesskey="p" rel="prev">Array creation</a>, Up: <a href="#Data-handling" accesskey="u" rel="up">Data handling</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Change-data-1"></a>
-<h4 class="subsection">5.3.2 Change data</h4>
-
-
-<p>MathGL has functions for data processing: differentiating, integrating, smoothing and so on (for more detail, see <a href="#Data-processing">Data processing</a>). Let us consider some examples. The simplest ones are integration and differentiation. The direction in which operation will be performed is specified by textual string, which may contain symbols `<samp>x</samp>`, `<samp>y</samp>` or `<samp>z</samp>`. For example, the call of <code>diff 'x'</code> will differentiate data along `<samp>x</samp>` direction; the call of <code>integrate 'xy'</code> perform the double integration of data along `<samp>x</samp>` and `<samp>y</samp>` directions; the call of <code>diff2 'xyz'</code> will apply 3d Laplace operator to data and so on. Example of this operations on 2d array a=x*y is presented in code:
-</p><pre class="verbatim">ranges 0 1 0 1 0 1:new a 30 40 'x*y'
-subplot 2 2 0:title 'a(x,y)':rotate 60 40
-surf a:box
-
-subplot 2 2 1:title 'da/dx':rotate 60 40
-diff a 'x':surf a:box
-
-subplot 2 2 2:title '\int da/dx dxdy':rotate 60 40
-integrate a 'xy':surf a:box
-
-subplot 2 2 3:title '\int {d^2}a/dxdy dx':rotate 60 40
-diff2 a 'y':surf a:box
-</pre>
-<div align="center"><img src="png/dat_diff.png" alt="Example of data differentiation and integration">
-</div>
-<p>Data smoothing (command <a href="#smooth">smooth</a>) is more interesting and important. This function has single argument which define type of smoothing and its direction. Now 3 methods are supported: `<samp>3</samp>` - linear averaging by 3 points, `<samp>5</samp>` - linear averaging by 5 points, and default one - quadratic averaging by 5 points.
-</p>
-<p>MathGL also have some amazing functions which is not so important for data processing as useful for data plotting. There are functions for finding envelope (useful for plotting rapidly oscillating data), for data sewing (useful to removing jumps on the phase), for data resizing (interpolation). Let me demonstrate it:
-</p><pre class="verbatim">subplot 2 2 0 '':title 'Envelop sample'
-new d1 1000 'exp(-8*x^2)*sin(10*pi*x)'
-axis:plot d1 'b'
-envelop d1 'x'
-plot d1 'r'
-
-subplot 2 2 1 '':title 'Smooth sample':ranges 0 1 0 1
-new y0 30 '0.4*sin(pi*x) + 0.3*cos(1.5*pi*x) - 0.4*sin(2*pi*x)+0.5*rnd'
-copy y1 y0:smooth y1 'x3':plot y1 'r';legend '"3" style'
-copy y2 y0:smooth y2 'x5':plot y2 'g';legend '"5" style'
-copy y3 y0:smooth y3 'x':plot y3 'b';legend 'default'
-plot y0 '{m7}:s';legend 'none':legend:box
-
-subplot 2 2 2:title 'Sew sample':rotate 50 60:light on:alpha on
-new d2 100 100 'mod((y^2-(1-x)^2)/2,0.1)'
-box:surf d2 'b'
-sew d2 'xy' 0.1
-surf d2 'r'
-
-subplot 2 2 3:title 'Resize sample (interpolation)'
-new x0 10 'rnd':new v0 10 'rnd'
-resize x1 x0 100:resize v1 v0 100
-plot x0 v0 'b+ ':plot x1 v1 'r-':label x0 v0 '%n'
-</pre>
-<div align="center"><img src="png/dat_extra.png" alt="Example of data smoothing">
-</div>
-<p>Finally one can create new data arrays on base of the existing one: extract slice, row or column of data (<a href="#subdata">subdata</a>), summarize along a direction(s) (<a href="#sum">sum</a>), find distribution of data elements (<a href="#hist">hist</a>) and so on.
-</p>
-<a name="Solve-sample"></a><p>Another interesting feature of MathGL is interpolation and root-finding. There are several functions for linear and cubic spline interpolation (see <a href="#Interpolation">Interpolation</a>). Also there is a function <a href="#evaluate">evaluate</a> which do interpolation of data array for values of each data element of index data. It look as indirect access to the data elements.
-</p>
-<p>This function have inverse function <a href="#solve">solve</a> which find array of indexes at which data array is equal to given value (i.e. work as root finding). But <a href="#solve">solve</a> function have the issue - usually multidimensional data (2d and 3d ones) have an infinite number of indexes which give some value. This is contour lines for 2d data, or isosurface(s) for 3d data. So, <a href="#solve">solve</a> function will return index only in given direction, assuming that other index(es) are the same as equidistant index(es) of original data. Let me demonstrate this on the following sample.
-</p>
-<pre class="verbatim">zrange 0 1
-new x 20 30 '(x+2)/3*cos(pi*y)'
-new y 20 30 '(x+2)/3*sin(pi*y)'
-new z 20 30 'exp(-6*x^2-2*sin(pi*y)^2)'
-
-subplot 2 1 0:title 'Cartesian space':rotate 30 -40
-axis 'xyzU':box
-xlabel 'x':ylabel 'y'origin 1 1:grid 'xy'
-mesh x y z
-
-# section along 'x' direction
-solve u x 0.5 'x'
-var v u.nx 0 1
-evaluate yy y u v
-evaluate xx x u v
-evaluate zz z u v
-plot xx yy zz 'k2o'
-
-# 1st section along 'y' direction
-solve u1 x -0.5 'y'
-var v1 u1.nx 0 1
-evaluate yy y v1 u1
-evaluate xx x v1 u1
-evaluate zz z v1 u1
-plot xx yy zz 'b2^'
-
-# 2nd section along 'y' direction
-solve u2 x -0.5 'y' u1
-evaluate yy y v1 u2
-evaluate xx x v1 u2
-evaluate zz z v1 u2
-plot xx yy zz 'r2v'
-
-subplot 2 1 1:title 'Accompanied space'
-ranges 0 1 0 1:origin 0 0
-axis:box:xlabel 'i':ylabel 'j':grid2 z 'h'
-
-plot u v 'k2o':line 0.4 0.5 0.8 0.5 'kA'
-plot v1 u1 'b2^':line 0.5 0.15 0.5 0.3 'bA'
-plot v1 u2 'r2v':line 0.5 0.7 0.5 0.85 'rA'
-</pre>
-<div align="center"><img src="png/solve.png" alt="Example of data interpolation and root finding">
-</div>
-
-<hr>
-<a name="Data-plotting"></a>
-<div class="header">
-<p>
-Next: <a href="#Hints" accesskey="n" rel="next">Hints</a>, Previous: <a href="#Data-handling" accesskey="p" rel="prev">Data handling</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-plotting-1"></a>
-<h3 class="section">5.4 Data plotting</h3>
-
-
-<p>Let me now show how to plot the data. Next section will give much more examples for all plotting functions. Here I just show some basics. MathGL generally has 2 types of plotting functions. Simple variant requires a single data array for plotting, other data (coordinates) are considered uniformly distributed in axis range. Second variant requires data arrays for all coordinates. It allows one to plot rather complex multivalent curves and surfaces (in case of parametric dependencies). Usually each function have one textual argument for plot style and accept options (see <a href="#Command-options">Command options</a>).
-</p>
-<p>Note, that the call of drawing function adds something to picture but does not clear the previous plots (as it does in Matlab). Another difference from Matlab is that all setup (like transparency, lightning, axis borders and so on) must be specified <strong>before</strong> plotting functions.
-</p>
-<p>Let start for plots for 1D data. Term “1D data” means that data depend on single index (parameter) like curve in parametric form {x(i),y(i),z(i)}, i=1...n. The textual argument allow you specify styles of line and marks (see <a href="#Line-styles">Line styles</a>). If this parameter is empty <code>''</code> then solid line with color from palette is used (see <a href="#Palette-and-colors">Palette and colors</a>).
-</p>
-<p>Below I shall show the features of 1D plotting on base of <a href="#plot">plot</a> function. Let us start from sinus plot:
-</p><pre class="verbatim">new y0 50 'sin(pi*x)'
-subplot 2 2 0
-plot y0:box
-</pre><p>Style of line is not specified in <a href="#plot">plot</a> function. So MathGL uses the solid line with first color of palette (this is blue). Next subplot shows array <var>y1</var> with 2 rows:
-</p><pre class="verbatim">subplot 2 2 1
-new y1 50 2
-fill y1 'cos(pi*(x+y/4))*2/(y+3)'
-plot y1:box
-</pre><p>As previously I did not specify the style of lines. As a result, MathGL again uses solid line with next colors in palette (there are green and red). Now let us plot a circle on the same subplot. The circle is parametric curve <em>x=cos(\pi t), y=sin(\pi t)</em>. I will set the color of the circle (dark yellow, `<samp>Y</samp>`) and put marks `<samp>+</samp>` at point position:
-</p><pre class="verbatim">new x 50 'cos(pi*x)'
-plot x y0 'Y+'
-</pre><p>Note that solid line is used because I did not specify the type of line. The same picture can be achieved by <a href="#plot">plot</a> and <a href="#subdata">subdata</a> functions. Let us draw ellipse by orange dash line:
-</p><pre class="verbatim">plot y1(:,0) y1(:,1) 'q|'
-</pre>
-<p>Drawing in 3D space is mostly the same. Let us draw spiral with default line style. Now its color is 4-th color from palette (this is cyan):
-</p><pre class="verbatim">subplot 2 2 2:rotate 60 40
-new z 50 'x'
-plot x y0 z:box
-</pre><p>Functions <a href="#plot">plot</a> and <a href="#subdata">subdata</a> make 3D curve plot but for single array. Use it to put circle marks on the previous plot:
-</p><pre class="verbatim">new y2 10 3 'cos(pi*(x+y/2))'
-modify y2 '2*x-1' 2
-plot y2(:,0) y2(:,1) y2(:,2) 'bo '
-</pre><p>Note that line style is empty `<samp> </samp>` here. Usage of other 1D plotting functions looks similar:
-</p><pre class="verbatim">subplot 2 2 3:rotate 60 40
-bars x y0 z 'r':box
-</pre>
-<p>Surfaces <a href="#surf">surf</a> and other 2D plots (see <a href="#g_t2D-plotting">2D plotting</a>) are drown the same simpler as 1D one. The difference is that the string parameter specifies not the line style but the color scheme of the plot (see <a href="#Color-scheme">Color scheme</a>). Here I draw attention on 4 most interesting color schemes. There is gray scheme where color is changed from black to white (string `<samp>kw</samp>`) or from white to black (string `<samp>wk</samp>`). Another scheme is useful for accentuation of negative (by blue color) and positive (by red color) regions on plot (string `<samp>"BbwrR"</samp>`). Last one is the popular “jet” scheme (string `<samp>"BbcyrR"</samp>`).
-</p>
-<p>Now I shall show the example of a surface drawing. At first let us switch lightning on
-</p><pre class="verbatim">light on
-</pre><p>and draw the surface, considering coordinates x,y to be uniformly distributed in axis range
-</p><pre class="verbatim">new a0 50 40 '0.6*sin(pi*(x+1))*sin(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-subplot 2 2 0:rotate 60 40
-surf a0:box
-</pre><p>Color scheme was not specified. So previous color scheme is used. In this case it is default color scheme (“jet”) for the first plot. Next example is a sphere. The sphere is parametrically specified surface:
-</p><pre class="verbatim">new x 50 40 '0.8*sin(pi*x)*cos(pi*y/2)'
-new y 50 40 '0.8*cos(pi*x)*cos(pi*y/2)'
-new z 50 40 '0.8*sin(pi*y/2)'
-subplot 2 2 1:rotate 60 40
-surf x y z 'BbwrR':box
-</pre><p>I set color scheme to <code>"BbwrR"</code> that corresponds to red top and blue bottom of the sphere.
-</p>
-<p>Surfaces will be plotted for each of slice of the data if <var>nz</var>>1. Next example draws surfaces for data arrays with <var>nz</var>=3:
-</p><pre class="verbatim">new a1 50 40 3
-modify a1 '0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))'
-modify a1 '0.6*cos(2*pi*x)*cos(3*pi*y)+0.4*sin(3*pi*(x*y))' 1
-modify a1 '0.6*cos(2*pi*x)*cos(3*pi*y)+0.4*cos(3*pi*(x*y))' 2
-subplot 2 2 2:rotate 60 40
-alpha on
-surf a1:box
-</pre><p>Note, that it may entail a confusion. However, if one will use density plot then the picture will look better:
-</p><pre class="verbatim">subplot 2 2 3:rotate 60 40
-dens a1:box
-</pre>
-<p>Drawing of other 2D plots is analogous. The only peculiarity is the usage of flag `<samp>#</samp>`. By default this flag switches on the drawing of a grid on plot (<a href="#grid">grid</a> or <a href="#mesh">mesh</a> for plots in plain or in volume). However, for isosurfaces (including surfaces of rotation <a href="#axial">axial</a>) this flag switches the face drawing off and figure becomes wired.
-</p>
-
-<hr>
-<a name="Hints"></a>
-<div class="header">
-<p>
-Next: <a href="#FAQ" accesskey="n" rel="next">FAQ</a>, Previous: <a href="#Data-plotting" accesskey="p" rel="prev">Data plotting</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Hints-1"></a>
-<h3 class="section">5.5 Hints</h3>
-
-
-<p>In this section I`ve included some small hints and advices for the improving of the quality of plots and for the demonstration of some non-trivial features of MathGL library. In contrast to previous examples I showed mostly the idea but not the whole drawing function.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#g_t_0060_0060Compound_0027_0027-graphics" accesskey="1">``Compound'' graphics</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Transparency-and-lighting" accesskey="2">Transparency and lighting</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Types-of-transparency" accesskey="3">Types of transparency</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Axis-projection" accesskey="4">Axis projection</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Adding-fog" accesskey="5">Adding fog</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Lighting-sample" accesskey="6">Lighting sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Using-primitives" accesskey="7">Using primitives</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#STFA-sample" accesskey="8">STFA sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Mapping-visualization" accesskey="9">Mapping visualization</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Data-interpolation">Data interpolation</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Making-regular-data">Making regular data</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Making-histogram">Making histogram</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Nonlinear-fitting-hints">Nonlinear fitting hints</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#PDE-solving-hints">PDE solving hints</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Drawing-phase-plain">Drawing phase plain</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Pulse-properties">Pulse properties</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Using-MGL-parser">Using MGL parser</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Using-options">Using options</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#g_t_0060_0060Templates_0027_0027">``Templates''</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Stereo-image">Stereo image</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Reduce-memory-usage">Reduce memory usage</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Saving-and-scanning-file">Saving and scanning file</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Mixing-bitmap-and-vector-output">Mixing bitmap and vector output</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="g_t_0060_0060Compound_0027_0027-graphics"></a>
-<div class="header">
-<p>
-Next: <a href="#Transparency-and-lighting" accesskey="n" rel="next">Transparency and lighting</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="g_t_0060_0060Compound_0027_0027-graphics-1"></a>
-<h4 class="subsection">5.5.1 “Compound” graphics</h4>
-
-
-<p>As I noted above, MathGL functions (except the special one, like Clf()) do not erase the previous plotting but just add the new one. It allows one to draw “compound” plots easily. For example, popular Matlab command <code>surfc</code> can be emulated in MathGL by 2 calls:
-</p><pre class="verbatim"> Surf(a);
- Cont(a, "_"); // draw contours at bottom
-</pre><p>Here <var>a</var> is 2-dimensional data for the plotting, <code>-1</code> is the value of z-coordinate at which the contour should be plotted (at the bottom in this example). Analogously, one can draw density plot instead of contour lines and so on.
-</p>
-<p>Another nice plot is contour lines plotted directly on the surface:
-</p><pre class="verbatim"> Light(true); // switch on light for the surface
- Surf(a, "BbcyrR"); // select 'jet' colormap for the surface
- Cont(a, "y"); // and yellow color for contours
-</pre><p>The possible difficulties arise in black&white case, when the color of the surface can be close to the color of a contour line. In that case I may suggest the following code:
-</p><pre class="verbatim"> Light(true); // switch on light for the surface
- Surf(a, "kw"); // select 'gray' colormap for the surface
- CAxis(-1,0); // first draw for darker surface colors
- Cont(a, "w"); // white contours
- CAxis(0,1); // now draw for brighter surface colors
- Cont(a, "k"); // black contours
- CAxis(-1,1); // return color range to original state
-</pre><p>The idea is to divide the color range on 2 parts (dark and bright) and to select the contrasting color for contour lines for each of part.
-</p>
-<p>Similarly, one can plot flow thread over density plot of vector field amplitude (this is another amusing plot from Matlab) and so on. The list of compound graphics can be prolonged but I hope that the general idea is clear.
-</p>
-<p>Just for illustration I put here following sample code:
-</p><pre class="verbatim">call 'prepare2v'
-call 'prepare3d'
-new v 10:fill v -0.5 1:copy d sqrt(a^2+b^2)
-subplot 2 2 0:title 'Surf + Cont':rotate 50 60:light on:box
-surf a:cont a 'y'
-
-subplot 2 2 1 '':title 'Flow + Dens':light off:box
-flow a b 'br':dens d
-
-subplot 2 2 2:title 'Mesh + Cont':rotate 50 60:box
-mesh a:cont a '_'
-
-subplot 2 2 3:title 'Surf3 + ContF3':rotate 50 60:light on
-box:contf3 v c 'z' 0:contf3 v c 'x':contf3 v c
-cut 0 -1 -1 1 0 1.1
-contf3 v c 'z' c.nz-1:surf3 c -0.5
-</pre>
-<div align="center"><img src="png/combined.png" alt="Example of “combined” plots">
-</div>
-
-<hr>
-<a name="Transparency-and-lighting"></a>
-<div class="header">
-<p>
-Next: <a href="#Types-of-transparency" accesskey="n" rel="next">Types of transparency</a>, Previous: <a href="#g_t_0060_0060Compound_0027_0027-graphics" accesskey="p" rel="prev">``Compound'' graphics</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Transparency-and-lighting-1"></a>
-<h4 class="subsection">5.5.2 Transparency and lighting</h4>
-
-
-<p>Here I want to show how transparency and lighting both and separately change the look of a surface. So, there is code and picture for that:
-</p><pre class="verbatim">call 'prepare2d'
-subplot 2 2 0:title 'default':rotate 50 60:box
-surf a
-
-subplot 2 2 1:title 'light on':rotate 50 60:box
-light on:surf a
-
-subplot 2 2 3:title 'light on; alpha on':rotate 50 60:box
-alpha on:surf a
-
-subplot 2 2 2:title 'alpha on':rotate 50 60:box
-light off:surf a
-</pre>
-<div align="center"><img src="png/alpha.png" alt="Example of transparency and lightings">
-</div>
-
-<hr>
-<a name="Types-of-transparency"></a>
-<div class="header">
-<p>
-Next: <a href="#Axis-projection" accesskey="n" rel="next">Axis projection</a>, Previous: <a href="#Transparency-and-lighting" accesskey="p" rel="prev">Transparency and lighting</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Types-of-transparency-1"></a>
-<h4 class="subsection">5.5.3 Types of transparency</h4>
-
-
-<p>MathGL library has advanced features for setting and handling the surface transparency. The simplest way to add transparency is the using of command <a href="#alpha">alpha</a>. As a result, all further surfaces (and isosurfaces, density plots and so on) become transparent. However, their look can be additionally improved.
-</p>
-<p>The value of transparency can be different from surface to surface. To do it just use <code>SetAlphaDef</code> before the drawing of the surface, or use option <code>alpha</code> (see <a href="#Command-options">Command options</a>). If its value is close to 0 then the surface becomes more and more transparent. Contrary, if its value is close to 1 then the surface becomes practically non-transparent.
-</p>
-<p>Also you can change the way how the light goes through overlapped surfaces. The function <code>SetTranspType</code> defines it. By default the usual transparency is used (`<samp>0</samp>`) - surfaces below is less visible than the upper ones. A “glass-like” transparency (`<samp>1</samp>`) has a different look - each surface just decreases the background light (the surfaces are commutable in this case).
-</p>
-<p>A “neon-like” transparency (`<samp>2</samp>`) has more interesting look. In this case a surface is the light source (like a lamp on the dark background) and just adds some intensity to the color. At this, the library sets automatically the black color for the background and changes the default line color to white.
-</p>
-<p>As example I shall show several plots for different types of transparency. The code is the same except the values of <code>SetTranspType</code> function:
-</p><pre class="verbatim">call 'prepare2d'
-alpha on:light on
-transptype 0:clf
-subplot 2 2 0:rotate 50 60:surf a:box
-subplot 2 2 1:rotate 50 60:dens a:box
-subplot 2 2 2:rotate 50 60:cont a:box
-subplot 2 2 3:rotate 50 60:axial a:box
-</pre>
-<div align="center"><img src="png/type0.png" alt="Example of SetTranspType(0).">
-</div><div align="center"><img src="png/type1.png" alt="Example of SetTranspType(1).">
-</div><div align="center"><img src="png/type2.png" alt="Example of SetTranspType(2).">
-</div>
-
-
-<hr>
-<a name="Axis-projection"></a>
-<div class="header">
-<p>
-Next: <a href="#Adding-fog" accesskey="n" rel="next">Adding fog</a>, Previous: <a href="#Ternary-axis" accesskey="p" rel="prev">Ternary axis</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Axis-projection-1"></a>
-<h4 class="subsection">5.5.4 Axis projection</h4>
-
-
-<p>You can easily make 3D plot and draw its x-,y-,z-projections (like in CAD) by using <a href="#ternary">ternary</a> function with arguments: 4 for Cartesian, 5 for Ternary and 6 for Quaternary coordinates. The sample code is:
-</p><pre class="verbatim">ranges 0 1 0 1 0 1
-new x 50 '0.25*(1+cos(2*pi*x))'
-new y 50 '0.25*(1+sin(2*pi*x))'
-new z 50 'x'
-new a 20 30 '30*x*y*(1-x-y)^2*(x+y<1)'
-new rx 10 'rnd':new ry 10:fill ry '(1-v)*rnd' rx
-light on
-
-title 'Projection sample':ternary 4:rotate 50 60
-box:axis:grid
-plot x y z 'r2':surf a '#'
-xlabel 'X':ylabel 'Y':zlabel 'Z'
-</pre>
-<div align="center"><img src="png/projection.png" alt="Example of axis projections">
-</div>
-
-<hr>
-<a name="Adding-fog"></a>
-<div class="header">
-<p>
-Next: <a href="#Lighting-sample" accesskey="n" rel="next">Lighting sample</a>, Previous: <a href="#Axis-projection" accesskey="p" rel="prev">Axis projection</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Adding-fog-1"></a>
-<h4 class="subsection">5.5.5 Adding fog</h4>
-
-
-<p>MathGL can add a fog to the image. Its switching on is rather simple - just use <a href="#fog">fog</a> function. There is the only feature - fog is applied for whole image. Not to particular subplot. The sample code is:
-</p><pre class="verbatim">call 'prepare2d'
-title 'Fog sample':rotate 50 60:light on
-fog 1
-box:surf a:cont a 'y'
-</pre>
-<div align="center"><img src="png/fog.png" alt="Example of Fog().">
-</div>
-
-<hr>
-<a name="Lighting-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#Using-primitives" accesskey="n" rel="next">Using primitives</a>, Previous: <a href="#Adding-fog" accesskey="p" rel="prev">Adding fog</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Lighting-sample-1"></a>
-<h4 class="subsection">5.5.6 Lighting sample</h4>
-
-
-<p>In contrast to the most of other programs, MathGL supports several (up to 10) light sources. Moreover, the color each of them can be different: white (this is usual), yellow, red, cyan, green and so on. The use of several light sources may be interesting for the highlighting of some peculiarities of the plot or just to make an amusing picture. Note, each light source can be switched on/off individually. The sample code is:
-</p><pre class="verbatim">call 'prepare2d'
-title 'Several light sources':rotate 50 60:light on
-light 1 0 1 0 'c':light 2 1 0 0 'y':light 3 0 -1 0 'm'
-box:surf a 'h'
-</pre>
-<div align="center"><img src="png/several_light.png" alt="Example of several light sources.">
-</div>
-<p>Additionally, you can use local light sources and set to use <a href="#diffuse">diffuse</a> reflection instead of specular one (by default) or both kinds. Note, I use <a href="#attachlight">attachlight</a> command to keep light settings relative to subplot.
-</p><pre class="verbatim">light on: attachlight on
-call 'prepare2d'
-subplot 2 2 0:title 'Default':rotate 50 60:box:surf a
-line -1 -0.7 1.7 -1 -0.7 0.7 'BA'
-
-subplot 2 2 1:title 'Local':rotate 50 60
-light 0 1 0 1 -2 -1 -1
-line 1 0 1 -1 -1 0 'BAO':box:surf a
-
-subplot 2 2 2:title 'no diffuse':rotate 50 60
-diffuse 0
-line 1 0 1 -1 -1 0 'BAO':box:surf a
-
-subplot 2 2 3:title 'diffusive only':rotate 50 60
-diffuse 0.5:light 0 1 0 1 -2 -1 -1 'w' 0
-line 1 0 1 -1 -1 0 'BAO':box:surf a
-</pre>
-<div align="center"><img src="png/light.png" alt="Example of different types of lighting.">
-</div>
-
-<hr>
-<a name="Using-primitives"></a>
-<div class="header">
-<p>
-Next: <a href="#STFA-sample" accesskey="n" rel="next">STFA sample</a>, Previous: <a href="#Lighting-sample" accesskey="p" rel="prev">Lighting sample</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Using-primitives-1"></a>
-<h4 class="subsection">5.5.7 Using primitives</h4>
-
-
-<p>MathGL provide a set of functions for drawing primitives (see <a href="#Primitives">Primitives</a>). Primitives are low level object, which used by most of plotting functions. Picture below demonstrate some of commonly used primitives.
-</p><pre class="verbatim">subplot 2 2 0 '':title 'Line, Curve, Rhomb, Ellipse' '' -1.5
-line -1 -1 -0.5 1 'qAI'
-curve -0.6 -1 1 1 0 1 1 1 'rA'
-ball 0 -0.5 '*':ball 1 -0.1 '*'
-rhomb 0 0.4 1 0.9 0.2 'b#'
-rhomb 0 0 1 0.4 0.2 'cg@'
-ellipse 0 -0.5 1 -0.1 0.2 'u#'
-ellipse 0 -1 1 -0.6 0.2 'm@'
-
-light on
-subplot 2 2 1:title 'Face[xyz]':rotate 50 60:box
-facex 1 0 -1 1 1 'r':facey -1 -1 -1 1 1 'g':facez 1 -1 -1 -1 1 'b'
-face -1 -1 1 -1 1 1 1 -1 0 1 1 1 'bmgr'
-
-subplot 2 2 3 '':title 'Cone'
-cone -0.7 -0.3 0 -0.7 0.7 0.5 0.2 0.1 'b':text -0.7 -0.7 'no edges\n(default)'
-cone 0 -0.3 0 0 0.7 0.5 0.2 0.1 'g@':text 0 -0.7 'with edges\n('\@' style)'
-cone 0.7 -0.3 0 0.7 0.7 0.5 0.2 0.1 'ry':text 0.7 -0.7 '"arrow" with\n{}gradient'
-
-subplot 2 2 2 '':title 'Sphere and Drop'
-line -0.9 0 1 0.9 0 1
-text -0.9 -0.7 'sh=0':drop -0.9 0 0 1 0.5 'r' 0:ball -0.9 0 1 'k'
-text -0.3 -0.7 'sh=0.33':drop -0.3 0 0 1 0.5 'r' 0.33:ball -0.3 0 1 'k'
-text 0.3 -0.7 'sh=0.67':drop 0.3 0 0 1 0.5 'r' 0.67:ball 0.3 0 1 'k'
-text 0.9 -0.7 'sh=1':drop 0.9 0 0 1 0.5 'r' 1:ball 0.9 0 1 'k'
-</pre>
-<div align="center"><img src="png/primitives.png" alt="Primitives in MathGL.">
-</div>
-<p>Generally, you can create arbitrary new kind of plot using primitives. For example, MathGL don`t provide any special functions for drawing molecules. However, you can do it using only one type of primitives <a href="#drop">drop</a>. The sample code is:
-</p><pre class="verbatim">alpha on:light on
-subplot 2 2 0 '':title 'Methane, CH_4':rotate 60 120
-sphere 0 0 0 0.25 'k':drop 0 0 0 0 0 1 0.35 'h' 1 2:sphere 0 0 0.7 0.25 'g'
-drop 0 0 0 -0.94 0 -0.33 0.35 'h' 1 2:sphere -0.66 0 -0.23 0.25 'g'
-drop 0 0 0 0.47 0.82 -0.33 0.35 'h' 1 2:sphere 0.33 0.57 -0.23 0.25 'g'
-drop 0 0 0 0.47 -0.82 -0.33 0.35 'h' 1 2:sphere 0.33 -0.57 -0.23 0.25 'g'
-
-subplot 2 2 1 '':title 'Water, H{_2}O':rotate 60 100
-sphere 0 0 0 0.25 'r':drop 0 0 0 0.3 0.5 0 0.3 'm' 1 2:sphere 0.3 0.5 0 0.25 'g'
-drop 0 0 0 0.3 -0.5 0 0.3 'm' 1 2:sphere 0.3 -0.5 0 0.25 'g'
-
-subplot 2 2 2 '':title 'Oxygen, O_2':rotate 60 120
-drop 0 0.5 0 0 -0.3 0 0.3 'm' 1 2:sphere 0 0.5 0 0.25 'r'
-drop 0 -0.5 0 0 0.3 0 0.3 'm' 1 2:sphere 0 -0.5 0 0.25 'r'
-
-subplot 2 2 3 '':title 'Ammonia, NH_3':rotate 60 120
-sphere 0 0 0 0.25 'b':drop 0 0 0 0.33 0.57 0 0.32 'n' 1 2
-sphere 0.33 0.57 0 0.25 'g':drop 0 0 0 0.33 -0.57 0 0.32 'n' 1 2
-sphere 0.33 -0.57 0 0.25 'g':drop 0 0 0 -0.65 0 0 0.32 'n' 1 2
-sphere -0.65 0 0 0.25 'g'
-</pre>
-<div align="center"><img src="png/molecule.png" alt="Example of molecules drawing.">
-</div>
-<p>Moreover, some of special plots can be more easily produced by primitives rather than by specialized function. For example, Venn diagram can be produced by <code>Error</code> plot:
-</p><pre class="verbatim">list x -0.3 0 0.3:list y 0.3 -0.3 0.3:list e 0.7 0.7 0.7
-title 'Venn-like diagram':alpha on
-error x y e e '!rgb@#o'
-</pre><p>You see that you have to specify and fill 3 data arrays. The same picture can be produced by just 3 calls of <a href="#circle">circle</a> function:
-</p><pre class="verbatim">title 'Venn-like diagram':alpha on
-circle -0.3 0.3 0.7 'rr@'
-circle 0 -0.3 0.7 'gg@'
-circle 0.3 0.3 0.7 'bb@'
-</pre><p>Of course, the first variant is more suitable if you need to plot a lot of circles. But for few ones the usage of primitives looks easy.
-</p>
-<div align="center"><img src="png/venn.png" alt="Example of Venn diagram.">
-</div>
-
-<hr>
-<a name="STFA-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#Mapping-visualization" accesskey="n" rel="next">Mapping visualization</a>, Previous: <a href="#Using-primitives" accesskey="p" rel="prev">Using primitives</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="STFA-sample-1"></a>
-<h4 class="subsection">5.5.8 STFA sample</h4>
-
-
-<p>Short-time Fourier Analysis (<a href="#stfa">stfa</a>) is one of informative method for analyzing long rapidly oscillating 1D data arrays. It is used to determine the sinusoidal frequency and phase content of local sections of a signal as it changes over time.
-</p>
-<p>MathGL can find and draw STFA result. Just to show this feature I give following sample. Initial data arrays is 1D arrays with step-like frequency. Exactly this you can see at bottom on the STFA plot. The sample code is:
-</p><pre class="verbatim">new a 2000:new b 2000
-fill a 'cos(50*pi*x)*(x<-.5)+cos(100*pi*x)*(x<0)*(x>-.5)+\
-cos(200*pi*x)*(x<.5)*(x>0)+cos(400*pi*x)*(x>.5)'
-
-subplot 1 2 0 '<_':title 'Initial signal'
-plot a:axis:xlabel '\i t'
-
-subplot 1 2 1 '<_':title 'STFA plot'
-stfa a b 64:axis:ylabel '\omega' 0:xlabel '\i t'
-</pre>
-<div align="center"><img src="png/stfa.png" alt="Example of STFA().">
-</div>
-
-<hr>
-<a name="Mapping-visualization"></a>
-<div class="header">
-<p>
-Next: <a href="#Data-interpolation" accesskey="n" rel="next">Data interpolation</a>, Previous: <a href="#STFA-sample" accesskey="p" rel="prev">STFA sample</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Mapping-visualization-1"></a>
-<h4 class="subsection">5.5.9 Mapping visualization</h4>
-
-
-<p>Sometime ago I worked with mapping and have a question about its visualization. Let me remember you that mapping is some transformation rule for one set of number to another one. The 1d mapping is just an ordinary function - it takes a number and transforms it to another one. The 2d mapping (which I used) is a pair of functions which take 2 numbers and transform them to another 2 ones. Except general plots (like <a href="#surfc">surfc</a>, <a href="#surfa">surfa</a>) there is a special plot - Arnold diagram. It shows the area which is the result of mapping of some initial area (usually square).
-</p>
-<p>I tried to make such plot in <a href="#map">map</a>. It shows the set of points or set of faces, which final position is the result of mapping. At this, the color gives information about their initial position and the height describes Jacobian value of the transformation. Unfortunately, it looks good only for the simplest mapping but for the real multivalent quasi-chaotic mapping it produces a confusion. So, use it if you like :).
-</p>
-<p>The sample code for mapping visualization is:
-</p><pre class="verbatim">new a 50 40 'x':new b 50 40 'y':zrange -2 2:text 0 0 '\to'
-subplot 2 1 0:text 0 1.1 '\{x, y\}' '' -2:box
-map a b 'brgk'
-
-subplot 2 1 1:box
-text 0 1.1 '\{\frac{x^3+y^3}{2}, \frac{x-y}{2}\}' '' -2
-fill a '(x^3+y^3)/2':fill b '(x-y)/2':map a b 'brgk'
-</pre>
-<div align="center"><img src="png/map.png" alt="Example of Map().">
-</div>
-
-<hr>
-<a name="Data-interpolation"></a>
-<div class="header">
-<p>
-Next: <a href="#Making-regular-data" accesskey="n" rel="next">Making regular data</a>, Previous: <a href="#Mapping-visualization" accesskey="p" rel="prev">Mapping visualization</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Data-interpolation-1"></a>
-<h4 class="subsection">5.5.10 Data interpolation</h4>
-
-
-<p>There are many functions to get interpolated values of a data array. Basically all of them can be divided by 3 categories:
-</p><ol>
-<li> functions which return single value at given point (see <a href="#Interpolation">Interpolation</a> and <code>mglGSpline()</code> in <a href="#Global-functions">Global functions</a>);
-</li><li> functions <a href="#subdata">subdata</a> and <a href="#evaluate">evaluate</a> for indirect access to data elements;
-</li><li> functions <a href="#refill">refill</a>, <a href="#gspline">gspline</a> and <a href="#datagrid">datagrid</a> which fill regular (rectangular) data array by interpolated values.
-</li></ol>
-
-<p>The usage of first category is rather straightforward and don`t need any special comments.
-</p>
-<p>There is difference in indirect access functions. Function <a href="#subdata">subdata</a> use use step-like interpolation to handle correctly single <code>nan</code> values in the data array. Contrary, function <a href="#evaluate">evaluate</a> use local spline interpolation, which give smoother output but spread <code>nan</code> values. So, <a href="#subdata">subdata</a> should be used for specific data elements (for example, for given column), and <a href="#evaluate">evaluate</a> should be used for distributed elements (i.e. consider data array as some field). Following sample illustrates this difference:
-</p><pre class="verbatim">subplot 1 1 0 '':title 'SubData vs Evaluate'
-new in 9 'x^3/1.1':plot in 'ko ':box
-new arg 99 '4*x+4'
-evaluate e in arg off:plot e 'b.'; legend 'Evaluate'
-subdata s in arg:plot s 'r.';legend 'SubData'
-legend 2
-</pre>
-<div align="center"><img src="png/indirect.png" alt="Example of indirect data access.">
-</div>
-<p>Example of <a href="#datagrid">datagrid</a> usage is done in <a href="#Making-regular-data">Making regular data</a>. Here I want to show the peculiarities of <a href="#refill">refill</a> and <a href="#gspline">gspline</a> functions. Both functions require argument(s) which provide coordinates of the data values, and return rectangular data array which equidistantly distributed in axis range. So, in opposite to <a href="#evaluate">evaluate</a> function, <a href="#refill">refill</a> and <a href="#gspline">gspline</a> can interpolate non-equidistantly distributed data. At this both functions <a href="#refill">refill</a> and <a href="#gspline">gspline</a> provide continuity of 2nd derivatives along coordinate(s). However, <a href="#refill">refill</a> is slower but give better (from human point of view) result than global spline <a href="#gspline">gspline</a> due to more advanced algorithm. Following sample illustrates this difference:
-</p><pre class="verbatim">new x 10 '0.5+rnd':cumsum x 'x':norm x -1 1
-copy y sin(pi*x)/1.5
-subplot 2 2 0 '<_':title 'Refill sample'
-box:axis:plot x y 'o ':fplot 'sin(pi*x)/1.5' 'B:'
-new r 100:refill r x y:plot r 'r'
-
-subplot 2 2 1 '<_':title 'Global spline'
-box:axis:plot x y 'o ':fplot 'sin(pi*x)/1.5' 'B:'
-new r 100:gspline r x y:plot r 'r'
-
-new y 10 '0.5+rnd':cumsum y 'x':norm y -1 1
-copy xx x:extend xx 10
-copy yy y:extend yy 10:transpose yy
-copy z sin(pi*xx*yy)/1.5
-alpha on:light on
-subplot 2 2 2:title '2d regular':rotate 40 60
-box:axis:mesh xx yy z 'k'
-new rr 100 100:refill rr x y z:surf rr
-
-new xx 10 10 '(x+1)/2*cos(y*pi/2-1)'
-new yy 10 10 '(x+1)/2*sin(y*pi/2-1)'
-copy z sin(pi*xx*yy)/1.5
-subplot 2 2 3:title '2d non-regular':rotate 40 60
-box:axis:plot xx yy z 'ko '
-new rr 100 100:refill rr xx yy z:surf rr
-</pre>
-<div align="center"><img src="png/refill.png" alt="Example of non-equidistant data interpolation.">
-</div>
-
-<hr>
-<a name="Making-regular-data"></a>
-<div class="header">
-<p>
-Next: <a href="#Making-histogram" accesskey="n" rel="next">Making histogram</a>, Previous: <a href="#Data-interpolation" accesskey="p" rel="prev">Data interpolation</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Making-regular-data-1"></a>
-<h4 class="subsection">5.5.11 Making regular data</h4>
-
-
-<p>Sometimes, one have only unregular data, like as data on triangular grids, or experimental results and so on. Such kind of data cannot be used as simple as regular data (like matrices). Only few functions, like <a href="#dots">dots</a>, can handle unregular data as is.
-</p>
-<p>However, one can use built in triangulation functions for interpolating unregular data points to a regular data grids. There are 2 ways. First way, one can use <a href="#triangulation">triangulation</a> function to obtain list of vertexes for triangles. Later this list can be used in functions like <a href="#triplot">triplot</a> or <a href="#tricont">tricont</a>. Second way consist in usage of <a href="#datagrid">datagrid</a> function, which fill regular data grid by interpolated values, assuming that coordinates of the data grid is equidistantly distributed in axis range. Note, you can use options (see <a href="#Command-options">Command options</a>) to change default axis range as well as in other plotting functions.
-</p><pre class="verbatim">new x 100 '2*rnd-1':new y 100 '2*rnd-1':copy z x^2-y^2
-# first way - plot triangular surface for points
-triangulate d x y
-title 'Triangulation'
-rotate 50 60:box:light on
-triplot d x y z:triplot d x y z '#k'
-# second way - make regular data and plot it
-new g 30 30:datagrid g x y z:mesh g 'm'
-</pre>
-<div align="center"><img src="png/triangulation.png" alt="Example of triangulation.">
-</div>
-
-<hr>
-<a name="Making-histogram"></a>
-<div class="header">
-<p>
-Next: <a href="#Nonlinear-fitting-hints" accesskey="n" rel="next">Nonlinear fitting hints</a>, Previous: <a href="#Making-regular-data" accesskey="p" rel="prev">Making regular data</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Making-histogram-1"></a>
-<h4 class="subsection">5.5.12 Making histogram</h4>
-
-
-<p>Using the <a href="#hist">hist</a> function(s) for making regular distributions is one of useful fast methods to process and plot irregular data. <code>Hist</code> can be used to find some momentum of set of points by specifying weight function. It is possible to create not only 1D distributions but also 2D and 3D ones. Below I place the simplest sample code which demonstrate <a href="#hist">hist</a> usage:
-</p><pre class="verbatim">new x 10000 '2*rnd-1':new y 10000 '2*rnd-1':copy z exp(-6*(x^2+y^2))
-hist xx x z:norm xx 0 1:hist yy y z:norm yy 0 1
-multiplot 3 3 3 2 2 '':ranges -1 1 -1 1 0 1:box:dots x y z 'wyrRk'
-multiplot 3 3 0 2 1 '':ranges -1 1 0 1:box:bars xx
-multiplot 3 3 5 1 2 '':ranges 0 1 -1 1:box:barh yy
-subplot 3 3 2:text 0.5 0.5 'Hist and\n{}MultiPlot\n{}sample' 'a' -3
-</pre>
-<div align="center"><img src="png/hist.png" alt="Example of Hist().">
-</div>
-
-
-<hr>
-<a name="Nonlinear-fitting-hints"></a>
-<div class="header">
-<p>
-Next: <a href="#PDE-solving-hints" accesskey="n" rel="next">PDE solving hints</a>, Previous: <a href="#Making-histogram" accesskey="p" rel="prev">Making histogram</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Nonlinear-fitting-hints-1"></a>
-<h4 class="subsection">5.5.13 Nonlinear fitting hints</h4>
-
-
-<p>Nonlinear fitting is rather simple. All that you need is the data to fit, the approximation formula and the list of coefficients to fit (better with its initial guess values). Let me demonstrate it on the following simple example. First, let us use sin function with some random noise:
-</p><pre class="verbatim">new dat 100 '0.4*rnd+0.1+sin(2*pi*x)'
-new in 100 '0.3+sin(2*pi*x)'
-</pre><p>and plot it to see that data we will fit
-</p><pre class="verbatim">title 'Fitting sample':yrange -2 2:box:axis:plot dat 'k. '
-</pre>
-<p>The next step is the fitting itself. For that let me specify an initial values <var>ini</var> for coefficients `<samp>abc</samp>` and do the fitting for approximation formula `<samp>a+b*sin(c*x)</samp>`
-</p><pre class="verbatim">list ini 1 1 3:fit res dat 'a+b*sin(c*x)' 'abc' ini
-</pre><p>Now display it
-</p><pre class="verbatim">plot res 'r':plot in 'b'
-text -0.9 -1.3 'fitted:' 'r:L'
-putsfit 0 -1.8 'y = ' 'r'
-text 0 2.2 'initial: y = 0.3+sin(2\pi x)' 'b'
-</pre>
-<p>NOTE! the fitting results may have strong dependence on initial values for coefficients due to algorithm features. The problem is that in general case there are several local "optimums" for coefficients and the program returns only first found one! There are no guaranties that it will be the best. Try for example to set <code>ini[3] = {0, 0, 0}</code> in the code above.
-</p>
-<p>The full sample code for nonlinear fitting is:
-</p><pre class="verbatim">new dat 100 '0.4*rnd+0.1+sin(2*pi*x)'
-new in 100 '0.3+sin(2*pi*x)'
-list ini 1 1 3:fit res dat 'a+b*sin(c*x)' 'abc' ini
-title 'Fitting sample':yrange -2 2:box:axis:plot dat 'k. '
-plot res 'r':plot in 'b'
-text -0.9 -1.3 'fitted:' 'r:L'
-putsfit 0 -1.8 'y = ' 'r'
-text 0 2.2 'initial: y = 0.3+sin(2\pi x)' 'b'
-</pre>
-<div align="center"><img src="png/fit.png" alt="Example of nonlinear fitting.">
-</div>
-
-<hr>
-<a name="PDE-solving-hints"></a>
-<div class="header">
-<p>
-Next: <a href="#Drawing-phase-plain" accesskey="n" rel="next">Drawing phase plain</a>, Previous: <a href="#Nonlinear-fitting-hints" accesskey="p" rel="prev">Nonlinear fitting hints</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="PDE-solving-hints-1"></a>
-<h4 class="subsection">5.5.14 PDE solving hints</h4>
-
-
-<p>Solving of Partial Differential Equations (PDE, including beam tracing) and ray tracing (or finding particle trajectory) are more or less common task. So, MathGL have several functions for that. There are <a href="#ray">ray</a> for ray tracing, <a href="#pde">pde</a> for PDE solving, <a href="#qo2d">qo2d</a> for beam tracing in 2D case (see <a href="#Global-functions">Global functions</a>). Note, that these functions take “Hamiltonian” or equations as string values. And I don`t plan now to allow one to use user-defined functions. There are 2 reasons: the complexity of corresponding interface; and the basic nature of used methods which are good for samples but may not good for serious scientific calculations.
-</p>
-<p>The ray tracing can be done by <a href="#ray">ray</a> function. Really ray tracing equation is Hamiltonian equation for 3D space. So, the function can be also used for finding a particle trajectory (i.e. solve Hamiltonian ODE) for 1D, 2D or 3D cases. The function have a set of arguments. First of all, it is Hamiltonian which defined the media (or the equation) you are planning to use. The Hamiltonian is defined by string which may depend on coordinates `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>`, time `<samp>t</samp>` (for particle dynamics) and momentums `<samp>p</samp>`=<em>p_x</em>, `<samp>q</samp>`=<em>p_y</em>, `<samp>v</samp>`=<em>p_z</em>. Next, you have to define the initial conditions for coordinates and momentums at `<samp>t</samp>`=0 and set the integrations step (default is 0.1) and its duration (default is 10). The Runge-Kutta method of 4-th order is used for integration.
-</p><pre class="verbatim"> const char *ham = "p^2+q^2-x-1+i*0.5*(y+x)*(y>-x)";
- mglData r = mglRay(ham, mglPoint(-0.7, -1), mglPoint(0, 0.5), 0.02, 2);
-</pre><p>This example calculate the reflection from linear layer (media with Hamiltonian `<samp>p^2+q^2-x-1</samp>`=<em>p_x^2+p_y^2-x-1</em>). This is parabolic curve. The resulting array have 7 columns which contain data for {x,y,z,p,q,v,t}.
-</p>
-<p>The solution of PDE is a bit more complicated. As previous you have to specify the equation as pseudo-differential operator <em>\hat H(x, \nabla)</em> which is called sometime as “Hamiltonian” (for example, in beam tracing). As previously, it is defined by string which may depend on coordinates `<samp>x</samp>`, `<samp>y</samp>`, `<samp>z</samp>` (but not time!), momentums `<samp>p</samp>`=<em>(d/dx)/i k_0</em>, `<samp>q</samp>`=<em>(d/dy)/i k_0</em> and field amplitude `<samp>u</samp>`=<em>|u|</em>. The evolutionary coordinate is `<samp>z</samp>` in all cases. So that, the equation look like <em>du/dz = ik_0 H(x,y,\hat p, \hat q, |u|)[u]</em>. Dependence on field amplitude `<samp>u</samp>`=<em>|u|</em> allows one to solve nonlinear problems too. For example, for nonlinear Shrodinger equation you may set <code>ham="p^2 + q^2 - u^2"</code>. Also you may specify imaginary part for wave absorption, like <code>ham = "p^2 + i*x*(x>0)"</code> or <code>ham = "p^2 + i1*x*(x>0)"</code>.
-</p>
-<p>Next step is specifying the initial conditions at `<samp>z</samp>` equal to minimal z-axis value. The function need 2 arrays for real and for imaginary part. Note, that coordinates x,y,z are supposed to be in specified axis range. So, the data arrays should have corresponding scales. Finally, you may set the integration step and parameter k0=<em>k_0</em>. Also keep in mind, that internally the 2 times large box is used (for suppressing numerical reflection from boundaries) and the equation should well defined even in this extended range.
-</p>
-<p>Final comment is concerning the possible form of pseudo-differential operator <em>H</em>. At this moment, simplified form of operator <em>H</em> is supported - all “mixed” terms (like `<samp>x*p</samp>`->x*d/dx) are excluded. For example, in 2D case this operator is effectively <em>H = f(p,z) + g(x,z,u)</em>. However commutable combinations (like `<samp>x*q</samp>`->x*d/dy) are allowed for 3D case.
-</p>
-<p>So, for example let solve the equation for beam deflected from linear layer and absorbed later. The operator will have the form `<samp>"p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)"</samp>` that correspond to equation <em>1/ik_0 * du/dz + d^2 u/dx^2 + d^2 u/dy^2 + x * u + i (x+z)/2 * u = 0</em>. This is typical equation for Electron Cyclotron (EC) absorption in magnetized plasmas. For initial conditions let me select the beam with plane phase front <em>exp(-48*(x+0.7)^2)</em>. The corresponding code looks like this:
-</p><pre class="verbatim">new re 128 'exp(-48*(x+0.7)^2)':new im 128
-pde a 'p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)' re im 0.01 30
-transpose a
-subplot 1 1 0 '<_':title 'PDE solver'
-axis:xlabel '\i x':ylabel '\i z'
-crange 0 1:dens a 'wyrRk'
-fplot '-x' 'k|'
-text 0 0.95 'Equation: ik_0\partial_zu + \Delta u + x\cdot u +\
- i \frac{x+z}{2}\cdot u = 0\n{}absorption: (x+z)/2 for x+z>0'
-</pre>
-<div align="center"><img src="png/pde.png" alt="Example of PDE solving.">
-</div>
-<p>The next example is example of beam tracing. Beam tracing equation is special kind of PDE equation written in coordinates accompanied to a ray. Generally this is the same parameters and limitation as for PDE solving but the coordinates are defined by the ray and by parameter of grid width <var>w</var> in direction transverse the ray. So, you don`t need to specify the range of coordinates. <strong>BUT</strong> there is limitation. The accompanied coordinates are well defined only for smooth enough rays, i.e. then the ray curvature <em>K</em> (which is defined as <em>1/K^2 = (|r''|^2 |r'|^2 - (r'', r'')^2)/|r'|^6</em>) is much large then the grid width: <em>K>>w</em>. So, you may receive incorrect results if this condition will be broken.
-</p>
-<p>You may use following code for obtaining the same solution as in previous example:
-</p><pre class="verbatim">define $1 'p^2+q^2-x-1+i*0.5*(y+x)*(y>-x)'
-subplot 1 1 0 '<_':title 'Beam and ray tracing'
-ray r $1 -0.7 -1 0 0 0.5 0 0.02 2:plot r(0) r(1) 'k'
-axis:xlabel '\i x':ylabel '\i z'
-new re 128 'exp(-48*x^2)':new im 128
-new xx 1:new yy 1
-qo2d a $1 re im r 1 30 xx yy
-crange 0 1:dens xx yy a 'wyrRk':fplot '-x' 'k|'
-text 0 0.85 'absorption: (x+y)/2 for x+y>0'
-text 0.7 -0.05 'central ray'
-</pre>
-<div align="center"><img src="png/qo2d.png" alt="Example of beam tracing.">
-</div>
-<p>Note, the <a href="#pde">pde</a> is fast enough and suitable for many cases routine. However, there is situations then media have both together: strong spatial dispersion and spatial inhomogeneity. In this, case the <a href="#pde">pde</a> will produce incorrect result and you need to use advanced PDE solver <a href="#apde">apde</a>. For example, a wave beam, propagated in plasma, described by Hamiltonian <em>exp(-x^2-p^2)</em>, will have different solution for using of simplification and advanced PDE solver:
-</p><pre class="verbatim">ranges -1 1 0 2 0 2
-new ar 256 'exp(-2*(x+0.0)^2)':new ai 256
-
-apde res1 'exp(-x^2-p^2)' ar ai 0.01:transpose res1
-subplot 1 2 0 '_':title 'Advanced PDE solver'
-ranges 0 2 -1 1:crange res1
-dens res1:box
-axis:xlabel '\i z':ylabel '\i x'
-text -0.5 0.2 'i\partial_z\i u = exp(-\i x^2+\partial_x^2)[\i u]' 'y'
-
-pde res2 'exp(-x^2-p^2)' ar ai 0.01
-subplot 1 2 1 '_':title 'Simplified PDE solver'
-dens res2:box
-axis:xlabel '\i z':ylabel '\i x'
-text -0.5 0.2 'i\partial_z\i u \approx\ exp(-\i x^2)\i u+exp(\partial_x^2)[\i u]' 'y'
-</pre>
-<div align="center"><img src="png/apde.png" alt="Comparison of simplified and advanced PDE solvers.">
-</div>
-
-
-<hr>
-<a name="Drawing-phase-plain"></a>
-<div class="header">
-<p>
-Next: <a href="#Pulse-properties" accesskey="n" rel="next">Pulse properties</a>, Previous: <a href="#PDE-solving-hints" accesskey="p" rel="prev">PDE solving hints</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Drawing-phase-plain-1"></a>
-<h4 class="subsection">5.5.15 Drawing phase plain</h4>
-
-
-<p>Here I want say a few words of plotting phase plains. Phase plain is name for system of coordinates <em>x</em>, <em>x'</em>, i.e. a variable and its time derivative. Plot in phase plain is very useful for qualitative analysis of an ODE, because such plot is rude (it topologically the same for a range of ODE parameters). Most often the phase plain {<em>x</em>, <em>x'</em>} is used (due to its simplicity), that allows to analyze up to the 2nd order ODE (i.e. <em>x''+f(x,x')=0</em>).
-</p>
-<p>The simplest way to draw phase plain in MathGL is using <a href="#flow">flow</a> function(s), which automatically select several points and draw flow threads. If the ODE have an integral of motion (like Hamiltonian <em>H(x,x')=const</em> for dissipation-free case) then you can use <a href="#cont">cont</a> function for plotting isolines (contours). In fact. isolines are the same as flow threads, but without arrows on it. Finally, you can directly solve ODE using <a href="#ode">ode</a> function and plot its numerical solution.
-</p>
-<p>Let demonstrate this for ODE equation <em>x''-x+3*x^2=0</em>. This is nonlinear oscillator with square nonlinearity. It has integral <em>H=y^2+2*x^3-x^2=Const</em>. Also it have 2 typical stationary points: saddle at {x=0, y=0} and center at {x=1/3, y=0}. Motion at vicinity of center is just simple oscillations, and is stable to small variation of parameters. In opposite, motion around saddle point is non-stable to small variation of parameters, and is very slow. So, calculation around saddle points are more difficult, but more important. Saddle points are responsible for solitons, stochasticity and so on.
-</p>
-<p>So, let draw this phase plain by 3 different methods. First, draw isolines for <em>H=y^2+2*x^3-x^2=Const</em> - this is simplest for ODE without dissipation. Next, draw flow threads - this is straightforward way, but the automatic choice of starting points is not always optimal. Finally, use <a href="#ode">ode</a> to check the above plots. At this we need to run <a href="#ode">ode</a> in both direction of time (in future and in the past) to draw whole plain. Alternatively, one can put starting points far from (or at the bounding box as done in <a href="#flow">flow</a>) the plot, but this is a more complicated. The sample code is:
-</p><pre class="verbatim">subplot 2 2 0 '<_':title 'Cont':box
-axis:xlabel 'x':ylabel '\dot{x}'
-new f 100 100 'y^2+2*x^3-x^2-0.5':cont f
-
-subplot 2 2 1 '<_':title 'Flow':box
-axis:xlabel 'x':ylabel '\dot{x}'
-new fx 100 100 'x-3*x^2'
-new fy 100 100 'y'
-flow fy fx 'v';value 7
-
-subplot 2 2 2 '<_':title 'ODE':box
-axis:xlabel 'x':ylabel '\dot{x}'
-for $x -1 1 0.1
- ode r 'y;x-3*x^2' 'xy' [$x,0]
- plot r(0) r(1)
- ode r '-y;-x+3*x^2' 'xy' [$x,0]
- plot r(0) r(1)
-next
-</pre>
-<div align="center"><img src="png/ode.png" alt="Example of ODE solving and phase plain drawing.">
-</div>
-
-
-
-<hr>
-<a name="Pulse-properties"></a>
-<div class="header">
-<p>
-Next: <a href="#Using-MGL-parser" accesskey="n" rel="next">Using MGL parser</a>, Previous: <a href="#Drawing-phase-plain" accesskey="p" rel="prev">Drawing phase plain</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Pulse-properties-1"></a>
-<h4 class="subsection">5.5.16 Pulse properties</h4>
-
-
-<p>There is common task in optics to determine properties of wave pulses or wave beams. MathGL provide special function <a href="#pulse">pulse</a> which return the pulse properties (maximal value, center of mass, width and so on). Its usage is rather simple. Here I just illustrate it on the example of Gaussian pulse, where all parameters are obvious.
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Pulse sample'
-# first prepare pulse itself
-new a 100 'exp(-6*x^2)'
-
-# get pulse parameters
-pulse b a 'x'
-
-# positions and widths are normalized on the number of points. So, set proper axis scale.
-ranges 0 a.nx-1 0 1
-axis:plot a # draw pulse and axis
-
-# now visualize found pulse properties
-define m a.max # maximal amplitude
-# approximate position of maximum
-line b(1) 0 b(1) m 'r='
-# width at half-maximum (so called FWHM)
-line b(1)-b(3)/2 0 b(1)-b(3)/2 m 'm|'
-line b(1)+b(3)/2 0 b(1)+b(3)/2 m 'm|'
-line 0 0.5*m a.nx-1 0.5*m 'h'
-# parabolic approximation near maximum
-new x 100 'x'
-plot b(0)*(1-((x-b(1))/b(2))^2) 'g'
-</pre>
-<div align="center"><img src="png/pulse.png" alt="Example of determining of pulse properties.">
-</div>
-
-
-
-<hr>
-<a name="Using-MGL-parser"></a>
-<div class="header">
-<p>
-Next: <a href="#Using-options" accesskey="n" rel="next">Using options</a>, Previous: <a href="#Pulse-properties" accesskey="p" rel="prev">Pulse properties</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Using-MGL-parser-1"></a>
-<h4 class="subsection">5.5.17 Using MGL parser</h4>
-
-
-<p>MGL scripts can contain loops, conditions and user-defined functions. Below I show very simple example of its usage:
-</p><pre class="verbatim">title 'MGL parser sample'
-call 'sample'
-stop
-
-func 'sample'
-new dat 100 'sin(2*pi*(x+1))'
-plot dat; xrange 0 1
-box:axis:xlabel 'x':ylabel 'y'
-for $0 -1 1 0.1
-if $0<0
-line 0 0 -1 $0 'r'
-else
-line 0 0 -1 $0 'r'
-endif
-next
-</pre>
-<div align="center"><img src="png/parser.png" alt="Example of MGL script parsing.">
-</div>
-
-<hr>
-<a name="Using-options"></a>
-<div class="header">
-<p>
-Next: <a href="#g_t_0060_0060Templates_0027_0027" accesskey="n" rel="next">``Templates''</a>, Previous: <a href="#Using-MGL-parser" accesskey="p" rel="prev">Using MGL parser</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Using-options-1"></a>
-<h4 class="subsection">5.5.18 Using options</h4>
-
-
-<p><a href="#Command-options">Command options</a> allow the easy setup of the selected plot by changing global settings only for this plot. Often, options are used for specifying the range of automatic variables (coordinates). However, options allows easily change plot transparency, numbers of line or faces to be drawn, or add legend entries. The sample function for options usage is:
-</p><pre class="verbatim">new a 31 41 '-pi*x*exp(-(y+1)^2-4*x^2)'
-alpha on:light on
-subplot 2 2 0:title 'Options for coordinates':rotate 40 60:box
-surf a 'r';yrange 0 1
-surf a 'b';yrange 0 -1
-
-subplot 2 2 1:title 'Option "meshnum"':rotate 40 60:box
-mesh a 'r'; yrange 0 1
-mesh a 'b';yrange 0 -1; meshnum 5
-
-subplot 2 2 2:title 'Option "alpha"':rotate 40 60:box
-surf a 'r';yrange 0 1; alpha 0.7
-surf a 'b';yrange 0 -1; alpha 0.3
-
-subplot 2 2 3 '<_':title 'Option "legend"'
-fplot 'x^3' 'r'; legend 'y = x^3'
-fplot 'cos(pi*x)' 'b'; legend 'y = cos \pi x'
-box:axis:legend 2
-</pre>
-<div align="center"><img src="png/mirror.png" alt="Example of options usage.">
-</div>
-
-<hr>
-<a name="g_t_0060_0060Templates_0027_0027"></a>
-<div class="header">
-<p>
-Next: <a href="#Nonlinear-fitting-hints" accesskey="n" rel="next">Nonlinear fitting hints</a>, Previous: <a href="#Using-options" accesskey="p" rel="prev">Using options</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="g_t_0060_0060Templates_0027_0027-1"></a>
-<h4 class="subsection">5.5.19 “Templates”</h4>
-
-
-<p>As I have noted before, the change of settings will influence only for the further plotting commands. This allows one to create “template” function which will contain settings and primitive drawing for often used plots. Correspondingly one may call this template-function for drawing simplification.
-</p>
-<p>For example, let one has a set of points (experimental or numerical) and wants to compare it with theoretical law (for example, with exponent law <em>\exp(-x/2), x \in [0, 20]</em>). The template-function for this task is:
-</p><pre class="verbatim">void template(mglGraph *gr)
-{
- mglData law(100); // create the law
- law.Modify("exp(-10*x)");
- gr->SetRanges(0,20, 0.0001,1);
- gr->SetFunc(0,"lg(y)",0);
- gr->Plot(law,"r2");
- gr->Puts(mglPoint(10,0.2),"Theoretical law: e^x","r:L");
- gr->Label('x',"x val."); gr->Label('y',"y val.");
- gr->Axis(); gr->Grid("xy","g;"); gr->Box();
-}
-</pre><p>At this, one will only write a few lines for data drawing:
-</p><pre class="verbatim"> template(gr); // apply settings and default drawing from template
- mglData dat("fname.dat"); // load the data
- // and draw it (suppose that data file have 2 columns)
- gr->Plot(dat.SubData(0),dat.SubData(1),"bx ");
-</pre><p>A template-function can also contain settings for font, transparency, lightning, color scheme and so on.
-</p>
-<p>I understand that this is obvious thing for any professional programmer, but I several times receive suggestion about “templates” ... So, I decide to point out it here.
-</p>
-
-<hr>
-<a name="Stereo-image"></a>
-<div class="header">
-<p>
-Next: <a href="#Reduce-memory-usage" accesskey="n" rel="next">Reduce memory usage</a>, Previous: <a href="#g_t_0060_0060Templates_0027_0027" accesskey="p" rel="prev">``Templates''</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Stereo-image-1"></a>
-<h4 class="subsection">5.5.20 Stereo image</h4>
-
-
-<p>One can easily create stereo image in MathGL. Stereo image can be produced by making two subplots with slightly different rotation angles. The corresponding code looks like this:
-</p><pre class="verbatim">call 'prepare2d'
-light on
-subplot 2 1 0:rotate 50 60+1:box:surf a
-subplot 2 1 1:rotate 50 60-1:box:surf a
-</pre>
-<div align="center"><img src="png/stereo.png" alt="Example of stereo image.">
-</div>
-
-<hr>
-<a name="Reduce-memory-usage"></a>
-<div class="header">
-<p>
-Next: <a href="#Saving-and-scanning-file" accesskey="n" rel="next">Saving and scanning file</a>, Previous: <a href="#Stereo-image" accesskey="p" rel="prev">Stereo image</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Reduce-memory-usage-1"></a>
-<h4 class="subsection">5.5.21 Reduce memory usage</h4>
-
-
-<p>By default MathGL save all primitives in memory, rearrange it and only later draw them on bitmaps. Usually, this speed up drawing, but may require a lot of memory for plots which contain a lot of faces (like <a href="#cloud">cloud</a>, <a href="#dew">dew</a>). You can use <a href="#quality">quality</a> function for setting to use direct drawing on bitmap and bypassing keeping any primitives in memory. This function also allow you to decrease the quality of the resulting image but increase the speed of the drawing.
-</p>
-<p>The code for lower memory usage looks like this:
-</p><pre class="verbatim">quality 6 # firstly, set to draw directly on bitmap
-for $1 0 1000
- sphere 2*rnd-1 2*rnd-1 0.05
-next
-</pre>
-
-<hr>
-<a name="Saving-and-scanning-file"></a>
-<div class="header">
-<p>
-Next: <a href="#Mixing-bitmap-and-vector-output" accesskey="n" rel="next">Mixing bitmap and vector output</a>, Previous: <a href="#Reduce-memory-usage" accesskey="p" rel="prev">Reduce memory usage</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Scanning-file"></a>
-<h4 class="subsection">5.5.22 Scanning file</h4>
-
-
-<p>MathGL have possibilities to write textual information into file with variable values by help of <a href="#save">save</a> command. This is rather useful for generating an ini-files or preparing human-readable textual files. For example, lets create some textual file
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Save and scanfile sample'
-list a 1 -1 0
-save 'This is test: 0 -> ',a(0),' q' 'test.txt' 'w'
-save 'This is test: 1 -> ',a(1),' q' 'test.txt'
-save 'This is test: 2 -> ',a(2),' q' 'test.txt'
-</pre><p>It contents look like
-</p><pre class="verbatim">This is test: 0 -> 1 q
-This is test: 1 -> -1 q
-This is test: 2 -> 0 q
-</pre><p>Note, that I use option `<samp>w</samp>` at first call of <code>save</code> to overwrite the contents of the file.
-</p>
-<p>Let assume now that you want to read this values (i.e. [[0,1],[1,-1],[2,0]]) from the file. You can use <a href="#scanfile">scanfile</a> for that. The desired values was written using template `<samp>This is test: %g -> %g q</samp>`. So, just use
-</p><pre class="verbatim">scanfile a 'test.txt' 'This is test: %g -> %g'
-</pre><p>and plot it to for assurance
-</p><pre class="verbatim">ranges a(0) a(1):axis:plot a(0) a(1) 'o'
-</pre>
-<p>Note, I keep only the leading part of template (i.e. `<samp>This is test: %g -> %g</samp>` instead of `<samp>This is test: %g -> %g q</samp>`), because there is no important for us information after the second number in the line.
-</p>
-
-<hr>
-<a name="Mixing-bitmap-and-vector-output"></a>
-<div class="header">
-<p>
-Previous: <a href="#Saving-and-scanning-file" accesskey="p" rel="prev">Saving and scanning file</a>, Up: <a href="#Hints" accesskey="u" rel="up">Hints</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Mixing-bitmap-and-vector-output-1"></a>
-<h4 class="subsection">5.5.23 Mixing bitmap and vector output</h4>
-
-
-<p>Sometimes output plots contain surfaces with a lot of points, and some vector primitives (like axis, text, curves, etc.). Using vector output formats (like EPS or SVG) will produce huge files with possible loss of smoothed lighting. Contrary, the bitmap output may cause the roughness of text and curves. Hopefully, MathGL have a possibility to combine bitmap output for surfaces and vector one for other primitives in the same EPS file, by using <a href="#rasterize">rasterize</a> command.
-</p>
-<p>The idea is to prepare part of picture with surfaces or other "heavy" plots and produce the background image from them by help of <a href="#rasterize">rasterize</a> command. Next, we draw everything to be saved in vector form (text, curves, axis and etc.). Note, that you need to clear primitives (use <a href="#clf">clf</a> command) after <a href="#rasterize">rasterize</a> if you want to disable duplication of surfaces in output files (like EPS). Note, that some of output formats (like 3D ones, and TeX) don`t support the background bitmap, and use <a href="#clf">clf</a> for them will cause the loss of part of picture.
-</p>
-<p>The sample code is:
-</p><pre class="verbatim"># first draw everything to be in bitmap output
-fsurf 'x^2+y^2' '#';value 10
-
-rasterize # set above plots as bitmap background
-clf # clear primitives, to exclude them from file
-
-# now draw everything to be in vector output
-axis:box
-
-# and save file
-write 'fname.eps'
-</pre>
-
-
-<hr>
-<a name="FAQ"></a>
-<div class="header">
-<p>
-Previous: <a href="#Hints" accesskey="p" rel="prev">Hints</a>, Up: <a href="#Examples" accesskey="u" rel="up">Examples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="FAQ-1"></a>
-<h3 class="section">5.6 FAQ</h3>
-
-
-<dl compact="compact">
-<dt><strong>The plot does not appear</strong></dt>
-<dd><p>Check that points of the plot are located inside the bounding box and resize the bounding box using <a href="#ranges">ranges</a> function. Check that the data have correct dimensions for selected type of plot. Sometimes the light reflection from flat surfaces (like, <a href="#dens">dens</a>) can look as if the plot were absent.
-</p>
-</dd>
-<dt><strong>I can not find some special kind of plot.</strong></dt>
-<dd><p>Most “new” types of plots can be created by using the existing drawing functions. For example, the surface of curve rotation can be created by a special function <a href="#torus">torus</a>, or as a parametrically specified surface by <a href="#surf">surf</a>. See also, <a href="#Hints">Hints</a>. If you can not find a specific type of plot, please e-mail me and this plot will appear in the next version of MathGL library.
-</p>
-</dd>
-<dt><strong>How can I print in Russian/Spanish/Arabic/Japanese, and so on?</strong></dt>
-<dd><p>The standard way is to use Unicode encoding for the text output. But the MathGL library also has interface for 8-bit (char *) strings with internal conversion to Unicode. This conversion depends on the current locale OS.
-</p>
-</dd>
-<dt><strong>How can I exclude a point or a region of plot from the drawing?</strong></dt>
-<dd><p>There are 3 general ways. First, the point with <code>nan</code> value as one of the coordinates (including color/alpha range) will never be plotted. Second, special functions define the condition when the points should be omitted (see <a href="#Cutting">Cutting</a>). Last, you may change the transparency of a part of the plot by the help of functions <a href="#surfa">surfa</a>, <a href="#surf3a">surf3a</a> (see <a href="#Dual-plotting">Dual plotting</a>). In last case the transparency is switched on smoothly.
-</p>
-</dd>
-<dt><strong>How many people write this library?</strong></dt>
-<dd><p>Most of the library was written by one person. This is a result of nearly a year of work (mostly in the evening and on holidays): I spent half a year to write the kernel and half a year to a year on extending, improving the library and writing documentation. This process continues now :). The build system (cmake files) was written mostly by D.Kulagin, and the export to PRC/PDF was written mostly by M.Vidassov.
-</p>
-</dd>
-<dt><strong>How can I display a bitmap on the figure?</strong></dt>
-<dd><p>You can import data by command <a href="#import">import</a> and display it by <a href="#dens">dens</a> function. For example, for black-and-white bitmap you can use the code: <code>import bmp 'fname.png' 'wk':dens bmp 'wk'</code>.
-</p>
-
-</dd>
-<dt><strong>How can I create 3D in PDF?</strong></dt>
-<dd><p>Just use command <code>write fname.pdf</code>, which create PDF file if enable-pdf=ON at MathGL configure.
-</p>
-</dd>
-<dt><strong>How can I create TeX figure?</strong></dt>
-<dd><p>Just use command <code>write fname.tex</code>, which create LaTeX files with figure itself `<samp><var>fname</var>.tex</samp>`, with MathGL colors `<samp>mglcolors.tex</samp>` and main file `<samp>mglmain.tex</samp>`. Last one can be used for viewing image by command like <code>pdflatex mglmain.tex</code>.
-</p>
-
-</dd>
-<dt><strong>How I can change the font family?</strong></dt>
-<dd><p>First, you should download new font files from <a href="http://mathgl.sourceforge.net/download.html">here</a> or from <a href="http://sourceforge.net/project/showfiles.php?group_id=152187&package_id=267177">here</a>. Next, you should load the font files into by the following command: <code>loadfont 'fontname'</code>. Here <var>fontname</var> is the base font name like `<samp>STIX</samp>`. Use <code>loadfont ''</code> to start using the default font.
-</p>
-</dd>
-<dt><strong>How can I draw tick out of a bounding box?</strong></dt>
-<dd><p>Just set a negative value in <a href="#ticklen">ticklen</a>. For example, use <code>ticklen -0.1</code>.
-</p>
-</dd>
-<dt><strong>How can I prevent text rotation?</strong></dt>
-<dd><p>Just use <code>rotatetext off</code>. Also you can use axis style `<samp>U</samp>` for disable only tick labels rotation.
-</p>
-</dd>
-<dt><strong>How can I draw equal axis range even for rectangular image?</strong></dt>
-<dd><p>Just use <code>aspect nan nan</code> for each subplot, or at the beginning of the drawing.
-</p>
-</dd>
-<dt><strong>Как задать полупрозрачный фон?</strong></dt>
-<dd><p>Просто используйте код типа <code>clf 'r{A5}'</code> или подготовьте PNG файл и задайте его в качестве фона рисунка <code>background 'fname.png'</code>.
-</p>
-</dd>
-<dt><strong>Как уменьшить поля вокруг графика?</strong></dt>
-<dd><p>Простейший путь состоит в использовании стилей <a href="#subplot">subplot</a>. Однако, вы должны быть осторожны в изменении стиля <a href="#subplot">subplot</a> если вы планируете добавлять <a href="#colorbar">colorbar</a> или вращать график - часть графика может стать невидимой.
-</p>
-</dd>
-<dt><strong>Can I combine bitmap and vector output in EPS?</strong></dt>
-<dd><p>Yes. Sometimes you may have huge surface and a small set of curves and/or text on the plot. You can use function <a href="#rasterize">rasterize</a> just after making surface plot. This will put all plot to bitmap background. At this later plotting will be in vector format. For example, you can do something like following:
-</p><pre class="verbatim">surf x y z
-rasterize # make surface as bitmap
-axis
-write 'fname.eps'
-</pre>
-</dd>
-</dl>
-
-
-
-<hr>
-<a name="All-samples"></a>
-<div class="header">
-<p>
-Next: <a href="#Symbols-and-hot_002dkeys" accesskey="n" rel="next">Symbols and hot-keys</a>, Previous: <a href="#Examples" accesskey="p" rel="prev">Examples</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="All-samples-1"></a>
-<h2 class="chapter">6 All samples</h2>
-
-
-<p>This chapter contain alphabetical list of MGL and C++ samples for most of MathGL graphics and features.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#initialization-sample" accesskey="1">initialization sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#g_t3wave-sample" accesskey="2">3wave sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#alpha-sample" accesskey="3">alpha sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#apde-sample" accesskey="4">apde sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#area-sample" accesskey="5">area sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#aspect-sample" accesskey="6">aspect sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#axial-sample" accesskey="7">axial sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#axis-sample" accesskey="8">axis sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#barh-sample" accesskey="9">barh sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#bars-sample">bars sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#belt-sample">belt sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#bifurcation-sample">bifurcation sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#box-sample">box sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#boxplot-sample">boxplot sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#boxs-sample">boxs sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#candle-sample">candle sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#chart-sample">chart sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cloud-sample">cloud sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#colorbar-sample">colorbar sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#combined-sample">combined sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cones-sample">cones sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cont-sample">cont sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cont3-sample">cont3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cont_005fxyz-sample">cont_xyz sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#contd-sample">contd sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#contf-sample">contf sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#contf3-sample">contf3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#contf_005fxyz-sample">contf_xyz sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#contv-sample">contv sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#correl-sample">correl sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#curvcoor-sample">curvcoor sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#cut-sample">cut sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dat_005fdiff-sample">dat_diff sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dat_005fextra-sample">dat_extra sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#data1-sample">data1 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#data2-sample">data2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dens-sample">dens sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dens3-sample">dens3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dens_005fxyz-sample">dens_xyz sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#detect-sample">detect sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dew-sample">dew sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#diffract-sample">diffract sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dilate-sample">dilate sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#dots-sample">dots sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#earth-sample">earth sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#error-sample">error sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#error2-sample">error2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#export-sample">export sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#fall-sample">fall sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#fexport-sample">fexport sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#fit-sample">fit sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#flame2d-sample">flame2d sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#flow-sample">flow sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#flow3-sample">flow3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#fog-sample">fog sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#fonts-sample">fonts sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#grad-sample">grad sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#hist-sample">hist sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ifs2d-sample">ifs2d sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ifs3d-sample">ifs3d sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#indirect-sample">indirect sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#inplot-sample">inplot sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#iris-sample">iris sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#label-sample">label sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#lamerey-sample">lamerey sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#legend-sample">legend sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#light-sample">light sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#loglog-sample">loglog sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#map-sample">map sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mark-sample">mark sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mask-sample">mask sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mesh-sample">mesh sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#mirror-sample">mirror sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#molecule-sample">molecule sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ode-sample">ode sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ohlc-sample">ohlc sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#param1-sample">param1 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#param2-sample">param2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#param3-sample">param3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#paramv-sample">paramv sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#parser-sample">parser sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#pde-sample">pde sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#pendelta-sample">pendelta sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#pipe-sample">pipe sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#plot-sample">plot sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#pmap-sample">pmap sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#primitives-sample">primitives sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#projection-sample">projection sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#projection5-sample">projection5 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#pulse-sample">pulse sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#qo2d-sample">qo2d sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality0-sample">quality0 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality1-sample">quality1 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality2-sample">quality2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality4-sample">quality4 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality5-sample">quality5 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality6-sample">quality6 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#quality8-sample">quality8 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#radar-sample">radar sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#refill-sample">refill sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#region-sample">region sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#scanfile-sample">scanfile sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#schemes-sample">schemes sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#section-sample">section sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#several_005flight-sample">several_light sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#solve-sample">solve sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#stem-sample">stem sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#step-sample">step sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#stereo-sample">stereo sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#stfa-sample">stfa sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#style-sample">style sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surf-sample">surf sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surf3-sample">surf3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surf3a-sample">surf3a sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surf3c-sample">surf3c sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surf3ca-sample">surf3ca sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surfa-sample">surfa sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surfc-sample">surfc sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#surfca-sample">surfca sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#table-sample">table sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#tape-sample">tape sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#tens-sample">tens sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ternary-sample">ternary sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#text-sample">text sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#text2-sample">text2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#textmark-sample">textmark sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#ticks-sample">ticks sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#tile-sample">tile sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#tiles-sample">tiles sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#torus-sample">torus sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#traj-sample">traj sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#triangulation-sample">triangulation sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#triplot-sample">triplot sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#tube-sample">tube sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#type0-sample">type0 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#type1-sample">type1 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#type2-sample">type2 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#vect-sample">vect sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#vect3-sample">vect3 sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#venn-sample">venn sample</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-<hr>
-<a name="initialization-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#g_t3wave-sample" accesskey="n" rel="next">3wave sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Functions-for-initialization"></a>
-<h3 class="section">6.1 Functions for initialization</h3>
-
-
-<p>This section contain functions for input data for most of further samples.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">
-func 'prepare1d'
-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 x1 50 'x'
-new x2 50 '0.05-0.03*cos(pi*x)'
-new y1 50 '0.5-0.3*cos(pi*x)'
-new y2 50 '-0.3*sin(pi*x)'
-return
-
-func 'prepare2d'
-new a 50 40 '0.6*sin(pi*(x+1))*sin(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-new b 50 40 '0.6*cos(pi*(x+1))*cos(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-return
-
-func 'prepare3d'
-new c 61 50 40 '-2*(x^2+y^2+z^4-z^2)+0.2'
-new d 61 50 40 '1-2*tanh((x+y)*(x+y))'
-return
-
-func 'prepare2v'
-new a 20 30 '0.6*sin(pi*(x+1))*sin(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-new b 20 30 '0.6*cos(pi*(x+1))*cos(1.5*pi*(y+1))+0.4*cos(0.75*pi*(x+1)*(y+1))'
-return
-
-func 'prepare3v'
-define $1 pow(x*x+y*y+(z-0.3)*(z-0.3)+0.03,1.5)
-define $2 pow(x*x+y*y+(z+0.3)*(z+0.3)+0.03,1.5)
-new ex 10 10 10 '0.2*x/$1-0.2*x/$2'
-new ey 10 10 10 '0.2*y/$1-0.2*y/$2'
-new ez 10 10 10 '0.2*(z-0.3)/$1-0.2*(z+0.3)/$2'
-return
-</pre>
-
-
-<hr>
-<a name="g_t3wave-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#alpha-sample" accesskey="n" rel="next">alpha sample</a>, Previous: <a href="#initialization-sample" accesskey="p" rel="prev">initialization sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-3wave"></a>
-<h3 class="section">6.2 Sample `<samp>3wave</samp>`</h3>
-
-
-<p>Example of complex <a href="#ode">ode</a> on basis of 3-wave decay.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">define t 50
-ode !r '-b*f;a*conj(f);a*conj(b)-0.1*f' 'abf' [1,1e-3,0] 0.1 t
-ranges 0 t 0 r.max
-plot r(0) 'b';legend 'a'
-plot r(1) 'g';legend 'b'
-plot r(2) 'r';legend 'f'
-axis:box:legend
-</pre>
-<div align="center"><img src="png/3wave.png" alt="Sample 3wave">
-</div>
-<hr>
-<a name="alpha-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#apde-sample" accesskey="n" rel="next">apde sample</a>, Previous: <a href="#g_t3wave-sample" accesskey="p" rel="prev">3wave sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-alpha"></a>
-<h3 class="section">6.3 Sample `<samp>alpha</samp>`</h3>
-
-
-<p>Example of <a href="#light">light</a> and <a href="#alpha">alpha</a> (transparency).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-subplot 2 2 0:title 'default':rotate 50 60:box
-surf a
-subplot 2 2 1:title 'light on':rotate 50 60:box
-light on:surf a
-subplot 2 2 3:title 'light on; alpha on':rotate 50 60:box
-alpha on:surf a
-subplot 2 2 2:title 'alpha on':rotate 50 60:box
-light off:surf a
-</pre>
-<div align="center"><img src="png/alpha.png" alt="Sample alpha">
-</div>
-<hr>
-<a name="apde-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#area-sample" accesskey="n" rel="next">area sample</a>, Previous: <a href="#alpha-sample" accesskey="p" rel="prev">alpha sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-apde"></a>
-<h3 class="section">6.4 Sample `<samp>apde</samp>`</h3>
-
-
-<p>Comparison of advanced PDE solver (<a href="#apde">apde</a>) and ordinary one (<a href="#pde">pde</a>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">ranges -1 1 0 2 0 2
-new ar 256 'exp(-2*(x+0.0)^2)'
-new ai 256
-
-apde res1 'exp(-x^2-p^2)' ar ai 0.01:transpose res1
-pde res2 'exp(-x^2-p^2)' ar ai 0.01
-
-subplot 1 2 0 '_':title 'Advanced PDE solver'
-ranges 0 2 -1 1:crange res1
-dens res1:box
-axis:xlabel '\i z':ylabel '\i x'
-text -0.5 0.2 'i\partial_z\i u = exp(-\i x^2+\partial_x^2)[\i u]' 'y'
-
-subplot 1 2 1 '_':title 'Simplified PDE solver'
-dens res2:box
-axis:xlabel '\i z':ylabel '\i x'
-text -0.5 0.2 'i\partial_z\i u \approx\ exp(-\i x^2)\i u+exp(\partial_x^2)[\i u]' 'y'
-</pre>
-<div align="center"><img src="png/apde.png" alt="Sample apde">
-</div>
-<hr>
-<a name="area-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#aspect-sample" accesskey="n" rel="next">aspect sample</a>, Previous: <a href="#apde-sample" accesskey="p" rel="prev">apde sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-area"></a>
-<h3 class="section">6.5 Sample `<samp>area</samp>`</h3>
-
-
-<p>Function <a href="#area">area</a> fill the area between curve and axis plane. It support gradient filling if 2 colors per curve is specified.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-origin 0 0 0
-subplot 2 2 0 '':title 'Area plot (default)':box:area y
-subplot 2 2 1 '':title '2 colors':box:area y 'cbgGyr'
-subplot 2 2 2 '':title '"!" style':box:area y '!'
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 2 2 3:title '3d variant':rotate 50 60:box
-area xc yc z 'r'
-area xc -yc z 'b#'
-</pre>
-<div align="center"><img src="png/area.png" alt="Sample area">
-</div>
-<hr>
-<a name="aspect-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#axial-sample" accesskey="n" rel="next">axial sample</a>, Previous: <a href="#area-sample" accesskey="p" rel="prev">area sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-aspect"></a>
-<h3 class="section">6.6 Sample `<samp>aspect</samp>`</h3>
-
-
-<p>Example of <a href="#subplot">subplot</a>, <a href="#inplot">inplot</a>, <a href="#rotate">rotate</a>, <a href="#aspect">aspect</a>, <a href="#shear">shear</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0:box:text -1 1.1 'Just box' ':L'
-inplot 0.2 0.5 0.7 1 off:box:text 0 1.2 'InPlot example'
-subplot 2 2 1:title 'Rotate only':rotate 50 60:box
-subplot 2 2 2:title 'Rotate and Aspect':rotate 50 60:aspect 1 1 2:box
-subplot 2 2 3:title 'Shear':box 'c':shear 0.2 0.1:box
-</pre>
-<div align="center"><img src="png/aspect.png" alt="Sample aspect">
-</div>
-<hr>
-<a name="axial-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#axis-sample" accesskey="n" rel="next">axis sample</a>, Previous: <a href="#aspect-sample" accesskey="p" rel="prev">aspect sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-axial"></a>
-<h3 class="section">6.7 Sample `<samp>axial</samp>`</h3>
-
-
-<p>Function <a href="#axial">axial</a> draw surfaces of rotation for contour lines. You can draw wire surfaces (`<samp>#</samp>` style) or ones rotated in other directions (`<samp>x</samp>`, `<samp>z</samp>` styles).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-subplot 2 2 0:title 'Axial plot (default)':light on:alpha on:rotate 50 60:box:axial a
-subplot 2 2 1:title '"x" style;"." style':light on:rotate 50 60:box:axial a 'x.'
-subplot 2 2 2:title '"z" style':light on:rotate 50 60:box:axial a 'z'
-subplot 2 2 3:title '"\#" style':light on:rotate 50 60:box:axial a '#'
-</pre>
-<div align="center"><img src="png/axial.png" alt="Sample axial">
-</div>
-<hr>
-<a name="axis-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#barh-sample" accesskey="n" rel="next">barh sample</a>, Previous: <a href="#axial-sample" accesskey="p" rel="prev">axial sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-axis"></a>
-<h3 class="section">6.8 Sample `<samp>axis</samp>`</h3>
-
-
-<p>Different forms of <a href="#axis">axis</a> position.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0:title 'Axis origin, Grid':origin 0 0:axis:grid:fplot 'x^3'
-subplot 2 2 1:title '2 axis':ranges -1 1 -1 1:origin -1 -1:axis:ylabel 'axis_1':fplot 'sin(pi*x)' 'r2'
-ranges 0 1 0 1:origin 1 1:axis:ylabel 'axis_2':fplot 'cos(pi*x)'
-subplot 2 2 3:title 'More axis':origin nan nan:xrange -1 1:axis:xlabel 'x' 0:ylabel 'y_1' 0:fplot 'x^2' 'k'
-yrange -1 1:origin -1.3 -1:axis 'y' 'r':ylabel '#r{y_2}' 0.2:fplot 'x^3' 'r'
-
-subplot 2 2 2:title '4 segments, inverted axis':origin 0 0:
-inplot 0.5 1 0.5 1 on:ranges 0 10 0 2:axis
-fplot 'sqrt(x/2)':xlabel 'W' 1:ylabel 'U' 1
-inplot 0 0.5 0.5 1 on:ranges 1 0 0 2:axis 'x':fplot 'sqrt(x)+x^3':xlabel '\tau' 1
-inplot 0.5 1 0 0.5 on:ranges 0 10 4 0:axis 'y':fplot 'x/4':ylabel 'L' -1
-inplot 0 0.5 0 0.5 on:ranges 1 0 4 0:fplot '4*x^2'
-</pre>
-<div align="center"><img src="png/axis.png" alt="Sample axis">
-</div>
-<hr>
-<a name="barh-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#bars-sample" accesskey="n" rel="next">bars sample</a>, Previous: <a href="#axis-sample" accesskey="p" rel="prev">axis sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-barh"></a>
-<h3 class="section">6.9 Sample `<samp>barh</samp>`</h3>
-
-
-<p>Function <a href="#barh">barh</a> is the similar to <a href="#bars">bars</a> but draw horizontal bars.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ys 10 3 '0.8*sin(pi*(x+y/4+1.25))+0.2*rnd':origin 0 0 0
-subplot 2 2 0 '':title 'Barh plot (default)':box:barh ys
-subplot 2 2 1 '':title '2 colors':box:barh ys 'cbgGyr'
-ranges -3 3 -1 1:subplot 2 2 2 '':title '"a" style':box:barh ys 'a'
-subplot 2 2 3 '': title '"f" style':box:barh ys 'f'
-</pre>
-<div align="center"><img src="png/barh.png" alt="Sample barh">
-</div>
-<hr>
-<a name="bars-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#belt-sample" accesskey="n" rel="next">belt sample</a>, Previous: <a href="#barh-sample" accesskey="p" rel="prev">barh sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-bars"></a>
-<h3 class="section">6.10 Sample `<samp>bars</samp>`</h3>
-
-
-<p>Function <a href="#bars">bars</a> draw vertical bars. It have a lot of options: bar-above-bar (`<samp>a</samp>` style), fall like (`<samp>f</samp>` style), 2 colors for positive and negative values, wired bars (`<samp>#</samp>` style), 3D variant.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ys 10 3 '0.8*sin(pi*(x+y/4+1.25))+0.2*rnd':origin 0 0 0
-subplot 3 2 0 '':title 'Bars plot (default)':box:bars ys
-subplot 3 2 1 '':title '2 colors':box:bars ys 'cbgGyr'
-subplot 3 2 4 '':title '"\#" style':box:bars ys '#'
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 3 2 5:title '3d variant':rotate 50 60:box:bars xc yc z 'r'
-ranges -1 1 -3 3:subplot 3 2 2 '':title '"a" style':box:bars ys 'a'
-subplot 3 2 3 '':title '"f" style':box:bars ys 'f'
-</pre>
-<div align="center"><img src="png/bars.png" alt="Sample bars">
-</div>
-<hr>
-<a name="belt-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#bifurcation-sample" accesskey="n" rel="next">bifurcation sample</a>, Previous: <a href="#bars-sample" accesskey="p" rel="prev">bars sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-belt"></a>
-<h3 class="section">6.11 Sample `<samp>belt</samp>`</h3>
-
-
-<p>Function <a href="#belt">belt</a> draw surface by belts. You can use `<samp>x</samp>` style for drawing lines in other direction.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Belt plot':rotate 50 60:box:belt a
-</pre>
-<div align="center"><img src="png/belt.png" alt="Sample belt">
-</div>
-<hr>
-<a name="bifurcation-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#box-sample" accesskey="n" rel="next">box sample</a>, Previous: <a href="#belt-sample" accesskey="p" rel="prev">belt sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-bifurcation"></a>
-<h3 class="section">6.12 Sample `<samp>bifurcation</samp>`</h3>
-
-
-<p>Function <a href="#bifurcation">bifurcation</a> draw Bifurcation diagram for multiple stationary points of the map (like logistic map).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Bifurcation sample'
-ranges 0 4 0 1:axis
-bifurcation 0.005 'x*y*(1-y)' 'r'
-</pre>
-<div align="center"><img src="png/bifurcation.png" alt="Sample bifurcation">
-</div>
-<hr>
-<a name="box-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#boxplot-sample" accesskey="n" rel="next">boxplot sample</a>, Previous: <a href="#bifurcation-sample" accesskey="p" rel="prev">bifurcation sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-box"></a>
-<h3 class="section">6.13 Sample `<samp>box</samp>`</h3>
-
-
-<p>Different styles of bounding <a href="#box">box</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0:title 'Box (default)':rotate 50 60:box
-subplot 2 2 1:title 'colored':rotate 50 60:box 'r'
-subplot 2 2 2:title 'with faces':rotate 50 60:box '@'
-subplot 2 2 3:title 'both':rotate 50 60:box '@cm'
-</pre>
-<div align="center"><img src="png/box.png" alt="Sample box">
-</div>
-<hr>
-<a name="boxplot-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#boxs-sample" accesskey="n" rel="next">boxs sample</a>, Previous: <a href="#box-sample" accesskey="p" rel="prev">box sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-boxplot"></a>
-<h3 class="section">6.14 Sample `<samp>boxplot</samp>`</h3>
-
-
-<p>Function <a href="#boxplot">boxplot</a> draw box-and-whisker diagram.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 10 7 '(2*rnd-1)^3/2'
-subplot 1 1 0 '':title 'Boxplot plot':box:boxplot a
-</pre>
-<div align="center"><img src="png/boxplot.png" alt="Sample boxplot">
-</div>
-<hr>
-<a name="boxs-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#candle-sample" accesskey="n" rel="next">candle sample</a>, Previous: <a href="#boxplot-sample" accesskey="p" rel="prev">boxplot sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-boxs"></a>
-<h3 class="section">6.15 Sample `<samp>boxs</samp>`</h3>
-
-
-<p>Function <a href="#boxs">boxs</a> draw surface by boxes. You can use `<samp>#</samp>` for drawing wire plot.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-origin 0 0 0
-subplot 2 2 0:title 'Boxs plot (default)':rotate 40 60:light on:box:boxs a
-subplot 2 2 1:title '"\@" style':rotate 50 60:box:boxs a '@'
-subplot 2 2 2:title '"\#" style':rotate 50 60:box:boxs a '#'
-subplot 2 2 3:title 'compare with Tile':rotate 50 60:box:tile a
-</pre>
-<div align="center"><img src="png/boxs.png" alt="Sample boxs">
-</div>
-<hr>
-<a name="candle-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#chart-sample" accesskey="n" rel="next">chart sample</a>, Previous: <a href="#boxs-sample" accesskey="p" rel="prev">boxs sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-candle"></a>
-<h3 class="section">6.16 Sample `<samp>candle</samp>`</h3>
-
-
-<p>Function <a href="#candle">candle</a> draw candlestick chart. This is a combination of a line-chart and a bar-chart, in that each bar represents the range of price movement over a given time interval.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new y 30 'sin(pi*x/2)^2'
-subplot 1 1 0 '':title 'Candle plot (default)'
-yrange 0 1:box
-candle y y/2 (y+1)/2
-</pre>
-<div align="center"><img src="png/candle.png" alt="Sample candle">
-</div>
-<hr>
-<a name="chart-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cloud-sample" accesskey="n" rel="next">cloud sample</a>, Previous: <a href="#candle-sample" accesskey="p" rel="prev">candle sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-chart"></a>
-<h3 class="section">6.17 Sample `<samp>chart</samp>`</h3>
-
-
-<p>Function <a href="#chart">chart</a> draw colored boxes with width proportional to data values. Use `<samp> </samp>` for empty box. It produce well known pie chart if drawn in polar coordinates.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ch 7 2 'rnd+0.1':light on
-subplot 2 2 0:title 'Chart plot (default)':rotate 50 60:box:chart ch
-subplot 2 2 1:title '"\#" style':rotate 50 60:box:chart ch '#'
-subplot 2 2 2:title 'Pie chart; " " color':rotate 50 60:
-axis '(y+1)/2*cos(pi*x)' '(y+1)/2*sin(pi*x)' '':box:chart ch 'bgr cmy#'
-subplot 2 2 3:title 'Ring chart; " " color':rotate 50 60:
-axis '(y+2)/3*cos(pi*x)' '(y+2)/3*sin(pi*x)' '':box:chart ch 'bgr cmy#'
-</pre>
-<div align="center"><img src="png/chart.png" alt="Sample chart">
-</div>
-<hr>
-<a name="cloud-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#colorbar-sample" accesskey="n" rel="next">colorbar sample</a>, Previous: <a href="#chart-sample" accesskey="p" rel="prev">chart sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cloud"></a>
-<h3 class="section">6.18 Sample `<samp>cloud</samp>`</h3>
-
-
-<p>Function <a href="#cloud">cloud</a> draw cloud-like object which is less transparent for higher data values. Similar plot can be created using many (about 10...20 - <code>surf3a a a;value 10</code>) isosurfaces <a href="#surf3a">surf3a</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-subplot 2 2 0:title 'Cloud plot':rotate 50 60:alpha on:box:cloud c 'wyrRk'
-subplot 2 2 1:title '"i" style':rotate 50 60:box:cloud c 'iwyrRk'
-subplot 2 2 2:title '"." style':rotate 50 60:box:cloud c '.wyrRk'
-subplot 2 2 3:title 'meshnum 10':rotate 50 60:box:cloud c 'wyrRk'; meshnum 10
-</pre>
-<div align="center"><img src="png/cloud.png" alt="Sample cloud">
-</div>
-<hr>
-<a name="colorbar-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#combined-sample" accesskey="n" rel="next">combined sample</a>, Previous: <a href="#cloud-sample" accesskey="p" rel="prev">cloud sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-colorbar"></a>
-<h3 class="section">6.19 Sample `<samp>colorbar</samp>`</h3>
-
-
-<p>Example of <a href="#colorbar">colorbar</a> position and styles.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-new v 9 'x'
-subplot 2 2 0:title 'Colorbar out of box':box
-colorbar '<':colorbar '>':colorbar '_':colorbar '^'
-subplot 2 2 1:title 'Colorbar near box':box
-colorbar '<I':colorbar '>I':colorbar '_I':colorbar '^I'
-subplot 2 2 2:title 'manual colors':box:contd v a
-colorbar v '<':colorbar v '>':colorbar v '_':colorbar v '^'
-subplot 2 2 3:title '':text -0.5 1.55 'Color positions' ':C' -2
-colorbar 'bwr>' 0.25 0:text -0.9 1.2 'Default'
-colorbar 'b{w,0.3}r>' 0.5 0:text -0.1 1.2 'Manual'
-crange 0.01 1e3
-colorbar '>' 0.75 0:text 0.65 1.2 'Normal scale':colorbar '>':text 1.35 1.2 'Log scale'
-</pre>
-<div align="center"><img src="png/colorbar.png" alt="Sample colorbar">
-</div>
-<hr>
-<a name="combined-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cones-sample" accesskey="n" rel="next">cones sample</a>, Previous: <a href="#colorbar-sample" accesskey="p" rel="prev">colorbar sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-combined"></a>
-<h3 class="section">6.20 Sample `<samp>combined</samp>`</h3>
-
-
-<p>Example of several plots in the same axis.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2v'
-call 'prepare3d'
-new v 10:fill v -0.5 1:copy d sqrt(a^2+b^2)
-subplot 2 2 0:title 'Surf + Cont':rotate 50 60:light on:box:surf a:cont a 'y'
-subplot 2 2 1 '':title 'Flow + Dens':light off:box:flow a b 'br':dens d
-subplot 2 2 2:title 'Mesh + Cont':rotate 50 60:box:mesh a:cont a '_'
-subplot 2 2 3:title 'Surf3 + ContF3':rotate 50 60:light on
-box:contf3 v c 'z' 0:contf3 v c 'x':contf3 v c
-cut 0 -1 -1 1 0 1.1
-contf3 v c 'z' c.nz-1:surf3 c -0.5
-</pre>
-<div align="center"><img src="png/combined.png" alt="Sample combined">
-</div>
-<hr>
-<a name="cones-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cont-sample" accesskey="n" rel="next">cont sample</a>, Previous: <a href="#combined-sample" accesskey="p" rel="prev">combined sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cones"></a>
-<h3 class="section">6.21 Sample `<samp>cones</samp>`</h3>
-
-
-<p>Function <a href="#cones">cones</a> is similar to <a href="#bars">bars</a> but draw cones.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ys 10 3 '0.8*sin(pi*(x+y/4+1.25))+0.2*rnd'
-light on:origin 0 0 0
-subplot 3 2 0:title 'Cones plot':rotate 50 60:box:cones ys
-subplot 3 2 1:title '2 colors':rotate 50 60:box:cones ys 'cbgGyr'
-subplot 3 2 2:title '"\#" style':rotate 50 60:box:cones ys '#'
-subplot 3 2 3:title '"a" style':rotate 50 60:zrange -2 2:box:cones ys 'a'
-subplot 3 2 4:title '"t" style':rotate 50 60:box:cones ys 't'
-subplot 3 2 5:title '"4" style':rotate 50 60:box:cones ys '4'
-</pre>
-<div align="center"><img src="png/cones.png" alt="Sample cones">
-</div>
-<hr>
-<a name="cont-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cont3-sample" accesskey="n" rel="next">cont3 sample</a>, Previous: <a href="#cones-sample" accesskey="p" rel="prev">cones sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cont"></a>
-<h3 class="section">6.22 Sample `<samp>cont</samp>`</h3>
-
-
-<p>Function <a href="#cont">cont</a> draw contour lines for surface. You can select automatic (default) or manual levels for contours, print contour labels, draw it on the surface (default) or at plane (as <code>Dens</code>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-list v -0.5 -0.15 0 0.15 0.5
-subplot 2 2 0:title 'Cont plot (default)':rotate 50 60:box:cont a
-subplot 2 2 1:title 'manual levels':rotate 50 60:box:cont v a
-subplot 2 2 2:title '"\_" and "." styles':rotate 50 60:box:cont a '_':cont a '_.2k'
-subplot 2 2 3 '':title '"t" style':box:cont a 't'
-</pre>
-<div align="center"><img src="png/cont.png" alt="Sample cont">
-</div>
-<hr>
-<a name="cont3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cont_005fxyz-sample" accesskey="n" rel="next">cont_xyz sample</a>, Previous: <a href="#cont-sample" accesskey="p" rel="prev">cont sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cont3"></a>
-<h3 class="section">6.23 Sample `<samp>cont3</samp>`</h3>
-
-
-<p>Function <a href="#contf3">contf3</a> draw ordinary contour lines but at slices of 3D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Cont3 sample':rotate 50 60:box
-cont3 c 'x':cont3 c:cont3 c 'z'
-</pre>
-<div align="center"><img src="png/cont3.png" alt="Sample cont3">
-</div>
-<hr>
-<a name="cont_005fxyz-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#contd-sample" accesskey="n" rel="next">contd sample</a>, Previous: <a href="#cont3-sample" accesskey="p" rel="prev">cont3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cont_005fxyz"></a>
-<h3 class="section">6.24 Sample `<samp>cont_xyz</samp>`</h3>
-
-
-<p>Functions <a href="#contz">contz</a>, <a href="#conty">conty</a>, <a href="#contx">contx</a> draw contour lines on plane perpendicular to corresponding axis. One of possible application is drawing projections of 3D field.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Cont[XYZ] sample':rotate 50 60:box
-contx {sum c 'x'} '' -1:conty {sum c 'y'} '' 1:contz {sum c 'z'} '' -1
-</pre>
-<div align="center"><img src="png/cont_xyz.png" alt="Sample cont_xyz">
-</div>
-<hr>
-<a name="contd-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#contf-sample" accesskey="n" rel="next">contf sample</a>, Previous: <a href="#cont_005fxyz-sample" accesskey="p" rel="prev">cont_xyz sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-contd"></a>
-<h3 class="section">6.25 Sample `<samp>contd</samp>`</h3>
-
-
-<p>Function <a href="#contd">contd</a> is similar to <a href="#contf">contf</a> but with manual contour colors.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-list v -0.5 -0.15 0 0.15 0.5
-new a1 30 40 3 '0.6*sin(2*pi*x+pi*(z+1)/2)*sin(3*pi*y+pi*z) + 0.4*cos(3*pi*(x*y)+pi*(z+1)^2/2)'
-subplot 2 2 0:title 'ContD plot (default)':rotate 50 60:box:contd a
-subplot 2 2 1:title 'manual levels':rotate 50 60:box:contd v a
-subplot 2 2 2:title '"\_" style':rotate 50 60:box:contd a '_'
-subplot 2 2 3:title 'several slices':rotate 50 60:box:contd a1
-</pre>
-<div align="center"><img src="png/contd.png" alt="Sample contd">
-</div>
-<hr>
-<a name="contf-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#contf3-sample" accesskey="n" rel="next">contf3 sample</a>, Previous: <a href="#contd-sample" accesskey="p" rel="prev">contd sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-contf"></a>
-<h3 class="section">6.26 Sample `<samp>contf</samp>`</h3>
-
-
-<p>Function <a href="#contf">contf</a> draw filled contours. You can select automatic (default) or manual levels for contours.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-list v -0.5 -0.15 0 0.15 0.5
-new a1 30 40 3 '0.6*sin(2*pi*x+pi*(z+1)/2)*sin(3*pi*y+pi*z) + 0.4*cos(3*pi*(x*y)+pi*(z+1)^2/2)'
-subplot 2 2 0:title 'ContF plot (default)':rotate 50 60:box:contf a
-subplot 2 2 1:title 'manual levels':rotate 50 60:box:contf v a
-subplot 2 2 2:title '"\_" style':rotate 50 60:box:contf a '_'
-subplot 2 2 3:title 'several slices':rotate 50 60:box:contf a1
-</pre>
-<div align="center"><img src="png/contf.png" alt="Sample contf">
-</div>
-<hr>
-<a name="contf3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#contf_005fxyz-sample" accesskey="n" rel="next">contf_xyz sample</a>, Previous: <a href="#contf-sample" accesskey="p" rel="prev">contf sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-contf3"></a>
-<h3 class="section">6.27 Sample `<samp>contf3</samp>`</h3>
-
-
-<p>Function <a href="#contf3">contf3</a> draw ordinary filled contours but at slices of 3D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Cont3 sample':rotate 50 60:box:light on
-contf3 c 'x':contf3 c:contf3 c 'z'
-cont3 c 'xk':cont3 c 'k':cont3 c 'zk'
-</pre>
-<div align="center"><img src="png/contf3.png" alt="Sample contf3">
-</div>
-<hr>
-<a name="contf_005fxyz-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#contv-sample" accesskey="n" rel="next">contv sample</a>, Previous: <a href="#contf3-sample" accesskey="p" rel="prev">contf3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-contf_005fxyz"></a>
-<h3 class="section">6.28 Sample `<samp>contf_xyz</samp>`</h3>
-
-
-<p>Functions <a href="#contfz">contfz</a>, <a href="#contfy">contfy</a>, <a href="#contfx">contfx</a>, draw filled contours on plane perpendicular to corresponding axis. One of possible application is drawing projections of 3D field.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'ContF[XYZ] sample':rotate 50 60:box
-contfx {sum c 'x'} '' -1:contfy {sum c 'y'} '' 1:contfz {sum c 'z'} '' -1
-</pre>
-<div align="center"><img src="png/contf_xyz.png" alt="Sample contf_xyz">
-</div>
-<hr>
-<a name="contv-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#correl-sample" accesskey="n" rel="next">correl sample</a>, Previous: <a href="#contf_005fxyz-sample" accesskey="p" rel="prev">contf_xyz sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-contv"></a>
-<h3 class="section">6.29 Sample `<samp>contv</samp>`</h3>
-
-
-<p>Function <a href="#contv">contv</a> draw vertical cylinders (belts) at contour lines.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-list v -0.5 -0.15 0 0.15 0.5
-subplot 2 2 0:title 'ContV plot (default)':rotate 50 60:box:contv a
-subplot 2 2 1:title 'manual levels':rotate 50 60:box:contv v a
-subplot 2 2 2:title '"\_" style':rotate 50 60:box:contv a '_'
-subplot 2 2 3:title 'ContV and ContF':rotate 50 60:light on:box
-contv a:contf a:cont a 'k'
-</pre>
-<div align="center"><img src="png/contv.png" alt="Sample contv">
-</div>
-<hr>
-<a name="correl-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#curvcoor-sample" accesskey="n" rel="next">curvcoor sample</a>, Previous: <a href="#contv-sample" accesskey="p" rel="prev">contv sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-correl"></a>
-<h3 class="section">6.30 Sample `<samp>correl</samp>`</h3>
-
-
-<p>Test of correlation function (<a href="#correl">correl</a>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 100 'exp(-10*x^2)'
-new b 100 'exp(-10*(x+0.5)^2)'
-yrange 0 1
-subplot 1 2 0 '_':title 'Input fields'
-plot a:plot b:box:axis
-correl r a b 'x'
-norm r 0 1:swap r 'x' # make it human readable
-subplot 1 2 1 '_':title 'Correlation of a and b'
-plot r 'r':axis:box
-line 0.5 0 0.5 1 'B|'
-</pre>
-<div align="center"><img src="png/correl.png" alt="Sample correl">
-</div>
-<hr>
-<a name="curvcoor-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#cut-sample" accesskey="n" rel="next">cut sample</a>, Previous: <a href="#correl-sample" accesskey="p" rel="prev">correl sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-curvcoor"></a>
-<h3 class="section">6.31 Sample `<samp>curvcoor</samp>`</h3>
-
-
-<p>Some common curvilinear coordinates.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">origin -1 1 -1
-subplot 2 2 0:title 'Cartesian':rotate 50 60:fplot '2*t-1' '0.5' '0' '2r':axis:grid
-axis 'y*sin(pi*x)' 'y*cos(pi*x)' '':subplot 2 2 1:title 'Cylindrical':rotate 50 60:fplot '2*t-1' '0.5' '0' '2r':axis:grid
-axis '2*y*x' 'y*y - x*x' '':subplot 2 2 2:title 'Parabolic':rotate 50 60:fplot '2*t-1' '0.5' '0' '2r':axis:grid
-axis 'y*sin(pi*x)' 'y*cos(pi*x)' 'x+z':subplot 2 2 3:title 'Spiral':rotate 50 60:fplot '2*t-1' '0.5' '0' '2r':axis:grid
-</pre>
-<div align="center"><img src="png/curvcoor.png" alt="Sample curvcoor">
-</div>
-<hr>
-<a name="cut-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dat_005fdiff-sample" accesskey="n" rel="next">dat_diff sample</a>, Previous: <a href="#curvcoor-sample" accesskey="p" rel="prev">curvcoor sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-cut"></a>
-<h3 class="section">6.32 Sample `<samp>cut</samp>`</h3>
-
-
-<p>Example of point cutting (<a href="#cut">cut</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-call 'prepare3d'
-subplot 2 2 0:title 'Cut on (default)':rotate 50 60:light on:box:surf a; zrange -1 0.5
-subplot 2 2 1:title 'Cut off':rotate 50 60:box:surf a; zrange -1 0.5; cut off
-subplot 2 2 2:title 'Cut in box':rotate 50 60:box:alpha on
-cut 0 -1 -1 1 0 1.1:surf3 c
-cut 0 0 0 0 0 0 # restore back
-subplot 2 2 3:title 'Cut by formula':rotate 50 60:box
-cut '(z>(x+0.5*y-1)^2-1) & (z>(x-0.5*y-1)^2-1)':surf3 c
-</pre>
-<div align="center"><img src="png/cut.png" alt="Sample cut">
-</div>
-<hr>
-<a name="dat_005fdiff-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dat_005fextra-sample" accesskey="n" rel="next">dat_extra sample</a>, Previous: <a href="#cut-sample" accesskey="p" rel="prev">cut sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dat_005fdiff"></a>
-<h3 class="section">6.33 Sample `<samp>dat_diff</samp>`</h3>
-
-
-<p>Example of <a href="#diff">diff</a> and <a href="#integrate">integrate</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">ranges 0 1 0 1 0 1:new a 30 40 'x*y'
-subplot 2 2 0:title 'a(x,y)':rotate 60 40:surf a:box
-subplot 2 2 1:title 'da/dx':rotate 60 40:diff a 'x':surf a:box
-subplot 2 2 2:title '\int da/dx dxdy':rotate 60 40:integrate a 'xy':surf a:box
-subplot 2 2 3:title '\int {d^2}a/dxdy dx':rotate 60 40:diff2 a 'y':surf a:box
-</pre>
-<div align="center"><img src="png/dat_diff.png" alt="Sample dat_diff">
-</div>
-<hr>
-<a name="dat_005fextra-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#data1-sample" accesskey="n" rel="next">data1 sample</a>, Previous: <a href="#dat_005fdiff-sample" accesskey="p" rel="prev">dat_diff sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dat_005fextra"></a>
-<h3 class="section">6.34 Sample `<samp>dat_extra</samp>`</h3>
-
-
-<p>Example of <a href="#envelop">envelop</a>, <a href="#sew">sew</a>, <a href="#smooth">smooth</a> and <a href="#resize">resize</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0 '':title 'Envelop sample':new d1 1000 'exp(-8*x^2)*sin(10*pi*x)'
-axis:plot d1 'b':envelop d1 'x':plot d1 'r'
-subplot 2 2 1 '':title 'Smooth sample':ranges 0 1 0 1
-new y0 30 '0.4*sin(pi*x) + 0.3*cos(1.5*pi*x) - 0.4*sin(2*pi*x)+0.5*rnd'
-copy y1 y0:smooth y1 'x3':plot y1 'r';legend '"3" style'
-copy y2 y0:smooth y2 'x5':plot y2 'g';legend '"5" style'
-copy y3 y0:smooth y3 'x':plot y3 'b';legend 'default'
-plot y0 '{m7}:s';legend 'none'
-legend:box
-subplot 2 2 2:title 'Sew sample':rotate 50 60:light on:alpha on
-new d2 100 100 'mod((y^2-(1-x)^2)/2,0.1)'
-box:surf d2 'b':sew d2 'xy' 0.1:surf d2 'r'
-subplot 2 2 3:title 'Resize sample (interpolation)'
-new x0 10 'rnd':new v0 10 'rnd'
-resize x1 x0 100:resize v1 v0 100
-plot x0 v0 'b+ ':plot x1 v1 'r-':label x0 v0 '%n'
-</pre>
-<div align="center"><img src="png/dat_extra.png" alt="Sample dat_extra">
-</div>
-<hr>
-<a name="data1-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#data2-sample" accesskey="n" rel="next">data2 sample</a>, Previous: <a href="#dat_005fextra-sample" accesskey="p" rel="prev">dat_extra sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-data1"></a>
-<h3 class="section">6.35 Sample `<samp>data1</samp>`</h3>
-
-
-
-
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 40 50 60 'exp(-x^2-4*y^2-16*z^2)'
-light on:alpha on
-copy b a:diff b 'x':subplot 5 3 0:call 'splot'
-copy b a:diff2 b 'x':subplot 5 3 1:call 'splot'
-copy b a:cumsum b 'x':subplot 5 3 2:call 'splot'
-copy b a:integrate b 'x':subplot 5 3 3:call 'splot'
-mirror b 'x':subplot 5 3 4:call 'splot'
-copy b a:diff b 'y':subplot 5 3 5:call 'splot'
-copy b a:diff2 b 'y':subplot 5 3 6:call 'splot'
-copy b a:cumsum b 'y':subplot 5 3 7:call 'splot'
-copy b a:integrate b 'y':subplot 5 3 8:call 'splot'
-mirror b 'y':subplot 5 3 9:call 'splot'
-copy b a:diff b 'z':subplot 5 3 10:call 'splot'
-copy b a:diff2 b 'z':subplot 5 3 11:call 'splot'
-copy b a:cumsum b 'z':subplot 5 3 12:call 'splot'
-copy b a:integrate b 'z':subplot 5 3 13:call 'splot'
-mirror b 'z':subplot 5 3 14:call 'splot'
-stop
-func splot 0
-title 'max=',b.max:norm b -1 1 on:rotate 70 60:box:surf3 b
-return
-</pre>
-<div align="center"><img src="png/data1.png" alt="Sample data1">
-</div>
-<hr>
-<a name="data2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dens-sample" accesskey="n" rel="next">dens sample</a>, Previous: <a href="#data1-sample" accesskey="p" rel="prev">data1 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-data2"></a>
-<h3 class="section">6.36 Sample `<samp>data2</samp>`</h3>
-
-
-
-
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 40 50 60 'exp(-x^2-4*y^2-16*z^2)'
-light on:alpha on
-copy b a:sinfft b 'x':subplot 5 3 0:call 'splot'
-copy b a:cosfft b 'x':subplot 5 3 1:call 'splot'
-copy b a:hankel b 'x':subplot 5 3 2:call 'splot'
-copy b a:swap b 'x':subplot 5 3 3:call 'splot'
-copy b a:smooth b 'x':subplot 5 3 4:call 'splot'
-copy b a:sinfft b 'y':subplot 5 3 5:call 'splot'
-copy b a:cosfft b 'y':subplot 5 3 6:call 'splot'
-copy b a:hankel b 'y':subplot 5 3 7:call 'splot'
-copy b a:swap b 'y':subplot 5 3 8:call 'splot'
-copy b a:smooth b 'y':subplot 5 3 9:call 'splot'
-copy b a:sinfft b 'z':subplot 5 3 10:call 'splot'
-copy b a:cosfft b 'z':subplot 5 3 11:call 'splot'
-copy b a:hankel b 'z':subplot 5 3 12:call 'splot'
-copy b a:swap b 'z':subplot 5 3 13:call 'splot'
-copy b a:smooth b 'z':subplot 5 3 14:call 'splot'
-stop
-func splot 0
-title 'max=',b.max:norm b -1 1 on:rotate 70 60:box
-surf3 b 0.5:surf3 b -0.5
-return
-</pre>
-<div align="center"><img src="png/data2.png" alt="Sample data2">
-</div>
-<hr>
-<a name="dens-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dens3-sample" accesskey="n" rel="next">dens3 sample</a>, Previous: <a href="#data2-sample" accesskey="p" rel="prev">data2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dens"></a>
-<h3 class="section">6.37 Sample `<samp>dens</samp>`</h3>
-
-
-<p>Function <a href="#dens">dens</a> draw density plot (also known as color-map) for surface.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-new a1 30 40 3 '0.6*sin(2*pi*x+pi*(z+1)/2)*sin(3*pi*y+pi*z) + 0.4*cos(3*pi*(x*y)+pi*(z+1)^2/2)'
-subplot 2 2 0 '':title 'Dens plot (default)':box:dens a
-subplot 2 2 1:title '3d variant':rotate 50 60:box:dens a
-subplot 2 2 2 '':title '"\#" style; meshnum 10':box:dens a '#'; meshnum 10
-subplot 2 2 3:title 'several slices':rotate 50 60:box:dens a1
-</pre>
-<div align="center"><img src="png/dens.png" alt="Sample dens">
-</div>
-<hr>
-<a name="dens3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dens_005fxyz-sample" accesskey="n" rel="next">dens_xyz sample</a>, Previous: <a href="#dens-sample" accesskey="p" rel="prev">dens sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dens3"></a>
-<h3 class="section">6.38 Sample `<samp>dens3</samp>`</h3>
-
-
-<p>Function <a href="#dens3">dens3</a> draw ordinary density plots but at slices of 3D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Dens3 sample':rotate 50 60:alpha on:alphadef 0.7
-origin 0 0 0:box:axis '_xyz'
-dens3 c 'x':dens3 c ':y':dens3 c 'z'
-</pre>
-<div align="center"><img src="png/dens3.png" alt="Sample dens3">
-</div>
-<hr>
-<a name="dens_005fxyz-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#detect-sample" accesskey="n" rel="next">detect sample</a>, Previous: <a href="#dens3-sample" accesskey="p" rel="prev">dens3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dens_005fxyz"></a>
-<h3 class="section">6.39 Sample `<samp>dens_xyz</samp>`</h3>
-
-
-<p>Functions <a href="#densz">densz</a>, <a href="#densy">densy</a>, <a href="#densx">densx</a> draw density plot on plane perpendicular to corresponding axis. One of possible application is drawing projections of 3D field.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Dens[XYZ] sample':rotate 50 60:box
-densx {sum c 'x'} '' -1:densy {sum c 'y'} '' 1:densz {sum c 'z'} '' -1
-</pre>
-<div align="center"><img src="png/dens_xyz.png" alt="Sample dens_xyz">
-</div>
-<hr>
-<a name="detect-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dew-sample" accesskey="n" rel="next">dew sample</a>, Previous: <a href="#dens_005fxyz-sample" accesskey="p" rel="prev">dens_xyz sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-detect"></a>
-<h3 class="section">6.40 Sample `<samp>detect</samp>`</h3>
-
-
-<p>Example of curve <a href="#detect">detect</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '':title 'Detect sample'
-new a 200 100 'exp(-30*(y-0.5*sin(pi*x))^2-rnd/10)+exp(-30*(y+0.5*sin(pi*x))^2-rnd/10)+exp(-30*(x+y)^2-rnd/10)'
-ranges 0 a.nx 0 a.ny:box
-alpha on:crange a:dens a
-
-detect r a 0.1 5
-plot r(0) r(1) '.'
-</pre>
-<div align="center"><img src="png/detect.png" alt="Sample detect">
-</div>
-<hr>
-<a name="dew-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#diffract-sample" accesskey="n" rel="next">diffract sample</a>, Previous: <a href="#detect-sample" accesskey="p" rel="prev">detect sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dew"></a>
-<h3 class="section">6.41 Sample `<samp>dew</samp>`</h3>
-
-
-<p>Function <a href="#dew">dew</a> is similar to <a href="#vect">vect</a> but use drops instead of arrows.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2v'
-subplot 1 1 0 '':title 'Dew plot':light on:box:dew a b
-</pre>
-<div align="center"><img src="png/dew.png" alt="Sample dew">
-</div>
-<hr>
-<a name="diffract-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dilate-sample" accesskey="n" rel="next">dilate sample</a>, Previous: <a href="#dew-sample" accesskey="p" rel="prev">dew sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-diffract"></a>
-<h3 class="section">6.42 Sample `<samp>diffract</samp>`</h3>
-
-
-
-
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">define n 32 #number of points
-define m 20 # number of iterations
-define dt 0.01 # time step
-new res n m+1
-ranges -1 1 0 m*dt 0 1
-
-#tridmat periodic variant
-new !a n 'i',dt*(n/2)^2/2
-copy !b !(1-2*a)
-
-new !u n 'exp(-6*x^2)'
-put res u all 0
-for $i 0 m
-tridmat u a b a u 'xdc'
-put res u all $i+1
-next
-subplot 2 2 0 '<_':title 'Tridmat, periodic b.c.'
-axis:box:dens res
-
-#fourier variant
-new k n:fillsample k 'xk'
-copy !e !exp(-i1*dt*k^2)
-
-new !u n 'exp(-6*x^2)'
-put res u all 0
-for $i 0 m
-fourier u 'x'
-multo u e
-fourier u 'ix'
-put res u all $i+1
-next
-subplot 2 2 1 '<_':title 'Fourier method'
-axis:box:dens res
-
-#tridmat zero variant
-new !u n 'exp(-6*x^2)'
-put res u all 0
-for $i 0 m
-tridmat u a b a u 'xd'
-put res u all $i+1
-next
-subplot 2 2 2 '<_':title 'Tridmat, zero b.c.'
-axis:box:dens res
-
-#diffract exp variant
-new !u n 'exp(-6*x^2)'
-define q dt*(n/2)^2/8 # need q<0.4 !!!
-put res u all 0
-for $i 0 m
-for $j 1 8 # due to smaller dt
-diffract u 'xe' q
-next
-put res u all $i+1
-next
-subplot 2 2 3 '<_':title 'Diffract, exp b.c.'
-axis:box:dens res
-</pre>
-<div align="center"><img src="png/diffract.png" alt="Sample diffract">
-</div>
-<hr>
-<a name="dilate-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#dots-sample" accesskey="n" rel="next">dots sample</a>, Previous: <a href="#diffract-sample" accesskey="p" rel="prev">diffract sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dilate"></a>
-<h3 class="section">6.43 Sample `<samp>dilate</samp>`</h3>
-
-
-<p>Example of <a href="#dilate">dilate</a> and <a href="#erode">erode</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0:title 'Dilate&Erode 1D sample'
-new y 11:put y 1 5
-ranges 0 10 0 1:axis:box
-plot y 'b*'
-dilate y 0.5 2
-plot y 'rs'
-erode y 0.5 1
-plot y 'g#o'
-
-subplot 2 2 1:title 'Dilate&Erode 2D sample':rotate 40 60
-ranges 0 10 0 10 0 3
-axis:box
-new z 11 11:put z 3 5 5
-boxs z 'b':boxs z 'k#'
-dilate z 1 2
-boxs z 'r':boxs z 'k#'
-erode z 1 1
-boxs 2*z 'g':boxs 2*z 'k#'
-
-subplot 2 2 2
-text 0.5 0.7 'initial' 'ba';size -2
-text 0.5 0.5 'dilate=2' 'ra';size -2
-text 0.5 0.3 'erode=1' 'ga';size -2
-
-subplot 2 2 3:title 'Dilate&Erode 3D sample'
-rotate 60 50:light on:alpha on
-ranges 0 10 0 10 0 10:crange 0 3
-axis:box
-new a 11 11 11:put a 3 5 5 5
-surf3a a a 1.5 'b'
-dilate a 1 2
-surf3a a a 0.5 'r'
-erode a 1 1
-surf3a 2*a 2*a 1 'g'
-</pre>
-<div align="center"><img src="png/dilate.png" alt="Sample dilate">
-</div>
-<hr>
-<a name="dots-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#earth-sample" accesskey="n" rel="next">earth sample</a>, Previous: <a href="#dilate-sample" accesskey="p" rel="prev">dilate sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-dots"></a>
-<h3 class="section">6.44 Sample `<samp>dots</samp>`</h3>
-
-
-<p>Function <a href="#dots">dots</a> is another way to draw irregular points. <code>Dots</code> use color scheme for coloring (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new t 2000 'pi*(rnd-0.5)':new f 2000 '2*pi*rnd'
-copy x 0.9*cos(t)*cos(f):copy y 0.9*cos(t)*sin(f):copy z 0.6*sin(t):copy c cos(2*t)
-subplot 2 2 0:title 'Dots sample':rotate 50 60
-box:dots x y z
-alpha on
-subplot 2 2 1:title 'add transparency':rotate 50 60
-box:dots x y z c
-subplot 2 2 2:title 'add colorings':rotate 50 60
-box:dots x y z x c
-subplot 2 2 3:title 'Only coloring':rotate 50 60
-box:tens x y z x ' .'
-</pre>
-<div align="center"><img src="png/dots.png" alt="Sample dots">
-</div>
-<hr>
-<a name="earth-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#error-sample" accesskey="n" rel="next">error sample</a>, Previous: <a href="#dots-sample" accesskey="p" rel="prev">dots sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-earth"></a>
-<h3 class="section">6.45 Sample `<samp>earth</samp>`</h3>
-
-
-<p>Example of Earth map by using <a href="#import">import</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">import dat 'Equirectangular-projection.jpg' 'BbGYw' -1 1
-subplot 1 1 0 '<>':title 'Earth in 3D':rotate 40 60
-copy phi dat 'pi*x':copy tet dat 'pi*y/2'
-copy x cos(tet)*cos(phi)
-copy y cos(tet)*sin(phi)
-copy z sin(tet)
-
-light on
-surfc x y z dat 'BbGYw'
-contp [-0.51,-0.51] x y z dat 'y'
-</pre>
-<div align="center"><img src="png/earth.png" alt="Sample earth">
-</div>
-<hr>
-<a name="error-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#error2-sample" accesskey="n" rel="next">error2 sample</a>, Previous: <a href="#earth-sample" accesskey="p" rel="prev">earth sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-error"></a>
-<h3 class="section">6.46 Sample `<samp>error</samp>`</h3>
-
-
-<p>Function <a href="#error">error</a> draw error boxes around the points. You can draw default boxes or semi-transparent symbol (like marker, see <a href="#Line-styles">Line styles</a>). Also you can set individual color for each box. See also <a href="#error2-sample">error2 sample</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-new y 50 '0.7*sin(pi*x-pi) + 0.5*cos(3*pi*(x+1)/2) + 0.2*sin(pi*(x+1)/2)'
-new x0 10 'x + 0.1*rnd-0.05':new ex 10 '0.1':new ey 10 '0.2'
-new y0 10 '0.7*sin(pi*x-pi) + 0.5*cos(3*pi*(x+1)/2) + 0.2*sin(pi*(x+1)/2) + 0.2*rnd-0.1'
-subplot 2 2 0 '':title 'Error plot (default)':box:plot y:error x0 y0 ex ey 'k'
-subplot 2 2 1 '':title '"!" style; no e_x':box:plot y:error x0 y0 ey 'o!rgb'
-subplot 2 2 2 '':title '"\@" style':alpha on:box:plot y:error x0 y0 ex ey '@'; alpha 0.5
-subplot 2 2 3:title '3d variant':rotate 50 60:axis
-for $1 0 9
- errbox 2*rnd-1 2*rnd-1 2*rnd-1 0.2 0.2 0.2 'bo'
-next
-</pre>
-<div align="center"><img src="png/error.png" alt="Sample error">
-</div>
-<hr>
-<a name="error2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#export-sample" accesskey="n" rel="next">export sample</a>, Previous: <a href="#error-sample" accesskey="p" rel="prev">error sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-error2"></a>
-<h3 class="section">6.47 Sample `<samp>error2</samp>`</h3>
-
-
-<p>Example of <a href="#error">error</a> kinds.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x0 10 'rnd':new ex 10 '0.1'
-new y0 10 'rnd':new ey 10 '0.1'
-ranges 0 1 0 1
-subplot 4 3 0 '':box:error x0 y0 ex ey '#+@'
-subplot 4 3 1 '':box:error x0 y0 ex ey '#x@'
-subplot 4 3 2 '':box:error x0 y0 ex ey '#s@'; alpha 0.5
-subplot 4 3 3 '':box:error x0 y0 ex ey 's@'
-subplot 4 3 4 '':box:error x0 y0 ex ey 'd@'
-subplot 4 3 5 '':box:error x0 y0 ex ey '#d@'; alpha 0.5
-subplot 4 3 6 '':box:error x0 y0 ex ey '+@'
-subplot 4 3 7 '':box:error x0 y0 ex ey 'x@'
-subplot 4 3 8 '':box:error x0 y0 ex ey 'o@'
-subplot 4 3 9 '':box:error x0 y0 ex ey '#o@'; alpha 0.5
-subplot 4 3 10 '':box:error x0 y0 ex ey '#.@'
-subplot 4 3 11 '':box:error x0 y0 ex ey; alpha 0.5
-</pre>
-<div align="center"><img src="png/error2.png" alt="Sample error2">
-</div>
-<hr>
-<a name="export-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#fall-sample" accesskey="n" rel="next">fall sample</a>, Previous: <a href="#error2-sample" accesskey="p" rel="prev">error2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-export"></a>
-<h3 class="section">6.48 Sample `<samp>export</samp>`</h3>
-
-
-<p>Example of data <a href="#export">export</a> and <a href="#import">import</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 100 100 'x^2*y':new b 100 100
-export a 'test_data.png' 'BbcyrR' -1 1
-import b 'test_data.png' 'BbcyrR' -1 1
-subplot 2 1 0 '':title 'initial':box:dens a
-subplot 2 1 1 '':title 'imported':box:dens b
-</pre>
-<div align="center"><img src="png/export.png" alt="Sample export">
-</div>
-<hr>
-<a name="fall-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#fexport-sample" accesskey="n" rel="next">fexport sample</a>, Previous: <a href="#export-sample" accesskey="p" rel="prev">export sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-fall"></a>
-<h3 class="section">6.49 Sample `<samp>fall</samp>`</h3>
-
-
-<p>Function <a href="#fall">fall</a> draw waterfall surface. You can use <a href="#meshnum">meshnum</a> for changing number of lines to be drawn. Also you can use `<samp>x</samp>` style for drawing lines in other direction.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Fall plot':rotate 50 60:box:fall a
-</pre>
-<div align="center"><img src="png/fall.png" alt="Sample fall">
-</div>
-<hr>
-<a name="fexport-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#fit-sample" accesskey="n" rel="next">fit sample</a>, Previous: <a href="#fall-sample" accesskey="p" rel="prev">fall sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-fexport"></a>
-<h3 class="section">6.50 Sample `<samp>fexport</samp>`</h3>
-
-
-<p>Example of <a href="#write">write</a> to different file formats.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-write 'fexport.jpg':#write 'fexport.png'
-write 'fexport.bmp':write 'fexport.tga'
-write 'fexport.eps':write 'fexport.svg'
-write 'fexport.gif':write 'fexport.xyz'
-write 'fexport.stl':write 'fexport.off'
-write 'fexport.tex':write 'fexport.obj'
-write 'fexport.prc':write 'fexport.json'
-write 'fexport.mgld'
-</pre>
-<div align="center"><img src="png/fexport.png" alt="Sample fexport">
-</div>
-<hr>
-<a name="fit-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#flame2d-sample" accesskey="n" rel="next">flame2d sample</a>, Previous: <a href="#fexport-sample" accesskey="p" rel="prev">fexport sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-fit"></a>
-<h3 class="section">6.51 Sample `<samp>fit</samp>`</h3>
-
-
-<p>Example of nonlinear <a href="#fit">fit</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new dat 100 '0.4*rnd+0.1+sin(2*pi*x)'
-new in 100 '0.3+sin(2*pi*x)'
-list ini 1 1 3:fit res dat 'a+b*sin(c*x)' 'abc' ini
-title 'Fitting sample':yrange -2 2:box:axis:plot dat 'k. '
-plot res 'r':plot in 'b'
-text -0.9 -1.3 'fitted:' 'r:L'
-putsfit 0 -1.8 'y = ' 'r':text 0 2.2 'initial: y = 0.3+sin(2\pi x)' 'b'
-</pre>
-<div align="center"><img src="png/fit.png" alt="Sample fit">
-</div>
-<hr>
-<a name="flame2d-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#flow-sample" accesskey="n" rel="next">flow sample</a>, Previous: <a href="#fit-sample" accesskey="p" rel="prev">fit sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-flame2d"></a>
-<h3 class="section">6.52 Sample `<samp>flame2d</samp>`</h3>
-
-
-<p>Function <a href="#flame2d">flame2d</a> generate points for flame fractals in 2d case.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">list A [0.33,0,0,0.33,0,0,0.2] [0.33,0,0,0.33,0.67,0,0.2] [0.33,0,0,0.33,0.33,0.33,0.2]\
- [0.33,0,0,0.33,0,0.67,0.2] [0.33,0,0,0.33,0.67,0.67,0.2]
-new B 2 3 A.ny '0.3'
-put B 3 0 0 -1
-put B 3 0 1 -1
-put B 3 0 2 -1
-flame2d fx fy A B 1000000
-subplot 1 1 0 '<_':title 'Flame2d sample'
-ranges fx fy:box:axis
-plot fx fy 'r#o ';size 0.05
-</pre>
-<div align="center"><img src="png/flame2d.png" alt="Sample flame2d">
-</div>
-<hr>
-<a name="flow-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#flow3-sample" accesskey="n" rel="next">flow3 sample</a>, Previous: <a href="#flame2d-sample" accesskey="p" rel="prev">flame2d sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-flow"></a>
-<h3 class="section">6.53 Sample `<samp>flow</samp>`</h3>
-
-
-<p>Function <a href="#flow">flow</a> is another standard way to visualize vector fields - it draw lines (threads) which is tangent to local vector field direction. MathGL draw threads from edges of bounding box and from central slices. Sometimes it is not most appropriate variant - you may want to use <code>flowp</code> to specify manual position of threads. The color scheme is used for coloring (see <a href="#Color-scheme">Color scheme</a>). At this warm color corresponds to normal flow (like attractor), cold one corresponds to inverse flow (like source).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2v'
-call 'prepare3v'
-subplot 2 2 0 '':title 'Flow plot (default)':box:flow a b
-subplot 2 2 1 '':title '"v" style':box:flow a b 'v'
-subplot 2 2 2 '':title '"#" and "." styles':box:flow a b '#':flow a b '.2k'
-subplot 2 2 3:title '3d variant':rotate 50 60:box:flow ex ey ez
-</pre>
-<div align="center"><img src="png/flow.png" alt="Sample flow">
-</div>
-<hr>
-<a name="flow3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#fog-sample" accesskey="n" rel="next">fog sample</a>, Previous: <a href="#flow-sample" accesskey="p" rel="prev">flow sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-flow3"></a>
-<h3 class="section">6.54 Sample `<samp>flow3</samp>`</h3>
-
-
-<p>Function <a href="#flow3">flow3</a> draw flow threads, which start from given plane.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3v'
-subplot 2 2 0:title 'Flow3 plot (default)':rotate 50 60:box
-flow3 ex ey ez
-subplot 2 2 1:title '"v" style, from boundary':rotate 50 60:box
-flow3 ex ey ez 'v' 0
-subplot 2 2 2:title '"t" style':rotate 50 60:box
-flow3 ex ey ez 't' 0
-subplot 2 2 3:title 'from \i z planes':rotate 50 60:box
-flow3 ex ey ez 'z' 0
-flow3 ex ey ez 'z' 9
-</pre>
-<div align="center"><img src="png/flow3.png" alt="Sample flow3">
-</div>
-<hr>
-<a name="fog-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#fonts-sample" accesskey="n" rel="next">fonts sample</a>, Previous: <a href="#flow3-sample" accesskey="p" rel="prev">flow3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-fog"></a>
-<h3 class="section">6.55 Sample `<samp>fog</samp>`</h3>
-
-
-<p>Example of <a href="#fog">fog</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Fog sample':rotate 50 60:light on:fog 1
-box:surf a:cont a 'y'
-</pre>
-<div align="center"><img src="png/fog.png" alt="Sample fog">
-</div>
-<hr>
-<a name="fonts-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#grad-sample" accesskey="n" rel="next">grad sample</a>, Previous: <a href="#fog-sample" accesskey="p" rel="prev">fog sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-fonts"></a>
-<h3 class="section">6.56 Sample `<samp>fonts</samp>`</h3>
-
-
-<p>Example of <a href="#font">font</a> typefaces.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">define d 0.25
-loadfont 'STIX':text 0 1.1 'default font (STIX)'
-loadfont 'adventor':text 0 1.1-d 'adventor font'
-loadfont 'bonum':text 0 1.1-2*d 'bonum font'
-loadfont 'chorus':text 0 1.1-3*d 'chorus font'
-loadfont 'cursor':text 0 1.1-4*d 'cursor font'
-loadfont 'heros':text 0 1.1-5*d 'heros font'
-loadfont 'heroscn':text 0 1.1-6*d 'heroscn font'
-loadfont 'pagella':text 0 1.1-7*d 'pagella font'
-loadfont 'schola':text 0 1.1-8*d 'schola font'
-loadfont 'termes':text 0 1.1-9*d 'termes font'
-loadfont ''
-</pre>
-<div align="center"><img src="png/fonts.png" alt="Sample fonts">
-</div>
-<hr>
-<a name="grad-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#hist-sample" accesskey="n" rel="next">hist sample</a>, Previous: <a href="#fonts-sample" accesskey="p" rel="prev">fonts sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-grad"></a>
-<h3 class="section">6.57 Sample `<samp>grad</samp>`</h3>
-
-
-<p>Function <a href="#grad">grad</a> draw gradient lines for matrix.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-subplot 1 1 0 '':title 'Grad plot':box:grad a:dens a '{u8}w{q8}'
-</pre>
-<div align="center"><img src="png/grad.png" alt="Sample grad">
-</div>
-<hr>
-<a name="hist-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ifs2d-sample" accesskey="n" rel="next">ifs2d sample</a>, Previous: <a href="#grad-sample" accesskey="p" rel="prev">grad sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-hist"></a>
-<h3 class="section">6.58 Sample `<samp>hist</samp>`</h3>
-
-
-<p>Example of <a href="#hist">hist</a> (histogram).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 10000 '2*rnd-1':new y 10000 '2*rnd-1':copy z exp(-6*(x^2+y^2))
-hist xx x z:norm xx 0 1:hist yy y z:norm yy 0 1
-multiplot 3 3 3 2 2 '':ranges -1 1 -1 1 0 1:box:dots x y z 'wyrRk'
-multiplot 3 3 0 2 1 '':ranges -1 1 0 1:box:bars xx
-multiplot 3 3 5 1 2 '':ranges 0 1 -1 1:box:barh yy
-subplot 3 3 2:text 0.5 0.5 'Hist and\n{}MultiPlot\n{}sample' 'a' -3
-</pre>
-<div align="center"><img src="png/hist.png" alt="Sample hist">
-</div>
-<hr>
-<a name="ifs2d-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ifs3d-sample" accesskey="n" rel="next">ifs3d sample</a>, Previous: <a href="#hist-sample" accesskey="p" rel="prev">hist sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ifs2d"></a>
-<h3 class="section">6.59 Sample `<samp>ifs2d</samp>`</h3>
-
-
-<p>Function <a href="#ifs2d">ifs2d</a> generate points for fractals using iterated function system in 2d case.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">list A [0.33,0,0,0.33,0,0,0.2] [0.33,0,0,0.33,0.67,0,0.2] [0.33,0,0,0.33,0.33,0.33,0.2]\
- [0.33,0,0,0.33,0,0.67,0.2] [0.33,0,0,0.33,0.67,0.67,0.2]
-ifs2d fx fy A 100000
-subplot 1 1 0 '<_':title 'IFS 2d sample'
-ranges fx fy:axis
-plot fx fy 'r#o ';size 0.05
-</pre>
-<div align="center"><img src="png/ifs2d.png" alt="Sample ifs2d">
-</div>
-<hr>
-<a name="ifs3d-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#indirect-sample" accesskey="n" rel="next">indirect sample</a>, Previous: <a href="#ifs2d-sample" accesskey="p" rel="prev">ifs2d sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ifs3d"></a>
-<h3 class="section">6.60 Sample `<samp>ifs3d</samp>`</h3>
-
-
-<p>Function <a href="#ifs3d">ifs3d</a> generate points for fractals using iterated function system in 3d case.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">list A [0,0,0,0,.18,0,0,0,0,0,0,0,.01] [.85,0,0,0,.85,.1,0,-0.1,0.85,0,1.6,0,.85]\
- [.2,-.2,0,.2,.2,0,0,0,0.3,0,0.8,0,.07] [-.2,.2,0,.2,.2,0,0,0,0.3,0,0.8,0,.07]
-ifs3d f A 100000
-title 'IFS 3d sample':rotate 50 60
-ranges f(0) f(1) f(2):axis:box
-dots f(0) f(1) f(2) 'G#o';size 0.05
-</pre>
-<div align="center"><img src="png/ifs3d.png" alt="Sample ifs3d">
-</div>
-<hr>
-<a name="indirect-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#inplot-sample" accesskey="n" rel="next">inplot sample</a>, Previous: <a href="#ifs3d-sample" accesskey="p" rel="prev">ifs3d sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-indirect"></a>
-<h3 class="section">6.61 Sample `<samp>indirect</samp>`</h3>
-
-
-<p>Comparison of <a href="#subdata">subdata</a> vs <a href="#evaluate">evaluate</a>/
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '':title 'SubData vs Evaluate'
-new in 9 'x^3/1.1':plot in 'ko ':box
-new arg 99 '4*x+4'
-evaluate e in arg off:plot e 'b.'; legend 'Evaluate'
-subdata s in arg:plot s 'r.';legend 'SubData'
-legend 2
-</pre>
-<div align="center"><img src="png/indirect.png" alt="Sample indirect">
-</div>
-<hr>
-<a name="inplot-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#iris-sample" accesskey="n" rel="next">iris sample</a>, Previous: <a href="#indirect-sample" accesskey="p" rel="prev">indirect sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-inplot"></a>
-<h3 class="section">6.62 Sample `<samp>inplot</samp>`</h3>
-
-
-<p>Example of <a href="#inplot">inplot</a>, <a href="#multiplot">multiplot</a>, <a href="#columnplot">columnplot</a>, <a href="#gridplot">gridplot</a>, <a href="#shearplot">shearplot</a>, <a href="#stickplot">stickplot</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 3 2 0:title 'StickPlot'
-stickplot 3 0 20 30:box 'r':text 0 0 0 '0' 'r'
-stickplot 3 1 20 30:box 'g':text 0 0 0 '1' 'g'
-stickplot 3 2 20 30:box 'b':text 0 9 0 '2' 'b'
-subplot 3 2 3 '':title 'ColumnPlot'
-columnplot 3 0:box 'r':text 0 0 '0' 'r'
-columnplot 3 1:box 'g':text 0 0 '1' 'g'
-columnplot 3 2:box 'b':text 0 0 '2' 'b'
-subplot 3 2 4 '':title 'GridPlot'
-gridplot 2 2 0:box 'r':text 0 0 '0' 'r'
-gridplot 2 2 1:box 'g':text 0 0 '1' 'g'
-gridplot 2 2 2:box 'b':text 0 0 '2' 'b'
-gridplot 2 2 3:box 'm':text 0 0 '3' 'm'
-subplot 3 2 5 '':title 'InPlot':box
-inplot 0.4 1 0.6 1 on:box 'r'
-multiplot 3 2 1 2 1 '':title 'MultiPlot and ShearPlot':box
-shearplot 3 0 0.2 0.1:box 'r':text 0 0 '0' 'r'
-shearplot 3 1 0.2 0.1:box 'g':text 0 0 '1' 'g'
-shearplot 3 2 0.2 0.1:box 'b':text 0 0 '2' 'b'
-</pre>
-<div align="center"><img src="png/inplot.png" alt="Sample inplot">
-</div>
-<hr>
-<a name="iris-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#label-sample" accesskey="n" rel="next">label sample</a>, Previous: <a href="#inplot-sample" accesskey="p" rel="prev">inplot sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-iris"></a>
-<h3 class="section">6.63 Sample `<samp>iris</samp>`</h3>
-
-
-<p>Function <a href="#iris">iris</a> draw Iris plot for columns of data array.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">read a 'iris.dat'
-crop a 0 4 'x':rearrange a a.nx 50
-subplot 1 1 0 '':title 'Iris plot'
-iris a 'sepal\n length;sepal\n width;petal\n length;petal\n width' '. ';value -1.5;size -2
-</pre>
-<div align="center"><img src="png/iris.png" alt="Sample iris">
-</div>
-<hr>
-<a name="label-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#lamerey-sample" accesskey="n" rel="next">lamerey sample</a>, Previous: <a href="#iris-sample" accesskey="p" rel="prev">iris sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-label"></a>
-<h3 class="section">6.64 Sample `<samp>label</samp>`</h3>
-
-
-<p>Function <a href="#label">label</a> print text at data points. The string may contain `<samp>%x</samp>`, `<samp>%y</samp>`, `<samp>%z</samp>` for x-, y-, z-coordinates of points, `<samp>%n</samp>` for point index.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ys 10 '0.2*rnd-0.8*sin(pi*x)'
-subplot 1 1 0 '':title 'Label plot':box:plot ys ' *':label ys 'y=%y'
-</pre>
-<div align="center"><img src="png/label.png" alt="Sample label">
-</div>
-<hr>
-<a name="lamerey-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#legend-sample" accesskey="n" rel="next">legend sample</a>, Previous: <a href="#label-sample" accesskey="p" rel="prev">label sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-lamerey"></a>
-<h3 class="section">6.65 Sample `<samp>lamerey</samp>`</h3>
-
-
-<p>Function <a href="#lamerey">lamerey</a> draw Lamerey diagram.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Lamerey sample'
-axis:xlabel '\i x':ylabel '\bar{\i x} = 2 \i{x}'
-fplot 'x' 'k='
-fplot '2*x' 'b'
-lamerey 0.00097 '2*x' 'rv~';size 2
-lamerey -0.00097 '2*x' 'rv~';size 2
-</pre>
-<div align="center"><img src="png/lamerey.png" alt="Sample lamerey">
-</div>
-<hr>
-<a name="legend-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#light-sample" accesskey="n" rel="next">light sample</a>, Previous: <a href="#lamerey-sample" accesskey="p" rel="prev">lamerey sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-legend"></a>
-<h3 class="section">6.66 Sample `<samp>legend</samp>`</h3>
-
-
-<p>Example of <a href="#legend">legend</a> styles.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">addlegend 'sin(\pi {x^2})' 'b':addlegend 'sin(\pi x)' 'g*'
-addlegend 'sin(\pi \sqrt{x})' 'rd':addlegend 'jsut text' ' ':addlegend 'no indent for this' ''
-subplot 2 2 0 '':title 'Legend (default)':box:legend
-legend 1 0.5 '^':text 0.49 0.88 'Style "\^"' 'A:L'
-legend 3 'A#':text 0.75 0.65 'Absolute position' 'A'
-subplot 2 2 2 '':title 'coloring':box:legend 0 'r#':legend 1 'Wb#':legend 2 'ygr#'
-subplot 2 2 3 '':title 'manual position':box
-legend 0.5 1:text 0.5 0.5 'at x=0.5, y=1' 'a'
-legend 1 '#-':text 0.75 0.25 'Horizontal legend' 'a'
-</pre>
-<div align="center"><img src="png/legend.png" alt="Sample legend">
-</div>
-<hr>
-<a name="light-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#loglog-sample" accesskey="n" rel="next">loglog sample</a>, Previous: <a href="#legend-sample" accesskey="p" rel="prev">legend sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-light"></a>
-<h3 class="section">6.67 Sample `<samp>light</samp>`</h3>
-
-
-<p>Example of <a href="#light">light</a> with different types.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">light on:attachlight on
-call 'prepare2d'
-subplot 2 2 0:title 'Default':rotate 50 60:box:surf a
-line -1 -0.7 1.7 -1 -0.7 0.7 'BA'
-
-subplot 2 2 1:title 'Local':rotate 50 60
-light 0 1 0 1 -2 -1 -1
-line 1 0 1 -1 -1 0 'BAO':box:surf a
-
-subplot 2 2 2:title 'no diffuse':rotate 50 60
-diffuse 0
-line 1 0 1 -1 -1 0 'BAO':box:surf a
-
-subplot 2 2 3:title 'diffusive only':rotate 50 60
-diffuse 0.5:light 0 1 0 1 -2 -1 -1 'w' 0
-line 1 0 1 -1 -1 0 'BAO':box:surf a
-</pre>
-<div align="center"><img src="png/light.png" alt="Sample light">
-</div>
-<hr>
-<a name="loglog-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#map-sample" accesskey="n" rel="next">map sample</a>, Previous: <a href="#light-sample" accesskey="p" rel="prev">light sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-loglog"></a>
-<h3 class="section">6.68 Sample `<samp>loglog</samp>`</h3>
-
-
-<p>Example of log- and log-log- axis labels.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0 '<_':title 'Semi-log axis':ranges 0.01 100 -1 1:axis 'lg(x)' '' ''
-axis:grid 'xy' 'g':fplot 'sin(1/x)':xlabel 'x' 0:ylabel 'y = sin 1/x' 0
-subplot 2 2 1 '<_':title 'Log-log axis':ranges 0.01 100 0.1 100:axis 'lg(x)' 'lg(y)' ''
-axis:grid '!' 'h=':grid:fplot 'sqrt(1+x^2)'
-xlabel 'x' 0:ylabel 'y = \sqrt{1+x^2}' 0
-subplot 2 2 2 '<_':title 'Minus-log axis':ranges -100 -0.01 -100 -0.1:axis '-lg(-x)' '-lg(-y)' ''
-axis:fplot '-sqrt(1+x^2)':xlabel 'x' 0:ylabel 'y = -\sqrt{1+x^2}' 0
-subplot 2 2 3 '<_':title 'Log-ticks':ranges 0.01 100 0 100:axis 'sqrt(x)' '' ''
-axis:fplot 'x':xlabel 'x' 1:ylabel 'y = x' 0
-</pre>
-<div align="center"><img src="png/loglog.png" alt="Sample loglog">
-</div>
-<hr>
-<a name="map-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#mark-sample" accesskey="n" rel="next">mark sample</a>, Previous: <a href="#loglog-sample" accesskey="p" rel="prev">loglog sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-map"></a>
-<h3 class="section">6.69 Sample `<samp>map</samp>`</h3>
-
-
-<p>Example of <a href="#map">map</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 50 40 'x':new b 50 40 'y':zrange -2 2:text 0 0 '\to'
-subplot 2 1 0:text 0 1.1 '\{x, y\}' '' -2:box:map a b 'brgk'
-subplot 2 1 1:text 0 1.1 '\{\frac{x^3+y^3}{2}, \frac{x-y}{2}\}' '' -2
-box:fill a '(x^3+y^3)/2':fill b '(x-y)/2':map a b 'brgk'
-</pre>
-<div align="center"><img src="png/map.png" alt="Sample map">
-</div>
-<hr>
-<a name="mark-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#mask-sample" accesskey="n" rel="next">mask sample</a>, Previous: <a href="#map-sample" accesskey="p" rel="prev">map sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-mark"></a>
-<h3 class="section">6.70 Sample `<samp>mark</samp>`</h3>
-
-
-<p>Example of <a href="#mark">mark</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 1 1 0 '':title 'Mark plot (default)':box:mark y y1 's'
-</pre>
-<div align="center"><img src="png/mark.png" alt="Sample mark">
-</div>
-<hr>
-<a name="mask-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#mesh-sample" accesskey="n" rel="next">mesh sample</a>, Previous: <a href="#mark-sample" accesskey="p" rel="prev">mark sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-mask"></a>
-<h3 class="section">6.71 Sample `<samp>mask</samp>`</h3>
-
-
-<p>Example of <a href="#mask">mask</a> kinds.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 10 10 'x'
-subplot 5 4 0 '':title '"-" mask':dens a '3-'
-subplot 5 4 1 '':title '"+" mask':dens a '3+'
-subplot 5 4 2 '':title '"=" mask':dens a '3='
-subplot 5 4 3 '':title '";" mask':dens a '3;'
-subplot 5 4 4 '':title '";I" mask':dens a '3;I'
-subplot 5 4 5 '':title '"o" mask':dens a '3o'
-subplot 5 4 6 '':title '"O" mask':dens a '3O'
-subplot 5 4 7 '':title '"s" mask':dens a '3s'
-subplot 5 4 8 '':title '"S" mask':dens a '3S'
-subplot 5 4 9 '':title '";/" mask':dens a '3;/'
-subplot 5 4 10 '':title '"~" mask':dens a '3~'
-subplot 5 4 11 '':title '"<" mask':dens a '3<'
-subplot 5 4 12 '':title '">" mask':dens a '3>'
-subplot 5 4 13 '':title '"j" mask':dens a '3j'
-subplot 5 4 14 '':title '"-;\" mask':dens a '3;\ '
-subplot 5 4 15 '':title '"d" mask':dens a '3d'
-subplot 5 4 16 '':title '"D" mask':dens a '3D'
-subplot 5 4 17 '':title '"*" mask':dens a '3*'
-subplot 5 4 18 '':title '"^" mask':dens a '3^'
-subplot 5 4 19 '':title 'manual mask'
-mask '+' 'ff00182424f800':dens a '3+'
-</pre>
-<div align="center"><img src="png/mask.png" alt="Sample mask">
-</div>
-<hr>
-<a name="mesh-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#mirror-sample" accesskey="n" rel="next">mirror sample</a>, Previous: <a href="#mask-sample" accesskey="p" rel="prev">mask sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-mesh"></a>
-<h3 class="section">6.72 Sample `<samp>mesh</samp>`</h3>
-
-
-<p>Function <a href="#mesh">mesh</a> draw wired surface. You can use <a href="#meshnum">meshnum</a> for changing number of lines to be drawn.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Mesh plot':rotate 50 60:box:mesh a
-</pre>
-<div align="center"><img src="png/mesh.png" alt="Sample mesh">
-</div>
-<hr>
-<a name="mirror-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#molecule-sample" accesskey="n" rel="next">molecule sample</a>, Previous: <a href="#mesh-sample" accesskey="p" rel="prev">mesh sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-mirror"></a>
-<h3 class="section">6.73 Sample `<samp>mirror</samp>`</h3>
-
-
-<p>Example of using options.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 31 41 '-pi*x*exp(-(y+1)^2-4*x^2)'
-subplot 2 2 0:title 'Options for coordinates':alpha on:light on:rotate 40 60:box
-surf a 'r';yrange 0 1:surf a 'b';yrange 0 -1
-subplot 2 2 1:title 'Option "meshnum"':rotate 40 60:box
-mesh a 'r'; yrange 0 1:mesh a 'b';yrange 0 -1; meshnum 5
-subplot 2 2 2:title 'Option "alpha"':rotate 40 60:box
-surf a 'r';yrange 0 1; alpha 0.7:surf a 'b';yrange 0 -1; alpha 0.3
-subplot 2 2 3 '<_':title 'Option "legend"'
-fplot 'x^3' 'r'; legend 'y = x^3':fplot 'cos(pi*x)' 'b'; legend 'y = cos \pi x'
-box:axis:legend 2
-</pre>
-<div align="center"><img src="png/mirror.png" alt="Sample mirror">
-</div>
-<hr>
-<a name="molecule-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ode-sample" accesskey="n" rel="next">ode sample</a>, Previous: <a href="#mirror-sample" accesskey="p" rel="prev">mirror sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-molecule"></a>
-<h3 class="section">6.74 Sample `<samp>molecule</samp>`</h3>
-
-
-<p>Example of drawing molecules.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">alpha on:light on
-subplot 2 2 0 '':title 'Methane, CH_4':rotate 60 120
-sphere 0 0 0 0.25 'k':drop 0 0 0 0 0 1 0.35 'h' 1 2:sphere 0 0 0.7 0.25 'g'
-drop 0 0 0 -0.94 0 -0.33 0.35 'h' 1 2:sphere -0.66 0 -0.23 0.25 'g'
-drop 0 0 0 0.47 0.82 -0.33 0.35 'h' 1 2:sphere 0.33 0.57 -0.23 0.25 'g'
-drop 0 0 0 0.47 -0.82 -0.33 0.35 'h' 1 2:sphere 0.33 -0.57 -0.23 0.25 'g'
-subplot 2 2 1 '':title 'Water, H{_2}O':rotate 60 100
-sphere 0 0 0 0.25 'r':drop 0 0 0 0.3 0.5 0 0.3 'm' 1 2:sphere 0.3 0.5 0 0.25 'g'
-drop 0 0 0 0.3 -0.5 0 0.3 'm' 1 2:sphere 0.3 -0.5 0 0.25 'g'
-subplot 2 2 2 '':title 'Oxygen, O_2':rotate 60 120
-drop 0 0.5 0 0 -0.3 0 0.3 'm' 1 2:sphere 0 0.5 0 0.25 'r'
-drop 0 -0.5 0 0 0.3 0 0.3 'm' 1 2:sphere 0 -0.5 0 0.25 'r'
-subplot 2 2 3 '':title 'Ammonia, NH_3':rotate 60 120
-sphere 0 0 0 0.25 'b':drop 0 0 0 0.33 0.57 0 0.32 'n' 1 2
-sphere 0.33 0.57 0 0.25 'g':drop 0 0 0 0.33 -0.57 0 0.32 'n' 1 2
-sphere 0.33 -0.57 0 0.25 'g':drop 0 0 0 -0.65 0 0 0.32 'n' 1 2
-sphere -0.65 0 0 0.25 'g'
-</pre>
-<div align="center"><img src="png/molecule.png" alt="Sample molecule">
-</div>
-<hr>
-<a name="ode-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ohlc-sample" accesskey="n" rel="next">ohlc sample</a>, Previous: <a href="#molecule-sample" accesskey="p" rel="prev">molecule sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ode"></a>
-<h3 class="section">6.75 Sample `<samp>ode</samp>`</h3>
-
-
-<p>Example of phase plain created by <a href="#ode">ode</a> solving, contour lines (<a href="#cont">cont</a>) and <a href="#flow">flow</a> threads.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0 '<_':title 'Cont':box
-axis:xlabel 'x':ylabel '\dot{x}'
-new f 100 100 'y^2+2*x^3-x^2-0.5':cont f
-
-subplot 2 2 1 '<_':title 'Flow':box
-axis:xlabel 'x':ylabel '\dot{x}'
-new fx 100 100 'x-3*x^2'
-new fy 100 100 'y'
-flow fy fx 'v';value 7
-
-subplot 2 2 2 '<_':title 'ODE':box
-axis:xlabel 'x':ylabel '\dot{x}'
-for $x -1 1 0.1
- ode r 'y;x-3*x^2' 'xy' [$x,0]
- plot r(0) r(1)
- ode r '-y;-x+3*x^2' 'xy' [$x,0]
- plot r(0) r(1)
-next
-</pre>
-<div align="center"><img src="png/ode.png" alt="Sample ode">
-</div>
-<hr>
-<a name="ohlc-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#param1-sample" accesskey="n" rel="next">param1 sample</a>, Previous: <a href="#ode-sample" accesskey="p" rel="prev">ode sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ohlc"></a>
-<h3 class="section">6.76 Sample `<samp>ohlc</samp>`</h3>
-
-
-<p>Function <a href="#ohlc">ohlc</a> draw Open-High-Low-Close diagram. This diagram show vertical line for between maximal(high) and minimal(low) values, as well as horizontal lines before/after vertical line for initial(open)/final(close) values of some process.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new o 10 '0.5*sin(pi*x)'
-new c 10 '0.5*sin(pi*(x+2/9))'
-new l 10 '0.3*rnd-0.8'
-new h 10 '0.3*rnd+0.5'
-subplot 1 1 0 '':title 'OHLC plot':box:ohlc o h l c
-</pre>
-<div align="center"><img src="png/ohlc.png" alt="Sample ohlc">
-</div>
-<hr>
-<a name="param1-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#param2-sample" accesskey="n" rel="next">param2 sample</a>, Previous: <a href="#ohlc-sample" accesskey="p" rel="prev">ohlc sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-param1"></a>
-<h3 class="section">6.77 Sample `<samp>param1</samp>`</h3>
-
-
-<p>Example of parametric plots for 1D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 100 'sin(pi*x)'
-new y 100 'cos(pi*x)'
-new z 100 'sin(2*pi*x)'
-new c 100 'cos(2*pi*x)'
-
-subplot 4 3 0:rotate 40 60:box:plot x y z
-subplot 4 3 1:rotate 40 60:box:area x y z
-subplot 4 3 2:rotate 40 60:box:tens x y z c
-subplot 4 3 3:rotate 40 60:box:bars x y z
-subplot 4 3 4:rotate 40 60:box:stem x y z
-subplot 4 3 5:rotate 40 60:box:textmark x y z c*2 '\alpha'
-subplot 4 3 6:rotate 40 60:box:tube x y z c/10
-subplot 4 3 7:rotate 40 60:box:mark x y z c 's'
-subplot 4 3 8:box:error x y z/10 c/10
-subplot 4 3 9:rotate 40 60:box:step x y z
-subplot 4 3 10:rotate 40 60:box:torus x z 'z';light on
-subplot 4 3 11:rotate 40 60:box:label x y z '%z'
-</pre>
-<div align="center"><img src="png/param1.png" alt="Sample param1">
-</div>
-<hr>
-<a name="param2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#param3-sample" accesskey="n" rel="next">param3 sample</a>, Previous: <a href="#param1-sample" accesskey="p" rel="prev">param1 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-param2"></a>
-<h3 class="section">6.78 Sample `<samp>param2</samp>`</h3>
-
-
-<p>Example of parametric plots for 2D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 100 100 'sin(pi*(x+y)/2)*cos(pi*y/2)'
-new y 100 100 'cos(pi*(x+y)/2)*cos(pi*y/2)'
-new z 100 100 'sin(pi*y/2)'
-new c 100 100 'cos(pi*x)'
-
-subplot 4 4 0:rotate 40 60:box:surf x y z
-subplot 4 4 1:rotate 40 60:box:surfc x y z c
-subplot 4 4 2:rotate 40 60:box:surfa x y z c;alpha 1
-subplot 4 4 3:rotate 40 60:box:mesh x y z;meshnum 10
-subplot 4 4 4:rotate 40 60:box:tile x y z;meshnum 10
-subplot 4 4 5:rotate 40 60:box:tiles x y z c;meshnum 10
-subplot 4 4 6:rotate 40 60:box:axial x y z;alpha 0.5;light on
-subplot 4 4 7:rotate 40 60:box:cont x y z
-subplot 4 4 8:rotate 40 60:box:contf x y z;light on:contv x y z;light on
-subplot 4 4 9:rotate 40 60:box:belt x y z 'x';meshnum 10;light on
-subplot 4 4 10:rotate 40 60:box:dens x y z;alpha 0.5
-subplot 4 4 11:rotate 40 60:box
-fall x y z 'g';meshnum 10:fall x y z 'rx';meshnum 10
-subplot 4 4 12:rotate 40 60:box:belt x y z '';meshnum 10;light on
-subplot 4 4 13:rotate 40 60:box:boxs x y z '';meshnum 10;light on
-subplot 4 4 14:rotate 40 60:box:boxs x y z '#';meshnum 10;light on
-subplot 4 4 15:rotate 40 60:box:boxs x y z '@';meshnum 10;light on
-</pre>
-<div align="center"><img src="png/param2.png" alt="Sample param2">
-</div>
-<hr>
-<a name="param3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#paramv-sample" accesskey="n" rel="next">paramv sample</a>, Previous: <a href="#param2-sample" accesskey="p" rel="prev">param2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-param3"></a>
-<h3 class="section">6.79 Sample `<samp>param3</samp>`</h3>
-
-
-<p>Example of parametric plots for 3D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 50 50 50 '(x+2)/3*sin(pi*y/2)'
-new y 50 50 50 '(x+2)/3*cos(pi*y/2)'
-new z 50 50 50 'z'
-new c 50 50 50 '-2*(x^2+y^2+z^4-z^2)+0.2'
-new d 50 50 50 '1-2*tanh(2*(x+y)^2)'
-
-alpha on:light on
-subplot 4 3 0:rotate 40 60:box:surf3 x y z c
-subplot 4 3 1:rotate 40 60:box:surf3c x y z c d
-subplot 4 3 2:rotate 40 60:box:surf3a x y z c d
-subplot 4 3 3:rotate 40 60:box:cloud x y z c
-subplot 4 3 4:rotate 40 60:box:cont3 x y z c:cont3 x y z c 'x':cont3 x y z c 'z'
-subplot 4 3 5:rotate 40 60:box:contf3 x y z c:contf3 x y z c 'x':contf3 x y z c 'z'
-subplot 4 3 6:rotate 40 60:box:dens3 x y z c:dens3 x y z c 'x':dens3 x y z c 'z'
-subplot 4 3 7:rotate 40 60:box:dots x y z c;meshnum 15
-subplot 4 3 8:rotate 40 60:box:densx c '' 0:densy c '' 0:densz c '' 0
-subplot 4 3 9:rotate 40 60:box:contx c '' 0:conty c '' 0:contz c '' 0
-subplot 4 3 10:rotate 40 60:box:contfx c '' 0:contfy c '' 0:contfz c '' 0
-</pre>
-<div align="center"><img src="png/param3.png" alt="Sample param3">
-</div>
-<hr>
-<a name="paramv-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#parser-sample" accesskey="n" rel="next">parser sample</a>, Previous: <a href="#param3-sample" accesskey="p" rel="prev">param3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-paramv"></a>
-<h3 class="section">6.80 Sample `<samp>paramv</samp>`</h3>
-
-
-<p>Example of parametric plots for vector fields.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 20 20 20 '(x+2)/3*sin(pi*y/2)'
-new y 20 20 20 '(x+2)/3*cos(pi*y/2)'
-new z 20 20 20 'z+x'
-new ex 20 20 20 'x'
-new ey 20 20 20 'x^2+y'
-new ez 20 20 20 'y^2+z'
-
-new x1 50 50 '(x+2)/3*sin(pi*y/2)'
-new y1 50 50 '(x+2)/3*cos(pi*y/2)'
-new e1 50 50 'x'
-new e2 50 50 'x^2+y'
-
-subplot 3 3 0:rotate 40 60:box:vect x1 y1 e1 e2
-subplot 3 3 1:rotate 40 60:box:flow x1 y1 e1 e2
-subplot 3 3 2:rotate 40 60:box:pipe x1 y1 e1 e2
-subplot 3 3 3:rotate 40 60:box:dew x1 y1 e1 e2
-subplot 3 3 4:rotate 40 60:box:vect x y z ex ey ez
-subplot 3 3 5:rotate 40 60:box
-vect3 x y z ex ey ez:vect3 x y z ex ey ez 'x':vect3 x y z ex ey ez 'z'
-grid3 x y z z '{r9}':grid3 x y z z '{g9}x':grid3 x y z z '{b9}z'
-subplot 3 3 6:rotate 40 60:box:flow x y z ex ey ez
-subplot 3 3 7:rotate 40 60:box:pipe x y z ex ey ez
-</pre>
-<div align="center"><img src="png/paramv.png" alt="Sample paramv">
-</div>
-<hr>
-<a name="parser-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#pde-sample" accesskey="n" rel="next">pde sample</a>, Previous: <a href="#paramv-sample" accesskey="p" rel="prev">paramv sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-parser"></a>
-<h3 class="section">6.81 Sample `<samp>parser</samp>`</h3>
-
-
-<p>Basic MGL script.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">title 'MGL parser sample'
-# call function
-call 'sample'
-
-# ordinary for-loop
-for $0 -1 1 0.1
-if $0<0:line 0 0 1 $0 'r':else:line 0 0 1 $0 'g':endif
-next
-
-# if-elseif-else
-for $i -1 1 0.5
-if $i<0
-text 1.1 $i '$i' 'b'
-elseif $i>0
-text 1.1 $i '$i' 'r'
-else
-text 1.1 $i '$i'
-endif
-next
-
-# ordinary do-while
-do
-defnum $i $i-0.2
-line 0 0 $i 1 'b'
-while $i>0
-
-# do-next-break
-do
-defnum $i $i-0.2
-if $i<-1 then break
-line 0 0 $i 1 'm'
-next
-
-# for-while-continue
-for $i -5 10
-text $i/5 1.1 'a'+($i+5)
-if $i<0
-text $i/5-0.06 1.1 '--' 'b'
-elseif mod($i,2)=0
-text $i/5-0.06 1.1 '~' 'r'
-else
-# NOTE: 'continue' bypass the 'while'!
-continue
-endif
-# NOTE: 'while' limit the actual number of iterations
-while $i<5
-
-# nested loops
-for $i 0 1 0.1
-for $j 0 1 0.1
-ball $i $j
-if $j>0.5 then continue
-ball $i $j 'b+'
-next
-next
-
-func 'sample'
-new dat 100 'sin(2*pi*(i/99+1))'
-plot dat;xrange -1 0
-box:axis
-xlabel 'x':ylabel 'y'
-return
-</pre>
-<div align="center"><img src="png/parser.png" alt="Sample parser">
-</div>
-<hr>
-<a name="pde-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#pendelta-sample" accesskey="n" rel="next">pendelta sample</a>, Previous: <a href="#parser-sample" accesskey="p" rel="prev">parser sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-pde"></a>
-<h3 class="section">6.82 Sample `<samp>pde</samp>`</h3>
-
-
-<p>Example of <a href="#pde">pde</a> solver.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new re 128 'exp(-48*(x+0.7)^2)':new im 128
-pde a 'p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)' re im 0.01 30
-transpose a
-subplot 1 1 0 '<_':title 'PDE solver'
-axis:xlabel '\i x':ylabel '\i z'
-crange 0 1:dens a 'wyrRk'
-fplot '-x' 'k|'
-text 0 0.95 'Equation: ik_0\partial_zu + \Delta u + x\cdot u + i \frac{x+z}{2}\cdot u = 0\n{}absorption: (x+z)/2 for x+z>0'
-</pre>
-<div align="center"><img src="png/pde.png" alt="Sample pde">
-</div>
-<hr>
-<a name="pendelta-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#pipe-sample" accesskey="n" rel="next">pipe sample</a>, Previous: <a href="#pde-sample" accesskey="p" rel="prev">pde sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-pendelta"></a>
-<h3 class="section">6.83 Sample `<samp>pendelta</samp>`</h3>
-
-
-<p>Example of <a href="#pendelta">pendelta</a> for lines and glyphs smoothing.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 6
-list a 0.25 0.5 1 2 4
-for $0 0 4
-pendelta a($0)
-define $1 0.5*$0-1
-line -1 $1 1 $1 'r'
-text 0 $1 'delta=',a($0)
-next
-</pre>
-<div align="center"><img src="png/pendelta.png" alt="Sample pendelta">
-</div>
-<hr>
-<a name="pipe-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#plot-sample" accesskey="n" rel="next">plot sample</a>, Previous: <a href="#pendelta-sample" accesskey="p" rel="prev">pendelta sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-pipe"></a>
-<h3 class="section">6.84 Sample `<samp>pipe</samp>`</h3>
-
-
-<p>Function <a href="#pipe">pipe</a> is similar to <a href="#flow">flow</a> but draw pipes (tubes) which radius is proportional to the amplitude of vector field. The color scheme is used for coloring (see <a href="#Color-scheme">Color scheme</a>). At this warm color corresponds to normal flow (like attractor), cold one corresponds to inverse flow (like source).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2v'
-call 'prepare3v'
-subplot 2 2 0 '':title 'Pipe plot (default)':light on:box:pipe a b
-subplot 2 2 1 '':title '"i" style':box:pipe a b 'i'
-subplot 2 2 2 '':title 'from edges only':box:pipe a b '#'
-subplot 2 2 3:title '3d variant':rotate 50 60:box:pipe ex ey ez '' 0.1
-</pre>
-<div align="center"><img src="png/pipe.png" alt="Sample pipe">
-</div>
-<hr>
-<a name="plot-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#pmap-sample" accesskey="n" rel="next">pmap sample</a>, Previous: <a href="#pipe-sample" accesskey="p" rel="prev">pipe sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-plot"></a>
-<h3 class="section">6.85 Sample `<samp>plot</samp>`</h3>
-
-
-<p>Function <a href="#plot">plot</a> is most standard way to visualize 1D data array. By default, <code>Plot</code> use colors from palette. However, you can specify manual color/palette, and even set to use new color for each points by using `<samp>!</samp>` style. Another feature is `<samp> </samp>` style which draw only markers without line between points.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 2 2 0 '':title 'Plot plot (default)':box:plot y
-subplot 2 2 2 '':title ''!' style; 'rgb' palette':box:plot y 'o!rgb'
-subplot 2 2 3 '':title 'just markers':box:plot y ' +'
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 2 2 1:title '3d variant':rotate 50 60:box:plot xc yc z 'rs'
-</pre>
-<div align="center"><img src="png/plot.png" alt="Sample plot">
-</div>
-<hr>
-<a name="pmap-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#primitives-sample" accesskey="n" rel="next">primitives sample</a>, Previous: <a href="#plot-sample" accesskey="p" rel="prev">plot sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-pmap"></a>
-<h3 class="section">6.86 Sample `<samp>pmap</samp>`</h3>
-
-
-<p>Function <a href="#pmap">pmap</a> draw Poincare map - show intersections of the curve and the surface.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_^':title 'Poincare map sample'
-ode r 'cos(y)+sin(z);cos(z)+sin(x);cos(x)+sin(y)' 'xyz' [0.1,0,0] 0.1 100
-rotate 40 60:copy x r(0):copy y r(1):copy z r(2)
-ranges x y z
-axis:plot x y z 'b'
-xlabel '\i x' 0:ylabel '\i y' 0:zlabel '\i z'
-pmap x y z z 'b#o'
-fsurf '0'
-</pre>
-<div align="center"><img src="png/pmap.png" alt="Sample pmap">
-</div>
-<hr>
-<a name="primitives-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#projection-sample" accesskey="n" rel="next">projection sample</a>, Previous: <a href="#pmap-sample" accesskey="p" rel="prev">pmap sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-primitives"></a>
-<h3 class="section">6.87 Sample `<samp>primitives</samp>`</h3>
-
-
-<p>Example of primitives: <a href="#line">line</a>, <a href="#curve">curve</a>, <a href="#rhomb">rhomb</a>, <a href="#ellipse">ellipse</a>, <a href="#face">face</a>, <a href="#sphere">sphere</a>, <a href="#drop">drop</a>, <a href="#cone">cone</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 2 2 0 '':title 'Line, Curve, Rhomb, Ellipse' '' -1.5
-line -1 -1 -0.5 1 'qAI'
-curve -0.6 -1 1 1 0 1 1 1 'rA'
-ball 0 -0.5 '*':ball 1 -0.1 '*'
-rhomb 0 0.4 1 0.9 0.2 'b#'
-rhomb 0 0 1 0.4 0.2 'cg@'
-ellipse 0 -0.5 1 -0.1 0.2 'u#'
-ellipse 0 -1 1 -0.6 0.2 'm@'
-
-subplot 2 3 1 '':title 'Arc, Polygon, Symbol';size -1.2
-arc -0.6 0 -0.6 0.3 180 '2kA':ball -0.6 0
-polygon 0 0 0 0.4 6 'r'
-new x 50 'cos(3*pi*x)':new y 50 'sin(pi*x)'
-addsymbol 'a' x y
-symbol 0.7 0 'a'
-
-light on
-subplot 2 3 3 '<^>' 0 -0.2:title 'Face[xyz]';size -1.5:rotate 50 60:box
-facex 1 0 -1 1 1 'r':facey -1 -1 -1 1 1 'g':facez 1 -1 -1 -1 1 'b'
-face -1 -1 1 -1 1 1 1 -1 0 1 1 1 'bmgr'
-
-subplot 2 3 5 '':title 'Cone';size -1.5
-cone -0.7 -0.3 0 -0.7 0.7 0.5 0.2 0.1 'b':text -0.7 -0.7 'no edges\n(default)';size -1.5
-cone 0 -0.3 0 0 0.7 0.5 0.2 0.1 'g@':text 0 -0.7 'with edges\n("\@" style)';size -1.5
-cone 0.7 -0.3 0 0.7 0.7 0.5 0.2 0 'Ggb':text 0.7 -0.7 '"arrow" with\n{}gradient';size -1.5
-subplot 2 2 2 '':title 'Sphere and Drop'
-line -0.9 0 1 0.9 0 1
-text -0.9 0.4 'sh=0':drop -0.9 0 0 1 0.5 'r' 0:ball -0.9 0 1 'k'
-text -0.3 0.6 'sh=0.33':drop -0.3 0 0 1 0.5 'r' 0.33:ball -0.3 0 1 'k'
-text 0.3 0.8 'sh=0.67':drop 0.3 0 0 1 0.5 'r' 0.67:ball 0.3 0 1 'k'
-text 0.9 1. 'sh=1':drop 0.9 0 0 1 0.5 'r' 1:ball 0.9 0 1 'k'
-
-text -0.9 -1.1 'asp=0.33':drop -0.9 -0.7 0 1 0.5 'b' 0 0.33
-text -0.3 -1.1 'asp=0.67':drop -0.3 -0.7 0 1 0.5 'b' 0 0.67
-text 0.3 -1.1 'asp=1':drop 0.3 -0.7 0 1 0.5 'b' 0 1
-text 0.9 -1.1 'asp=1.5':drop 0.9 -0.7 0 1 0.5 'b' 0 1.5
-</pre>
-<div align="center"><img src="png/primitives.png" alt="Sample primitives">
-</div>
-<hr>
-<a name="projection-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#projection5-sample" accesskey="n" rel="next">projection5 sample</a>, Previous: <a href="#primitives-sample" accesskey="p" rel="prev">primitives sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-projection"></a>
-<h3 class="section">6.88 Sample `<samp>projection</samp>`</h3>
-
-
-<p>Example of plot projection (<a href="#ternary">ternary</a>=4).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">ranges 0 1 0 1 0 1
-new x 50 '0.25*(1+cos(2*pi*x))'
-new y 50 '0.25*(1+sin(2*pi*x))'
-new z 50 'x'
-new a 20 30 '30*x*y*(1-x-y)^2*(x+y<1)'
-new rx 10 'rnd':new ry 10:fill ry '(1-v)*rnd' rx
-light on
-
-title 'Projection sample':ternary 4:rotate 50 60
-box:axis:grid
-plot x y z 'r2':surf a '#'
-xlabel 'X':ylabel 'Y':zlabel 'Z'
-</pre>
-<div align="center"><img src="png/projection.png" alt="Sample projection">
-</div>
-<hr>
-<a name="projection5-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#pulse-sample" accesskey="n" rel="next">pulse sample</a>, Previous: <a href="#projection-sample" accesskey="p" rel="prev">projection sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-projection5"></a>
-<h3 class="section">6.89 Sample `<samp>projection5</samp>`</h3>
-
-
-<p>Example of plot projection in ternary coordinates (<a href="#ternary">ternary</a>=5).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">ranges 0 1 0 1 0 1
-new x 50 '0.25*(1+cos(2*pi*x))'
-new y 50 '0.25*(1+sin(2*pi*x))'
-new z 50 'x'
-new a 20 30 '30*x*y*(1-x-y)^2*(x+y<1)'
-new rx 10 'rnd':new ry 10:fill ry '(1-v)*rnd' rx
-light on
-
-title 'Projection sample (ternary)':ternary 5:rotate 50 60
-box:axis:grid
-plot x y z 'r2':surf a '#'
-xlabel 'X':ylabel 'Y':zlabel 'Z'
-</pre>
-<div align="center"><img src="png/projection5.png" alt="Sample projection5">
-</div>
-<hr>
-<a name="pulse-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#qo2d-sample" accesskey="n" rel="next">qo2d sample</a>, Previous: <a href="#projection5-sample" accesskey="p" rel="prev">projection5 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-pulse"></a>
-<h3 class="section">6.90 Sample `<samp>pulse</samp>`</h3>
-
-
-<p>Example of <a href="#pulse">pulse</a> parameter determining.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Pulse sample'
-new a 100 'exp(-6*x^2)':ranges 0 a.nx-1 0 1
-axis:plot a
-
-pulse b a 'x'
-
-define m a.max
-
-line b(1) 0 b(1) m 'r='
-line b(1)-b(3)/2 0 b(1)-b(3)/2 m 'm|'
-line b(1)+b(3)/2 0 b(1)+b(3)/2 m 'm|'
-line 0 0.5*m a.nx-1 0.5*m 'h'
-new x 100 'x'
-plot b(0)*(1-((x-b(1))/b(2))^2) 'g'
-</pre>
-<div align="center"><img src="png/pulse.png" alt="Sample pulse">
-</div>
-<hr>
-<a name="qo2d-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality0-sample" accesskey="n" rel="next">quality0 sample</a>, Previous: <a href="#pulse-sample" accesskey="p" rel="prev">pulse sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-qo2d"></a>
-<h3 class="section">6.91 Sample `<samp>qo2d</samp>`</h3>
-
-
-<p>Example of PDE solving by quasioptical approach <a href="#qo2d">qo2d</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">define $1 'p^2+q^2-x-1+i*0.5*(y+x)*(y>-x)'
-subplot 1 1 0 '<_':title 'Beam and ray tracing'
-ray r $1 -0.7 -1 0 0 0.5 0 0.02 2:plot r(0) r(1) 'k'
-axis:xlabel '\i x':ylabel '\i z'
-new re 128 'exp(-48*x^2)':new im 128
-new xx 1:new yy 1
-qo2d a $1 re im r 1 30 xx yy
-crange 0 1:dens xx yy a 'wyrRk':fplot '-x' 'k|'
-text 0 0.85 'absorption: (x+y)/2 for x+y>0'
-text 0.7 -0.05 'central ray'
-</pre>
-<div align="center"><img src="png/qo2d.png" alt="Sample qo2d">
-</div>
-<hr>
-<a name="quality0-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality1-sample" accesskey="n" rel="next">quality1 sample</a>, Previous: <a href="#qo2d-sample" accesskey="p" rel="prev">qo2d sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality0"></a>
-<h3 class="section">6.92 Sample `<samp>quality0</samp>`</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=0.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 0
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<div align="center"><img src="png/quality0.png" alt="Sample quality0">
-</div>
-<hr>
-<a name="quality1-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality2-sample" accesskey="n" rel="next">quality2 sample</a>, Previous: <a href="#quality0-sample" accesskey="p" rel="prev">quality0 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality1"></a>
-<h3 class="section">6.93 Sample `<samp>quality1</samp>`</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=1.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 1
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<div align="center"><img src="png/quality1.png" alt="Sample quality1">
-</div>
-<hr>
-<a name="quality2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality4-sample" accesskey="n" rel="next">quality4 sample</a>, Previous: <a href="#quality1-sample" accesskey="p" rel="prev">quality1 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality2"></a>
-<h3 class="section">6.94 Sample `<samp>quality2</samp>`</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=2.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 2
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<div align="center"><img src="png/quality2.png" alt="Sample quality2">
-</div>
-<hr>
-<a name="quality4-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality5-sample" accesskey="n" rel="next">quality5 sample</a>, Previous: <a href="#quality2-sample" accesskey="p" rel="prev">quality2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality4"></a>
-<h3 class="section">6.95 Sample `<samp>quality4</samp>`</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=4.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 4
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<div align="center"><img src="png/quality4.png" alt="Sample quality4">
-</div>
-<hr>
-<a name="quality5-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality6-sample" accesskey="n" rel="next">quality6 sample</a>, Previous: <a href="#quality4-sample" accesskey="p" rel="prev">quality4 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality5"></a>
-<h3 class="section">6.96 Sample `<samp>quality5</samp>`</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=5.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 5
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<div align="center"><img src="png/quality5.png" alt="Sample quality5">
-</div>
-<hr>
-<a name="quality6-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#quality8-sample" accesskey="n" rel="next">quality8 sample</a>, Previous: <a href="#quality5-sample" accesskey="p" rel="prev">quality5 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality6"></a>
-<h3 class="section">6.97 Sample `<samp>quality6</samp>`</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=6.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 6
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<div align="center"><img src="png/quality6.png" alt="Sample quality6">
-</div>
-<hr>
-<a name="quality8-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#radar-sample" accesskey="n" rel="next">radar sample</a>, Previous: <a href="#quality6-sample" accesskey="p" rel="prev">quality6 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-quality8"></a>
-<h3 class="section">6.98 Sample `<samp>quality8</samp>`</h3>
-
-
-<p>Show all kind of primitives in <a href="#quality">quality</a>=8.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">quality 8
-subplot 3 2 0:define y 0.95
-define d 0.3:define x0 0.2:define x1 0.5:define x2 0.6
-line x0 1-0*d x1 1-0*d 'k-':text x2 y-0*d 'Solid `-`' ':rL'
-line x0 1-1*d x1 1-1*d 'k|':text x2 y-1*d 'Long Dash `|`' ':rL'
-line x0 1-2*d x1 1-2*d 'k;':text x2 y-2*d 'Dash 1;`' ':rL'
-line x0 1-3*d x1 1-3*d 'k=':text x2 y-3*d 'Small dash `=`' ':rL'
-line x0 1-4*d x1 1-4*d 'kj':text x2 y-4*d 'Dash-dot `j`' ':rL'
-line x0 1-5*d x1 1-5*d 'ki':text x2 y-5*d 'Small dash-dot `i`' ':rL'
-line x0 1-6*d x1 1-6*d 'k:':text x2 y-6*d 'Dots `:`' ':rL'
-line x0 1-7*d x1 1-7*d 'k ':text x2 y-7*d 'None ``' ':rL'
-define d 0.25:define x0 -0.8:define x1 -1:define x2 -0.05
-ball x1 5*d 'k.':text x0 5*d '.' ':rL'
-ball x1 4*d 'k+':text x0 4*d '+' ':rL'
-ball x1 3*d 'kx':text x0 3*d 'x' ':rL'
-ball x1 2*d 'k*':text x0 2*d '*' ':rL'
-ball x1 d 'ks':text x0 d 's' ':rL'
-ball x1 0 'kd':text x0 0 'd' ':rL'
-ball x1 -d 0 'ko':text x0 y-d 'o' ':rL'
-ball x1 -2*d 0 'k^':text x0 -2*d '\^' ':rL'
-ball x1 -3*d 0 'kv':text x0 -3*d 'v' ':rL'
-ball x1 -4*d 0 'k<':text x0 -4*d '<' ':rL'
-ball x1 -5*d 0 'k>':text x0 -5*d '>' ':rL'
-
-define x0 -0.3:define x1 -0.5
-ball x1 5*d 'k#.':text x0 5*d '\#.' ':rL'
-ball x1 4*d 'k#+':text x0 4*d '\#+' ':rL'
-ball x1 3*d 'k#x':text x0 3*d '\#x' ':rL'
-ball x1 2*d 'k#*':text x0 2*d '\#*' ':rL'
-ball x1 d 'k#s':text x0 d '\#s' ':rL'
-ball x1 0 'k#d':text x0 0 '\#d' ':rL'
-ball x1 -d 0 'k#o':text x0 -d '\#o' ':rL'
-ball x1 -2*d 0 'k#^':text x0 -2*d '\#\^' ':rL'
-ball x1 -3*d 0 'k#v':text x0 -3*d '\#v' ':rL'
-ball x1 -4*d 0 'k#<':text x0 -4*d '\#<' ':rL'
-ball x1 -5*d 0 'k#>':text x0 -5*d '\#>' ':rL'
-
-subplot 3 2 1
-define a 0.1:define b 0.4:define c 0.5
-line a 1 b 1 'k-A':text c 1 'Style `A` or `A\_`' ':rL'
-line a 0.8 b 0.8 'k-V':text c 0.8 'Style `V` or `V\_`' ':rL'
-line a 0.6 b 0.6 'k-K':text c 0.6 'Style `K` or `K\_`' ':rL'
-line a 0.4 b 0.4 'k-I':text c 0.4 'Style `I` or `I\_`' ':rL'
-line a 0.2 b 0.2 'k-D':text c 0.2 'Style `D` or `D\_`' ':rL'
-line a 0 b 0 'k-S':text c 0 'Style `S` or `S\_`' ':rL'
-line a -0.2 b -0.2 'k-O':text c -0.2 'Style `O` or `O\_`' ':rL'
-line a -0.4 b -0.4 'k-T':text c -0.4 'Style `T` or `T\_`' ':rL'
-line a -0.6 b -0.6 'k-_':text c -0.6 'Style `\_` or none' ':rL'
-line a -0.8 b -0.8 'k-AS':text c -0.8 'Style `AS`' ':rL'
-line a -1 b -1 'k-_A':text c -1 'Style `\_A`' ':rL'
-
-define a -1:define b -0.7:define c -0.6
-line a 1 b 1 'kAA':text c 1 'Style `AA`' ':rL'
-line a 0.8 b 0.8 'kVV':text c 0.8 'Style `VV`' ':rL'
-line a 0.6 b 0.6 'kKK':text c 0.6 'Style `KK`' ':rL'
-line a 0.4 b 0.4 'kII':text c 0.4 'Style `II`' ':rL'
-line a 0.2 b 0.2 'kDD':text c 0.2 'Style `DD`' ':rL'
-line a 0 b 0 'kSS':text c 0 'Style `SS`' ':rL'
-line a -0.2 b -0.2 'kOO':text c -0.2 'Style `OO`' ':rL'
-line a -0.4 b -0.4 'kTT':text c -0.4 'Style `TT`' ':rL'
-line a -0.6 b -0.6 'k-__':text c -0.6 'Style `\_\_`' ':rL'
-line a -0.8 b -0.8 'k-VA':text c -0.8 'Style `VA`' ':rL'
-line a -1 b -1 'k-AV':text c -1 'Style `AV`' ':rL'
-
-subplot 3 2 2
-#LENUQ
-
-facez -1 -1 0 0.4 0.3 'L#':text -0.8 -0.9 'L' 'w:C' -1.4
-facez -0.6 -1 0 0.4 0.3 'E#':text -0.4 -0.9 'E' 'w:C' -1.4
-facez -0.2 -1 0 0.4 0.3 'N#':text 0 -0.9 'N' 'w:C' -1.4
-facez 0.2 -1 0 0.4 0.3 'U#':text 0.4 -0.9 'U' 'w:C' -1.4
-facez 0.6 -1 0 0.4 0.3 'Q#':text 0.8 -0.9 'Q' 'w:C' -1.4
-#lenuq
-facez -1 -0.7 0 0.4 0.3 'l#':text -0.8 -0.6 'l' 'k:C' -1.4
-facez -0.6 -0.7 0 0.4 0.3 'e#':text -0.4 -0.6 'e' 'k:C' -1.4
-facez -0.2 -0.7 0 0.4 0.3 'n#':text 0 -0.6 'n' 'k:C' -1.4
-facez 0.2 -0.7 0 0.4 0.3 'u#':text 0.4 -0.6 'u' 'k:C' -1.4
-facez 0.6 -0.7 0 0.4 0.3 'q#':text 0.8 -0.6 'q' 'k:C' -1.4
-#CMYkP
-facez -1 -0.4 0 0.4 0.3 'C#':text -0.8 -0.3 'C' 'w:C' -1.4
-facez -0.6 -0.4 0 0.4 0.3 'M#':text -0.4 -0.3 'M' 'w:C' -1.4
-facez -0.2 -0.4 0 0.4 0.3 'Y#':text 0 -0.3 'Y' 'w:C' -1.4
-facez 0.2 -0.4 0 0.4 0.3 'k#':text 0.4 -0.3 'k' 'w:C' -1.4
-facez 0.6 -0.4 0 0.4 0.3 'P#':text 0.8 -0.3 'P' 'w:C' -1.4
-#cmywp
-facez -1 -0.1 0 0.4 0.3 'c#':text -0.8 0 'c' 'k:C' -1.4
-facez -0.6 -0.1 0 0.4 0.3 'm#':text -0.4 0 'm' 'k:C' -1.4
-facez -0.2 -0.1 0 0.4 0.3 'y#':text 0 0 'y' 'k:C' -1.4
-facez 0.2 -0.1 0 0.4 0.3 'w#':text 0.4 0 'w' 'k:C' -1.4
-facez 0.6 -0.1 0 0.4 0.3 'p#':text 0.8 0 'p' 'k:C' -1.4
-#BGRHW
-facez -1 0.2 0 0.4 0.3 'B#':text -0.8 0.3 'B' 'w:C' -1.4
-facez -0.6 0.2 0 0.4 0.3 'G#':text -0.4 0.3 'G' 'w:C' -1.4
-facez -0.2 0.2 0 0.4 0.3 'R#':text 0 0.3 'R' 'w:C' -1.4
-facez 0.2 0.2 0 0.4 0.3 'H#':text 0.4 0.3 'H' 'w:C' -1.4
-facez 0.6 0.2 0 0.4 0.3 'W#':text 0.8 0.3 'W' 'w:C' -1.4
-#bgrhw
-facez -1 0.5 0 0.4 0.3 'b#':text -0.8 0.6 'b' 'k:C' -1.4
-facez -0.6 0.5 0 0.4 0.3 'g#':text -0.4 0.6 'g' 'k:C' -1.4
-facez -0.2 0.5 0 0.4 0.3 'r#':text 0 0.6 'r' 'k:C' -1.4
-facez 0.2 0.5 0 0.4 0.3 'h#':text 0.4 0.6 'h' 'k:C' -1.4
-facez 0.6 0.5 0 0.4 0.3 'w#':text 0.8 0.6 'w' 'k:C' -1.4
-#brighted
-facez -1 0.8 0 0.4 0.3 '{r1}#':text -0.8 0.9 '\{r1\}' 'w:C' -1.4
-facez -0.6 0.8 0 0.4 0.3 '{r3}#':text -0.4 0.9 '\{r3\}' 'w:C' -1.4
-facez -0.2 0.8 0 0.4 0.3 '{r5}#':text 0 0.9 '\{r5\}' 'k:C' -1.4
-facez 0.2 0.8 0 0.4 0.3 '{r7}#':text 0.4 0.9 '\{r7\}' 'k:C' -1.4
-facez 0.6 0.8 0 0.4 0.3 '{r9}#':text 0.8 0.9 '\{r9\}' 'k:C' -1.4
-# HEX
-facez -1 -1.3 0 1 0.3 '{xff9966}#':text -0.5 -1.2 '\{xff9966\}' 'k:C' -1.4
-facez 0 -1.3 0 1 0.3 '{x83CAFF}#':text 0.5 -1.2 '\{x83caff\}' 'k:C' -1.4
-
-subplot 3 2 3
-for $i 0 9
-line -1 0.2*$i-1 1 0.2*$i-1 'r','0'+$i
-text 1.05 0.2*$i-1 '0'+$i ':L'
-next
-
-subplot 3 2 4:title 'TriPlot sample':rotate 50 60
-list tt 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0:list yt -1 -1 1 0:list zt -1 -1 -1 1:light on
-triplot tt xt yt zt 'b':triplot tt xt yt zt 'k#'
-
-subplot 3 2 5:new r 4 'i+1':ranges 1 4 1 4
-axis:mark r r 's':plot r 'b'
-
-</pre>
-<div align="center"><img src="png/quality8.png" alt="Sample quality8">
-</div>
-<hr>
-<a name="radar-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#refill-sample" accesskey="n" rel="next">refill sample</a>, Previous: <a href="#quality8-sample" accesskey="p" rel="prev">quality8 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-radar"></a>
-<h3 class="section">6.99 Sample `<samp>radar</samp>`</h3>
-
-
-<p>The <a href="#radar">radar</a> plot is variant of <a href="#plot">plot</a>, which make plot in polar coordinates and draw radial rays in point directions. If you just need a plot in polar coordinates then I recommend to use <a href="#Curvilinear-coordinates">Curvilinear coordinates</a> or <a href="#plot">plot</a> in parametric form with <code>x=r*cos(fi); y=r*sin(fi);</code>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new yr 10 3 '0.4*sin(pi*(x+1.5+y/2)+0.1*rnd)'
-subplot 1 1 0 '':title 'Radar plot (with grid, "\#")':radar yr '#'
-</pre>
-<div align="center"><img src="png/radar.png" alt="Sample radar">
-</div>
-<hr>
-<a name="refill-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#region-sample" accesskey="n" rel="next">region sample</a>, Previous: <a href="#radar-sample" accesskey="p" rel="prev">radar sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-refill"></a>
-<h3 class="section">6.100 Sample `<samp>refill</samp>`</h3>
-
-
-<p>Example of <a href="#refill">refill</a> and <a href="#gspline">gspline</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 10 '0.5+rnd':cumsum x 'x':norm x -1 1
-copy y sin(pi*x)/1.5
-subplot 2 2 0 '<_':title 'Refill sample'
-box:axis:plot x y 'o ':fplot 'sin(pi*x)/1.5' 'B:'
-new r 100:refill r x y:plot r 'r'
-
-subplot 2 2 1 '<_':title 'Global spline'
-box:axis:plot x y 'o ':fplot 'sin(pi*x)/1.5' 'B:'
-new r 100:gspline r x y:plot r 'r'
-
-new y 10 '0.5+rnd':cumsum y 'x':norm y -1 1
-copy xx x:extend xx 10
-copy yy y:extend yy 10:transpose yy
-copy z sin(pi*xx*yy)/1.5
-alpha on:light on
-subplot 2 2 2:title '2d regular':rotate 40 60
-box:axis:mesh xx yy z 'k'
-new rr 100 100:refill rr x y z:surf rr
-
-new xx 10 10 '(x+1)/2*cos(y*pi/2-1)':new yy 10 10 '(x+1)/2*sin(y*pi/2-1)'
-copy z sin(pi*xx*yy)/1.5
-subplot 2 2 3:title '2d non-regular':rotate 40 60
-box:axis:plot xx yy z 'ko '
-new rr 100 100:refill rr xx yy z:surf rr
-</pre>
-<div align="center"><img src="png/refill.png" alt="Sample refill">
-</div>
-<hr>
-<a name="region-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#scanfile-sample" accesskey="n" rel="next">scanfile sample</a>, Previous: <a href="#refill-sample" accesskey="p" rel="prev">refill sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-region"></a>
-<h3 class="section">6.101 Sample `<samp>region</samp>`</h3>
-
-
-<p>Function <a href="#region">region</a> fill the area between 2 curves. It support gradient filling if 2 colors per curve is specified. Also it can fill only the region y1<y<y2 if style `<samp>i</samp>` is used.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-copy y1 y(:,1):copy y2 y(:,2)
-subplot 2 2 0 '':title 'Region plot (default)':box:region y1 y2:plot y1 'k2':plot y2 'k2'
-subplot 2 2 1 '':title '2 colors':box:region y1 y2 'yr':plot y1 'k2':plot y2 'k2'
-subplot 2 2 2 '':title '"i" style':box:region y1 y2 'ir':plot y1 'k2':plot y2 'k2'
-subplot 2 2 3 '^_':title '3d variant':rotate 40 60:box
-new x1 100 'sin(pi*x)':new y1 100 'cos(pi*x)':new z 100 'x'
-new x2 100 'sin(pi*x+pi/3)':new y2 100 'cos(pi*x+pi/3)'
-plot x1 y1 z 'r2':plot x2 y2 z 'b2'
-region x1 y1 z x2 y2 z 'cmy!'
-</pre>
-<div align="center"><img src="png/region.png" alt="Sample region">
-</div>
-<hr>
-<a name="scanfile-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#schemes-sample" accesskey="n" rel="next">schemes sample</a>, Previous: <a href="#region-sample" accesskey="p" rel="prev">region sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-scanfile"></a>
-<h3 class="section">6.102 Sample `<samp>scanfile</samp>`</h3>
-
-
-<p>Example of <a href="#scanfile">scanfile</a> for reading `named` data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Save and scanfile sample'
-list a 1 -1 0
-save 'This is test: 0 -> ',a(0),' q' 'test.txt' 'w'
-save 'This is test: 1 -> ',a(1),' q' 'test.txt'
-save 'This is test: 2 -> ',a(2),' q' 'test.txt'
-
-scanfile a 'test.txt' 'This is test: %g -> %g'
-ranges a(0) a(1):axis:plot a(0) a(1) 'o'
-</pre>
-<div align="center"><img src="png/scanfile.png" alt="Sample scanfile">
-</div>
-<hr>
-<a name="schemes-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#section-sample" accesskey="n" rel="next">section sample</a>, Previous: <a href="#scanfile-sample" accesskey="p" rel="prev">scanfile sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-schemes"></a>
-<h3 class="section">6.103 Sample `<samp>schemes</samp>`</h3>
-
-
-<p>Example of popular color schemes.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 100 100 'x':new y 100 100 'y'
-call 'sch' 0 'kw'
-call 'sch' 1 '%gbrw'
-call 'sch' 2 'kHCcw'
-call 'sch' 3 'kBbcw'
-call 'sch' 4 'kRryw'
-call 'sch' 5 'kGgew'
-call 'sch' 6 'BbwrR'
-call 'sch' 7 'BbwgG'
-call 'sch' 8 'GgwmM'
-call 'sch' 9 'UuwqR'
-call 'sch' 10 'QqwcC'
-call 'sch' 11 'CcwyY'
-call 'sch' 12 'bcwyr'
-call 'sch' 13 'bwr'
-call 'sch' 14 'wUrqy'
-call 'sch' 15 'UbcyqR'
-call 'sch' 16 'BbcyrR'
-call 'sch' 17 'bgr'
-call 'sch' 18 'BbcyrR|'
-call 'sch' 19 'b{g,0.3}r'
-stop
-func 'sch' 2
-subplot 2 10 $1 '<>_^' 0.2 0:surfa x y $2
-text 0.07+0.5*mod($1,2) 0.92-0.1*int($1/2) $2 'A'
-return
-</pre>
-<div align="center"><img src="png/schemes.png" alt="Sample schemes">
-</div>
-<hr>
-<a name="section-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#several_005flight-sample" accesskey="n" rel="next">several_light sample</a>, Previous: <a href="#schemes-sample" accesskey="p" rel="prev">schemes sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-section"></a>
-<h3 class="section">6.104 Sample `<samp>section</samp>`</h3>
-
-
-<p>Example of <a href="#section">section</a> to separate data and <a href="#join">join</a> it back.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 1 1 0 '<_':title 'Section&Join sample'
-axis:box:line -1 0 1 0 'h:'
-# first lets demonstrate 'join'
-new aa 11 'x^2':new a1 3 '-x':new a2 15 'x^3'
-join aa a1:join aa a2
-# add x-coordinate
-new xx aa.nx 'x':join aa xx
-plot aa(:,1) aa(:,0) '2y'
-# now select 1-st (id=0) section between zeros
-section b1 aa 0 'x' 0
-plot b1(:,1) b1(:,0) 'bo'
-# next, select 3-d (id=2) section between zeros
-section b3 aa 2 'x' 0
-plot b3(:,1) b3(:,0) 'gs'
-# finally, select 2-nd (id=-2) section from the end
-section b4 aa -2 'x' 0
-plot b4(:,1) b4(:,0) 'r#o'
-</pre>
-<div align="center"><img src="png/section.png" alt="Sample section">
-</div>
-<hr>
-<a name="several_005flight-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#solve-sample" accesskey="n" rel="next">solve sample</a>, Previous: <a href="#section-sample" accesskey="p" rel="prev">section sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-several_005flight"></a>
-<h3 class="section">6.105 Sample `<samp>several_light</samp>`</h3>
-
-
-<p>Example of using several <a href="#light">light</a> sources.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Several light sources':rotate 50 60:light on
-light 1 0 1 0 'c':light 2 1 0 0 'y':light 3 0 -1 0 'm'
-box:surf a 'h'
-</pre>
-<div align="center"><img src="png/several_light.png" alt="Sample several_light">
-</div>
-<hr>
-<a name="solve-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#stem-sample" accesskey="n" rel="next">stem sample</a>, Previous: <a href="#several_005flight-sample" accesskey="p" rel="prev">several_light sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-solve"></a>
-<h3 class="section">6.106 Sample `<samp>solve</samp>`</h3>
-
-
-<p>Example of <a href="#solve">solve</a> for root finding.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">zrange 0 1
-new x 20 30 '(x+2)/3*cos(pi*y)'
-new y 20 30 '(x+2)/3*sin(pi*y)'
-new z 20 30 'exp(-6*x^2-2*sin(pi*y)^2)'
-
-subplot 2 1 0:title 'Cartesian space':rotate 30 -40
-axis 'xyzU':box
-xlabel 'x':ylabel 'y'
-origin 1 1:grid 'xy'
-mesh x y z
-
-# section along 'x' direction
-solve u x 0.5 'x'
-var v u.nx 0 1
-evaluate yy y u v
-evaluate xx x u v
-evaluate zz z u v
-plot xx yy zz 'k2o'
-
-# 1st section along 'y' direction
-solve u1 x -0.5 'y'
-var v1 u1.nx 0 1
-evaluate yy y v1 u1
-evaluate xx x v1 u1
-evaluate zz z v1 u1
-plot xx yy zz 'b2^'
-
-# 2nd section along 'y' direction
-solve u2 x -0.5 'y' u1
-evaluate yy y v1 u2
-evaluate xx x v1 u2
-evaluate zz z v1 u2
-plot xx yy zz 'r2v'
-
-subplot 2 1 1:title 'Accompanied space'
-ranges 0 1 0 1:origin 0 0
-axis:box:xlabel 'i':ylabel 'j':grid2 z 'h'
-
-plot u v 'k2o':line 0.4 0.5 0.8 0.5 'kA'
-plot v1 u1 'b2^':line 0.5 0.15 0.5 0.3 'bA'
-plot v1 u2 'r2v':line 0.5 0.7 0.5 0.85 'rA'
-</pre>
-<div align="center"><img src="png/solve.png" alt="Sample solve">
-</div>
-<hr>
-<a name="stem-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#step-sample" accesskey="n" rel="next">step sample</a>, Previous: <a href="#solve-sample" accesskey="p" rel="prev">solve sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-stem"></a>
-<h3 class="section">6.107 Sample `<samp>stem</samp>`</h3>
-
-
-<p>Function <a href="#stem">stem</a> draw vertical bars. It is most attractive if markers are drawn too.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-origin 0 0 0:subplot 2 2 0 '':title 'Stem plot (default)':box:stem y
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 2 2 1:title '3d variant':rotate 50 60:box:stem xc yc z 'rx'
-subplot 2 2 2 '':title '"!" style':box:stem y 'o!rgb'
-</pre>
-<div align="center"><img src="png/stem.png" alt="Sample stem">
-</div>
-<hr>
-<a name="step-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#stereo-sample" accesskey="n" rel="next">stereo sample</a>, Previous: <a href="#stem-sample" accesskey="p" rel="prev">stem sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-step"></a>
-<h3 class="section">6.108 Sample `<samp>step</samp>`</h3>
-
-
-<p>Function <a href="#step">step</a> plot data as stairs. At this stairs can be centered if sizes are differ by 1.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-origin 0 0 0:subplot 2 2 0 '':title 'Step plot (default)':box:step y
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 2 2 1:title '3d variant':rotate 50 60:box:step xc yc z 'r'
-subplot 2 2 2 '':title '"!" style':box:step y 's!rgb'
-</pre>
-<div align="center"><img src="png/step.png" alt="Sample step">
-</div>
-<hr>
-<a name="stereo-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#stfa-sample" accesskey="n" rel="next">stfa sample</a>, Previous: <a href="#step-sample" accesskey="p" rel="prev">step sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-stereo"></a>
-<h3 class="section">6.109 Sample `<samp>stereo</samp>`</h3>
-
-
-<p>Example of stereo image of <a href="#surf">surf</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-light on
-subplot 2 1 0:rotate 50 60+1:box:surf a
-subplot 2 1 1:rotate 50 60-1:box:surf a
-</pre>
-<div align="center"><img src="png/stereo.png" alt="Sample stereo">
-</div>
-<hr>
-<a name="stfa-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#style-sample" accesskey="n" rel="next">style sample</a>, Previous: <a href="#stereo-sample" accesskey="p" rel="prev">stereo sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-stfa"></a>
-<h3 class="section">6.110 Sample `<samp>stfa</samp>`</h3>
-
-
-<p>Example of <a href="#stfa">stfa</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new a 2000:new b 2000
-fill a 'cos(50*pi*x)*(x<-.5)+cos(100*pi*x)*(x<0)*(x>-.5)+\
-cos(200*pi*x)*(x<.5)*(x>0)+cos(400*pi*x)*(x>.5)'
-subplot 1 2 0 '<_':title 'Initial signal':plot a:axis:xlabel '\i t'
-subplot 1 2 1 '<_':title 'STFA plot':stfa a b 64:axis:ylabel '\omega' 0:xlabel '\i t'
-</pre>
-<div align="center"><img src="png/stfa.png" alt="Sample stfa">
-</div>
-<hr>
-<a name="style-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surf-sample" accesskey="n" rel="next">surf sample</a>, Previous: <a href="#stfa-sample" accesskey="p" rel="prev">stfa sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-style"></a>
-<h3 class="section">6.111 Sample `<samp>style</samp>`</h3>
-
-
-<p>Example of colors and styles for plots.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">
-</pre>
-<div align="center"><img src="png/style.png" alt="Sample style">
-</div>
-<hr>
-<a name="surf-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surf3-sample" accesskey="n" rel="next">surf3 sample</a>, Previous: <a href="#style-sample" accesskey="p" rel="prev">style sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surf"></a>
-<h3 class="section">6.112 Sample `<samp>surf</samp>`</h3>
-
-
-<p>Function <a href="#surf">surf</a> is most standard way to visualize 2D data array. <code>Surf</code> use color scheme for coloring (see <a href="#Color-scheme">Color scheme</a>). You can use `<samp>#</samp>` style for drawing black meshes on the surface.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-subplot 2 2 0:title 'Surf plot (default)':rotate 50 60:light on:box:surf a
-subplot 2 2 1:title '"\#" style; meshnum 10':rotate 50 60:box:surf a '#'; meshnum 10
-subplot 2 2 2:title '"." style':rotate 50 60:box:surf a '.'
-new x 50 40 '0.8*sin(pi*x)*sin(pi*(y+1)/2)'
-new y 50 40 '0.8*cos(pi*x)*sin(pi*(y+1)/2)'
-new z 50 40 '0.8*cos(pi*(y+1)/2)'
-subplot 2 2 3:title 'parametric form':rotate 50 60:box:surf x y z 'BbwrR'
-</pre>
-<div align="center"><img src="png/surf.png" alt="Sample surf">
-</div>
-<hr>
-<a name="surf3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surf3a-sample" accesskey="n" rel="next">surf3a sample</a>, Previous: <a href="#surf-sample" accesskey="p" rel="prev">surf sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surf3"></a>
-<h3 class="section">6.113 Sample `<samp>surf3</samp>`</h3>
-
-
-<p>Function <a href="#surf3">surf3</a> is one of most suitable (for my opinion) functions to visualize 3D data. It draw the isosurface(s) - surface(s) of constant amplitude (3D analogue of contour lines). You can draw wired isosurfaces if specify `<samp>#</samp>` style.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-light on:alpha on
-subplot 2 2 0:title 'Surf3 plot (default)'
-rotate 50 60:box:surf3 c
-subplot 2 2 1:title '"\#" style'
-rotate 50 60:box:surf3 c '#'
-subplot 2 2 2:title '"." style'
-rotate 50 60:box:surf3 c '.'
-</pre>
-<div align="center"><img src="png/surf3.png" alt="Sample surf3">
-</div>
-<hr>
-<a name="surf3a-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surf3c-sample" accesskey="n" rel="next">surf3c sample</a>, Previous: <a href="#surf3-sample" accesskey="p" rel="prev">surf3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surf3a"></a>
-<h3 class="section">6.114 Sample `<samp>surf3a</samp>`</h3>
-
-
-<p>Function <a href="#surf3c">surf3c</a> is similar to <a href="#surf3">surf3</a> but its transparency is determined by another data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Surf3A plot':rotate 50 60:light on:alpha on:box:surf3a c d
-</pre>
-<div align="center"><img src="png/surf3a.png" alt="Sample surf3a">
-</div>
-<hr>
-<a name="surf3c-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surf3ca-sample" accesskey="n" rel="next">surf3ca sample</a>, Previous: <a href="#surf3a-sample" accesskey="p" rel="prev">surf3a sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surf3c"></a>
-<h3 class="section">6.115 Sample `<samp>surf3c</samp>`</h3>
-
-
-<p>Function <a href="#surf3c">surf3c</a> is similar to <a href="#surf3">surf3</a> but its coloring is determined by another data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Surf3C plot':rotate 50 60:light on:alpha on:box:surf3c c d
-</pre>
-<div align="center"><img src="png/surf3c.png" alt="Sample surf3c">
-</div>
-<hr>
-<a name="surf3ca-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surfa-sample" accesskey="n" rel="next">surfa sample</a>, Previous: <a href="#surf3c-sample" accesskey="p" rel="prev">surf3c sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surf3ca"></a>
-<h3 class="section">6.116 Sample `<samp>surf3ca</samp>`</h3>
-
-
-<p>Function <a href="#surf3c">surf3c</a> is similar to <a href="#surf3">surf3</a> but its coloring and transparency is determined by another data arrays.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3d'
-title 'Surf3CA plot':rotate 50 60:light on:alpha on:box:surf3ca c d c
-</pre>
-<div align="center"><img src="png/surf3ca.png" alt="Sample surf3ca">
-</div>
-<hr>
-<a name="surfa-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surfc-sample" accesskey="n" rel="next">surfc sample</a>, Previous: <a href="#surf3ca-sample" accesskey="p" rel="prev">surf3ca sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surfa"></a>
-<h3 class="section">6.117 Sample `<samp>surfa</samp>`</h3>
-
-
-<p>Function <a href="#surfa">surfa</a> is similar to <a href="#surf">surf</a> but its transparency is determined by another data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'SurfA plot':rotate 50 60:light on:alpha on:box:surfa a b
-</pre>
-<div align="center"><img src="png/surfa.png" alt="Sample surfa">
-</div>
-<hr>
-<a name="surfc-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#surfca-sample" accesskey="n" rel="next">surfca sample</a>, Previous: <a href="#surfa-sample" accesskey="p" rel="prev">surfa sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surfc"></a>
-<h3 class="section">6.118 Sample `<samp>surfc</samp>`</h3>
-
-
-<p>Function <a href="#surfc">surfc</a> is similar to <a href="#surf">surf</a> but its coloring is determined by another data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'SurfC plot':rotate 50 60:light on:box:surfc a b
-</pre>
-<div align="center"><img src="png/surfc.png" alt="Sample surfc">
-</div>
-<hr>
-<a name="surfca-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#table-sample" accesskey="n" rel="next">table sample</a>, Previous: <a href="#surfc-sample" accesskey="p" rel="prev">surfc sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-surfca"></a>
-<h3 class="section">6.119 Sample `<samp>surfca</samp>`</h3>
-
-
-<p>Function <a href="#surfca">surfca</a> is similar to <a href="#surf">surf</a> but its coloring and transparency is determined by another data arrays.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'SurfCA plot':rotate 50 60:light on:alpha on:box:surfca a b a
-</pre>
-<div align="center"><img src="png/surfca.png" alt="Sample surfca">
-</div>
-<hr>
-<a name="table-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#tape-sample" accesskey="n" rel="next">tape sample</a>, Previous: <a href="#surfca-sample" accesskey="p" rel="prev">surfca sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-table"></a>
-<h3 class="section">6.120 Sample `<samp>table</samp>`</h3>
-
-
-<p>Function <a href="#table">table</a> draw table with data values.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new ys 10 3 '0.8*sin(pi*(x+y/4+1.25))+0.2*rnd'
-subplot 2 2 0:title 'Table sample':box
-table ys 'y_1\n{}y_2\n{}y_3'
-
-subplot 2 2 1:title 'no borders, colored'
-table ys 'y_1\n{}y_2\n{}y_3' 'r|'
-
-subplot 2 2 2:title 'no font decrease'
-table ys 'y_1\n{}y_2\n{}y_3' '#'
-
-subplot 2 2 3:title 'manual width and position':box
-table 0.5 0.95 ys 'y_1\n{}y_2\n{}y_3' '#';value 0.7
-</pre>
-<div align="center"><img src="png/table.png" alt="Sample table">
-</div>
-<hr>
-<a name="tape-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#tens-sample" accesskey="n" rel="next">tens sample</a>, Previous: <a href="#table-sample" accesskey="p" rel="prev">table sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-tape"></a>
-<h3 class="section">6.121 Sample `<samp>tape</samp>`</h3>
-
-
-<p>Function <a href="#tape">tape</a> draw tapes which rotate around the curve as transverse orts of accompanied coordinates.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-new yc 50 'sin(pi*x)':new xc 50 'cos(pi*x)':new z 50 'x'
-subplot 2 2 0 '':title 'Tape plot (default)':box:tape y:plot y 'k'
-subplot 2 2 1:title '3d variant, 2 colors':rotate 50 60:light on
-box:plot xc yc z 'k':tape xc yc z 'rg'
-subplot 2 2 2:title '3d variant, x only':rotate 50 60
-box:plot xc yc z 'k':tape xc yc z 'xr':tape xc yc z 'xr#'
-subplot 2 2 3:title '3d variant, z only':rotate 50 60
-box:plot xc yc z 'k':tape xc yc z 'zg':tape xc yc z 'zg#'
-</pre>
-<div align="center"><img src="png/tape.png" alt="Sample tape">
-</div>
-<hr>
-<a name="tens-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ternary-sample" accesskey="n" rel="next">ternary sample</a>, Previous: <a href="#tape-sample" accesskey="p" rel="prev">tape sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-tens"></a>
-<h3 class="section">6.122 Sample `<samp>tens</samp>`</h3>
-
-
-<p>Function <a href="#tens">tens</a> is variant of <a href="#plot">plot</a> with smooth coloring along the curves. At this, color is determined as for surfaces (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 2 2 0 '':title 'Tens plot (default)':box:tens y(:,0) y(:,1)
-subplot 2 2 2 '':title '" " style':box:tens y(:,0) y(:,1) 'o '
-new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
-subplot 2 2 1:title '3d variant':rotate 50 60:box:tens xc yc z z 's'
-</pre>
-<div align="center"><img src="png/tens.png" alt="Sample tens">
-</div>
-<hr>
-<a name="ternary-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#text-sample" accesskey="n" rel="next">text sample</a>, Previous: <a href="#tens-sample" accesskey="p" rel="prev">tens sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ternary"></a>
-<h3 class="section">6.123 Sample `<samp>ternary</samp>`</h3>
-
-
-<p>Example of <a href="#ternary">ternary</a> coordinates.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">ranges 0 1 0 1 0 1
-new x 50 '0.25*(1+cos(2*pi*x))'
-new y 50 '0.25*(1+sin(2*pi*x))'
-new z 50 'x'
-new a 20 30 '30*x*y*(1-x-y)^2*(x+y<1)'
-new rx 10 'rnd':new ry 10:fill ry '(1-v)*rnd' rx
-light on
-
-subplot 2 2 0:title 'Ordinary axis 3D':rotate 50 60
-box:axis:grid
-plot x y z 'r2':surf a '#'
-xlabel 'B':ylabel 'C':zlabel 'Z'
-
-subplot 2 2 1:title 'Ternary axis (x+y+t=1)':ternary 1
-box:axis:grid 'xyz' 'B;'
-plot x y 'r2':plot rx ry 'q^ ':cont a:line 0.5 0 0 0.75 'g2'
-xlabel 'B':ylabel 'C':tlabel 'A'
-
-subplot 2 2 2:title 'Quaternary axis 3D':rotate 50 60:ternary 2
-box:axis:grid 'xyz' 'B;'
-plot x y z 'r2':surf a '#'
-xlabel 'B':ylabel 'C':tlabel 'A':zlabel 'D'
-
-subplot 2 2 3:title 'Ternary axis 3D':rotate 50 60:ternary 1
-box:axis:grid 'xyz' 'B;'
-plot x y z 'r2':surf a '#'
-xlabel 'B':ylabel 'C':tlabel 'A':zlabel 'Z'
-</pre>
-<div align="center"><img src="png/ternary.png" alt="Sample ternary">
-</div>
-<hr>
-<a name="text-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#text2-sample" accesskey="n" rel="next">text2 sample</a>, Previous: <a href="#ternary-sample" accesskey="p" rel="prev">ternary sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-text"></a>
-<h3 class="section">6.124 Sample `<samp>text</samp>`</h3>
-
-
-<p>Example of <a href="#text">text</a> possibilities.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 2 2 0 ''
-text 0 1 'Text can be in ASCII and in Unicode'
-text 0 0.6 'It can be \wire{wire}, \big{big} or #r{colored}'
-text 0 0.2 'One can change style in string: \b{bold}, \i{italic, \b{both}}'
-text 0 -0.2 'Easy to \a{overline} or \u{underline}'
-text 0 -0.6 'Easy to change indexes ^{up} _{down} @{center}'
-text 0 -1 'It parse TeX: \int \alpha \cdot \
-\sqrt3{sin(\pi x)^2 + \gamma_{i_k}} dx'
-subplot 2 2 1 ''
- text 0 0.5 '\sqrt{\frac{\alpha^{\gamma^2}+\overset 1{\big\infty}}{\sqrt3{2+b}}}' '@' -2
-text 0 -0.1 'More text position: \frac{a}{b}, \dfrac{a}{b}, [\stack{a}{bbb}], [\stackl{a}{bbb}], [\stackr{a}{bbb}], \sup{a}{sup}, \sub{a}{sub}'text 0 -0.5 'Text can be printed\n{}on several lines'
-text 0 -0.9 'or with color gradient' 'BbcyrR'
-subplot 2 2 2 '':box:plot y(:,0)
-text y 'This is very very long string drawn along a curve' 'k'
-text y 'Another string drawn above a curve' 'Tr'
-subplot 2 2 3 '':line -1 -1 1 -1 'rA':text 0 -1 1 -1 'Horizontal'
-line -1 -1 1 1 'rA':text 0 0 1 1 'At angle' '@'
-line -1 -1 -1 1 'rA':text -1 0 -1 1 'Vertical'
-</pre>
-<div align="center"><img src="png/text.png" alt="Sample text">
-</div>
-<hr>
-<a name="text2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#textmark-sample" accesskey="n" rel="next">textmark sample</a>, Previous: <a href="#text-sample" accesskey="p" rel="prev">text sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-text2"></a>
-<h3 class="section">6.125 Sample `<samp>text2</samp>`</h3>
-
-
-<p>Example of <a href="#text">text</a> along curve.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 1 3 0 '':box:plot y(:,0)
-text y 'This is very very long string drawn along a curve' 'k'
-text y 'Another string drawn under a curve' 'Tr'
-subplot 1 3 1 '':box:plot y(:,0)
-text y 'This is very very long string drawn along a curve' 'k:C'
-text y 'Another string drawn under a curve' 'Tr:C'
-subplot 1 3 2 '':box:plot y(:,0)
-text y 'This is very very long string drawn along a curve' 'k:R'
-text y 'Another string drawn under a curve' 'Tr:R'
-</pre>
-<div align="center"><img src="png/text2.png" alt="Sample text2">
-</div>
-<hr>
-<a name="textmark-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#ticks-sample" accesskey="n" rel="next">ticks sample</a>, Previous: <a href="#text2-sample" accesskey="p" rel="prev">text2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-textmark"></a>
-<h3 class="section">6.126 Sample `<samp>textmark</samp>`</h3>
-
-
-<p>Function <a href="#textmark">textmark</a> is similar to <a href="#mark">mark</a> but draw text instead of markers.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 1 1 0 '':title 'TextMark plot (default)':box:textmark y y1 '\gamma' 'r'
-</pre>
-<div align="center"><img src="png/textmark.png" alt="Sample textmark">
-</div>
-<hr>
-<a name="ticks-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#tile-sample" accesskey="n" rel="next">tile sample</a>, Previous: <a href="#textmark-sample" accesskey="p" rel="prev">textmark sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-ticks"></a>
-<h3 class="section">6.127 Sample `<samp>ticks</samp>`</h3>
-
-
-<p>Example of <a href="#axis">axis</a> ticks.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">subplot 3 3 0:title 'Usual axis with ":" style'
-axis ':'
-
-subplot 3 3 1:title 'Too big/small range'
-ranges -1000 1000 0 0.001:axis
-
-subplot 3 3 2:title 'LaTeX-like labels'
-axis 'F!'
-
-subplot 3 3 3:title 'Too narrow range'
-ranges 100 100.1 10 10.01:axis
-
-subplot 3 3 4:title 'No tuning, manual "+"'
-axis '+!'
-# for version <2.3 you can use
-#tuneticks off:axis
-
-subplot 3 3 5:title 'Template for ticks'
-xtick 'xxx:%g':ytick 'y:%g'
-axis
-
-xtick '':ytick '' # switch it off for other plots
-
-subplot 3 3 6:title 'No tuning, higher precision'
-axis '!4'
-
-subplot 3 3 7:title 'Manual ticks'
-ranges -pi pi 0 2
-xtick pi 3 '\pi'
-xtick 0.886 'x^*' on # note this will disable subticks drawing
-# or you can use
-#xtick -pi '\pi' -pi/2 '-\pi/2' 0 '0' 0.886 'x^*' pi/2 '\pi/2' pi 'pi'
-list v 0 0.5 1 2:ytick v '0
-0.5
-1
-2'
-axis:grid:fplot '2*cos(x^2)^2' 'r2'
-
-subplot 3 3 8:title 'Time ticks'
-xrange 0 3e5:ticktime 'x':axis
-</pre>
-<div align="center"><img src="png/ticks.png" alt="Sample ticks">
-</div>
-<hr>
-<a name="tile-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#tiles-sample" accesskey="n" rel="next">tiles sample</a>, Previous: <a href="#ticks-sample" accesskey="p" rel="prev">ticks sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-tile"></a>
-<h3 class="section">6.128 Sample `<samp>tile</samp>`</h3>
-
-
-<p>Function <a href="#tile">tile</a> draw surface by tiles.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-title 'Tile plot':rotate 50 60:box:tile a
-</pre>
-<div align="center"><img src="png/tile.png" alt="Sample tile">
-</div>
-<hr>
-<a name="tiles-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#torus-sample" accesskey="n" rel="next">torus sample</a>, Previous: <a href="#tile-sample" accesskey="p" rel="prev">tile sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-tiles"></a>
-<h3 class="section">6.129 Sample `<samp>tiles</samp>`</h3>
-
-
-<p>Function <a href="#tiles">tiles</a> is similar to <a href="#tile">tile</a> but tile sizes is determined by another data. This allows one to simulate transparency of the plot.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-subplot 1 1 0 '':title 'Tiles plot':box:tiles a b
-</pre>
-<div align="center"><img src="png/tiles.png" alt="Sample tiles">
-</div>
-<hr>
-<a name="torus-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#traj-sample" accesskey="n" rel="next">traj sample</a>, Previous: <a href="#tiles-sample" accesskey="p" rel="prev">tiles sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-torus"></a>
-<h3 class="section">6.130 Sample `<samp>torus</samp>`</h3>
-
-
-<p>Function <a href="#torus">torus</a> draw surface of the curve rotation.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 2 2 0:title 'Torus plot (default)':light on:rotate 50 60:box:torus y1 y2
-subplot 2 2 1:title '"x" style':light on:rotate 50 60:box:torus y1 y2 'x'
-subplot 2 2 2:title '"z" style':light on:rotate 50 60:box:torus y1 y2 'z'
-subplot 2 2 3:title '"\#" style':light on:rotate 50 60:box:torus y1 y2 '#'
-</pre>
-<div align="center"><img src="png/torus.png" alt="Sample torus">
-</div>
-<hr>
-<a name="traj-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#triangulation-sample" accesskey="n" rel="next">triangulation sample</a>, Previous: <a href="#torus-sample" accesskey="p" rel="prev">torus sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-traj"></a>
-<h3 class="section">6.131 Sample `<samp>traj</samp>`</h3>
-
-
-<p>Function <a href="#traj">traj</a> is 1D analogue of <a href="#vect">vect</a>. It draw vectors from specified points.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-subplot 1 1 0 '':title 'Traj plot':box:plot x1 y:traj x1 y y1 y2
-</pre>
-<div align="center"><img src="png/traj.png" alt="Sample traj">
-</div>
-<hr>
-<a name="triangulation-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#triplot-sample" accesskey="n" rel="next">triplot sample</a>, Previous: <a href="#traj-sample" accesskey="p" rel="prev">traj sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-triangulation"></a>
-<h3 class="section">6.132 Sample `<samp>triangulation</samp>`</h3>
-
-
-<p>Example of use <a href="#triangulate">triangulate</a> for arbitrary placed points.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">new x 100 '2*rnd-1':new y 100 '2*rnd-1':copy z x^2-y^2
-new g 30 30:triangulate d x y
-title 'Triangulation'
-rotate 50 60:box:light on
-triplot d x y z:triplot d x y z '#k'
-datagrid g x y z:mesh g 'm'
-</pre>
-<div align="center"><img src="png/triangulation.png" alt="Sample triangulation">
-</div>
-<hr>
-<a name="triplot-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#tube-sample" accesskey="n" rel="next">tube sample</a>, Previous: <a href="#triangulation-sample" accesskey="p" rel="prev">triangulation sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-triplot"></a>
-<h3 class="section">6.133 Sample `<samp>triplot</samp>`</h3>
-
-
-<p>Functions <a href="#triplot">triplot</a> and <a href="#quadplot">quadplot</a> draw set of triangles (or quadrangles, correspondingly) for irregular data arrays. Note, that you have to provide not only vertexes, but also the indexes of triangles or quadrangles. I.e. perform triangulation by some other library. See also <a href="#triangulate">triangulate</a>.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">list q 0 1 2 3 | 4 5 6 7 | 0 2 4 6 | 1 3 5 7 | 0 4 1 5 | 2 6 3 7
-list xq -1 1 -1 1 -1 1 -1 1
-list yq -1 -1 1 1 -1 -1 1 1
-list zq -1 -1 -1 -1 1 1 1 1
-light on
-subplot 2 2 0:title 'QuadPlot sample':rotate 50 60
-quadplot q xq yq zq 'yr'
-quadplot q xq yq zq '#k'
-subplot 2 2 2:title 'QuadPlot coloring':rotate 50 60
-quadplot q xq yq zq yq 'yr'
-quadplot q xq yq zq '#k'
-list t 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
-list xt -1 1 0 0
-list yt -1 -1 1 0
-list zt -1 -1 -1 1
-subplot 2 2 1:title 'TriPlot sample':rotate 50 60
-triplot t xt yt zt 'b'
-triplot t xt yt zt '#k'
-subplot 2 2 3:title 'TriPlot coloring':rotate 50 60
-triplot t xt yt zt yt 'cb'
-triplot t xt yt zt '#k'
-tricont t xt yt zt 'B'
-</pre>
-<div align="center"><img src="png/triplot.png" alt="Sample triplot">
-</div>
-<hr>
-<a name="tube-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#type0-sample" accesskey="n" rel="next">type0 sample</a>, Previous: <a href="#triplot-sample" accesskey="p" rel="prev">triplot sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-tube"></a>
-<h3 class="section">6.134 Sample `<samp>tube</samp>`</h3>
-
-
-<p>Function <a href="#tube">tube</a> draw tube with variable radius.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare1d'
-light on
-new yc 50 'sin(pi*x)':new xc 50 'cos(pi*x)':new z 50 'x':divto y1 20
-subplot 2 2 0 '':title 'Tube plot (default)':box:tube y 0.05
-subplot 2 2 1 '':title 'variable radius':box:tube y y1
-subplot 2 2 2 '':title '"\#" style':box:tube y 0.05 '#'
-subplot 2 2 3:title '3d variant':rotate 50 60:box:tube xc yc z y2 'r'
-</pre>
-<div align="center"><img src="png/tube.png" alt="Sample tube">
-</div>
-<hr>
-<a name="type0-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#type1-sample" accesskey="n" rel="next">type1 sample</a>, Previous: <a href="#tube-sample" accesskey="p" rel="prev">tube sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-type0"></a>
-<h3 class="section">6.135 Sample `<samp>type0</samp>`</h3>
-
-
-<p>Example of ordinary transparency (<a href="#transptype">transptype</a>=0).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-alpha on:light on:transptype 0:clf
-subplot 2 2 0:rotate 50 60:surf a:box
-subplot 2 2 1:rotate 50 60:dens a:box
-subplot 2 2 2:rotate 50 60:cont a:box
-subplot 2 2 3:rotate 50 60:axial a:box
-</pre>
-<div align="center"><img src="png/type0.png" alt="Sample type0">
-</div>
-<hr>
-<a name="type1-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#type2-sample" accesskey="n" rel="next">type2 sample</a>, Previous: <a href="#type0-sample" accesskey="p" rel="prev">type0 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-type1"></a>
-<h3 class="section">6.136 Sample `<samp>type1</samp>`</h3>
-
-
-<p>Example of glass-like transparency (<a href="#transptype">transptype</a>=1).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-alpha on:light on:transptype 1:clf
-subplot 2 2 0:rotate 50 60:surf a:box
-subplot 2 2 1:rotate 50 60:dens a:box
-subplot 2 2 2:rotate 50 60:cont a:box
-subplot 2 2 3:rotate 50 60:axial a:box
-</pre>
-<div align="center"><img src="png/type1.png" alt="Sample type1">
-</div>
-<hr>
-<a name="type2-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#vect-sample" accesskey="n" rel="next">vect sample</a>, Previous: <a href="#type1-sample" accesskey="p" rel="prev">type1 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-type2"></a>
-<h3 class="section">6.137 Sample `<samp>type2</samp>`</h3>
-
-
-<p>Example of lamp-like transparency (<a href="#transptype">transptype</a>=2).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2d'
-alpha on:light on:transptype 2:clf
-subplot 2 2 0:rotate 50 60:surf a:box
-subplot 2 2 1:rotate 50 60:dens a:box
-subplot 2 2 2:rotate 50 60:cont a:box
-subplot 2 2 3:rotate 50 60:axial a:box
-</pre>
-<div align="center"><img src="png/type2.png" alt="Sample type2">
-</div>
-<hr>
-<a name="vect-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#vect3-sample" accesskey="n" rel="next">vect3 sample</a>, Previous: <a href="#type2-sample" accesskey="p" rel="prev">type2 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-vect"></a>
-<h3 class="section">6.138 Sample `<samp>vect</samp>`</h3>
-
-
-<p>Function <a href="#vect">vect</a> is most standard way to visualize vector fields - it draw a lot of arrows or hachures for each data cell. It have a lot of options which can be seen on the figure (and in the sample code), and use color scheme for coloring (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare2v'
-call 'prepare3v'
-subplot 3 2 0 '':title 'Vect plot (default)':box:vect a b
-subplot 3 2 1 '':title '"." style; "=" style':box:vect a b '.='
-subplot 3 2 2 '':title '"f" style':box:vect a b 'f'
-subplot 3 2 3 '':title '">" style':box:vect a b '>'
-subplot 3 2 4 '':title '"<" style':box:vect a b '<'
-subplot 3 2 5:title '3d variant':rotate 50 60:box:vect ex ey ez
-</pre>
-<div align="center"><img src="png/vect.png" alt="Sample vect">
-</div>
-<hr>
-<a name="vect3-sample"></a>
-<div class="header">
-<p>
-Next: <a href="#venn-sample" accesskey="n" rel="next">venn sample</a>, Previous: <a href="#vect-sample" accesskey="p" rel="prev">vect sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-vect3"></a>
-<h3 class="section">6.139 Sample `<samp>vect3</samp>`</h3>
-
-
-<p>Function <a href="#vect3">vect3</a> draw ordinary vector field plot but at slices of 3D data.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">call 'prepare3v'
-subplot 2 1 0:title 'Vect3 sample':rotate 50 60
-origin 0 0 0:box:axis '_xyz'
-vect3 ex ey ez 'x':vect3 ex ey ez:vect3 ex ey ez 'z'
-subplot 2 1 1:title '"f" style':rotate 50 60
-origin 0 0 0:box:axis '_xyz'
-vect3 ex ey ez 'fx':vect3 ex ey ez 'f':vect3 ex ey ez 'fz'
-grid3 ex 'Wx':grid3 ex 'W':grid3 ex 'Wz'
-</pre>
-<div align="center"><img src="png/vect3.png" alt="Sample vect3">
-</div>
-<hr>
-<a name="venn-sample"></a>
-<div class="header">
-<p>
-Previous: <a href="#vect3-sample" accesskey="p" rel="prev">vect3 sample</a>, Up: <a href="#All-samples" accesskey="u" rel="up">All samples</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Sample-_0027venn_0027"></a>
-<h3 class="section">6.140 Sample `venn`</h3>
-
-
-<p>Example of venn-like diagram.
-</p>
-<p><strong>MGL code:</strong>
-</p><pre class="verbatim">list x -0.3 0 0.3:list y 0.3 -0.3 0.3:list e 0.7 0.7 0.7
-subplot 1 1 0:title 'Venn-like diagram'
-transptype 1:alpha on:error x y e e '!rgb@#o';alpha 0.1
-</pre>
-<div align="center"><img src="png/venn.png" alt="Sample venn">
-</div>
-
-<hr>
-<a name="Symbols-and-hot_002dkeys"></a>
-<div class="header">
-<p>
-Next: <a href="#Copying-This-Manual" accesskey="n" rel="next">Copying This Manual</a>, Previous: <a href="#All-samples" accesskey="p" rel="prev">All samples</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Symbols-and-hot_002dkeys-1"></a>
-<h2 class="appendix">Appendix A Symbols and hot-keys</h2>
-
-
-<p>This appendix contain the full list of symbols (characters) used by MathGL for setting up plot. Also it contain sections for full list of hot-keys supported by mglview tool and by UDAV program.
-</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Symbols-for-styles" accesskey="1">Symbols for styles</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Hot_002dkeys-for-mglview" accesskey="2">Hot-keys for mglview</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Hot_002dkeys-for-UDAV" accesskey="3">Hot-keys for UDAV</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-</table>
-
-
-<hr>
-<a name="Symbols-for-styles"></a>
-<div class="header">
-<p>
-Next: <a href="#Hot_002dkeys-for-mglview" accesskey="n" rel="next">Hot-keys for mglview</a>, Up: <a href="#Symbols-and-hot_002dkeys" accesskey="u" rel="up">Symbols and hot-keys</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Symbols-for-styles-1"></a>
-<h3 class="section">A.1 Symbols for styles</h3>
-
-
-<p>Below is full list of all characters (symbols) which MathGL use for setting up the plot.
-</p>
-<dl compact="compact">
-<dt>`<samp>space ' '</samp>`</dt>
-<dd><p>empty line style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>empty color in <a href="#chart">chart</a>.
-</p>
-</dd>
-<dt>`<samp>!</samp>`</dt>
-<dd><p>set to use new color from palette for each point (not for each curve, as default) in <a href="#g_t1D-plotting">1D plotting</a>;
-</p>
-<p>set to disable ticks tuning in <a href="#axis">axis</a> and <a href="#colorbar">colorbar</a>;
-</p>
-<p>set to draw <a href="#grid">grid</a> lines at subticks coordinates too;
-</p>
-<p>define complex variable/expression in MGL script if placed at beginning.
-</p>
-</dd>
-<dt>`<samp>#</samp>`</dt>
-<dd><p>set to use solid marks (see <a href="#Line-styles">Line styles</a>) or solid <a href="#error">error</a> boxes;
-</p>
-<p>set to draw wired plot for <a href="#axial">axial</a>, <a href="#surf3">surf3</a>, <a href="#surf3a">surf3a</a>, <a href="#surf3c">surf3c</a>, <a href="#triplot">triplot</a>, <a href="#quadplot">quadplot</a>, <a href="#area">area</a>, <a href="#region">region</a>, <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#tube">tube</a>, <a href="#tape">tape</a>, <a href="#cone">cone</a>, <a href="#boxs">boxs</a> and draw boundary only for <a href="#circle">circle</a>, <a href="#ellipse">ellipse</a>, <a href="#rhomb">rhomb</a>;
-</p>
-<p>set to draw also mesh lines for <a href="#surf">surf</a>, <a href="#surfc">surfc</a>, <a href="#surfa">surfa</a>, <a href="#dens">dens</a>, <a href="#densx">densx</a>, <a href="#densy">densy</a>, <a href="#densz">densz</a>, <a href="#dens3">dens3</a>, or boundary for <a href="#chart">chart</a>, <a href="#facex">facex</a>, <a href="#facey">facey</a>, <a href="#facez">facez</a>, <a href="#rect">rect</a>;
-</p>
-<p>set to draw boundary and box for <a href="#legend">legend</a>, <a href="#title">title</a>, or grid lines for <a href="#table">table</a>;
-</p>
-<p>set to draw grid for <a href="#radar">radar</a>;
-</p>
-<p>set to start flow threads and pipes from edges only for <a href="#flow">flow</a>, <a href="#pipe">pipe</a>;
-</p>
-<p>set to use whole are for axis range in <a href="#subplot">subplot</a>, <a href="#inplot">inplot</a>;
-</p>
-<p>change text color inside a string (see <a href="#Font-styles">Font styles</a>);
-</p>
-<p>start comment in <a href="#MGL-scripts">MGL scripts</a> or in <a href="#Command-options">Command options</a>.
-</p>
-</dd>
-<dt>`<samp>$</samp>`</dt>
-<dd><p>denote parameter of <a href="#MGL-scripts">MGL scripts</a>.
-</p>
-</dd>
-<dt>`<samp>%</samp>`</dt>
-<dd><p>set color scheme along 2 coordinates <a href="#Color-scheme">Color scheme</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>&</samp>`</dt>
-<dd>
-<p>set to pass long integer number in tick template <a href="#xtick">xtick</a>, <a href="#ytick">ytick</a>, <a href="#ztick">ztick</a>, <a href="#ctick">ctick</a>;
-</p>
-<p>specifier of drawing user-defined symbols as mark (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>`</samp>`</dt>
-<dd><p>denote string in <a href="#MGL-scripts">MGL scripts</a> or in <a href="#Command-options">Command options</a>.
-</p>
-</dd>
-<dt>`<samp>*</samp>`</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>set to start flow threads from 2d array inside data (see <a href="#flow">flow</a>);
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>+</samp>`</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>set to print `<samp>+</samp>` for positive numbers in <a href="#axis">axis</a>, <a href="#label">label</a>, <a href="#table">table</a>;
-</p>
-<p>operation of increasing last character value in MGL strings;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>,</samp>`</dt>
-<dd><p>separator for color positions (see <a href="#Color-styles">Color styles</a>) or items in a list
-</p>
-<p>concatenation of MGL string with another string or numerical value.
-</p>
-</dd>
-<dt>`<samp>-</samp>`</dt>
-<dd><p>solid line style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>place entries horizontally in <a href="#legend">legend</a>;
-</p>
-<p>set to use usual `<samp>-</samp>` for negative numbers in <a href="#axis">axis</a>, <a href="#label">label</a>, <a href="#table">table</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>.</samp>`</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>set to draw hachures instead of arrows for <a href="#vect">vect</a>, <a href="#vect3">vect3</a>;
-</p>
-<p>set to use dots instead of faces for <a href="#cloud">cloud</a>, <a href="#torus">torus</a>, <a href="#axial">axial</a>, <a href="#surf3">surf3</a>, <a href="#surf3a">surf3a</a>, <a href="#surf3c">surf3c</a>, <a href="#surf">surf</a>, <a href="#surfa">surfa</a>, <a href="#surfc">surfc</a>, <a href="#dens">dens</a>, <a href="#map">map</a>;
-</p>
-<p>delimiter of fractional parts for numbers.
-</p>
-</dd>
-<dt>`<samp>/</samp>`</dt>
-<dd><p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>:</samp>`</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>stop color scheme parsing (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>range operation in <a href="#MGL-scripts">MGL scripts</a>;
-</p>
-<p>style for <a href="#axis">axis</a>;
-</p>
-<p>separator of commands in <a href="#MGL-scripts">MGL scripts</a>.
-</p>
-</dd>
-<dt>`<samp>;</samp>`</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>start of an option in <a href="#MGL-scripts">MGL scripts</a> or in <a href="#Command-options">Command options</a>;
-</p>
-<p>separator of equations in <a href="#ode">ode</a>;
-</p>
-<p>separator of labels in <a href="#iris">iris</a>.
-</p>
-</dd>
-<dt>`<samp><</samp>`</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>style of <a href="#subplot">subplot</a> and <a href="#inplot">inplot</a>;
-</p>
-<p>set position of <a href="#colorbar">colorbar</a>;
-</p>
-<p>style of <a href="#vect">vect</a>, <a href="#vect3">vect3</a>;
-</p>
-<p>align left in <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#boxplot">boxplot</a>, <a href="#cones">cones</a>, <a href="#candle">candle</a>, <a href="#ohlc">ohlc</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-
-</dd>
-<dt>`<samp>></samp>`</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>style of <a href="#subplot">subplot</a> and <a href="#inplot">inplot</a>;
-</p>
-<p>set position of <a href="#colorbar">colorbar</a>;
-</p>
-<p>style of <a href="#vect">vect</a>, <a href="#vect3">vect3</a>;
-</p>
-<p>align right in <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#boxplot">boxplot</a>, <a href="#cones">cones</a>, <a href="#candle">candle</a>, <a href="#ohlc">ohlc</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>=</samp>`</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>set to use equidistant columns for <a href="#table">table</a>;
-</p>
-<p>set to use color gradient for <a href="#vect">vect</a>, <a href="#vect3">vect3</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>@</samp>`</dt>
-<dd><p>set to draw box around text for <a href="#text">text</a> and similar functions;
-</p>
-<p>set to draw boundary and fill it for <a href="#circle">circle</a>, <a href="#ellipse">ellipse</a>, <a href="#rhomb">rhomb</a>;
-</p>
-<p>set to fill faces for <a href="#box">box</a>;
-</p>
-<p>set to draw large semitransparent mark instead of error box for <a href="#error">error</a>;
-</p>
-<p>set to draw edges for <a href="#cone">cone</a>;
-</p>
-<p>set to draw filled boxes for <a href="#boxs">boxs</a>;
-</p>
-<p>reduce text size inside a string (see <a href="#Font-styles">Font styles</a>);
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>^</samp>`</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>style of <a href="#subplot">subplot</a> and <a href="#inplot">inplot</a>;
-</p>
-<p>set position of <a href="#colorbar">colorbar</a>;
-</p>
-<p>set outer position for <a href="#legend">legend</a>;
-</p>
-<p>inverse default position for <a href="#axis">axis</a>;
-</p>
-<p>switch to upper index inside a string (see <a href="#Font-styles">Font styles</a>);
-</p>
-<p>align center in <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#boxplot">boxplot</a>, <a href="#cones">cones</a>, <a href="#candle">candle</a>, <a href="#ohlc">ohlc</a>;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>_</samp>`</dt>
-<dd><p>empty arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>disable drawing of tick labels for <a href="#axis">axis</a>;
-</p>
-<p>style of <a href="#subplot">subplot</a> and <a href="#inplot">inplot</a>;
-</p>
-<p>set position of <a href="#colorbar">colorbar</a>;
-</p>
-<p>set to draw contours at bottom for <a href="#cont">cont</a>, <a href="#contf">contf</a>, <a href="#contd">contd</a>, <a href="#contv">contv</a>, <a href="#tricont">tricont</a>;
-</p>
-<p>switch to lower index inside a string (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>`<samp>[]</samp>`</dt>
-<dd><p>contain symbols excluded from color scheme parsing (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>operation of getting n-th character from MGL string.
-</p>
-</dd>
-<dt>`<samp>{}</samp>`</dt>
-<dd><p>contain extended specification of color (see <a href="#Color-styles">Color styles</a>), dashing (see <a href="#Line-styles">Line styles</a>) or mask (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>denote special operation in <a href="#MGL-scripts">MGL scripts</a>;
-</p>
-<p>denote `meta-symbol` for LaTeX like string parsing (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>`<samp>|</samp>`</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>set to use sharp color scheme (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>set to limit width by subplot width for <a href="#table">table</a>;
-</p>
-<p>delimiter in <a href="#list">list</a> command;
-</p>
-<p>operation in <a href="#Textual-formulas">Textual formulas</a>.
-</p>
-</dd>
-<dt>`<samp>\</samp>`</dt>
-<dd><p>string continuation symbol on next line for <a href="#MGL-scripts">MGL scripts</a>.
-</p>
-</dd>
-<dt>`<samp>~</samp>`</dt>
-<dd><p>disable drawing of tick labels for <a href="#axis">axis</a> and <a href="#colorbar">colorbar</a>;
-</p>
-<p>disable first segment in <a href="#lamerey">lamerey</a>;
-</p>
-<p>reduce number of segments in <a href="#plot">plot</a> and <a href="#tens">tens</a>;
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-</dd>
-<dt>`<samp>0,1,2,3,4,5,6,7,8,9</samp>`</dt>
-<dd><p>line width (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>brightness of a color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>precision of numbers in <a href="#axis">axis</a>, <a href="#label">label</a>, <a href="#table">table</a>;
-</p>
-<p>kind of smoothing (for digits 1,3,5) in <a href="#smooth">smooth</a>;
-</p>
-<p>digits for a value.
-</p>
-</dd>
-<dt>`<samp>4,6,8</samp>`</dt>
-<dd><p>set to draw square, hex- or octo-pyramids instead of cones in <a href="#cone">cone</a>, <a href="#cones">cones</a>.
-</p>
-</dd>
-<dt>`<samp>A,B,C,D,E,F,a,b,c,d,e,f</samp>`</dt>
-<dd><p>can be hex-digit for color specification if placed inside {} (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>A</samp>`</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>set to use absolute position in whole picture for <a href="#text">text</a>, <a href="#colorbar">colorbar</a>, <a href="#legend">legend</a>.
-</p>
-</dd>
-<dt>`<samp>a</samp>`</dt>
-<dd><p>set to use absolute position in subplot for <a href="#text">text</a>;
-</p>
-<p>style of <a href="#plot">plot</a>, <a href="#radar">radar</a>, <a href="#tens">tens</a>, <a href="#area">area</a>, <a href="#region">region</a> to draw segments between points outside of axis range;
-</p>
-<p>style of <a href="#bars">bars</a>, <a href="#barh">barh</a>, <a href="#cones">cones</a>.
-</p>
-</dd>
-<dt>`<samp>B</samp>`</dt>
-<dd><p>dark blue color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>b</samp>`</dt>
-<dd><p>blue color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>bold font face if placed after `<samp>:</samp>` (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>`<samp>C</samp>`</dt>
-<dd><p>dark cyan color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>align text to center if placed after `<samp>:</samp>` (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>`<samp>c</samp>`</dt>
-<dd><p>cyan color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>name of color axis;
-</p>
-<p>cosine transform for <a href="#transform">transform</a>.
-</p>
-</dd>
-<dt>`<samp>D</samp>`</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-</dd>
-<dt>`<samp>d</samp>`</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>start hex-dash description if placed inside {} (see <a href="#Line-styles">Line styles</a>).
-</p>
-</dd>
-<dt>`<samp>E</samp>`</dt>
-<dd><p>dark green-yellow color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>e</samp>`</dt>
-<dd><p>green-yellow color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>F</samp>`</dt>
-<dd>
-<p>set fixed bar widths in <a href="#bars">bars</a>, <a href="#barh">barh</a>;
-</p>
-<p>set LaTeX-like format for numbers in <a href="#axis">axis</a>, <a href="#label">label</a>, <a href="#table">table</a>.
-</p>
-</dd>
-<dt>`<samp>f</samp>`</dt>
-<dd><p>style of <a href="#bars">bars</a>, <a href="#barh">barh</a>;
-</p>
-<p>style of <a href="#vect">vect</a>, <a href="#vect3">vect3</a>;
-</p>
-<p>set fixed format for numbers in <a href="#axis">axis</a>, <a href="#label">label</a>, <a href="#table">table</a>;
-</p>
-<p>Fourier transform for <a href="#transform">transform</a>.
-</p>
-</dd>
-<dt>`<samp>G</samp>`</dt>
-<dd><p>dark green color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>g</samp>`</dt>
-<dd><p>green color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>H</samp>`</dt>
-<dd><p>dark gray color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>h</samp>`</dt>
-<dd><p>gray color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>Hankel transform for <a href="#transform">transform</a>.
-</p>
-</dd>
-<dt>`<samp>I</samp>`</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>set <a href="#colorbar">colorbar</a> position near boundary.
-</p>
-</dd>
-<dt>`<samp>i</samp>`</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>italic font face if placed after `<samp>:</samp>` (see <a href="#Font-styles">Font styles</a>).
-</p>
-<p>set to use inverse values for <a href="#cloud">cloud</a>, <a href="#pipe">pipe</a>, <a href="#dew">dew</a>;
-</p>
-<p>set to fill only area with y1<y<y2 for <a href="#region">region</a>;
-</p>
-<p>inverse Fourier transform for <a href="#transform">transform</a>, <a href="#transforma">transforma</a>, <a href="#fourier">fourier</a>.
-</p>
-</dd>
-<dt>`<samp>j</samp>`</dt>
-<dd><p>line dashing style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-</dd>
-<dt>`<samp>K</samp>`</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>).
-</p>
-</dd>
-<dt>`<samp>k</samp>`</dt>
-<dd><p>black color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>L</samp>`</dt>
-<dd><p>dark green-blue color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>align text to left if placed after `<samp>:</samp>` (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>`<samp>l</samp>`</dt>
-<dd><p>green-blue color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>M</samp>`</dt>
-<dd><p>dark magenta color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>m</samp>`</dt>
-<dd><p>magenta color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>N</samp>`</dt>
-<dd><p>dark sky-blue color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>n</samp>`</dt>
-<dd><p>sky-blue color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>O</samp>`</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-</dd>
-<dt>`<samp>o</samp>`</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>over-line text if placed after `<samp>:</samp>` (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>`<samp>P</samp>`</dt>
-<dd><p>dark purple color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>p</samp>`</dt>
-<dd><p>purple color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>Q</samp>`</dt>
-<dd><p>dark orange or brown color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>q</samp>`</dt>
-<dd><p>orange color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>R</samp>`</dt>
-<dd><p>dark red color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>align text to right if placed after `<samp>:</samp>` (see <a href="#Font-styles">Font styles</a>).
-</p>
-</dd>
-<dt>`<samp>r</samp>`</dt>
-<dd><p>red color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>S</samp>`</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>).
-</p>
-</dd>
-<dt>`<samp>s</samp>`</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>one of mask for face filling (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>start hex-mask description if placed inside {} (see <a href="#Color-scheme">Color scheme</a>);
-</p>
-<p>sine transform for <a href="#transform">transform</a>.
-</p>
-</dd>
-<dt>`<samp>t</samp>`</dt>
-<dd><p>draw tubes instead of cones in <a href="#cone">cone</a>, <a href="#cones">cones</a>;
-</p>
-</dd>
-<dt>`<samp>T</samp>`</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>place text under the curve for <a href="#text">text</a>, <a href="#cont">cont</a>, <a href="#cont3">cont3</a>.
-</p>
-</dd>
-<dt>`<samp>t</samp>`</dt>
-<dd><p>set to draw text labels for <a href="#cont">cont</a>, <a href="#cont3">cont3</a>;
-</p>
-<p>name of t-axis (one of ternary axis);
-</p>
-<p>variable in <a href="#Textual-formulas">Textual formulas</a>, which usually is varied in range [0,1].
-</p>
-</dd>
-<dt>`<samp>U</samp>`</dt>
-<dd><p>dark blue-violet color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>disable rotation of tick labels for <a href="#axis">axis</a>.
-</p>
-</dd>
-<dt>`<samp>u</samp>`</dt>
-<dd><p>blue-violet color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>under-line text if placed after `<samp>:</samp>` (see <a href="#Font-styles">Font styles</a>);
-</p>
-<p>name of u-axis (one of ternary axis);
-</p>
-<p>variable in <a href="#Textual-formulas">Textual formulas</a>, which usually denote array itself.
-</p>
-</dd>
-<dt>`<samp>V</samp>`</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>place text centering on vertical direction for <a href="#text">text</a>.
-</p>
-</dd>
-<dt>`<samp>v</samp>`</dt>
-<dd><p>one of marks (see <a href="#Line-styles">Line styles</a>);
-</p>
-<p>set to draw vectors on flow threads for <a href="#flow">flow</a> and on segments for <a href="#lamerey">lamerey</a>.
-</p>
-</dd>
-<dt>`<samp>W</samp>`</dt>
-<dd><p>bright gray color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>w</samp>`</dt>
-<dd><p>white color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>wired text if placed after `<samp>:</samp>` (see <a href="#Font-styles">Font styles</a>);
-</p>
-<p>name of w-axis (one of ternary axis);
-</p>
-</dd>
-<dt>`<samp>X</samp>`</dt>
-<dd><p>arrow style (see <a href="#Line-styles">Line styles</a>).
-</p>
-</dd>
-<dt>`<samp>x</samp>`</dt>
-<dd>
-<p>name of x-axis or x-direction or 1st dimension of a data array;
-</p>
-<p>start hex-color description if placed inside {} (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>one of marks (see <a href="#Line-styles">Line styles</a>) or kind of <a href="#error">error</a> boxes;
-</p>
-<p>tiles orientation perpendicular to x-axis in <a href="#tile">tile</a>, <a href="#tiles">tiles</a>;
-</p>
-<p>style of <a href="#tape">tape</a>.
-</p>
-</dd>
-<dt>`<samp>Y</samp>`</dt>
-<dd><p>dark yellow or gold color (see <a href="#Color-styles">Color styles</a>).
-</p>
-</dd>
-<dt>`<samp>y</samp>`</dt>
-<dd><p>yellow color (see <a href="#Color-styles">Color styles</a>);
-</p>
-<p>name of y-axis or y-direction or 2nd dimension of a data array;
-</p>
-<p>tiles orientation perpendicular to y-axis in <a href="#tile">tile</a>, <a href="#tiles">tiles</a>.
-</p>
-</dd>
-<dt>`<samp>z</samp>`</dt>
-<dd>
-<p>name of z-axis or z-direction or 3d dimension of a data array;
-</p>
-<p>style of <a href="#tape">tape</a>.
-</p>
-</dd>
-</dl>
-
-
-
-<hr>
-<a name="Hot_002dkeys-for-mglview"></a>
-<div class="header">
-<p>
-Next: <a href="#Hot_002dkeys-for-UDAV" accesskey="n" rel="next">Hot-keys for UDAV</a>, Previous: <a href="#Symbols-for-styles" accesskey="p" rel="prev">Symbols for styles</a>, Up: <a href="#Symbols-and-hot_002dkeys" accesskey="u" rel="up">Symbols and hot-keys</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Hot_002dkeys-for-mglview-1"></a>
-<h3 class="section">A.2 Hot-keys for mglview</h3>
-
-
-<table>
-<thead><tr><th width="30%">Key</th><th width="70%">Description</th></tr></thead>
-<tr><td width="30%"><tt class="key">Ctrl-P</tt></td><td width="70%">Open printer dialog and print graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-W</tt></td><td width="70%">Close window.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-T</tt></td><td width="70%">Switch on/off transparency for the graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-L</tt></td><td width="70%">Switch on/off additional lightning for the graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Space</tt></td><td width="70%">Restore default graphics rotation, zoom and perspective.</td></tr>
-<tr><td width="30%"><tt class="key">F5</tt></td><td width="70%">Execute script and redraw graphics.</td></tr>
-<tr><td width="30%"><tt class="key">F6</tt></td><td width="70%">Change canvas size to fill whole region.</td></tr>
-<tr><td width="30%"><tt class="key">F7</tt></td><td width="70%">Stop drawing and script execution.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-F5</tt></td><td width="70%">Run slideshow. If no parameter specified then the dialog with slideshow options will appear.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Comma</tt>, <tt class="key">Ctrl-Period</tt></td><td width="70%">Show next/previous slide. If no parameter specified then the dialog with slideshow options will appear.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-G</tt></td><td width="70%">Copy graphics to clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-P</tt></td><td width="70%">Export as semitransparent PNG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-F</tt></td><td width="70%">Export as solid PNG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-J</tt></td><td width="70%">Export as JPEG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-E</tt></td><td width="70%">Export as vector EPS.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-S</tt></td><td width="70%">Export as vector SVG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-L</tt></td><td width="70%">Export as LaTeX/Tikz image.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-M</tt></td><td width="70%">Export as MGLD.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-D</tt></td><td width="70%">Export as PRC/PDF.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-O</tt></td><td width="70%">Export as OBJ.</td></tr>
-</table>
-
-
-<hr>
-<a name="Hot_002dkeys-for-UDAV"></a>
-<div class="header">
-<p>
-Previous: <a href="#Hot_002dkeys-for-mglview" accesskey="p" rel="prev">Hot-keys for mglview</a>, Up: <a href="#Symbols-and-hot_002dkeys" accesskey="u" rel="up">Symbols and hot-keys</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Hot_002dkeys-for-UDAV-1"></a>
-<h3 class="section">A.3 Hot-keys for UDAV</h3>
-
-
-<table>
-<thead><tr><th width="30%">Key</th><th width="70%">Description</th></tr></thead>
-<tr><td width="30%"><tt class="key">Ctrl-N</tt></td><td width="70%">Create new window with empty script. Note, all scripts share variables. So, second window can be used to see some additional information of existed variables.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-O</tt></td><td width="70%">Open and execute/show script or data from file. You may switch off automatic exection in UDAV properties</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-S</tt></td><td width="70%">Save script to a file.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-P</tt></td><td width="70%">Open printer dialog and print graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Z</tt></td><td width="70%">Undo changes in script editor.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-Z</tt></td><td width="70%">Redo changes in script editor.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-X</tt></td><td width="70%">Cut selected text into clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-C</tt></td><td width="70%">Copy selected text into clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-V</tt></td><td width="70%">Paste selected text from clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-A</tt></td><td width="70%">Select all text in editor.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-F</tt></td><td width="70%">Show dialog for text finding.</td></tr>
-<tr><td width="30%"><tt class="key">F3</tt></td><td width="70%">Find next occurrence of the text.</td></tr>
-<tr><td width="30%"><tt class="key">Win-C</tt> or <tt class="key">Meta-C</tt></td><td width="70%">Show dialog for new command and put it into the script.</td></tr>
-<tr><td width="30%"><tt class="key">Win-F</tt> or <tt class="key">Meta-F</tt></td><td width="70%">Insert last fitted formula with found coefficients.</td></tr>
-<tr><td width="30%"><tt class="key">Win-S</tt> or <tt class="key">Meta-S</tt></td><td width="70%">Show dialog for styles and put it into the script. Styles define the plot view (color scheme, marks, dashing and so on).</td></tr>
-<tr><td width="30%"><tt class="key">Win-O</tt> or <tt class="key">Meta-O</tt></td><td width="70%">Show dialog for options and put it into the script. Options are used for additional setup the plot.</td></tr>
-<tr><td width="30%"><tt class="key">Win-N</tt> or <tt class="key">Meta-N</tt></td><td width="70%">Replace selected expression by its numerical value.</td></tr>
-<tr><td width="30%"><tt class="key">Win-P</tt> or <tt class="key">Meta-P</tt></td><td width="70%">Select file and insert its file name into the script.</td></tr>
-<tr><td width="30%"><tt class="key">Win-G</tt> or <tt class="key">Meta-G</tt></td><td width="70%">Show dialog for plot setup and put resulting code into the script. This dialog setup axis, labels, lighting and other general things.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-O</tt></td><td width="70%">Load data from file. Data will be deleted only at exit but UDAV will not ask to save it.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-S</tt></td><td width="70%">Save data to a file.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-C</tt></td><td width="70%">Copy range of numbers to clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-V</tt></td><td width="70%">Paste range of numbers from clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-N</tt></td><td width="70%">Recreate the data with new sizes and fill it by zeros.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-R</tt></td><td width="70%">Resize (interpolate) the data to specified sizes.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-T</tt></td><td width="70%">Transform data along dimension(s).</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-M</tt></td><td width="70%">Make another data.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-H</tt></td><td width="70%">Find histogram of data.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-T</tt></td><td width="70%">Switch on/off transparency for the graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-L</tt></td><td width="70%">Switch on/off additional lightning for the graphics.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-G</tt></td><td width="70%">Switch on/off grid of absolute coordinates.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Space</tt></td><td width="70%">Restore default graphics rotation, zoom and perspective.</td></tr>
-<tr><td width="30%"><tt class="key">F5</tt></td><td width="70%">Execute script and redraw graphics.</td></tr>
-<tr><td width="30%"><tt class="key">F6</tt></td><td width="70%">Change canvas size to fill whole region.</td></tr>
-<tr><td width="30%"><tt class="key">F7</tt></td><td width="70%">Stop script execution and drawing.</td></tr>
-<tr><td width="30%"><tt class="key">F8</tt></td><td width="70%">Show/hide tool window with list of hidden plots.</td></tr>
-<tr><td width="30%"><tt class="key">F9</tt></td><td width="70%">Restore status for `once` command and reload data.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-F5</tt></td><td width="70%">Run slideshow. If no parameter specified then the dialog with slideshow options will appear.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Comma</tt>, <tt class="key">Ctrl-Period</tt></td><td width="70%">Show next/previous slide. If no parameter specified then the dialog with slideshow options will appear.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-W</tt></td><td width="70%">Open dialog with slideshow options.</td></tr>
-<tr><td width="30%"><tt class="key">Ctrl-Shift-G</tt></td><td width="70%">Copy graphics to clipboard.</td></tr>
-<tr><td width="30%"><tt class="key">F1</tt></td><td width="70%">Show help on MGL commands</td></tr>
-<tr><td width="30%"><tt class="key">F2</tt></td><td width="70%">Show/hide tool window with messages and information.</td></tr>
-<tr><td width="30%"><tt class="key">F4</tt></td><td width="70%">Show/hide calculator which evaluate and help to type textual formulas. Textual formulas may contain data variables too.</td></tr>
-<tr><td width="30%"><tt class="key">Meta-Shift-Up</tt>, <tt class="key">Meta-Shift-Down</tt></td><td width="70%">Change view angle <em>\theta</em>.</td></tr>
-<tr><td width="30%"><tt class="key">Meta-Shift-Left</tt>, <tt class="key">Meta-Shift-Right</tt></td><td width="70%">Change view angle <em>\phi</em>.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-Minus</tt>, <tt class="key">Alt-Equal</tt></td><td width="70%">Zoom in/out whole image.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-Up</tt>, <tt class="key">Alt-Down</tt>, <tt class="key">Alt-Right</tt>, <tt class="key">Alt-Left</tt></td><td width="70%">Shift whole image.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-P</tt></td><td width="70%">Export as semitransparent PNG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-F</tt></td><td width="70%">Export as solid PNG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-J</tt></td><td width="70%">Export as JPEG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-E</tt></td><td width="70%">Export as vector EPS.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-S</tt></td><td width="70%">Export as vector SVG.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-L</tt></td><td width="70%">Export as LaTeX/Tikz image.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-M</tt></td><td width="70%">Export as MGLD.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-D</tt></td><td width="70%">Export as PRC/PDF.</td></tr>
-<tr><td width="30%"><tt class="key">Alt-O</tt></td><td width="70%">Export as OBJ.</td></tr>
-</table>
-
-
-
-<hr>
-<a name="Copying-This-Manual"></a>
-<div class="header">
-<p>
-Next: <a href="#Index" accesskey="n" rel="next">Index</a>, Previous: <a href="#Symbols-and-hot_002dkeys" accesskey="p" rel="prev">Symbols and hot-keys</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="GNU-Free-Documentation-License"></a>
-<h2 class="appendix">Appendix B GNU Free Documentation License</h2>
-<div align="center">Version 1.2, November 2002
-</div>
-
-<div class="display">
-<pre class="display">Copyright © 2000,2001,2002 Free Software Foundation, Inc.
-51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-</pre></div>
-
-<ol start="0">
-<li> PREAMBLE
-
-<p>The purpose of this License is to make a manual, textbook, or other
-functional and useful document <em>free</em> in the sense of freedom: to
-assure everyone the effective freedom to copy and redistribute it,
-with or without modifying it, either commercially or noncommercially.
-Secondarily, this License preserves for the author and publisher a way
-to get credit for their work, while not being considered responsible
-for modifications made by others.
-</p>
-<p>This License is a kind of “copyleft”, which means that derivative
-works of the document must themselves be free in the same sense. It
-complements the GNU General Public License, which is a copyleft
-license designed for free software.
-</p>
-<p>We have designed this License in order to use it for manuals for free
-software, because free software needs free documentation: a free
-program should come with manuals providing the same freedoms that the
-software does. But this License is not limited to software manuals;
-it can be used for any textual work, regardless of subject matter or
-whether it is published as a printed book. We recommend this License
-principally for works whose purpose is instruction or reference.
-</p>
-</li><li> APPLICABILITY AND DEFINITIONS
-
-<p>This License applies to any manual or other work, in any medium, that
-contains a notice placed by the copyright holder saying it can be
-distributed under the terms of this License. Such a notice grants a
-world-wide, royalty-free license, unlimited in duration, to use that
-work under the conditions stated herein. The “Document”, below,
-refers to any such manual or work. Any member of the public is a
-licensee, and is addressed as “you”. You accept the license if you
-copy, modify or distribute the work in a way requiring permission
-under copyright law.
-</p>
-<p>A “Modified Version” of the Document means any work containing the
-Document or a portion of it, either copied verbatim, or with
-modifications and/or translated into another language.
-</p>
-<p>A “Secondary Section” is a named appendix or a front-matter section
-of the Document that deals exclusively with the relationship of the
-publishers or authors of the Document to the Document`s overall
-subject (or to related matters) and contains nothing that could fall
-directly within that overall subject. (Thus, if the Document is in
-part a textbook of mathematics, a Secondary Section may not explain
-any mathematics.) The relationship could be a matter of historical
-connection with the subject or with related matters, or of legal,
-commercial, philosophical, ethical or political position regarding
-them.
-</p>
-<p>The “Invariant Sections” are certain Secondary Sections whose titles
-are designated, as being those of Invariant Sections, in the notice
-that says that the Document is released under this License. If a
-section does not fit the above definition of Secondary then it is not
-allowed to be designated as Invariant. The Document may contain zero
-Invariant Sections. If the Document does not identify any Invariant
-Sections then there are none.
-</p>
-<p>The “Cover Texts” are certain short passages of text that are listed,
-as Front-Cover Texts or Back-Cover Texts, in the notice that says that
-the Document is released under this License. A Front-Cover Text may
-be at most 5 words, and a Back-Cover Text may be at most 25 words.
-</p>
-<p>A “Transparent” copy of the Document means a machine-readable copy,
-represented in a format whose specification is available to the
-general public, that is suitable for revising the document
-straightforwardly with generic text editors or (for images composed of
-pixels) generic paint programs or (for drawings) some widely available
-drawing editor, and that is suitable for input to text formatters or
-for automatic translation to a variety of formats suitable for input
-to text formatters. A copy made in an otherwise Transparent file
-format whose markup, or absence of markup, has been arranged to thwart
-or discourage subsequent modification by readers is not Transparent.
-An image format is not Transparent if used for any substantial amount
-of text. A copy that is not “Transparent” is called “Opaque”.
-</p>
-<p>Examples of suitable formats for Transparent copies include plain
-<small>ASCII</small> without markup, Texinfo input format, LaTeX input
-format, <acronym>SGML</acronym> or <acronym>XML</acronym> using a publicly available
-<acronym>DTD</acronym>, and standard-conforming simple <acronym>HTML</acronym>,
-PostScript or <acronym>PDF</acronym> designed for human modification. Examples
-of transparent image formats include <acronym>PNG</acronym>, <acronym>XCF</acronym> and
-<acronym>JPG</acronym>. Opaque formats include proprietary formats that can be
-read and edited only by proprietary word processors, <acronym>SGML</acronym> or
-<acronym>XML</acronym> for which the <acronym>DTD</acronym> and/or processing tools are
-not generally available, and the machine-generated <acronym>HTML</acronym>,
-PostScript or <acronym>PDF</acronym> produced by some word processors for
-output purposes only.
-</p>
-<p>The “Title Page” means, for a printed book, the title page itself,
-plus such following pages as are needed to hold, legibly, the material
-this License requires to appear in the title page. For works in
-formats which do not have any title page as such, “Title Page” means
-the text near the most prominent appearance of the work`s title,
-preceding the beginning of the body of the text.
-</p>
-<p>A section “Entitled XYZ” means a named subunit of the Document whose
-title either is precisely XYZ or contains XYZ in parentheses following
-text that translates XYZ in another language. (Here XYZ stands for a
-specific section name mentioned below, such as “Acknowledgements”,
-“Dedications”, “Endorsements”, or “History”.) To “Preserve the Title”
-of such a section when you modify the Document means that it remains a
-section “Entitled XYZ” according to this definition.
-</p>
-<p>The Document may include Warranty Disclaimers next to the notice which
-states that this License applies to the Document. These Warranty
-Disclaimers are considered to be included by reference in this
-License, but only as regards disclaiming warranties: any other
-implication that these Warranty Disclaimers may have is void and has
-no effect on the meaning of this License.
-</p>
-</li><li> VERBATIM COPYING
-
-<p>You may copy and distribute the Document in any medium, either
-commercially or noncommercially, provided that this License, the
-copyright notices, and the license notice saying this License applies
-to the Document are reproduced in all copies, and that you add no other
-conditions whatsoever to those of this License. You may not use
-technical measures to obstruct or control the reading or further
-copying of the copies you make or distribute. However, you may accept
-compensation in exchange for copies. If you distribute a large enough
-number of copies you must also follow the conditions in section 3.
-</p>
-<p>You may also lend copies, under the same conditions stated above, and
-you may publicly display copies.
-</p>
-</li><li> COPYING IN QUANTITY
-
-<p>If you publish printed copies (or copies in media that commonly have
-printed covers) of the Document, numbering more than 100, and the
-Document`s license notice requires Cover Texts, you must enclose the
-copies in covers that carry, clearly and legibly, all these Cover
-Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
-the back cover. Both covers must also clearly and legibly identify
-you as the publisher of these copies. The front cover must present
-the full title with all words of the title equally prominent and
-visible. You may add other material on the covers in addition.
-Copying with changes limited to the covers, as long as they preserve
-the title of the Document and satisfy these conditions, can be treated
-as verbatim copying in other respects.
-</p>
-<p>If the required texts for either cover are too voluminous to fit
-legibly, you should put the first ones listed (as many as fit
-reasonably) on the actual cover, and continue the rest onto adjacent
-pages.
-</p>
-<p>If you publish or distribute Opaque copies of the Document numbering
-more than 100, you must either include a machine-readable Transparent
-copy along with each Opaque copy, or state in or with each Opaque copy
-a computer-network location from which the general network-using
-public has access to download using public-standard network protocols
-a complete Transparent copy of the Document, free of added material.
-If you use the latter option, you must take reasonably prudent steps,
-when you begin distribution of Opaque copies in quantity, to ensure
-that this Transparent copy will remain thus accessible at the stated
-location until at least one year after the last time you distribute an
-Opaque copy (directly or through your agents or retailers) of that
-edition to the public.
-</p>
-<p>It is requested, but not required, that you contact the authors of the
-Document well before redistributing any large number of copies, to give
-them a chance to provide you with an updated version of the Document.
-</p>
-</li><li> MODIFICATIONS
-
-<p>You may copy and distribute a Modified Version of the Document under
-the conditions of sections 2 and 3 above, provided that you release
-the Modified Version under precisely this License, with the Modified
-Version filling the role of the Document, thus licensing distribution
-and modification of the Modified Version to whoever possesses a copy
-of it. In addition, you must do these things in the Modified Version:
-</p>
-<ol type="A" start="1">
-<li> Use in the Title Page (and on the covers, if any) a title distinct
-from that of the Document, and from those of previous versions
-(which should, if there were any, be listed in the History section
-of the Document). You may use the same title as a previous version
-if the original publisher of that version gives permission.
-
-</li><li> List on the Title Page, as authors, one or more persons or entities
-responsible for authorship of the modifications in the Modified
-Version, together with at least five of the principal authors of the
-Document (all of its principal authors, if it has fewer than five),
-unless they release you from this requirement.
-
-</li><li> State on the Title page the name of the publisher of the
-Modified Version, as the publisher.
-
-</li><li> Preserve all the copyright notices of the Document.
-
-</li><li> Add an appropriate copyright notice for your modifications
-adjacent to the other copyright notices.
-
-</li><li> Include, immediately after the copyright notices, a license notice
-giving the public permission to use the Modified Version under the
-terms of this License, in the form shown in the Addendum below.
-
-</li><li> Preserve in that license notice the full lists of Invariant Sections
-and required Cover Texts given in the Document`s license notice.
-
-</li><li> Include an unaltered copy of this License.
-
-</li><li> Preserve the section Entitled “History”, Preserve its Title, and add
-to it an item stating at least the title, year, new authors, and
-publisher of the Modified Version as given on the Title Page. If
-there is no section Entitled “History” in the Document, create one
-stating the title, year, authors, and publisher of the Document as
-given on its Title Page, then add an item describing the Modified
-Version as stated in the previous sentence.
-
-</li><li> Preserve the network location, if any, given in the Document for
-public access to a Transparent copy of the Document, and likewise
-the network locations given in the Document for previous versions
-it was based on. These may be placed in the “History” section.
-You may omit a network location for a work that was published at
-least four years before the Document itself, or if the original
-publisher of the version it refers to gives permission.
-
-</li><li> For any section Entitled “Acknowledgements” or “Dedications”, Preserve
-the Title of the section, and preserve in the section all the
-substance and tone of each of the contributor acknowledgements and/or
-dedications given therein.
-
-</li><li> Preserve all the Invariant Sections of the Document,
-unaltered in their text and in their titles. Section numbers
-or the equivalent are not considered part of the section titles.
-
-</li><li> Delete any section Entitled “Endorsements”. Such a section
-may not be included in the Modified Version.
-
-</li><li> Do not retitle any existing section to be Entitled “Endorsements” or
-to conflict in title with any Invariant Section.
-
-</li><li> Preserve any Warranty Disclaimers.
-</li></ol>
-
-<p>If the Modified Version includes new front-matter sections or
-appendices that qualify as Secondary Sections and contain no material
-copied from the Document, you may at your option designate some or all
-of these sections as invariant. To do this, add their titles to the
-list of Invariant Sections in the Modified Version`s license notice.
-These titles must be distinct from any other section titles.
-</p>
-<p>You may add a section Entitled “Endorsements”, provided it contains
-nothing but endorsements of your Modified Version by various
-parties—for example, statements of peer review or that the text has
-been approved by an organization as the authoritative definition of a
-standard.
-</p>
-<p>You may add a passage of up to five words as a Front-Cover Text, and a
-passage of up to 25 words as a Back-Cover Text, to the end of the list
-of Cover Texts in the Modified Version. Only one passage of
-Front-Cover Text and one of Back-Cover Text may be added by (or
-through arrangements made by) any one entity. If the Document already
-includes a cover text for the same cover, previously added by you or
-by arrangement made by the same entity you are acting on behalf of,
-you may not add another; but you may replace the old one, on explicit
-permission from the previous publisher that added the old one.
-</p>
-<p>The author(s) and publisher(s) of the Document do not by this License
-give permission to use their names for publicity for or to assert or
-imply endorsement of any Modified Version.
-</p>
-</li><li> COMBINING DOCUMENTS
-
-<p>You may combine the Document with other documents released under this
-License, under the terms defined in section 4 above for modified
-versions, provided that you include in the combination all of the
-Invariant Sections of all of the original documents, unmodified, and
-list them all as Invariant Sections of your combined work in its
-license notice, and that you preserve all their Warranty Disclaimers.
-</p>
-<p>The combined work need only contain one copy of this License, and
-multiple identical Invariant Sections may be replaced with a single
-copy. If there are multiple Invariant Sections with the same name but
-different contents, make the title of each such section unique by
-adding at the end of it, in parentheses, the name of the original
-author or publisher of that section if known, or else a unique number.
-Make the same adjustment to the section titles in the list of
-Invariant Sections in the license notice of the combined work.
-</p>
-<p>In the combination, you must combine any sections Entitled “History”
-in the various original documents, forming one section Entitled
-“History”; likewise combine any sections Entitled “Acknowledgements”,
-and any sections Entitled “Dedications”. You must delete all
-sections Entitled “Endorsements.”
-</p>
-</li><li> COLLECTIONS OF DOCUMENTS
-
-<p>You may make a collection consisting of the Document and other documents
-released under this License, and replace the individual copies of this
-License in the various documents with a single copy that is included in
-the collection, provided that you follow the rules of this License for
-verbatim copying of each of the documents in all other respects.
-</p>
-<p>You may extract a single document from such a collection, and distribute
-it individually under this License, provided you insert a copy of this
-License into the extracted document, and follow this License in all
-other respects regarding verbatim copying of that document.
-</p>
-</li><li> AGGREGATION WITH INDEPENDENT WORKS
-
-<p>A compilation of the Document or its derivatives with other separate
-and independent documents or works, in or on a volume of a storage or
-distribution medium, is called an “aggregate” if the copyright
-resulting from the compilation is not used to limit the legal rights
-of the compilation`s users beyond what the individual works permit.
-When the Document is included in an aggregate, this License does not
-apply to the other works in the aggregate which are not themselves
-derivative works of the Document.
-</p>
-<p>If the Cover Text requirement of section 3 is applicable to these
-copies of the Document, then if the Document is less than one half of
-the entire aggregate, the Document`s Cover Texts may be placed on
-covers that bracket the Document within the aggregate, or the
-electronic equivalent of covers if the Document is in electronic form.
-Otherwise they must appear on printed covers that bracket the whole
-aggregate.
-</p>
-</li><li> TRANSLATION
-
-<p>Translation is considered a kind of modification, so you may
-distribute translations of the Document under the terms of section 4.
-Replacing Invariant Sections with translations requires special
-permission from their copyright holders, but you may include
-translations of some or all Invariant Sections in addition to the
-original versions of these Invariant Sections. You may include a
-translation of this License, and all the license notices in the
-Document, and any Warranty Disclaimers, provided that you also include
-the original English version of this License and the original versions
-of those notices and disclaimers. In case of a disagreement between
-the translation and the original version of this License or a notice
-or disclaimer, the original version will prevail.
-</p>
-<p>If a section in the Document is Entitled “Acknowledgements”,
-“Dedications”, or “History”, the requirement (section 4) to Preserve
-its Title (section 1) will typically require changing the actual
-title.
-</p>
-</li><li> TERMINATION
-
-<p>You may not copy, modify, sublicense, or distribute the Document except
-as expressly provided for under this License. Any other attempt to
-copy, modify, sublicense or distribute the Document is void, and will
-automatically terminate your rights under this License. However,
-parties who have received copies, or rights, from you under this
-License will not have their licenses terminated so long as such
-parties remain in full compliance.
-</p>
-</li><li> FUTURE REVISIONS OF THIS LICENSE
-
-<p>The Free Software Foundation may publish new, revised versions
-of the GNU Free Documentation License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns. See
-<a href="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</a>.
-</p>
-<p>Each version of the License is given a distinguishing version number.
-If the Document specifies that a particular numbered version of this
-License “or any later version” applies to it, you have the option of
-following the terms and conditions either of that specified version or
-of any later version that has been published (not as a draft) by the
-Free Software Foundation. If the Document does not specify a version
-number of this License, you may choose any version ever published (not
-as a draft) by the Free Software Foundation.
-</p></li></ol>
-
-<a name="ADDENDUM_003a-How-to-use-this-License-for-your-documents"></a>
-<h3 class="heading">ADDENDUM: How to use this License for your documents</h3>
-
-<p>To use this License in a document you have written, include a copy of
-the License in the document and put the following copyright and
-license notices just after the title page:
-</p>
-<div class="smallexample">
-<pre class="smallexample"> Copyright (C) <var>year</var> <var>your name</var>.
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.2
- or any later version published by the Free Software Foundation;
- with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
- Texts. A copy of the license is included in the section entitled ``GNU
- Free Documentation License''.
-</pre></div>
-
-<p>If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
-replace the “with…Texts.” line with this:
-</p>
-<div class="smallexample">
-<pre class="smallexample"> with the Invariant Sections being <var>list their titles</var>, with
- the Front-Cover Texts being <var>list</var>, and with the Back-Cover Texts
- being <var>list</var>.
-</pre></div>
-
-<p>If you have Invariant Sections without Cover Texts, or some other
-combination of the three, merge those two alternatives to suit the
-situation.
-</p>
-<p>If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License,
-to permit their use in free software.
-</p>
-
-
-<hr>
-<a name="Index"></a>
-<div class="header">
-<p>
-Previous: <a href="#Copying-This-Manual" accesskey="p" rel="prev">Copying This Manual</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
-</div>
-<a name="Index-1"></a>
-<h2 class="unnumbered">Index</h2>
-
-<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Index_cp_letter-A"><b>A</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-B"><b>B</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-C"><b>C</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-D"><b>D</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-E"><b>E</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-F"><b>F</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-G"><b>G</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-H"><b>H</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-I"><b>I</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-J"><b>J</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-L"><b>L</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-M"><b>M</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-N"><b>N</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-O"><b>O</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-P"><b>P</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Q"><b>Q</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-R"><b>R</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-S"><b>S</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-T"><b>T</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-V"><b>V</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-W"><b>W</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-X"><b>X</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Y"><b>Y</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Z"><b>Z</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Н"><b>Н</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-С"><b>С</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Т"><b>Т</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Ц"><b>Ц</b></a>
-
-</td></tr></table>
-<table class="index-cp" border="0">
-<tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-A">A</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-AddLegend">AddLegend</a>:</td><td> </td><td valign="top"><a href="#Legend">Legend</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Adjust">Adjust</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-alpha">alpha</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Alpha">Alpha</a>:</td><td> </td><td valign="top"><a href="#Transparency">Transparency</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-alphadef">alphadef</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-AlphaDef">AlphaDef</a>:</td><td> </td><td valign="top"><a href="#Transparency">Transparency</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Ambient">Ambient</a>:</td><td> </td><td valign="top"><a href="#Lighting">Lighting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Area">Area</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ArrowSize">ArrowSize</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ask">ask</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Aspect">Aspect</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-AutoCorrel">AutoCorrel</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Axial">Axial</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Axis">Axis</a>:</td><td> </td><td valign="top"><a href="#Curved-coordinates">Curved coordinates</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Axis-1">Axis</a>:</td><td> </td><td valign="top"><a href="#Axis-and-Colorbar">Axis and Colorbar</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-AxisStl">AxisStl</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-B">B</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Ball">Ball</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Barh">Barh</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Bars">Bars</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-BarWidth">BarWidth</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Beam">Beam</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Belt">Belt</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Box">Box</a>:</td><td> </td><td valign="top"><a href="#Axis-and-Colorbar">Axis and Colorbar</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-BoxPlot">BoxPlot</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Boxs">Boxs</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-C">C</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-call">call</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Candle">Candle</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Chart">Chart</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-chdir">chdir</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Clean">Clean</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ClearLegend">ClearLegend</a>:</td><td> </td><td valign="top"><a href="#Legend">Legend</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Clf">Clf</a>:</td><td> </td><td valign="top"><a href="#Background">Background</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cloud">Cloud</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Colorbar">Colorbar</a>:</td><td> </td><td valign="top"><a href="#Axis-and-Colorbar">Axis and Colorbar</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Column">Column</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ColumnPlot">ColumnPlot</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Combine">Combine</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cone">Cone</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cones">Cones</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cont">Cont</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cont3">Cont3</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ContD">ContD</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ContF">ContF</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ContF3">ContF3</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ContFXYZ">ContFXYZ</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ContXYZ">ContXYZ</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Correl">Correl</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CosFFT">CosFFT</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CRange">CRange</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Create">Create</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Crop">Crop</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Crust">Crust</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CTick">CTick</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-CumSum">CumSum</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Curve">Curve</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-cut">cut</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cut">Cut</a>:</td><td> </td><td valign="top"><a href="#Cutting">Cutting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-D">D</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-DataGrid">DataGrid</a>:</td><td> </td><td valign="top"><a href="#Data-manipulation">Data manipulation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-defchr">defchr</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-define">define</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-defnum">defnum</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Delete">Delete</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Dens">Dens</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Dens3">Dens3</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-DensXYZ">DensXYZ</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Dew">Dew</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Diff">Diff</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Diff2">Diff2</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-do">do</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Dots">Dots</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Drop">Drop</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-E">E</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-else">else</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-elseif">elseif</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-endif">endif</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Envelop">Envelop</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Error">Error</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Evaluate">Evaluate</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Export">Export</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Extend">Extend</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-F">F</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Face">Face</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FaceX">FaceX</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FaceY">FaceY</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FaceZ">FaceZ</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fall">Fall</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-fgets">fgets</a>:</td><td> </td><td valign="top"><a href="#Text-printing">Text printing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fill">Fill</a>:</td><td> </td><td valign="top"><a href="#Data-manipulation">Data manipulation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fill-1">Fill</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fit">Fit</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fit2">Fit2</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fit3">Fit3</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FitS">FitS</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Flow">Flow</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FlowP">FlowP</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Fog">Fog</a>:</td><td> </td><td valign="top"><a href="#Fog">Fog</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Font">Font</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-fontsize">fontsize</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-for">for</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FPlot">FPlot</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-FSurf">FSurf</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-func">func</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-G">G</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-GetNx">GetNx</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-GetNy">GetNy</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-GetNz">GetNz</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Glyph">Glyph</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Grad">Grad</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Grid">Grid</a>:</td><td> </td><td valign="top"><a href="#Axis-and-Colorbar">Axis and Colorbar</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Grid-1">Grid</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Grid3">Grid3</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-H">H</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Hankel">Hankel</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Hist">Hist</a>:</td><td> </td><td valign="top"><a href="#Data-manipulation">Data manipulation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Hist-1">Hist</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-I">I</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-if">if</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Import">Import</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-InPlot">InPlot</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Insert">Insert</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Integral">Integral</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-J">J</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Join">Join</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-L">L</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Label">Label</a>:</td><td> </td><td valign="top"><a href="#Axis-and-Colorbar">Axis and Colorbar</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Label-1">Label</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-legend">legend</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Legend">Legend</a>:</td><td> </td><td valign="top"><a href="#Legend">Legend</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Light">Light</a>:</td><td> </td><td valign="top"><a href="#Lighting">Lighting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Line">Line</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-List">List</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-load">load</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-LoadBackground">LoadBackground</a>:</td><td> </td><td valign="top"><a href="#Background">Background</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-M">M</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Map">Map</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Mark">Mark</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-MarkSize">MarkSize</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Max">Max</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Maximal">Maximal</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Mesh">Mesh</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-meshnum">meshnum</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-MeshNum">MeshNum</a>:</td><td> </td><td valign="top"><a href="#Default-sizes">Default sizes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglData">mglData</a>:</td><td> </td><td valign="top"><a href="#Data-constructor">Data constructor</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglFitPnts">mglFitPnts</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-mglGraph">mglGraph</a>:</td><td> </td><td valign="top"><a href="#MathGL-core">MathGL core</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Min">Min</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Minimal">Minimal</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Mirror">Mirror</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Modify">Modify</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Momentum">Momentum</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Momentum-1">Momentum</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-MultiPlot">MultiPlot</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-N">N</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-next">next</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Norm">Norm</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-NormSl">NormSl</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-O">O</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-once">once</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Origin">Origin</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-P">P</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Palette">Palette</a>:</td><td> </td><td valign="top"><a href="#Palette-and-colors">Palette and colors</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Perspective">Perspective</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Pipe">Pipe</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Plot">Plot</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Pop">Pop</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-PrintInfo">PrintInfo</a>:</td><td> </td><td valign="top"><a href="#Data-information">Data information</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Push">Push</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-PutsFit">PutsFit</a>:</td><td> </td><td valign="top"><a href="#Nonlinear-fitting">Nonlinear fitting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-Q">Q</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-QuadPlot">QuadPlot</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-R">R</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Radar">Radar</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Ranges">Ranges</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Rasterize">Rasterize</a>:</td><td> </td><td valign="top"><a href="#Background">Background</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Read">Read</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ReadAll">ReadAll</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ReadHDF">ReadHDF</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ReadMat">ReadMat</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ReadRange">ReadRange</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Rearrange">Rearrange</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Refill">Refill</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Region">Region</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Resize">Resize</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-return">return</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-rkstep">rkstep</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Roll">Roll</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Roots">Roots</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Rotate">Rotate</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-RotateN">RotateN</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-RotateText">RotateText</a>:</td><td> </td><td valign="top"><a href="#Font-settings">Font settings</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-S">S</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Save">Save</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SaveHDF">SaveHDF</a>:</td><td> </td><td valign="top"><a href="#File-I_002fO">File I/O</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Set">Set</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetLegendBox">SetLegendBox</a>:</td><td> </td><td valign="top"><a href="#Legend">Legend</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetLegendMarks">SetLegendMarks</a>:</td><td> </td><td valign="top"><a href="#Legend">Legend</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetMask">SetMask</a>:</td><td> </td><td valign="top"><a href="#Masks">Masks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetMaskAngle">SetMaskAngle</a>:</td><td> </td><td valign="top"><a href="#Masks">Masks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SetSize">SetSize</a>:</td><td> </td><td valign="top"><a href="#Export-picture">Export picture</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Sew">Sew</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SinFFT">SinFFT</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Smooth">Smooth</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Sort">Sort</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Sphere">Sphere</a>:</td><td> </td><td valign="top"><a href="#Primitives">Primitives</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Squeeze">Squeeze</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Stem">Stem</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Step">Step</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-STFA">STFA</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-StickPlot">StickPlot</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-stop">stop</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SubData">SubData</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SubPlot">SubPlot</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Sum">Sum</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Surf">Surf</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Surf3">Surf3</a>:</td><td> </td><td valign="top"><a href="#g_t3D-plotting">3D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Surf3A">Surf3A</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Surf3C">Surf3C</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SurfA">SurfA</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-SurfC">SurfC</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Swap">Swap</a>:</td><td> </td><td valign="top"><a href="#Data-changing">Data changing</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-T">T</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Tape">Tape</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Tens">Tens</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Text">Text</a>:</td><td> </td><td valign="top"><a href="#Text-printing">Text printing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TextMark">TextMark</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TickLen">TickLen</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Tile">Tile</a>:</td><td> </td><td valign="top"><a href="#g_t2D-plotting">2D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TileS">TileS</a>:</td><td> </td><td valign="top"><a href="#Dual-plotting">Dual plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Title">Title</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Torus">Torus</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Trace">Trace</a>:</td><td> </td><td valign="top"><a href="#Make-another-data">Make another data</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Traj">Traj</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Transpose">Transpose</a>:</td><td> </td><td valign="top"><a href="#Data-resizing">Data resizing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TranspType">TranspType</a>:</td><td> </td><td valign="top"><a href="#Transparency">Transparency</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TriCont">TriCont</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-TriPlot">TriPlot</a>:</td><td> </td><td valign="top"><a href="#Other-plotting">Other plotting</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Tube">Tube</a>:</td><td> </td><td valign="top"><a href="#g_t1D-plotting">1D plotting</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-V">V</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-value">value</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Var">Var</a>:</td><td> </td><td valign="top"><a href="#Data-filling">Data filling</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-variant">variant</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Vect">Vect</a>:</td><td> </td><td valign="top"><a href="#Vector-fields">Vector fields</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-View">View</a>:</td><td> </td><td valign="top"><a href="#Subplots-and-rotation">Subplots and rotation</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-W">W</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-while">while</a>:</td><td> </td><td valign="top"><a href="#Program-flow-commands">Program flow commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Write">Write</a>:</td><td> </td><td valign="top"><a href="#Export-to-file">Export to file</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-X">X</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-xrange">xrange</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-XRange">XRange</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-XTick">XTick</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-Y">Y</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-yrange">yrange</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-YRange">YRange</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-YTick">YTick</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-Z">Z</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-zrange">zrange</a>:</td><td> </td><td valign="top"><a href="#Command-options">Command options</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ZRange">ZRange</a>:</td><td> </td><td valign="top"><a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-ZTick">ZTick</a>:</td><td> </td><td valign="top"><a href="#Ticks">Ticks</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-Н">Н</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Nastroika-MathGL">Настройка MathGL</a>:</td><td> </td><td valign="top"><a href="#Graphics-setup">Graphics setup</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-С">С</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Stilx-linii">Стиль линий</a>:</td><td> </td><td valign="top"><a href="#Line-styles">Line styles</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Stilx-markerov">Стиль маркеров</a>:</td><td> </td><td valign="top"><a href="#Line-styles">Line styles</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Stilx-strelok">Стиль стрелок</a>:</td><td> </td><td valign="top"><a href="#Line-styles">Line styles</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Stilx-teksta">Стиль текста</a>:</td><td> </td><td valign="top"><a href="#Font-styles">Font styles</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-Т">Т</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Tekstovye-formuly">Текстовые формулы</a>:</td><td> </td><td valign="top"><a href="#Textual-formulas">Textual formulas</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-Ц">Ц</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Cvetovaya-skhema">Цветовая схема</a>:</td><td> </td><td valign="top"><a href="#Color-scheme">Color scheme</a></td></tr>
-<tr><td colspan="4"> <hr></td></tr>
-</table>
-<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Index_cp_letter-A"><b>A</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-B"><b>B</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-C"><b>C</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-D"><b>D</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-E"><b>E</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-F"><b>F</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-G"><b>G</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-H"><b>H</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-I"><b>I</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-J"><b>J</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-L"><b>L</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-M"><b>M</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-N"><b>N</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-O"><b>O</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-P"><b>P</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Q"><b>Q</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-R"><b>R</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-S"><b>S</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-T"><b>T</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-V"><b>V</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-W"><b>W</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-X"><b>X</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Y"><b>Y</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Z"><b>Z</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Н"><b>Н</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-С"><b>С</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Т"><b>Т</b></a>
-
-<a class="summary-letter" href="#Index_cp_letter-Ц"><b>Ц</b></a>
-
-</td></tr></table>
-
-<hr>
-
-
-
-</body>
-</html>
-sed -i -- 's/<head>/<head><link rel="stylesheet" href="styles.css">/g' *_*.html
-sed -i -- 's/<body lang="en">/<body lang="en"><div class="topnav" id="myTopnav"><\/div><div class="main">/g' *_*.html
-sed -i -- 's/<body lang="ru">/<body lang="ru"><div class="topnav" id="myTopnav"><\/div><div class="main">/g' *_*.html
-sed -i -- 's/<\/body>/<\/div><script type="text\/javascript" src="accordion.js"><\/script><\/body>/g' *_*.html
-sed -i -- 's/.png.png/.png/g' *_*.html
cd doc_en/
sed -i -- 's/<head>/<head><link rel="stylesheet" href="..\/styles.css">/g' *.html
sed -i -- 's/<body lang="en">/<body lang="en"><div class="topnav" id="myTopnav"><\/div><div class="main">/g' *.html
void Animation(); ///< Run animation (I'm too lasy to change it)
void MakeDialog(const char *ids, char const * const *args, const char *title="")
{ if(GetNumFig()==1) mgl->dialog(ids,args,title); }
+ void *Window() {return Wnd;} ///< Return pointer to widget (Fl_Window*) used for plotting
+ void *Widget() {return mgl;} ///< Return pointer to widget (Fl_MGLView*) used for plotting
+ void WndSize(int w, int h) { Wnd->size(w,h); } ///< Resize window
+ void WndMove(int x, int y) { Wnd->position(x,y); } ///< Move window
};
//-----------------------------------------------------------------------------
void MGL_EXPORT mgl_ask_fltk(const wchar_t *quest, wchar_t *res)
g->mgl->FMGL->set_handle_key(true);
return g;
}
-void* mgl_fltk_widget(HMGL gr)
+MGL_EXPORT_PURE void* mgl_fltk_widget(HMGL gr)
{
mglCanvasFL *g = dynamic_cast<mglCanvasFL *>(gr);
return g?g->mgl:NULL;
void GotoFrame(int d); ///< Show arbitrary frame (use relative step)
void Animation(); ///< Run slideshow (animation) of frames
void MakeDialog(const char *ids, char const * const *args, const char *title=""){} // TODO
+ void *Window() {return Wnd;} ///< Return pointer to widget (QMainWindow*) used for plotting
+ void *Widget() {return QMGL;} ///< Return pointer to widget (QMathGL*) used for plotting
+ void WndSize(int w, int h) { Wnd->resize(w,h); } ///< Resize window
+ void WndMove(int x, int y) { Wnd->move(x,y); } ///< Move window
protected:
g->Window(0,0,draw,title,par,load);
return g;
}
-void* mgl_qt_widget(HMGL gr)
+MGL_EXPORT_PURE void* mgl_qt_widget(HMGL gr)
{
mglCanvasQT *g = dynamic_cast<mglCanvasQT *>(gr);
return g?g->QMGL:NULL;