This file is indexed.

/usr/share/doc/mathgl/mathgl_en/mathgl_en_31.html is in mathgl-doc-en 2.1.3.1-4ubuntu3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- This manual is for MathGL (version 2.1.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 on December 22, 2013 by texi2html 1.82
texi2html was written by: 
            Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people.
Send bugs and suggestions to <texi2html-bug@nongnu.org>
-->
<head>
<title>MathGL 2.1.2: 4.2 Graphics setup</title>

<meta name="description" content="MathGL 2.1.2: 4.2 Graphics setup">
<meta name="keywords" content="MathGL 2.1.2: 4.2 Graphics setup">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.82">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.roman {font-family:serif; font-weight:normal;}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="Graphics-setup"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="mathgl_en_30.html#Constructor" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Transparency" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en_29.html#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_29.html#MathGL-core" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_47.html#Widget-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_88.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Graphics-setup-1"></a>
<h2 class="section">4.2 Graphics setup</h2>
<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>
<dl>
<dt><a name="index-DefaultPlotParam"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>DefaultPlotParam</b><i> ()</i></dt>
<dt><a name="index-mgl_005fset_005fdef_005fparam"></a><u>C function:</u> <code>void</code> <b>mgl_set_def_param</b><i> (<code>HMGL</code> gr)</i></dt>
<dd><p>Restore initial values for all of parameters.
</p></dd></dl>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#Transparency">4.2.1 Transparency</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#Lighting">4.2.2 Lighting</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#Fog">4.2.3 Fog</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#Default-sizes">4.2.4 Default sizes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#Cutting">4.2.5 Cutting</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#Font-settings">4.2.6 Font settings</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#Palette-and-colors">4.2.7 Palette and colors</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#Error-handling">4.2.8 Error handling</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>

<hr size="6">
<a name="Transparency"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Graphics-setup" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Lighting" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en_29.html#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Graphics-setup" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_47.html#Widget-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_88.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Transparency-1"></a>
<h3 class="subsection">4.2.1 Transparency</h3>
<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 section <a href="mathgl_en_18.html#Transparency-and-lighting">Transparency and lighting</a>, for sample code and picture.
</p>
<p><a name="alpha"></a>
</p><dl>
<dt><a name="index-alpha-2"></a><u>MGL command:</u> <b>alpha</b><i> <code>[val=on]</code></i></dt>
<dt><a name="index-Alpha-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>Alpha</b><i> (<code>bool</code> enable)</i></dt>
<dt><a name="index-mgl_005fset_005falpha"></a><u>C function:</u> <code>void</code> <b>mgl_set_alpha</b><i> (<code>HMGL</code> gr, <code>int</code> enable)</i></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>

<p><a name="alphadef"></a>
</p><dl>
<dt><a name="index-alphadef-1"></a><u>MGL command:</u> <b>alphadef</b><i> <code>val</code></i></dt>
<dt><a name="index-SetAlphaDef-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>SetAlphaDef</b><i> (<code>mreal</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005falpha_005fdefault"></a><u>C function:</u> <code>void</code> <b>mgl_set_alpha_default</b><i> (<code>HMGL</code> gr, <code>mreal</code> alpha)</i></dt>
<dd><p>Sets default value of alpha channel (transparency) for all plotting functions. Initial value is 0.5.
</p></dd></dl>

<p><a name="transptype"></a>
</p><dl>
<dt><a name="index-transptype"></a><u>MGL command:</u> <b>transptype</b><i> <code>val</code></i></dt>
<dt><a name="index-SetTranspType-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>SetTranspType</b><i> (<code>int</code> type)</i></dt>
<dt><a name="index-mgl_005fset_005ftransp_005ftype"></a><u>C function:</u> <code>void</code> <b>mgl_set_transp_type</b><i> (<code>HMGL</code> gr, <code>int</code> type)</i></dt>
<dd><p>Set the type of transparency. Possible values are:
</p><ul>
<li>
Normal transparency (&lsquo;<samp>0</samp>&rsquo;) &ndash; 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 (&lsquo;<samp>1</samp>&rsquo;) &ndash; below and upper things are commutable and just decrease intensity of light by RGB channel.
</li><li>
Lamp-like transparency (&lsquo;<samp>2</samp>&rsquo;) &ndash; 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 section <a href="mathgl_en_18.html#Types-of-transparency">Types of transparency</a>, for sample code and picture..
</p></dd></dl>

<hr size="6">
<a name="Lighting"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Transparency" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Fog" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en_29.html#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Graphics-setup" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_47.html#Widget-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_88.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Lighting-1"></a>
<h3 class="subsection">4.2.2 Lighting</h3>
<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.
</p>
<p><a name="light"></a>
</p><dl>
<dt><a name="index-light"></a><u>MGL command:</u> <b>light</b><i> <code>[val=on]</code></i></dt>
<dt><a name="index-Light-1"></a><u>Method on <code>mglGraph</code>:</u> <code>bool</code> <b>Light</b><i> (<code>bool</code> enable)</i></dt>
<dt><a name="index-mgl_005fset_005flight"></a><u>C function:</u> <code>void</code> <b>mgl_set_light</b><i> (<code>HMGL</code> gr, <code>int</code> enable)</i></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><u>MGL command:</u> <b>light</b><i> <code>num</code> <code>val</code></i></dt>
<dt><a name="index-Light-2"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>Light</b><i> (<code>int</code> n, <code>bool</code> enable)</i></dt>
<dt><a name="index-mgl_005fset_005flight_005fn"></a><u>C function:</u> <code>void</code> <b>mgl_set_light_n</b><i> (<code>HMGL</code> gr, <code>int</code> n, <code>int</code> enable)</i></dt>
<dd><p>Switch on/off <var>n</var>-th light source separately.
</p></dd></dl>

<dl>
<dt><a name="index-light-2"></a><u>MGL command:</u> <b>light</b><i> <code>num xdir ydir zdir</code> ['col'='w' <code>br=0.5</code>]</i></dt>
<dt><a name="index-light-3"></a><u>MGL command:</u> <b>light</b><i> <code>num xdir ydir zdir xpos ypos zpos</code> ['col'='w' <code>br=0.5</code>]</i></dt>
<dt><a name="index-AddLight-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>AddLight</b><i> (<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>)</i></dt>
<dt><a name="index-AddLight-2"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>AddLight</b><i> (<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>)</i></dt>
<dt><a name="index-mgl_005fadd_005flight"></a><u>C function:</u> <code>void</code> <b>mgl_add_light</b><i> (<code>HMGL</code> gr, <code>int</code> n, <code>mreal</code> dx, <code>mreal</code> dy, <code>mreal</code> dz)</i></dt>
<dt><a name="index-mgl_005fadd_005flight_005fext"></a><u>C function:</u> <code>void</code> <b>mgl_add_light_ext</b><i> (<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)</i></dt>
<dt><a name="index-mgl_005fadd_005flight_005floc"></a><u>C function:</u> <code>void</code> <b>mgl_add_light_loc</b><i> (<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)</i></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&rsquo;t NAN then light source is supposed to be local otherwise light source is supposed to be placed at infinity.
</p></dd></dl>

<p><a name="diffuse"></a>
</p><dl>
<dt><a name="index-SetDifLight"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>SetDifLight</b><i> (<code>bool</code> enable)</i></dt>
<dt><a name="index-mgl_005fset_005flight_005fdif"></a><u>C function:</u> <code>void</code> <b>mgl_set_light_dif</b><i> (<code>HMGL</code> gr, <code>int</code> enable)</i></dt>
<dd><p>Set on/off to use diffusive light (only for local light sources).
</p></dd></dl>

<p><a name="ambient"></a>
</p><dl>
<dt><a name="index-ambient"></a><u>MGL command:</u> <b>ambient</b><i> <code>val</code></i></dt>
<dt><a name="index-SetAmbient-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>SetAmbient</b><i> (<code>mreal</code> bright=<code>0.5</code>)</i></dt>
<dt><a name="index-mgl_005fset_005fambbr"></a><u>C function:</u> <code>void</code> <b>mgl_set_ambbr</b><i> (<code>HMGL</code> gr, <code>mreal</code> bright)</i></dt>
<dd><p>Sets the brightness of ambient light. The value should be in range [0,1].
</p></dd></dl>

<hr size="6">
<a name="Fog"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Lighting" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Default-sizes" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en_29.html#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Graphics-setup" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_47.html#Widget-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_88.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Fog-1"></a>
<h3 class="subsection">4.2.3 Fog</h3>
<a name="index-Fog"></a>

<p><a name="fog"></a>
</p><dl>
<dt><a name="index-fog"></a><u>MGL command:</u> <b>fog</b><i> <code>val [dz=0.25]</code></i></dt>
<dt><a name="index-Fog-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>Fog</b><i> (<code>mreal</code> d, <code>mreal</code> dz=<code>0.25</code>)</i></dt>
<dt><a name="index-mgl_005fset_005ffog"></a><u>C function:</u> <code>void</code> <b>mgl_set_fog</b><i> (<code>HMGL</code> gr, <code>mreal</code> d, <code>mreal</code> dz)</i></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 section <a href="mathgl_en_18.html#Adding-fog">Adding fog</a>, for sample code and picture.
</p></dd></dl>

<hr size="6">
<a name="Default-sizes"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Fog" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Cutting" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en_29.html#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Graphics-setup" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_47.html#Widget-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_88.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Default-sizes-1"></a>
<h3 class="subsection">4.2.4 Default sizes</h3>
<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>
<p><a name="barwidth"></a>
</p><dl>
<dt><a name="index-barwidth"></a><u>MGL command:</u> <b>barwidth</b><i> <code>val</code></i></dt>
<dt><a name="index-SetBarWidth-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>SetBarWidth</b><i> ( <code>mreal</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005fbar_005fwidth"></a><u>C function:</u> <code>void</code> <b>mgl_set_bar_width</b><i> (<code>HMGL</code> gr, <code>mreal</code> val)</i></dt>
<dd><p>Sets relative width of rectangles in <a href="mathgl_en_39.html#bars">bars</a>, <a href="mathgl_en_39.html#barh">barh</a>, <a href="mathgl_en_39.html#boxplot">boxplot</a>, <a href="mathgl_en_39.html#candle">candle</a>. Default value is <code>0.7</code>.
</p></dd></dl>

<p><a name="marksize"></a>
</p><dl>
<dt><a name="index-marksize"></a><u>MGL command:</u> <b>marksize</b><i> <code>val</code></i></dt>
<dt><a name="index-SetMarkSize-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>SetMarkSize</b><i> (<code>mreal</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005fmark_005fsize"></a><u>C function:</u> <code>void</code> <b>mgl_set_mark_size</b><i> (<code>HMGL</code> gr, <code>mreal</code> val)</i></dt>
<dd><p>Sets size of marks for <a href="mathgl_en_39.html#g_t1D-plotting">1D plotting</a>. Default value is <code>1</code>.
</p></dd></dl>

<p><a name="arrowsize"></a>
</p><dl>
<dt><a name="index-arrowsize"></a><u>MGL command:</u> <b>arrowsize</b><i> <code>val</code></i></dt>
<dt><a name="index-SetArrowSize-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>SetArrowSize</b><i> (<code>mreal</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005farrow_005fsize"></a><u>C function:</u> <code>void</code> <b>mgl_set_arrow_size</b><i> (<code>HMGL</code> gr, <code>mreal</code> val)</i></dt>
<dd><p>Sets size of arrows for <a href="mathgl_en_39.html#g_t1D-plotting">1D plotting</a>, lines and curves (see <a href="mathgl_en_35.html#Primitives">Primitives</a>). Default value is <code>1</code>.
</p></dd></dl>

<p><a name="meshnum"></a>
<a name="MeshNum"></a>
</p><dl>
<dt><a name="index-meshnum-2"></a><u>MGL command:</u> <b>meshnum</b><i> <code>val</code></i></dt>
<dt><a name="index-SetMeshNum-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>SetMeshNum</b><i> (<code>int</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005fmeshnum"></a><u>C function:</u> <code>void</code> <b>mgl_set_meshnum</b><i> (<code>HMGL</code> gr, <code>int</code> num)</i></dt>
<dd><p>Sets approximate number of lines in <a href="mathgl_en_40.html#mesh">mesh</a>, <a href="mathgl_en_40.html#fall">fall</a>, <a href="mathgl_en_37.html#grid">grid</a> and also the number of hachures in <a href="mathgl_en_43.html#vect">vect</a>, <a href="mathgl_en_43.html#dew">dew</a> and the number of cells in <a href="mathgl_en_41.html#cloud">cloud</a>. By default (=0) it draws all lines/hachures/cells.
</p></dd></dl>

<p><a name="facenum"></a>
</p><dl>
<dt><a name="index-facenum"></a><u>MGL command:</u> <b>facenum</b><i> <code>val</code></i></dt>
<dt><a name="index-SetFaceNum"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>SetFaceNum</b><i> (<code>int</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005ffacenum"></a><u>C function:</u> <code>void</code> <b>mgl_set_facenum</b><i> (<code>HMGL</code> gr, <code>int</code> num)</i></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>

<p><a name="plotid"></a>
</p><dl>
<dt><a name="index-plotid"></a><u>MGL command:</u> <b>plotid</b><i> 'id'</i></dt>
<dt><a name="index-SetPlotId-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>SetPlotId</b><i> (<code>const char *</code>id)</i></dt>
<dt><a name="index-mgl_005fset_005fplotid"></a><u>C function:</u> <code>void</code> <b>mgl_set_plotid</b><i> (<code>HMGL</code> gr, <code>const char *</code>id)</i></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><u>Method on <code>mglGraph</code>:</u> <code>const char *</code> <b>GetPlotId</b><i> ()</i></dt>
<dt><a name="index-mgl_005fget_005fplotid"></a><u>C function:</u> <code>const char *</code> <b>mgl_get_plotid</b><i> (<code>HMGL</code> gr)</i></dt>
<dd><p>Gets default name <var>id</var> as filename for saving (in FLTK window for example).
</p></dd></dl>

<hr size="6">
<a name="Cutting"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Default-sizes" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Font-settings" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en_29.html#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Graphics-setup" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_47.html#Widget-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_88.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Cutting-1"></a>
<h3 class="subsection">4.2.5 Cutting</h3>
<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 section <a href="mathgl_en_11.html#Cutting-sample">Cutting sample</a>, for sample code and picture.
</p>
<p><a name="cut"></a>
</p><dl>
<dt><a name="index-cut-2"></a><u>MGL command:</u> <b>cut</b><i> <code>val</code></i></dt>
<dt><a name="index-SetCut-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>SetCut</b><i> (<code>bool</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005fcut"></a><u>C function:</u> <code>void</code> <b>mgl_set_cut</b><i> (<code>HMGL</code> gr, <code>int</code> val)</i></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><u>MGL command:</u> <b>cut</b><i> <code>x1 y1 z1 x2 y2 z2</code></i></dt>
<dt><a name="index-SetCutBox-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>SetCutBox</b><i> (<code>mglPoint</code> p1, <code>mglPoint</code> p1)</i></dt>
<dt><a name="index-mgl_005fset_005fcut_005fbox"></a><u>C function:</u> <code>void</code> <b>mgl_set_cut_box</b><i> (<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)</i></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><u>MGL command:</u> <b>cut</b><i> 'cond'</i></dt>
<dt><a name="index-CutOff-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>CutOff</b><i> (<code>const char *</code>cond)</i></dt>
<dt><a name="index-mgl_005fset_005fcutoff"></a><u>C function:</u> <code>void</code> <b>mgl_set_cutoff</b><i> (<code>HMGL</code> gr, <code>const char *</code>cond)</i></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>&quot;&quot;</code> to disable cutting off condition.
</p></dd></dl>

<hr size="6">
<a name="Font-settings"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Cutting" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Palette-and-colors" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en_29.html#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Graphics-setup" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_47.html#Widget-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_88.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Font-settings-1"></a>
<h3 class="subsection">4.2.6 Font settings</h3>
<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>

<p><a name="font"></a>
</p><dl>
<dt><a name="index-font"></a><u>MGL command:</u> <b>font</b><i> 'fnt' [<code>val=6</code>]</i></dt>
<dd><p>Font style for text and labels (see text). Initial style is &rsquo;fnt&rsquo;=&rsquo;:rC&rsquo; 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="mathgl_en_25.html#Font-styles">Font styles</a>.
</p></dd></dl>

<p><a name="rotatetext"></a>
</p><dl>
<dt><a name="index-rotatetext"></a><u>MGL command:</u> <b>rotatetext</b><i> <code>val</code></i></dt>
<dt><a name="index-SetRotatedText-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>SetRotatedText</b><i> (<code>bool</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005frotated_005ftext"></a><u>C function:</u> <code>void</code> <b>mgl_set_rotated_text</b><i> (<code>HMGL</code> gr, <code>int</code> val)</i></dt>
<dd><p>Sets to use or not text rotation.
</p></dd></dl>

<p><a name="loadfont"></a>
</p><dl>
<dt><a name="index-loadfont"></a><u>MGL command:</u> <b>loadfont</b><i> ['name'='']</i></dt>
<dt><a name="index-LoadFont-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>LoadFont</b><i> (<code>const char *</code>name, <code>const char *</code>path=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fload_005ffont"></a><u>C function:</u> <code>void</code> <b>mgl_load_font</b><i> (<code>HMGL</code> gr, <code>const char *</code>name, <code>const char *</code>path)</i></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><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>SetFontDef</b><i> (<code>const char *</code>fnt)</i></dt>
<dt><a name="index-mgl_005fset_005ffont_005fdef"></a><u>C function:</u> <code>void</code> <b>mgl_set_font_def</b><i> (<code>HMGL</code> gr, <code>const char *</code> val)</i></dt>
<dd><p>Sets the font specification (see <a href="mathgl_en_36.html#Text-printing">Text printing</a>). Default is &lsquo;<samp>rC</samp>&rsquo; &ndash; Roman font centering.
</p></dd></dl>

<dl>
<dt><a name="index-SetFontSize-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>SetFontSize</b><i> (<code>mreal</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005ffont_005fsize"></a><u>C function:</u> <code>void</code> <b>mgl_set_font_size</b><i> (<code>HMGL</code> gr, <code>mreal</code> val)</i></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><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>SetFontSizePT</b><i> (<code>mreal</code> cm, <code>int</code> dpi=<code>72</code>)</i></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><u>Method on <code>mglGraph</code>:</u> <code>inline void</code> <b>SetFontSizeCM</b><i> (<code>mreal</code> cm, <code>int</code> dpi=<code>72</code>)</i></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><u>Method on <code>mglGraph</code>:</u> <code>inline void</code> <b>SetFontSizeIN</b><i> (<code>mreal</code> cm, <code>int</code> dpi=<code>72</code>)</i></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-LoadFont-2"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>LoadFont</b><i> (<code>const char *</code>name, <code>const char *</code>path=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fload_005ffont-1"></a><u>C function:</u> <code>void</code> <b>mgl_load_font</b><i> (<code>HMGL</code> gr, <code>const char *</code>name, <code>const char *</code>path)</i></dt>
<dd><p>Load font typeface from <var>path</var>/<var>name</var>.
</p></dd></dl>

<dl>
<dt><a name="index-CopyFont-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>CopyFont</b><i> (<code>mglGraph *</code> from)</i></dt>
<dt><a name="index-mgl_005fcopy_005ffont"></a><u>C function:</u> <code>void</code> <b>mgl_copy_font</b><i> (<code>HMGL</code> gr, <code>HMGL</code> gr_from)</i></dt>
<dd><p>Copy font data from another <code>mglGraph</code> object.
</p></dd></dl>

<dl>
<dt><a name="index-RestoreFont-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>RestoreFont</b><i> ()</i></dt>
<dt><a name="index-mgl_005frestore_005ffont"></a><u>C function:</u> <code>void</code> <b>mgl_restore_font</b><i> (<code>HMGL</code> gr)</i></dt>
<dd><p>Restore font data to default typeface.
</p></dd></dl>

<dl>
<dt><a name="index-mgl_005fdef_005ffont"></a><u>Функция С:</u> <code>void</code> <b>mgl_def_font</b><i> (<code>const char *</code>name, <code>const char *</code>path)</i></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 size="6">
<a name="Palette-and-colors"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Font-settings" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Error-handling" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en_29.html#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Graphics-setup" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_47.html#Widget-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_88.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Palette-and-colors-1"></a>
<h3 class="subsection">4.2.7 Palette and colors</h3>
<a name="index-SetPalette"></a>
<a name="index-Palette"></a>

<p><a name="palette"></a>
</p><dl>
<dt><a name="index-palette"></a><u>MGL command:</u> <b>palette</b><i> 'colors'</i></dt>
<dt><a name="index-SetPalette-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>SetPalette</b><i> (<code>const char *</code>colors)</i></dt>
<dt><a name="index-mgl_005fset_005fpalette"></a><u>C function:</u> <code>void</code> <b>mgl_set_palette</b><i> (<code>HMGL</code> gr, <code>const char *</code>colors)</i></dt>
<dd><p>Sets the palette as selected colors. Default value is <code>&quot;Hbgrcmyhlnqeup&quot;</code> that corresponds to colors: dark gray &lsquo;<samp>H</samp>&rsquo;, blue &lsquo;<samp>b</samp>&rsquo;, green &lsquo;<samp>g</samp>&rsquo;, red &lsquo;<samp>r</samp>&rsquo;, cyan &lsquo;<samp>c</samp>&rsquo;, magenta &lsquo;<samp>m</samp>&rsquo;, yellow &lsquo;<samp>y</samp>&rsquo;, gray &lsquo;<samp>h</samp>&rsquo;, blue-green &lsquo;<samp>l</samp>&rsquo;, sky-blue &lsquo;<samp>n</samp>&rsquo;, orange &lsquo;<samp>q</samp>&rsquo;, yellow-green &lsquo;<samp>e</samp>&rsquo;, blue-violet &lsquo;<samp>u</samp>&rsquo;, purple &lsquo;<samp>p</samp>&rsquo;. The palette is used mostly in 1D plots (see <a href="mathgl_en_39.html#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="mathgl_en_37.html#box">box</a> or <a href="mathgl_en_37.html#axis">axis</a> functions).
</p></dd></dl>

<dl>
<dt><a name="index-SetDefScheme"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>SetDefScheme</b><i> (<code>const char *</code>sch)</i></dt>
<dt><a name="index-mgl_005fset_005fdef_005fsch"></a><u>C function:</u> <code>void</code> <b>mgl_set_def_sch</b><i> (<code>HMGL</code> gr, <code>const char *</code>sch)</i></dt>
<dd><p>Sets the <var>sch</var> as default color scheme. Default value is <code>&quot;BbcyrR&quot;</code>.
</p></dd></dl>

<dl>
<dt><a name="index-mgl_005fset_005fcolor"></a><u>C function:</u> <code>void</code> <b>mgl_set_color</b><i> (<code>char</code> id, <code>mreal</code> r, <code>mreal</code> g, <code>mreal</code> b)</i></dt>
<dd><p>Sets RGB values for color with given <var>id</var>.
</p></dd></dl>

<hr size="6">
<a name="Error-handling"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Palette-and-colors" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_32.html#Axis-settings" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en_29.html#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Graphics-setup" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_47.html#Widget-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_88.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Error-handling-1"></a>
<h3 class="subsection">4.2.8 Error handling</h3>
<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>GetWarnCode()</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 &ndash; the plot just will not be drawn.
</p>
<dl>
<dt><a name="index-SetWarn-1"></a><u>Method on <code>mglGraph</code>:</u> <code>void</code> <b>SetWarn</b><i> (<code>int</code> code, <code>const char *</code>info=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fset_005fwarn"></a><u>C function:</u> <code>void</code> <b>mgl_set_warn</b><i> (<code>HMGL</code> gr, <code>int</code> code, <code>const char *</code>info)</i></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>&lt;0.
</p></dd></dl>

<dl>
<dt><a name="index-Message-1"></a><u>Method on <code>mglGraph</code>:</u> <code>const char *</code> <b>Message</b><i> ()</i></dt>
<dt><a name="index-mgl_005fget_005fmess"></a><u>C function:</u> <code>const char *</code> <b>mgl_get_mess</b><i> (<code>HMGL</code> gr)</i></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-GetWarnCode"></a><u>Method on <code>mglGraph</code>:</u> <code>int</code> <b>GetWarnCode</b><i> ()</i></dt>
<dt><a name="index-mgl_005fget_005fwarn_005fcode"></a><u>C function:</u> <code>int</code> <b>mgl_get_warn_code</b><i> (<code>HMGL</code> gr)</i></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>mglWarnLegA</code></dt>
<dd><p>Too many legend entries
</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&rsquo;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>
</dl>
</dd></dl>



<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Palette-and-colors" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_32.html#Axis-settings" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en_29.html#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Graphics-setup" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_47.html#Widget-classes" title="Next chapter"> &gt;&gt; </a>]</td>
</tr></table>
<p>
 <font size="-1">
  This document was generated by <em>Build Daemon user</em> on <em>December 22, 2013</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
 </font>
 <br>

</p>
</body>
</html>