Class: MathGL::MglGraph

Inherits:
Object
  • Object
show all
Defined in:
lib/mathgl/doc/libdoc_core_en.rb,
ext/mathgl/mathgl.cxx

Overview

Proxy of C++ MathGL::MglGraph class

Instance Method Summary collapse

Constructor Details

#initialize(kind = 0, width = 600, height = 400) ⇒ MglGraph #initialize(gr) ⇒ MglGraph

Create and delete objects. Creates the instance of class mglGraph with specified sizes width and height. Parameter kind may have following values: ‘0’ – use default plotter, ‘1’ – use OpenGL plotter.

Overloads:

  • #initialize(kind = 0, width = 600, height = 400) ⇒ MglGraph

    Parameters:

    • kind (Integer) (defaults to: 0)

      default=0

    • width (Integer) (defaults to: 600)

      default=600

    • height (Integer) (defaults to: 400)

      default=400

  • #initialize(gr) ⇒ MglGraph

    Parameters:



31
32
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 31

def initialize
end

Instance Method Details

#add_legend(text, style) ⇒ nil

Legend. Adds string text to internal legend accumulator. The style of described line and mark is specified in string style (see Line styles).

Parameters:

  • text (String)
  • style (String)

Returns:

  • (nil)


2083
2084
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2083

def add_legend
end

#add_light(n, d, c = 'w', bright = 0.5, ap = 0) ⇒ nil #add_light(n, r, d, c = 'w', bright = 0.5, ap = 0) ⇒ nil

Lighting. The function adds a light source with identification n in direction d with color c and with brightness bright (which must be in range (0,1)). If position r is specified and isn’t NAN then light source is supposed to be local otherwise light source is supposed to be placed at infinity.

Overloads:

  • #add_light(n, d, c = 'w', bright = 0.5, ap = 0) ⇒ nil

    Parameters:

    • n (Integer)
    • d (MglPoint)
    • c (String) (defaults to: 'w')

      default=‘w’

    • bright (Float) (defaults to: 0.5)

      default=0.5

    • ap (Float) (defaults to: 0)

      default=0

    Returns:

    • (nil)
  • #add_light(n, r, d, c = 'w', bright = 0.5, ap = 0) ⇒ nil

    Parameters:

    • n (Integer)
    • r (MglPoint)
    • d (MglPoint)
    • c (String) (defaults to: 'w')

      default=‘w’

    • bright (Float) (defaults to: 0.5)

      default=0.5

    • ap (Float) (defaults to: 0)

      default=0

    Returns:

    • (nil)


115
116
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 115

def add_light
end

#add_range(dir, v1, v2) ⇒ nil

Ranges (bounding box). Sets or adds the range for ‘x’-,‘y’-,‘z’- coordinate or coloring (‘c’). If one of values is NAN then it is ignored. See also ranges.

Parameters:

  • dir (String)
  • v1 (Float)
  • v2 (Float)

Returns:

  • (nil)


532
533
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 532

def add_range
end

#add_tick(dir, val, lbl) ⇒ nil

Ticks. The same as previous but add single tick label lbl at position val to the lest of existed ones.

Parameters:

  • dir (String)
  • val (Float)
  • lbl (String)

Returns:

  • (nil)


733
734
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 733

def add_tick
end

#adjust(dir = "xyzc") ⇒ nil

Ticks. Set the ticks step, number of sub-ticks and initial ticks position to be the most human readable for the axis along direction(s) dir. Also set SetTuneTicks(true). Usually you don’t need to call this function except the case of returning to default settings.

Parameters:

  • dir (String) (defaults to: "xyzc")

    default=“xyzc”

Returns:

  • (nil)


688
689
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 688

def adjust
end

#alpha(enable) ⇒ nil

Transparency. 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.

Parameters:

  • enable (bool)

Returns:

  • (nil)


50
51
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 50

def alpha
end

#arc(p0, p1, a, col = "r") ⇒ nil #arc(p0, pa, p1, a, col = "r") ⇒ nil

Primitives. Draw the arc around axis pa (default is z-axis pa=(0,0,1)) with center at p0 and starting from point p1. Parameter a set the angle of arc in degree. Parameter col may contain color of the arc and arrow style for arc edges.

Overloads:

  • #arc(p0, p1, a, col = "r") ⇒ nil

    Parameters:

    • p0 (MglPoint)
    • p1 (MglPoint)
    • a (Float)
    • col (String) (defaults to: "r")

      default=“r”

    Returns:

    • (nil)
  • #arc(p0, pa, p1, a, col = "r") ⇒ nil

    Parameters:

    Returns:

    • (nil)


1849
1850
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1849

def arc
end

#area(y, pen = "", opt = "") ⇒ nil #area(x, y, pen = "", opt = "") ⇒ nil #area(x, y, z, pen = "", opt = "") ⇒ nil

1D plotting. 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. See also plot, bars, stem, region. Area sample

Overloads:

  • #area(y, pen = "", opt = "") ⇒ nil

    Parameters:

    • y (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #area(x, y, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #area(x, y, z, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2252
2253
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2252

def area
end

#aspect(ax, ay, az = 1) ⇒ nil

Subplots and rotation. Defines aspect ratio for the plot. The viewable axes will be related one to another as the ratio Ax:Ay:Az. For the best effect it should be used after rotate function. If Ax is NAN then function try to select optimal aspect ratio to keep equal ranges for x-y axis. At this, Ay will specify proportionality factor, or set to use automatic one if Ay=NAN.

Parameters:

  • ax (Float)
  • ay (Float)
  • az (Float) (defaults to: 1)

    default=1

Returns:

  • (nil)


974
975
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 974

def aspect
end

#axial(z, sch = "", opt = "", num = 3) ⇒ nil #axial(x, y, z, sch = "", opt = "", num = 3) ⇒ nil

2D plotting. The same as previous with vector v of num-th elements equidistantly distributed in color range. Here num is equal to parameter value in options opt (default is 3).

Overloads:

  • #axial(z, sch = "", opt = "", num = 3) ⇒ nil

    Parameters:

    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    • num (Integer) (defaults to: 3)

      default=3

    Returns:

    • (nil)
  • #axial(x, y, z, sch = "", opt = "", num = 3) ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    • num (Integer) (defaults to: 3)

      default=3

    Returns:

    • (nil)


3049
3050
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3049

def axial
end

#axis(dir = "xyz", stl = "", opt = "") ⇒ nil

Axis and Colorbar. Draws axes with ticks (see Axis settings). Parameter dir may contain: Styles of ticks and axis can be overrided by using stl string. Axis and ticks

Parameters:

  • dir (String) (defaults to: "xyz")

    default=“xyz”

  • stl (String) (defaults to: "")

    default=“”

  • opt (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


1960
1961
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1960

def axis
end

#ball(p, col = 'r') ⇒ nil

Primitives. Draws a mark (point ‘.’ by default) at position p=(x, y, z) with color col.

Parameters:

  • p (MglPoint)
  • col (String) (defaults to: 'r')

    default=‘r’

Returns:

  • (nil)


1633
1634
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1633

def ball
end

#barh(v, pen = "", opt = "") ⇒ nil #barh(y, v, pen = "", opt = "") ⇒ nil

1D plotting. These functions draw horizontal bars from points to axis plane. If string contain symbol ‘a’ then lines are drawn one above another (like summation). If string contain symbol ‘f’ then waterfall chart is drawn for determining the cumulative effect of sequentially introduced positive or negative values. You can give different colors for positive and negative values if number of specified colors is equal to 2*number of curves. If pen contain ‘<’, ‘^’ or ‘>’ then boxes will be aligned left, right or centered at its x-coordinates. See also bars, barwidth. Barh sample

Overloads:

  • #barh(v, pen = "", opt = "") ⇒ nil

    Parameters:

    • v (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #barh(y, v, pen = "", opt = "") ⇒ nil

    Parameters:

    • y (MglData)
    • v (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2366
2367
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2366

def barh
end

#bars(y, pen = "", opt = "") ⇒ nil #bars(x, y, pen = "", opt = "") ⇒ nil #bars(x, y, z, pen = "", opt = "") ⇒ nil

1D plotting. These functions draw vertical bars from points to axis plane. If string pen contain symbol ‘a’ then lines are drawn one above another (like summation). If string contain symbol ‘f’ then waterfall chart is drawn for determining the cumulative effect of sequentially introduced positive or negative values. You can give different colors for positive and negative values if number of specified colors is equal to 2*number of curves. If pen contain ‘<’, ‘^’ or ‘>’ then boxes will be aligned left, right or centered at its x-coordinates. See also barh, cones, area, stem, chart, barwidth. Bars sample

Overloads:

  • #bars(y, pen = "", opt = "") ⇒ nil

    Parameters:

    • y (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #bars(x, y, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #bars(x, y, z, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2347
2348
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2347

def bars
end

#beam(tr, g1, g2, a, r, stl = "", flag = 0, num = 3) ⇒ nil #beam(val, tr, g1, g2, a, r, stl = "", flag = 0) ⇒ nil

3D plotting. Draws the isosurface for 3d array a at constant values of a=val. This is special kind of plot for a specified in accompanied coordinates along curve tr with orts g1, g2 and with transverse scale r. Variable flag is bitwise: ‘0x1’ - draw in accompanied (not laboratory) coordinates; ‘0x2’ - draw projection to rho-z plane; ‘0x4’ - draw normalized in each slice field. The x-size of data arrays tr, g1, g2 must be nx>2. The y-size of data arrays tr, g1, g2 and z-size of the data array a must be equal. See also surf3.

Overloads:

  • #beam(tr, g1, g2, a, r, stl = "", flag = 0, num = 3) ⇒ nil

    Parameters:

    • tr (MglData)
    • g1 (MglData)
    • g2 (MglData)
    • a (MglData)
    • r (Float)
    • stl (String) (defaults to: "")

      default=“”

    • flag (Integer) (defaults to: 0)

      default=0

    • num (Integer) (defaults to: 3)

      default=3

    Returns:

    • (nil)
  • #beam(val, tr, g1, g2, a, r, stl = "", flag = 0) ⇒ nil

    Parameters:

    • val (Float)
    • tr (MglData)
    • g1 (MglData)
    • g2 (MglData)
    • a (MglData)
    • r (Float)
    • stl (String) (defaults to: "")

      default=“”

    • flag (Integer) (defaults to: 0)

      default=0

    Returns:

    • (nil)


3328
3329
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3328

def beam
end

#belt(z, sch = "", opt = "") ⇒ nil #belt(x, y, z, sch = "", opt = "") ⇒ nil

2D plotting. The function draws belts for surface specified parametrically (x(i,j), y(i,j), z(i,j)). This plot can be used as 3d generalization of plot). If sch contain ‘x’ then belts are drawn along x-direction else (by default) belts are drawn along y-direction. See also fall, surf, plot, meshnum. Belt sample

Overloads:

  • #belt(z, sch = "", opt = "") ⇒ nil

    Parameters:

    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #belt(x, y, z, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2797
2798
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2797

def belt
end

#box(col = "", ticks = true) ⇒ nil

Axis and Colorbar. Draws bounding box outside the plotting volume with color col. If col contain ‘@’ then filled faces are drawn. At this first color is used for faces (default is light yellow), last one for edges. Bounding box

Parameters:

  • col (String) (defaults to: "")

    default=“”

  • ticks (bool) (defaults to: true)

    default=true

Returns:

  • (nil)


2034
2035
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2034

def box
end

#box_plot(a, pen = "", opt = "") ⇒ nil #box_plot(x, a, pen = "", opt = "") ⇒ nil

1D plotting. These functions draw boxplot (also known as a box-and-whisker diagram) at points x(i). This is five-number summaries of data a(i,j) (minimum, lower quartile (Q1), median (Q2), upper quartile (Q3) and maximum) along second (j-th) direction. If pen contain ‘<’, ‘^’ or ‘>’ then boxes will be aligned left, right or centered at its x-coordinates. See also plot, error, bars, barwidth. BoxPlot sample

Overloads:

  • #box_plot(a, pen = "", opt = "") ⇒ nil

    Parameters:

    • a (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #box_plot(x, a, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • a (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2425
2426
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2425

def box_plot
end

#boxs(z, sch = "", opt = "") ⇒ nil #boxs(x, y, z, sch = "", opt = "") ⇒ nil

2D plotting. The function draws vertical boxes for surface specified parametrically (x(i,j), y(i,j), z(i,j)). Symbol ‘@’ in sch set to draw filled boxes. See also surf, dens, tile, step. Boxs sample

Overloads:

  • #boxs(z, sch = "", opt = "") ⇒ nil

    Parameters:

    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #boxs(x, y, z, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2817
2818
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2817

def boxs
end

#calc_scr(p) ⇒ MglPoint

Bitmap in memory. Calculate screen point (xs,ys) for 3D coordinate (x,y,z). The calculation are done for the last used InPlot (see Subplots and rotation).

Parameters:

Returns:



1483
1484
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1483

def calc_scr
end

#calc_xyz(xs, ys) ⇒ MglPoint

Bitmap in memory. 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 Subplots and rotation).

Parameters:

  • xs (Integer)
  • ys (Integer)

Returns:



1473
1474
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1473

def calc_xyz
end

#candle(v1, pen = "", opt = "") ⇒ nil #candle(v1, v2, pen = "", opt = "") ⇒ nil #candle(v1, y1, y2, pen = "", opt = "") ⇒ nil #candle(v1, v2, y1, y2, pen = "", opt = "") ⇒ nil #candle(x, v1, v2, y1, y2, pen = "", opt = "") ⇒ nil

1D plotting. These functions draw candlestick chart at points x(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 v1(i)<v2(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 pen contain ‘#’ then the wire candle will be used even for 2-color scheme. “Shadows” show the minimal y1 and maximal y2 prices. If v2 is absent then it is determined as v2(i)=v1(i+1). See also plot, bars, ohlc, barwidth. Candle sample

Overloads:

  • #candle(v1, pen = "", opt = "") ⇒ nil

    Parameters:

    • v1 (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #candle(v1, v2, pen = "", opt = "") ⇒ nil

    Parameters:

    • v1 (MglData)
    • v2 (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #candle(v1, y1, y2, pen = "", opt = "") ⇒ nil

    Parameters:

    • v1 (MglData)
    • y1 (MglData)
    • y2 (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #candle(v1, v2, y1, y2, pen = "", opt = "") ⇒ nil

    Parameters:

    • v1 (MglData)
    • v2 (MglData)
    • y1 (MglData)
    • y2 (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #candle(x, v1, v2, y1, y2, pen = "", opt = "") ⇒ nil

    Parameters:

    Returns:

    • (nil)


2471
2472
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2471

def candle
end

#chart(a, col = "", opt = "") ⇒ nil

1D plotting. The function draws colored stripes (boxes) for data in array a. The number of stripes is equal to the number of rows in a (equal to a.ny). The color of each next stripe is cyclically changed from colors specified in string col or in palette Pal (see Palette and colors). Spaces in colors denote transparent “color” (i.e. corresponding stripe(s) are not drawn). The stripe width is proportional to value of element in a. Chart is plotted only for data with non-negative elements. If string col have symbol ‘#’ 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). Chart sample

Parameters:

  • a (MglData)
  • col (String) (defaults to: "")

    default=“”

  • opt (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


2406
2407
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2406

def chart
end

#check_version(ver) ⇒ bool

. Return nonzero if MathGL version is appropriate for required by ver, i.e. if major version is the same and minor version is greater or equal to one in ver.

Parameters:

  • ver (String)

Returns:

  • (bool)


15
16
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 15

def check_version
end

#circle(p, r, stl = "r") ⇒ nil

Primitives. Draw the circle with radius r and center at point p=(x0, y0, z0). Parameter col may contain

Parameters:

  • p (MglPoint)
  • r (Float)
  • stl (String) (defaults to: "r")

    default=“r”

Returns:

  • (nil)


1802
1803
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1802

def circle
end

#clear_frame(i) ⇒ nil

Frames/Animation. Clear list of primitives for current drawing.

Parameters:

  • i (Integer)

Returns:

  • (nil)


1385
1386
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1385

def clear_frame
end

#clear_legendnil

Legend. Clears saved legend strings.

Returns:

  • (nil)


2092
2093
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2092

def clear_legend
end

#clfnil #clf(col) ⇒ nil #clf(col) ⇒ nil #clf(r, g, b) ⇒ nil

Background. Clear the picture and fill background by specified color.

Overloads:

  • #clfnil

    Returns:

    • (nil)
  • #clf(col) ⇒ nil

    Parameters:

    • col (String)

    Returns:

    • (nil)
  • #clf(col) ⇒ nil

    Parameters:

    • col (String)

    Returns:

    • (nil)
  • #clf(r, g, b) ⇒ nil

    Parameters:

    • r (Float)
    • g (Float)
    • b (Float)

    Returns:

    • (nil)


1602
1603
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1602

def clf
end

#close_gifnil

Frames/Animation. Finish writing animated GIF and close connected pointers.

Returns:

  • (nil)


1405
1406
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1405

def close_gif
end

#cloud(a, sch = "", opt = "") ⇒ nil #cloud(x, y, z, a, sch = "", opt = "") ⇒ nil

3D plotting. The function draws cloud plot for 3d data specified parametrically a(i,j,k)(x(i,j,k), y(i,j,k), z(i,j,k)). This plot is a set of cubes with color and transparency proportional to value of a. The resulting plot is like cloud – low value is transparent but higher ones are not. The number of plotting cells depend on meshnum. If string sch contain symbol ‘.’ then lower quality plot will produced with much low memory usage. If string sch contain symbol ‘i’ then transparency will be inversed, i.e. higher become transparent and lower become not transparent. See also surf3, meshnum. Cloud sample

Overloads:

  • #cloud(a, sch = "", opt = "") ⇒ nil

    Parameters:

    • a (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #cloud(x, y, z, a, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • a (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


3156
3157
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3156

def cloud
end

#colorbar(v, sch, x, y, w = 1, h = 1) ⇒ nil

Axis and Colorbar. The same as previous but with sharp colors sch (current palette if sch=“”) for values v. ContD sample

Parameters:

  • v (MglData)
  • sch (String)
  • x (Float)
  • y (Float)
  • w (Float) (defaults to: 1)

    default=1

  • h (Float) (defaults to: 1)

    default=1

Returns:

  • (nil)


1971
1972
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1971

def colorbar
end

#column_plot(num, ind, d = 0) ⇒ nil

Subplots and rotation. Puts further plotting in ind-th cell of column with num cells. The position is relative to previous subplot (or inplot with rel=false). Parameter d set extra gap between cells.

Parameters:

  • num (Integer)
  • ind (Integer)
  • d (Float) (defaults to: 0)

    default=0

Returns:

  • (nil)


898
899
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 898

def column_plot
end

#combine(g) ⇒ Integer

Parallelization. Combine drawing from instance g with gr (or with this) taking into account Z-ordering of pixels. The width and height of both instances must be the same.

Parameters:

Returns:

  • (Integer)


1559
1560
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1559

def combine
end

#cone(p1, p2, r1, r2 = -1, stl = "B") ⇒ nil

Primitives. Draw tube (or truncated cone if edge=false) between points p1, p2 with radius at the edges r1, r2. If r2<0 then it is supposed that r2=r1. The cone color is defined by string stl. Parameter stl can contain:

Parameters:

  • p1 (MglPoint)
  • p2 (MglPoint)
  • r1 (Float)
  • r2 (Float) (defaults to: -1)

    default=-1

  • stl (String) (defaults to: "B")

    default=“B”

Returns:

  • (nil)


1790
1791
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1790

def cone
end

#cones(y, pen = "", opt = "") ⇒ nil #cones(x, y, pen = "", opt = "") ⇒ nil #cones(x, y, z, pen = "", opt = "") ⇒ nil

1D plotting. These functions draw cones from points to axis plane. If string contain symbol ‘a’ 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 pen can contain: See also bars, cone, barwidth. Cones sample

Overloads:

  • #cones(y, pen = "", opt = "") ⇒ nil

    Parameters:

    • y (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #cones(x, y, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #cones(x, y, z, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2394
2395
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2394

def cones
end

#cont(z, sch = "", opt = "") ⇒ nil #cont(x, y, z, sch = "", opt = "") ⇒ nil

2D plotting. The same as previous with vector v of num-th elements equidistantly distributed in color range. Here num is equal to parameter value in options opt (default is 7).

Overloads:

  • #cont(z, sch = "", opt = "") ⇒ nil

    Parameters:

    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #cont(x, y, z, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2881
2882
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2881

def cont
end

#cont3(a, sch = "", sval = -1, opt = "", opt = "") ⇒ nil #cont3(x, y, z, a, sch = "", sval = -1, opt = "") ⇒ nil

3D plotting. The same as previous with vector v of num-th elements equidistantly distributed in color range. Here num is equal to parameter value in options opt (default is 7).

Overloads:

  • #cont3(a, sch = "", sval = -1, opt = "", opt = "") ⇒ nil

    Parameters:

    • a (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • sval (Float) (defaults to: -1)

      default=-1

    • opt (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #cont3(x, y, z, a, sch = "", sval = -1, opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • a (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • sval (Float) (defaults to: -1)

      default=-1

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


3204
3205
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3204

def cont3
end

#cont_d(z, sch = "", opt = "") ⇒ nil #cont_d(x, y, z, sch = "", opt = "") ⇒ nil

2D plotting. The same as previous with vector v of num-th elements equidistantly distributed in color range. Here num is equal to parameter value in options opt (default is 7).

Overloads:

  • #cont_d(z, sch = "", opt = "") ⇒ nil

    Parameters:

    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #cont_d(x, y, z, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2965
2966
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2965

def cont_d
end

#cont_f(z, sch = "", opt = "") ⇒ nil #cont_f(x, y, z, sch = "", opt = "") ⇒ nil

2D plotting. The same as previous with vector v of num-th elements equidistantly distributed in color range. Here num is equal to parameter value in options opt (default is 7).

Overloads:

  • #cont_f(z, sch = "", opt = "") ⇒ nil

    Parameters:

    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #cont_f(x, y, z, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2923
2924
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2923

def cont_f
end

#cont_fx(v, a, stl = "", sval = NAN, opt = "") ⇒ nil

Other plotting. The same as previous with manual contour levels.

Parameters:

  • v (MglData)
  • a (MglData)
  • stl (String) (defaults to: "")

    default=“”

  • sval (Float) (defaults to: NAN)

    default=NAN

  • opt (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


3972
3973
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3972

def cont_fx
end

#cont_fy(v, a, stl = "", sval = NAN, opt = "") ⇒ nil

Other plotting. The same as previous with manual contour levels.

Parameters:

  • v (MglData)
  • a (MglData)
  • stl (String) (defaults to: "")

    default=“”

  • sval (Float) (defaults to: NAN)

    default=NAN

  • opt (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


3985
3986
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3985

def cont_fy
end

#cont_fz(v, a, stl = "", sval = NAN, opt = "") ⇒ nil

Other plotting. The same as previous with manual contour levels.

Parameters:

  • v (MglData)
  • a (MglData)
  • stl (String) (defaults to: "")

    default=“”

  • sval (Float) (defaults to: NAN)

    default=NAN

  • opt (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


3998
3999
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3998

def cont_fz
end

#cont_v(z, sch = "", opt = "") ⇒ nil #cont_v(x, y, z, sch = "", opt = "") ⇒ nil

2D plotting. The same as previous with vector v of num-th elements equidistantly distributed in color range. Here num is equal to parameter value in options opt (default is 7).

Overloads:

  • #cont_v(z, sch = "", opt = "") ⇒ nil

    Parameters:

    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #cont_v(x, y, z, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


3007
3008
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3007

def cont_v
end

#cont_x(v, a, stl = "", sval = NAN, opt = "") ⇒ nil

Other plotting. The same as previous with manual contour levels.

Parameters:

  • v (MglData)
  • a (MglData)
  • stl (String) (defaults to: "")

    default=“”

  • sval (Float) (defaults to: NAN)

    default=NAN

  • opt (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


3891
3892
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3891

def cont_x
end

#cont_y(v, a, stl = "", sval = NAN, opt = "") ⇒ nil

Other plotting. The same as previous with manual contour levels.

Parameters:

  • v (MglData)
  • a (MglData)
  • stl (String) (defaults to: "")

    default=“”

  • sval (Float) (defaults to: NAN)

    default=NAN

  • opt (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


3904
3905
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3904

def cont_y
end

#cont_z(v, a, stl = "", sval = NAN, opt = "") ⇒ nil

Other plotting. The same as previous with manual contour levels.

Parameters:

  • v (MglData)
  • a (MglData)
  • stl (String) (defaults to: "")

    default=“”

  • sval (Float) (defaults to: NAN)

    default=NAN

  • opt (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


3917
3918
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3917

def cont_z
end

#contf3(a, sch = "", sval = -1, opt = "", opt = "") ⇒ nil #contf3(x, y, z, a, sch = "", sval = -1, opt = "") ⇒ nil

3D plotting. The same as previous with vector v of num-th elements equidistantly distributed in color range. Here num is equal to parameter value in options opt (default is 7).

Overloads:

  • #contf3(a, sch = "", sval = -1, opt = "", opt = "") ⇒ nil

    Parameters:

    • a (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • sval (Float) (defaults to: -1)

      default=-1

    • opt (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #contf3(x, y, z, a, sch = "", sval = -1, opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • a (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • sval (Float) (defaults to: -1)

      default=-1

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


3253
3254
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3253

def contf3
end

#copy_font(from) ⇒ nil

Font settings. Copy font data from another mglGraph object.

Parameters:

Returns:

  • (nil)


341
342
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 341

def copy_font
end

#crust(x, y, z, sch = "", opt = "") ⇒ nil

Other plotting. The function reconstruct and draws the surface for arbitrary placed points (x(i), y(i), z(i)). String sch sets the color scheme. If string contain ‘#’ then wire plot is produced. Arrays x, y, z must have equal sizes. See also dots, triplot. @c Crust sample

Parameters:

  • x (MglData)
  • y (MglData)
  • z (MglData)
  • sch (String) (defaults to: "")

    default=“”

  • opt (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


4257
4258
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 4257

def crust
end

#curve(p1, d1, p2, d2, stl = "B", num = 100) ⇒ nil

Primitives. Draws Bezier-like curve from point p1 to p2 using line style stl. At this tangent is codirected with d1, d2 and proportional to its amplitude. Parameter num define the “quality” of the curve. If num=2 then the straight line will be drawn in all coordinate system (independently on transformation formulas, see Curved coordinates). Contrary, for large values (for example, =100) the spline like Bezier curve will be drawn in corresponding coordinate system. Curve will be drawn even if it lies out of bounding box.

Parameters:

Returns:

  • (nil)


1684
1685
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1684

def curve
end

#cut_off(cond) ⇒ nil

Cutting. Sets the cutting off condition by formula cond. 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 “” to disable cutting off condition.

Parameters:

  • cond (String)

Returns:

  • (nil)


246
247
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 246

def cut_off
end

#data_grid(u, x, y, z, opt = "") ⇒ nil

Data manipulation. Fills the value of array ‘u’ according to the linear interpolation of triangulated surface, found for arbitrary placed points ‘x’, ‘y’, ‘z’. Interpolation is done at points equidistantly distributed in axis range. NAN value is used for grid points placed outside of triangulated surface. Making regular data

Parameters:

Returns:

  • (nil)


4565
4566
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 4565

def data_grid
end

#default_plot_paramnil

Graphics setup. Restore initial values for all of parameters and clear the image.

Returns:

  • (nil)


40
41
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 40

def default_plot_param
end

#del_frame(i) ⇒ nil

Frames/Animation. Deletes drawing data for frame i and shift all later frame indexes. Function work if MGL_VECT_FRAME is set on (by default). Do nothing in OpenGL mode.

Parameters:

  • i (Integer)

Returns:

  • (nil)


1366
1367
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1366

def del_frame
end

#dens(z, sch = "", opt = "", zval = NAN) ⇒ nil #dens(x, y, z, sch = "", opt = "", zval = NAN) ⇒ nil

2D plotting. The function draws density plot for surface specified parametrically (x(i,j), y(i,j), z(i,j)) at z equal to minimal z-axis value. If string sch have symbol ‘#’ then grid lines are drawn. If string sch have symbol ‘.’ then plot by dots is produced. See also surf, cont, contf, boxs, tile, dens(xyz). Dens sample

Overloads:

  • #dens(z, sch = "", opt = "", zval = NAN) ⇒ nil

    Parameters:

    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    • zval (Float) (defaults to: NAN)

      default=NAN

    Returns:

    • (nil)
  • #dens(x, y, z, sch = "", opt = "", zval = NAN) ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    • zval (Float) (defaults to: NAN)

      default=NAN

    Returns:

    • (nil)


2859
2860
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2859

def dens
end

#dens3(a, sch = "", sval = -1, opt = "") ⇒ nil #dens3(x, y, z, a, sch = "", sval = -1, opt = "") ⇒ nil

3D plotting. The function draws density plot for 3d data specified parametrically a(i,j,k)(x(i,j,k), y(i,j,k), z(i,j,k)). Density is plotted at slice sVal in direction (‘x’, ‘y’, ‘z’) if sch contain corresponding symbol (by default, ‘y’ direction is used). If string stl have symbol ‘#’ then grid lines are drawn. See also cont3, contf3, dens, grid3. Dens3 sample

Overloads:

  • #dens3(a, sch = "", sval = -1, opt = "") ⇒ nil

    Parameters:

    • a (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • sval (Float) (defaults to: -1)

      default=-1

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #dens3(x, y, z, a, sch = "", sval = -1, opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • a (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • sval (Float) (defaults to: -1)

      default=-1

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


3179
3180
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3179

def dens3
end

#dens_x(a, stl = "", sval = NAN, opt = "") ⇒ nil

Other plotting. These plotting functions draw density plot in x, y, or z plain. If a is a tensor (3-dimensional data) then interpolation to a given sVal is performed. These functions are useful for creating projections of the 3D data array to the bounding box. See also ContXYZ, ContFXYZ, dens, Data manipulation. Dens projection sample

Parameters:

  • a (MglData)
  • stl (String) (defaults to: "")

    default=“”

  • sval (Float) (defaults to: NAN)

    default=NAN

  • opt (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


3852
3853
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3852

def dens_x
end

#dens_y(a, stl = "", sval = NAN, opt = "") ⇒ nil

Other plotting. These plotting functions draw density plot in x, y, or z plain. If a is a tensor (3-dimensional data) then interpolation to a given sVal is performed. These functions are useful for creating projections of the 3D data array to the bounding box. See also ContXYZ, ContFXYZ, dens, Data manipulation. Dens projection sample

Parameters:

  • a (MglData)
  • stl (String) (defaults to: "")

    default=“”

  • sval (Float) (defaults to: NAN)

    default=NAN

  • opt (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


3865
3866
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3865

def dens_y
end

#dens_z(a, stl = "", sval = NAN, opt = "") ⇒ nil

Other plotting. These plotting functions draw density plot in x, y, or z plain. If a is a tensor (3-dimensional data) then interpolation to a given sVal is performed. These functions are useful for creating projections of the 3D data array to the bounding box. See also ContXYZ, ContFXYZ, dens, Data manipulation. Dens projection sample

Parameters:

  • a (MglData)
  • stl (String) (defaults to: "")

    default=“”

  • sval (Float) (defaults to: NAN)

    default=NAN

  • opt (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


3878
3879
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3878

def dens_z
end

#dew(ax, ay, sch = "", opt = "") ⇒ nil #dew(x, y, ax, ay, sch = "", opt = "") ⇒ nil

Vector fields. The function draws dew-drops for plane vector field (ax, ay) depending parametrically on coordinates x, y at level z 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 sqrt(ax^2+ay^2). The number of drops depend on meshnum. See also vect. Dew sample

Overloads:

  • #dew(ax, ay, sch = "", opt = "") ⇒ nil

    Parameters:

    • ax (MglData)
    • ay (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #dew(x, y, ax, ay, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • ax (MglData)
    • ay (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


3660
3661
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3660

def dew
end

#dots(x, y, z, sch = "", opt = "") ⇒ nil #dots(x, y, z, a, sch = "", opt = "") ⇒ nil #dots(x, y, z, c, a, sch = "", opt = "") ⇒ nil

Other plotting. The function draws the arbitrary placed points (x(i), y(i), z(i)). String sch sets the color scheme and kind of marks. If arrays c, a are specified then they define colors and transparencies of dots. You can use tens plot with style ‘ .’ to draw non-transparent dots with specified colors. Arrays x, y, z, a must have equal sizes. See also crust, tens, mark, plot. Dots sample

Overloads:

  • #dots(x, y, z, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #dots(x, y, z, a, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • a (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #dots(x, y, z, c, a, sch = "", opt = "") ⇒ nil

    Parameters:

    Returns:

    • (nil)


4243
4244
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 4243

def dots
end

#drop(p, d, r, col = "r", shift = 1, ap = 1) ⇒ nil

Primitives. Draw the drop with radius r at point p elongated in direction d and with color col. Parameter shift set the degree of drop oblongness: ‘0’ is sphere, ‘1’ is maximally oblongness drop. Parameter ap set relative width of the drop (this is analogue of “ellipticity” for the sphere).

Parameters:

  • p (MglPoint)
  • d (MglPoint)
  • r (Float)
  • col (String) (defaults to: "r")

    default=“r”

  • shift (Float) (defaults to: 1)

    default=1

  • ap (Float) (defaults to: 1)

    default=1

Returns:

  • (nil)


1776
1777
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1776

def drop
end

#ellipse(p1, p2, r, col = "r") ⇒ nil

Primitives. Draw the ellipse with radius r and focal points p1, p2. Parameter col may contain

Parameters:

  • p1 (MglPoint)
  • p2 (MglPoint)
  • r (Float)
  • col (String) (defaults to: "r")

    default=“r”

Returns:

  • (nil)


1815
1816
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1815

def ellipse
end

#end_framenil

Frames/Animation. Finishes the frame drawing.

Returns:

  • (nil)


1317
1318
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1317

def end_frame
end

#end_groupnil

Export picture. Ends group definition.

Returns:

  • (nil)


1086
1087
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1086

def end_group
end

#error(y, ey, pen = "", opt = "") ⇒ nil #error(x, y, ey, pen = "", opt = "") ⇒ nil #error(x, y, ex, ey, pen = "", opt = "") ⇒ nil

1D plotting. These functions draw error boxes (ex(i), ey(i)) at points (x(i), y(i)). This can be useful, for example, in experimental points, or to show numeric error or some estimations and so on. If string pen contain symbol ‘@’ than large semitransparent mark is used instead of error box. See also plot, mark. Error sample

Overloads:

  • #error(y, ey, pen = "", opt = "") ⇒ nil

    Parameters:

    • y (MglData)
    • ey (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #error(x, y, ey, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • ey (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #error(x, y, ex, ey, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • ex (MglData)
    • ey (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


1656
1657
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1656

def error
end

#export_mgld(fname, descr = "") ⇒ nil

Export to file. Exports points and primitives in file using MGLD format. Later this file can be used for faster loading and viewing by mglview utility. Parameter fname specifies the file name, descr adds description to file (default is file name).

Parameters:

  • fname (String)
  • descr (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


1288
1289
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1288

def export_mgld
end

#face(p1, p2, p3, p4, stl = "w") ⇒ nil

Primitives. Draws the solid quadrangle (face) with vertexes p1, p2, p3, p4 and with color(s) stl. 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.

Parameters:

Returns:

  • (nil)


1698
1699
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1698

def face
end

#face_x(x0, y0, z0, wy, wz, stl = "w", d1 = 0, d2 = 0) ⇒ nil

Primitives. Draws the solid rectangle (face) perpendicular to (x,y,z)-axis correspondingly at position (x0, y0, z0) with color stl and with widths wx, wy, wz 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 d1!=0, d2!=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.

Parameters:

  • x0 (Float)
  • y0 (Float)
  • z0 (Float)
  • wy (Float)
  • wz (Float)
  • stl (String) (defaults to: "w")

    default=“w”

  • d1 (Float) (defaults to: 0)

    default=0

  • d2 (Float) (defaults to: 0)

    default=0

Returns:

  • (nil)


1715
1716
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1715

def face_x
end

#face_y(x0, y0, z0, wx, wz, stl = "w", d1 = 0, d2 = 0) ⇒ nil

Primitives. Draws the solid rectangle (face) perpendicular to (x,y,z)-axis correspondingly at position (x0, y0, z0) with color stl and with widths wx, wy, wz 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 d1!=0, d2!=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.

Parameters:

  • x0 (Float)
  • y0 (Float)
  • z0 (Float)
  • wx (Float)
  • wz (Float)
  • stl (String) (defaults to: "w")

    default=“w”

  • d1 (Float) (defaults to: 0)

    default=0

  • d2 (Float) (defaults to: 0)

    default=0

Returns:

  • (nil)


1732
1733
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1732

def face_y
end

#face_z(x0, y0, z0, wx, wy, stl = "w", d1 = 0, d2 = 0) ⇒ nil

Primitives. Draws the solid rectangle (face) perpendicular to (x,y,z)-axis correspondingly at position (x0, y0, z0) with color stl and with widths wx, wy, wz 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 d1!=0, d2!=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.

Parameters:

  • x0 (Float)
  • y0 (Float)
  • z0 (Float)
  • wx (Float)
  • wy (Float)
  • stl (String) (defaults to: "w")

    default=“w”

  • d1 (Float) (defaults to: 0)

    default=0

  • d2 (Float) (defaults to: 0)

    default=0

Returns:

  • (nil)


1749
1750
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1749

def face_z
end

#fall(z, sch = "", opt = "") ⇒ nil #fall(x, y, z, sch = "", opt = "") ⇒ nil

2D plotting. The function draws fall lines for surface specified parametrically (x(i,j), y(i,j), z(i,j)). This plot can be used for plotting several curves shifted in depth one from another. If sch contain ‘x’ then lines are drawn along x-direction else (by default) lines are drawn along y-direction. See also belt, mesh, tens, meshnum. Fall sample

Overloads:

  • #fall(z, sch = "", opt = "") ⇒ nil

    Parameters:

    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #fall(x, y, z, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2777
2778
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2777

def fall
end

#fill(u, eq, opt = "") ⇒ nil #fill(u, eq, v, opt = "") ⇒ nil #fill(u, eq, v, w, opt = "") ⇒ nil

Data manipulation. Fills the value of array ‘u’ according to the formula in string eq. Formula is an arbitrary expression depending on variables ‘x’, ‘y’, ‘z’, ‘u’, ‘v’, ‘w’. Coordinates ‘x’, ‘y’, ‘z’ are supposed to be normalized in axis range. Variable ‘u’ is the original value of the array. Variables ‘v’ and ‘w’ are values of arrays v, w which can be NULL (i.e. can be omitted).

Overloads:

  • #fill(u, eq, opt = "") ⇒ nil

    Parameters:

    • u (MglData)
    • eq (String)
    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #fill(u, eq, v, opt = "") ⇒ nil

    Parameters:

    • u (MglData)
    • eq (String)
    • v (MglData)
    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #fill(u, eq, v, w, opt = "") ⇒ nil

    Parameters:

    Returns:

    • (nil)


4551
4552
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 4551

def fill
end

#fit(a, func, var, opt = "") ⇒ MglData #fit(a, func, var, ini, opt = "") ⇒ MglData #fit(x, a, func, var, opt = "") ⇒ MglData #fit(x, a, func, var, ini, opt = "") ⇒ MglData #fit(x, y, a, func, var, opt = "") ⇒ MglData #fit(x, y, a, func, var, ini, opt = "") ⇒ MglData #fit(x, y, z, a, func, var, opt = "") ⇒ MglData #fit(x, y, z, a, func, var, ini, opt = "") ⇒ MglData

Nonlinear fitting. Fit data along x-, y- and z-directions for array specified parametrically a(i,j,k)(x(i,j,k), y(i,j,k), z(i,j,k)) with weight factor 1.

Overloads:

  • #fit(a, func, var, opt = "") ⇒ MglData

    Parameters:

    • a (MglData)
    • func (String)
    • var (String)
    • opt (String) (defaults to: "")

      default=“”

    Returns:

  • #fit(a, func, var, ini, opt = "") ⇒ MglData

    Parameters:

    • a (MglData)
    • func (String)
    • var (String)
    • ini (MglData)
    • opt (String) (defaults to: "")

      default=“”

    Returns:

  • #fit(x, a, func, var, opt = "") ⇒ MglData

    Parameters:

    • x (MglData)
    • a (MglData)
    • func (String)
    • var (String)
    • opt (String) (defaults to: "")

      default=“”

    Returns:

  • #fit(x, a, func, var, ini, opt = "") ⇒ MglData

    Parameters:

    • x (MglData)
    • a (MglData)
    • func (String)
    • var (String)
    • ini (MglData)
    • opt (String) (defaults to: "")

      default=“”

    Returns:

  • #fit(x, y, a, func, var, opt = "") ⇒ MglData

    Parameters:

    • x (MglData)
    • y (MglData)
    • a (MglData)
    • func (String)
    • var (String)
    • opt (String) (defaults to: "")

      default=“”

    Returns:

  • #fit(x, y, a, func, var, ini, opt = "") ⇒ MglData

    Parameters:

    Returns:

  • #fit(x, y, z, a, func, var, opt = "") ⇒ MglData

    Parameters:

    Returns:

  • #fit(x, y, z, a, func, var, ini, opt = "") ⇒ MglData

    Parameters:

    Returns:



4421
4422
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 4421

def fit
end

#fit2(a, func, var, opt = "") ⇒ MglData #fit2(fit, a, func, var, ini, opt = "") ⇒ MglData

Nonlinear fitting. Fit data along all directions for 2d or 3d arrays a with s=1 and x, y, z equidistantly distributed in axis range.

Overloads:

  • #fit2(a, func, var, opt = "") ⇒ MglData

    Parameters:

    • a (MglData)
    • func (String)
    • var (String)
    • opt (String) (defaults to: "")

      default=“”

    Returns:

  • #fit2(fit, a, func, var, ini, opt = "") ⇒ MglData

    Parameters:

    • fit (MglData)
    • a (MglData)
    • func (String)
    • var (String)
    • ini (MglData)
    • opt (String) (defaults to: "")

      default=“”

    Returns:



4443
4444
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 4443

def fit2
end

#fit3(fit, a, func, var, opt = "") ⇒ MglData #fit3(fit, a, func, var, ini, opt = "") ⇒ MglData

Nonlinear fitting. Fit data along all directions for 2d or 3d arrays a with s=1 and x, y, z equidistantly distributed in axis range.

Overloads:

  • #fit3(fit, a, func, var, opt = "") ⇒ MglData

    Parameters:

    • fit (MglData)
    • a (MglData)
    • func (String)
    • var (String)
    • opt (String) (defaults to: "")

      default=“”

    Returns:

  • #fit3(fit, a, func, var, ini, opt = "") ⇒ MglData

    Parameters:

    • fit (MglData)
    • a (MglData)
    • func (String)
    • var (String)
    • ini (MglData)
    • opt (String) (defaults to: "")

      default=“”

    Returns:



4466
4467
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 4466

def fit3
end

#fit_s(a, s, func, var, opt = "") ⇒ MglData #fit_s(a, s, func, var, ini, opt = "") ⇒ MglData #fit_s(x, a, s, func, var, opt = "") ⇒ MglData #fit_s(x, a, s, func, var, ini, opt = "") ⇒ MglData #fit_s(x, y, a, s, func, var, opt = "") ⇒ MglData #fit_s(x, y, a, s, func, var, ini, opt = "") ⇒ MglData #fit_s(x, y, z, a, s, func, var, opt = "") ⇒ MglData #fit_s(x, y, z, a, s, func, var, ini, opt = "") ⇒ MglData

Nonlinear fitting. Fit data along x-, y- and z-directions for array specified parametrically a(i,j,k)(x(i,j,k), y(i,j,k), z(i,j,k)) with weight factor s(i,j,k).

Overloads:

  • #fit_s(a, s, func, var, opt = "") ⇒ MglData

    Parameters:

    • a (MglData)
    • s (MglData)
    • func (String)
    • var (String)
    • opt (String) (defaults to: "")

      default=“”

    Returns:

  • #fit_s(a, s, func, var, ini, opt = "") ⇒ MglData

    Parameters:

    • a (MglData)
    • s (MglData)
    • func (String)
    • var (String)
    • ini (MglData)
    • opt (String) (defaults to: "")

      default=“”

    Returns:

  • #fit_s(x, a, s, func, var, opt = "") ⇒ MglData

    Parameters:

    • x (MglData)
    • a (MglData)
    • s (MglData)
    • func (String)
    • var (String)
    • opt (String) (defaults to: "")

      default=“”

    Returns:

  • #fit_s(x, a, s, func, var, ini, opt = "") ⇒ MglData

    Parameters:

    Returns:

  • #fit_s(x, y, a, s, func, var, opt = "") ⇒ MglData

    Parameters:

    Returns:

  • #fit_s(x, y, a, s, func, var, ini, opt = "") ⇒ MglData

    Parameters:

    Returns:

  • #fit_s(x, y, z, a, s, func, var, opt = "") ⇒ MglData

    Parameters:

    Returns:

  • #fit_s(x, y, z, a, s, func, var, ini, opt = "") ⇒ MglData

    Parameters:

    Returns:



4343
4344
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 4343

def fit_s
end

#flow(ax, ay, az, sch = "", opt = "") ⇒ nil #flow(x, y, z, ax, ay, az, sch = "", opt = "") ⇒ nil

Vector fields. This is 3D version of the first functions. Here arrays ax, ay, az must be 3-ranged tensors with equal sizes and the color of line is proportional to sqrt(ax^2+ay^2+az^2).

Overloads:

  • #flow(ax, ay, az, sch = "", opt = "") ⇒ nil

    Parameters:

    • ax (MglData)
    • ay (MglData)
    • az (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #flow(x, y, z, ax, ay, az, sch = "", opt = "") ⇒ nil

    Parameters:

    Returns:

    • (nil)


3683
3684
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3683

def flow
end

#flow_p(p0, ax, ay, az, sch = "", opt = "") ⇒ nil #flow_p(p0, x, y, z, ax, ay, az, sch = "", opt = "") ⇒ nil

Vector fields. This is 3D version of the previous functions.

Overloads:

  • #flow_p(p0, ax, ay, az, sch = "", opt = "") ⇒ nil

    Parameters:

    • p0 (MglPoint)
    • ax (MglData)
    • ay (MglData)
    • az (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #flow_p(p0, x, y, z, ax, ay, az, sch = "", opt = "") ⇒ nil

    Parameters:

    Returns:

    • (nil)


3732
3733
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3732

def flow_p
end

#fog(d, dz = 0.25) ⇒ nil

Fog. Function imitate a fog in the plot. Fog start from relative distance dz from view point and its density growths exponentially in depth. So that the fog influence is determined by law ~ 1-exp(-d*z). Here z is normalized to 1 depth of the plot. If value d=0 then the fog is absent. Note, that fog was applied at stage of image creation, not at stage of drawing. Adding fog

Parameters:

  • d (Float)
  • dz (Float) (defaults to: 0.25)

    default=0.25

Returns:

  • (nil)


146
147
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 146

def fog
end

#fplot(eqx, eqy, eqz, pen, opt = "") ⇒ nil

Other plotting. Draws command parametrical curve (‘x(t)’, ‘y(t)’, ‘z(t)’) where ‘t’ variable is changed in range (0, 1). You do not need to create the data arrays to plot it. Option value set number of points. See also plot.

Parameters:

  • eqx (String)
  • eqy (String)
  • eqz (String)
  • pen (String)
  • opt (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


4052
4053
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 4052

def fplot
end

#fsurf(eqx, eqy, eqz, sch = "", opt = "") ⇒ nil

Other plotting. Draws command parametrical surface (‘x(u,v)’, ‘y(u,v)’, ‘z(u,v)’) where ‘u’, ‘v’ variable are changed in range (0, 1). You do not need to create the data arrays to plot it. Option value set number of points. See also surf.

Parameters:

  • eqx (String)
  • eqy (String)
  • eqz (String)
  • sch (String) (defaults to: "")

    default=“”

  • opt (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


4078
4079
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 4078

def fsurf
end

#get_bgrn(buf, size) ⇒ nil

Bitmap in memory. 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 GetBGRN()). You have to provide the proper size of the buffer, buf, i.e. the code for Python should look like

Parameters:

  • buf (String)
  • size (Integer)

Returns:

  • (nil)


1430
1431
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1430

def get_bgrn
end

#get_fitString

Nonlinear fitting. Get last fitted formula with found coefficients (as numbers).

Returns:

  • (String)


4488
4489
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 4488

def get_fit
end

#get_fit_chiFloat

Nonlinear fitting. Get chi for last fitted formula.

Returns:

  • (Float)


4497
4498
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 4497

def get_fit_chi
end

#get_frame(i) ⇒ nil

Frames/Animation. Replaces drawing data by one from frame i. Function work if MGL_VECT_FRAME is set on (by default).

Parameters:

  • i (Integer)

Returns:

  • (nil)


1346
1347
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1346

def get_frame
end

#get_heightInteger

Bitmap in memory. Gets width and height of the image.

Returns:

  • (Integer)


1462
1463
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1462

def get_height
end

#get_num_frameInteger

Frames/Animation. Gets the number of created frames.

Returns:

  • (Integer)


1326
1327
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1326

def get_num_frame
end

#get_obj_id(xs, ys) ⇒ Integer

Bitmap in memory. Get the numeric id for most upper object at pixel (xs, ys) of the picture.

Parameters:

  • xs (Integer)
  • ys (Integer)

Returns:

  • (Integer)


1504
1505
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1504

def get_obj_id
end

#get_plot_idString

Default sizes. Gets default name id as filename for saving (in FLTK window for example).

Returns:

  • (String)


215
216
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 215

def get_plot_id
end

#get_qualityInteger

Export picture. Gets quality of the plot: MGL_DRAW_WIRE=0 – no face drawing (fastest), MGL_DRAW_FAST=1 – no color interpolation (fast), MGL_DRAW_NORM=2 – high quality (normal), MGL_DRAW_HIGH=3 – high quality with 3d primitives (arrows and marks); MGL_DRAW_LMEM=0x4 – direct bitmap drawing (low memory usage); MGL_DRAW_DOTS=0x8 – for dots drawing instead of primitives (extremely fast).

Returns:

  • (Integer)


1067
1068
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1067

def get_quality
end

#get_rgbunsigned char #get_rgb(buf, size) ⇒ nil

Bitmap in memory. 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 GetBGRN()). You have to provide the proper size of the buffer, buf, i.e. the code for Python should look like

Overloads:

  • #get_rgbunsigned char

    Returns:

    • (unsigned char)
  • #get_rgb(buf, size) ⇒ nil

    Parameters:

    • buf (String)
    • size (Integer)

    Returns:

    • (nil)


1419
1420
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1419

def get_rgb
end

#get_rgbaunsigned char #get_rgba(buf, size) ⇒ nil

Bitmap in memory. 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).

Overloads:

  • #get_rgbaunsigned char

    Returns:

    • (unsigned char)
  • #get_rgba(buf, size) ⇒ nil

    Parameters:

    • buf (String)
    • size (Integer)

    Returns:

    • (nil)


1444
1445
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1444

def get_rgba
end

#get_spl_id(xs, ys) ⇒ Integer

Bitmap in memory. Get the numeric id for most subplot/inplot at pixel (xs, ys) of the picture.

Parameters:

  • xs (Integer)
  • ys (Integer)

Returns:

  • (Integer)


1515
1516
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1515

def get_spl_id
end

#get_warnInteger

Error handling. Return the numerical ID of warning about the not drawn plot. Possible values are:

Returns:

  • (Integer)


449
450
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 449

def get_warn
end

#get_widthInteger

Bitmap in memory. Gets width and height of the image.

Returns:

  • (Integer)


1453
1454
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1453

def get_width
end

#global_warnString

Error handling. Get warning message(s) for global scope.

Returns:

  • (String)


478
479
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 478

def global_warn
end

#grad(phi, sch = "", opt = "") ⇒ nil #grad(x, y, phi, sch = "", opt = "") ⇒ nil #grad(x, y, z, phi, sch = "", opt = "") ⇒ nil

Vector fields. The function draws gradient lines for scalar field phi(i,j) (or phi(i,j,k) in 3d case) specified parametrically (x(i,j,k), y(i,j,k), z(i,j,k)). Number of lines is proportional to value option (default is 5). See also dens, cont, flow.

Overloads:

  • #grad(phi, sch = "", opt = "") ⇒ nil

    Parameters:

    • phi (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #grad(x, y, phi, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • phi (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #grad(x, y, z, phi, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • phi (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


3788
3789
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3788

def grad
end

#grid(z, sch = "", opt = "") ⇒ nil #grid(x, y, z, sch = "", opt = "") ⇒ nil

2D plotting. The function draws grid lines for density plot of surface specified parametrically (x(i,j), y(i,j), z(i,j)) at z equal to minimal z-axis value. See also dens, cont, contf, grid3, meshnum.

Overloads:

  • #grid(z, sch = "", opt = "") ⇒ nil

    Parameters:

    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #grid(x, y, z, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2023
2024
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2023

def grid
end

#grid3(a, sch = "", sval = -1, opt = "") ⇒ nil #grid3(x, y, z, a, sch = "", sval = -1, opt = "") ⇒ nil

3D plotting. The function draws grid for 3d data specified parametrically a(i,j,k)(x(i,j,k), y(i,j,k), z(i,j,k)). Grid is plotted at slice sVal in direction (‘x’, ‘y’, ‘z’) if sch contain corresponding symbol (by default, ‘y’ direction is used). See also cont3, contf3, dens3, grid2, meshnum.

Overloads:

  • #grid3(a, sch = "", sval = -1, opt = "") ⇒ nil

    Parameters:

    • a (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • sval (Float) (defaults to: -1)

      default=-1

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #grid3(x, y, z, a, sch = "", sval = -1, opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • a (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • sval (Float) (defaults to: -1)

      default=-1

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


3300
3301
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3300

def grid3
end

#grid_plot(nx, ny, ind, d = 0) ⇒ nil

Subplots and rotation. Puts further plotting in ind-th cell of nx*ny grid. The position is relative to previous subplot (or inplot with rel=false). Parameter d set extra gap between cells.

Parameters:

  • nx (Integer)
  • ny (Integer)
  • ind (Integer)
  • d (Float) (defaults to: 0)

    default=0

Returns:

  • (nil)


911
912
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 911

def grid_plot
end

#highlight(id) ⇒ nil

Bitmap in memory. Highlight the object with given id.

Parameters:

  • id (Integer)

Returns:

  • (nil)


1525
1526
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1525

def highlight
end

#hist(x, a, opt = "") ⇒ MglData #hist(x, y, a, opt = "") ⇒ MglData #hist(x, y, z, a, opt = "") ⇒ MglData

Data manipulation. 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 x, y, z define the positions (coordinates) of random points. Array a define the data value. Number of points in output array res is defined by option value (default is mglFitPnts=100).

Overloads:



4524
4525
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 4524

def hist
end

#import_mgld(fname, add = false) ⇒ nil

Export to file. Imports points and primitives in file using MGLD format. Later this file can be used for faster loading and viewing by mglview utility. Parameter fname specifies the file name, add sets to append or replace primitives to existed ones.

Parameters:

  • fname (String)
  • add (bool) (defaults to: false)

    default=false

Returns:

  • (nil)


1299
1300
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1299

def import_mgld
end

#in_plot(x1, x2, y1, y2, rel = true) ⇒ nil

Subplots and rotation. 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 (x1, x2)*(y1, y2). The coordinates x1, x2, y1, y2 are normalized to interval (0, 1). If parameter rel=true then the relative position to current subplot (or inplot with rel=false) is used. This function set off any aspects or rotations. So it should be used first for creating subplot.

Parameters:

  • x1 (Float)
  • x2 (Float)
  • y1 (Float)
  • y2 (Float)
  • rel (bool) (defaults to: true)

    default=true

Returns:

  • (nil)


886
887
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 886

def in_plot
end

#is_active(xs, ys, d = 1) ⇒ long

Bitmap in memory. Checks if point (xs, ys) is close to one of active point (i.e. mglBase::Act) with accuracy d and return its index or -1 if not found. Active points are special points which characterize primitives (like edges and so on). This function for advanced users only.

Parameters:

  • xs (Integer)
  • ys (Integer)
  • d (Integer) (defaults to: 1)

    default=1

Returns:

  • (long)


1537
1538
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1537

def is_active
end

#label(y, txt, fnt = "", opt = "") ⇒ nil #label(x, y, txt, fnt = "", opt = "") ⇒ nil #label(x, y, z, txt, fnt = "", opt = "") ⇒ nil

1D plotting. These functions draw string txt at points (x(i), y(i), z(i)). If string txt contain ‘%x’, ‘%y’, ‘%z’ or ‘%n’ then it will be replaced by the value of x-,y-,z-coordinate of the point or its index. String fnt may contain: See also plot, mark, textmark, table. Label sample

Overloads:

  • #label(y, txt, fnt = "", opt = "") ⇒ nil

    Parameters:

    • y (MglData)
    • txt (String)
    • fnt (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #label(x, y, txt, fnt = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • txt (String)
    • fnt (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #label(x, y, z, txt, fnt = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • txt (String)
    • fnt (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2047
2048
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2047

def label
end

#legend(x, y, fnt = "#", opt = "") ⇒ nil

Legend. Draws legend of accumulated legend entries by font fnt with size. Position of legend is determined by parameter x, y which supposed to be normalized to interval (0,1). Option value set the space between line samples and text (default is 0.1).

Parameters:

  • x (Float)
  • y (Float)
  • fnt (String) (defaults to: "#")

    default=“#”

  • opt (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


2059
2060
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2059

def legend
end

#light(n, enable) ⇒ nil

Lighting. Switch on/off n-th light source separately.

Parameters:

  • n (Integer)
  • enable (bool)

Returns:

  • (nil)


81
82
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 81

def light
end

#line(p1, p2, stl = "B", num = 2) ⇒ nil

Primitives. Draws a geodesic line (straight line in Cartesian coordinates) from point p1 to p2 using line style stl. Parameter num define the “quality” of the line. If num=2 then the stright line will be drawn in all coordinate system (independently on transformation formulas (see Curved coordinates). Contrary, for large values (for example, =100) 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.

Parameters:

  • p1 (MglPoint)
  • p2 (MglPoint)
  • stl (String) (defaults to: "B")

    default=“B”

  • num (Integer) (defaults to: 2)

    default=2

Returns:

  • (nil)


1669
1670
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1669

def line
end

#load_background(fname, alpha = 1) ⇒ nil

Background. Load PNG or JPEG file fname as background for the plot. Parameter alpha manually set transparency of the background.

Parameters:

  • fname (String)
  • alpha (Float) (defaults to: 1)

    default=1

Returns:

  • (nil)


1622
1623
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1622

def load_background
end

#load_font(name, path = "") ⇒ nil

Font settings. Load font typeface from path/name.

Parameters:

  • name (String)
  • path (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


267
268
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 267

def load_font
end

#logo(fname, smooth = false, opt = "") ⇒ nil #logo(w, h, rgba, smooth = false, opt = "") ⇒ nil

Primitives. Draw bitmap (logo) along whole axis range, which can be changed by Command options. Bitmap can be loaded from file or specified as RGBA values for pixels. Parameter smooth set to draw bitmap without or with color interpolation.

Overloads:

  • #logo(fname, smooth = false, opt = "") ⇒ nil

    Parameters:

    • fname (String)
    • smooth (bool) (defaults to: false)

      default=false

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #logo(w, h, rgba, smooth = false, opt = "") ⇒ nil

    Parameters:

    • w (long)
    • h (long)
    • rgba (unsigned char)
    • smooth (bool) (defaults to: false)

      default=false

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


1882
1883
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1882

def 
end

#map(ax, ay, sch = "", opt = "") ⇒ nil #map(x, y, ax, ay, sch = "", opt = "") ⇒ nil

Dual plotting. The function draws mapping plot for matrices (ax, ay ) which parametrically depend on coordinates x, y. 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 sch contain symbol ‘.’ then the color ball at matrix knots are drawn otherwise face is drawn. Mapping visualization

Overloads:

  • #map(ax, ay, sch = "", opt = "") ⇒ nil

    Parameters:

    • ax (MglData)
    • ay (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #map(x, y, ax, ay, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • ax (MglData)
    • ay (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


3512
3513
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3512

def map
end

#mark(y, r, pen = "", opt = "") ⇒ nil #mark(x, y, r, pen = "", opt = "") ⇒ nil #mark(x, y, z, r, pen = "", opt = "") ⇒ nil

1D plotting. These functions draw marks with size r(i)*marksize at points (x(i), y(i), z(i)). If you need to draw markers of the same size then you can use plot function with empty line style ‘ ’. For markers with size in axis range use error with style ‘@’. See also plot, textmark, error, stem. Mark sample

Overloads:

  • #mark(y, r, pen = "", opt = "") ⇒ nil

    Parameters:

    • y (MglData)
    • r (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #mark(x, y, r, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • r (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #mark(x, y, z, r, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • r (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


1644
1645
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1644

def mark
end

#mesh(z, sch = "", opt = "") ⇒ nil #mesh(x, y, z, sch = "", opt = "") ⇒ nil

2D plotting. The function draws mesh lines for surface specified parametrically (x(i,j), y(i,j), z(i,j)). See also surf, fall, meshnum, cont, tens. Mesh sample

Overloads:

  • #mesh(z, sch = "", opt = "") ⇒ nil

    Parameters:

    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #mesh(x, y, z, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2757
2758
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2757

def mesh
end

#messageString

Error handling. Return messages about matters why some plot are not drawn. If returned string is empty then there are no messages.

Returns:

  • (String)


440
441
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 440

def message
end

#mpi_recv(id) ⇒ Integer

Parallelization. Receive graphical information from node id using MPI. The width and height in both nodes must be the same.

Parameters:

  • id (Integer)

Returns:

  • (Integer)


1579
1580
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1579

def mpi_recv
end

#mpi_send(id) ⇒ Integer

Parallelization. Send graphical information from node id using MPI. The width and height in both nodes must be the same.

Parameters:

  • id (Integer)

Returns:

  • (Integer)


1569
1570
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1569

def mpi_send
end

#multi_plot(nx, ny, m, dx, dy, stl = "<>_^") ⇒ nil

Subplots and rotation. Puts further plotting in a rectangle of dx*dy cells starting from m-th cell of nx*ny grid of the whole frame area. 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 stl contain:

Parameters:

  • nx (Integer)
  • ny (Integer)
  • m (Integer)
  • dx (Integer)
  • dy (Integer)
  • stl (String) (defaults to: "<>_^")

    default=“<>_^”

Returns:

  • (nil)


872
873
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 872

def multi_plot
end

#need_stopbool

Stop drawing. Return true 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.

Returns:

  • (bool)


497
498
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 497

def need_stop
end

#new_framenil

Frames/Animation. 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 EndFrame() must be call after the finishing of the frame drawing for each call of this function.

Returns:

  • (nil)


1308
1309
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1308

def new_frame
end

#ohlc(o, h, l, c, pen = "", opt = "") ⇒ nil #ohlc(x, o, h, l, c, pen = "", opt = "") ⇒ nil

1D plotting. These functions draw Open-High-Low-Close diagram. This diagram show vertical line for between maximal(high h) and minimal(low l) values, as well as horizontal lines before/after vertical line for initial(open o)/final(close c) 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 candle, plot, barwidth. OHLC sample

Overloads:

  • #ohlc(o, h, l, c, pen = "", opt = "") ⇒ nil

    Parameters:

    • o (MglData)
    • h (MglData)
    • l (MglData)
    • c (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #ohlc(x, o, h, l, c, pen = "", opt = "") ⇒ nil

    Parameters:

    Returns:

    • (nil)


2496
2497
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2496

def ohlc
end

#pde(ham, ini_re, ini_im, dz = 0.1, k0 = 100, opt = "") ⇒ MglData

Data manipulation. Solves equation du/dz = i*k0*ham(p,q,x,y,z,|u|)(u), where p=-i/k0*d/dx, q=-i/k0*d/dy are pseudo-differential operators. Parameters ini_re, ini_im specify real and imaginary part of initial field distribution. Coordinates ‘x’, ‘y’, ‘z’ 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 dz set the step along evolutionary coordinate z. At this moment, simplified form of function ham is supported – all “mixed” terms (like ‘x*p’->x*d/dx) are excluded. For example, in 2D case this function is effectively ham = f(p,z) + g(x,z,u). However commutable combinations (like ‘x*q’->x*d/dy) are allowed. Here variable ‘u’ is used for field amplitude |u|. This allow one solve nonlinear problems – for example, for nonlinear Shrodinger equation you may set ham=“p^2 + q^2 - u^2”. You may specify imaginary part for wave absorption, like ham = “p^2 + i*x*(x>0)”, but only if dependence on variable ‘i’ is linear (i.e. ham = hre+i*him). PDE solving hints

Parameters:

  • ham (String)
  • ini_re (MglData)
  • ini_im (MglData)
  • dz (Float) (defaults to: 0.1)

    default=0.1

  • k0 (Float) (defaults to: 100)

    default=100

  • opt (String) (defaults to: "")

    default=“”

Returns:



4580
4581
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 4580

def pde
end

#perspective(a) ⇒ nil

Subplots and rotation. Add (switch on) the perspective to plot. The parameter a = Depth/(Depth+dz) in (0,1). By default (a=0) the perspective is off.

Parameters:

  • a (Float)

Returns:

  • (nil)


1012
1013
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1012

def perspective
end

#pipe(ax, ay, az, sch = "", r0 = 0.05, opt = "") ⇒ nil #pipe(x, y, z, ax, ay, az, sch = "", r0 = 0.05, opt = "") ⇒ nil

Vector fields. This is 3D version of the first functions. Here arrays ax, ay, az must be 3-ranged tensors with equal sizes and the color of line is proportional to sqrt(ax^2+ay^2+az^2).

Overloads:

  • #pipe(ax, ay, az, sch = "", r0 = 0.05, opt = "") ⇒ nil

    Parameters:

    • ax (MglData)
    • ay (MglData)
    • az (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • r0 (Float) (defaults to: 0.05)

      default=0.05

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #pipe(x, y, z, ax, ay, az, sch = "", r0 = 0.05, opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • ax (MglData)
    • ay (MglData)
    • az (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • r0 (Float) (defaults to: 0.05)

      default=0.05

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


3812
3813
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3812

def pipe
end

#plot(y, pen = "", opt = "") ⇒ nil #plot(x, y, pen = "", opt = "") ⇒ nil #plot(x, y, z, pen = "", opt = "") ⇒ nil

1D plotting. These functions draw continuous lines between points (x(i), y(i), z(i)). See also area, step, stem, tube, mark, error, belt, tens, tape. Plot sample

Overloads:

  • #plot(y, pen = "", opt = "") ⇒ nil

    Parameters:

    • y (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #plot(x, y, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #plot(x, y, z, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2129
2130
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2129

def plot
end

#polygon(p0, p1, num, col = "r") ⇒ nil

Primitives. Draw the polygon with num edges starting from p1. The center of polygon is located in p0. Parameter col may contain

Parameters:

  • p0 (MglPoint)
  • p1 (MglPoint)
  • num (Integer)
  • col (String) (defaults to: "r")

    default=“r”

Returns:

  • (nil)


1862
1863
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1862

def polygon
end

#popnil

Subplots and rotation. Pop (restore last ‘pushed’) transformation matrix into stack.

Returns:

  • (nil)


992
993
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 992

def pop
end

#pushnil

Subplots and rotation. Push transformation matrix into stack. Later you can restore its current state by Pop() function.

Returns:

  • (nil)


983
984
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 983

def push
end

#puts(p, d, text, fnt = ":L", size = -1) ⇒ nil

Text printing. The function plots the string text at position p along direction d with specified size. Parameter fnt set text style and text position: under (‘T’) or above (‘t’) the line.

Parameters:

  • p (MglPoint)
  • d (MglPoint)
  • text (String)
  • fnt (String) (defaults to: ":L")

    default=“:L”

  • size (Float) (defaults to: -1)

    default=-1

Returns:

  • (nil)


1903
1904
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1903

def puts
end

#puts_fit(p, prefix = "", font = "", size = -1) ⇒ nil

Nonlinear fitting. Print last fitted formula with found coefficients (as numbers) at position p0. The string prefix will be printed before formula. All other parameters are the same as in Text printing.

Parameters:

  • p (MglPoint)
  • prefix (String) (defaults to: "")

    default=“”

  • font (String) (defaults to: "")

    default=“”

  • size (Float) (defaults to: -1)

    default=-1

Returns:

  • (nil)


4479
4480
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 4479

def puts_fit
end

#quad_plot(id, x, y, sch = "", opt = "") ⇒ nil #quad_plot(id, x, y, z, c, sch = "", opt = "") ⇒ nil #quad_plot(id, x, y, z, sch = "", opt = "") ⇒ nil

Other plotting. The function draws the surface of quadrangles. Quadrangles vertexes are set by indexes id of data points (x(i), y(i), z(i)). String sch sets the color scheme. If string contain ‘#’ then wire plot is produced. First dimensions of id must be 4 or greater. Arrays x, y, z must have equal sizes. Parameter c set the colors of quadrangles (if id.ny=c.nx) or colors of vertexes (if x.nx=c.nx). See also triplot. TriPlot and QuadPlot

Overloads:

  • #quad_plot(id, x, y, sch = "", opt = "") ⇒ nil

    Parameters:

    • id (MglData)
    • x (MglData)
    • y (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #quad_plot(id, x, y, z, c, sch = "", opt = "") ⇒ nil

    Parameters:

    Returns:

    • (nil)
  • #quad_plot(id, x, y, z, sch = "", opt = "") ⇒ nil

    Parameters:

    • id (MglData)
    • x (MglData)
    • y (MglData)
    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


4210
4211
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 4210

def quad_plot
end

#radar(a, pen = "", opt = "") ⇒ nil

1D plotting. This functions draws radar chart which is continuous lines between points located on an radial lines (like plot in Polar coordinates). Option value set the additional shift of data (i.e. the data a+value is used instead of a). If value<0 then r=max(0, -min(value). If pen containt ‘#’ symbol then “grid” (radial lines and circle for r) is drawn. See also plot. Radar sample

Parameters:

  • a (MglData)
  • pen (String) (defaults to: "")

    default=“”

  • opt (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


2141
2142
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2141

def radar
end

#rasterizenil

Background. Force drawing the plot and use it as background. After it, function clear the list of primitives, like clf. 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).

Returns:

  • (nil)


1611
1612
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1611

def rasterize
end

#region(y1, y2, pen = "", opt = "") ⇒ nil #region(x, y1, y2, pen = "", opt = "") ⇒ nil #region(x1, y1, x2, y2, pen = "", opt = "") ⇒ nil #region(x1, y1, z1, x2, y2, z2, pen = "", opt = "") ⇒ nil

1D plotting. These functions fill area between 2 curves. Dimensions of arrays y1 and y2 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 pen contain symbol ‘i’ then only area with y1<y<y2 will be filled else the area with y2<y<y1 will be filled too. See also area, bars, stem. Region sample

Overloads:

  • #region(y1, y2, pen = "", opt = "") ⇒ nil

    Parameters:

    • y1 (MglData)
    • y2 (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #region(x, y1, y2, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y1 (MglData)
    • y2 (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #region(x1, y1, x2, y2, pen = "", opt = "") ⇒ nil

    Parameters:

    • x1 (MglData)
    • y1 (MglData)
    • x2 (MglData)
    • y2 (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #region(x1, y1, z1, x2, y2, z2, pen = "", opt = "") ⇒ nil

    Parameters:

    Returns:

    • (nil)


2293
2294
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2293

def region
end

#reset_framesnil

Frames/Animation. Reset frames counter (start it from zero).

Returns:

  • (nil)


1375
1376
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1375

def reset_frames
end

#restore_fontnil

Font settings. Restore font data to default typeface.

Returns:

  • (nil)


350
351
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 350

def restore_font
end

#rhomb(p1, p2, r, col = "r") ⇒ nil

Primitives. Draw the rhombus with width r and edge points p1, p2. Parameter col may contain

Parameters:

  • p1 (MglPoint)
  • p2 (MglPoint)
  • r (Float)
  • col (String) (defaults to: "r")

    default=“r”

Returns:

  • (nil)


1828
1829
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1828

def rhomb
end

#rotate(tetx, tetz, tety = 0) ⇒ nil

Subplots and rotation. Rotates a further plotting relative to each axis (x, z, y) consecutively on angles TetX, TetZ, TetY.

Parameters:

  • tetx (Float)
  • tetz (Float)
  • tety (Float) (defaults to: 0)

    default=0

Returns:

  • (nil)


949
950
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 949

def rotate
end

#rotate_n(tet, x, y, z) ⇒ nil

Subplots and rotation. Rotates a further plotting around vector (x, y, z) on angle Tet.

Parameters:

  • tet (Float)
  • x (Float)
  • y (Float)
  • z (Float)

Returns:

  • (nil)


962
963
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 962

def rotate_n
end

#set_alpha_def(val) ⇒ nil

Transparency. Sets default value of alpha channel (transparency) for all plotting functions. Initial value is 0.5.

Parameters:

  • val (Float)

Returns:

  • (nil)


60
61
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 60

def set_alpha_def
end

#set_ambient(bright = 0.5) ⇒ nil

Lighting. Sets the brightness of ambient light. The value should be in range (0,1).

Parameters:

  • bright (Float) (defaults to: 0.5)

    default=0.5

Returns:

  • (nil)


135
136
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 135

def set_ambient
end

#set_arrow_size(val) ⇒ nil

Default sizes. Sets size of arrows for 1D plotting, lines and curves (see Primitives). Default value is 1.

Parameters:

  • val (Float)

Returns:

  • (nil)


176
177
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 176

def set_arrow_size
end

#set_auto_ranges(p1, p2) ⇒ nil #set_auto_ranges(x1, x2, y1, y2, z1 = 0, z2 = 0, c1 = 0, c2 = 0) ⇒ nil

Ranges (bounding box). Sets the ranges for automatic coordinates. If minimal and maximal values of the coordinate are the same then they are ignored.

Overloads:

  • #set_auto_ranges(p1, p2) ⇒ nil

    Parameters:

    Returns:

    • (nil)
  • #set_auto_ranges(x1, x2, y1, y2, z1 = 0, z2 = 0, c1 = 0, c2 = 0) ⇒ nil

    Parameters:

    • x1 (Float)
    • x2 (Float)
    • y1 (Float)
    • y2 (Float)
    • z1 (Float) (defaults to: 0)

      default=0

    • z2 (Float) (defaults to: 0)

      default=0

    • c1 (Float) (defaults to: 0)

      default=0

    • c2 (Float) (defaults to: 0)

      default=0

    Returns:

    • (nil)


610
611
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 610

def set_auto_ranges
end

#set_axis_stl(stl = "k", tck = 0, sub = 0) ⇒ nil

Ticks. The line style of axis (stl), ticks (tck) and subticks (sub). If stl is empty then default style is used (‘k’ or ‘w’ depending on transparency type). If tck or sub is empty then axis style is used (i.e. stl).

Parameters:

  • stl (String) (defaults to: "k")

    default=“k”

  • tck (String) (defaults to: 0)

    default=0

  • sub (String) (defaults to: 0)

    default=0

Returns:

  • (nil)


841
842
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 841

def set_axis_stl
end

#set_bar_width(val) ⇒ nil

Default sizes. Sets relative width of rectangles in bars, barh, boxplot, candle, ohlc. Default value is 0.7.

Parameters:

  • val (Float)

Returns:

  • (nil)


156
157
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 156

def set_bar_width
end

#set_color(id, r, g, b) ⇒ nil

Palette and colors. Sets RGB values for color with given id. This is global setting which influence on any later usage of symbol id.

Parameters:

  • id (String)
  • r (Float)
  • g (Float)
  • b (Float)

Returns:

  • (nil)


394
395
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 394

def set_color
end

#set_coor(how) ⇒ nil

Curved coordinates. Sets one of the predefined transformation formulas for curvilinear coordinate. Parameter how define the coordinates: mglCartesian=0 – Cartesian coordinates (no transformation); mglPolar=1 – Polar coordinates x_n=x*cos(y),y_n=x*sin(y), z_n=z; mglSpherical=2 – Sperical coordinates x_n=x*sin(y)*cos(z), y_n=x*sin(y)*sin(z), z_n=x*cos(y); mglParabolic=3 – Parabolic coordinates x_n=x*y, y_n=(x*x-y*y)/2, z_n=z; mglParaboloidal=4 – Paraboloidal coordinates x_n=(x*x-y*y)*cos(z)/2, y_n=(x*x-y*y)*sin(z)/2, z_n=x*y; mglOblate=5 – Oblate coordinates x_n=cosh(x)*cos(y)*cos(z), y_n=cosh(x)*cos(y)*sin(z), z_n=sinh(x)*sin(y); mglProlate=6 – Prolate coordinates x_n=sinh(x)*sin(y)*cos(z), y_n=sinh(x)*sin(y)*sin(z), z_n=cosh(x)*cos(y); mglElliptic=7 – Elliptic coordinates x_n=cosh(x)*cos(y), y_n=sinh(x)*sin(y), z_n=z; mglToroidal=8 – Toroidal coordinates x_n=sinh(x)*cos(z)/(cosh(x)-cos(y)), y_n=sinh(x)*sin(z)/(cosh(x)-cos(y)), z_n=sin(y)/(cosh(x)-cos(y)); mglBispherical=9 – Bispherical coordinates x_n=sin(y)*cos(z)/(cosh(x)-cos(y)), y_n=sin(y)*sin(z)/(cosh(x)-cos(y)), z_n=sinh(x)/(cosh(x)-cos(y)); mglBipolar=10 – Bipolar coordinates x_n=sinh(x)/(cosh(x)-cos(y)), y_n=sin(y)/(cosh(x)-cos(y)), z_n=z; mglLogLog=11 – log-log coordinates x_n=lg(x), y_n=lg(y), z_n=lg(z); mglLogX=12 – log-x coordinates x_n=lg(x), y_n=y, z_n=z; mglLogY=13 – log-y coordinates x_n=x, y_n=lg(y), z_n=z.

Parameters:

  • how (Integer)

Returns:

  • (nil)


660
661
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 660

def set_coor
end

#set_cut(val) ⇒ nil

Cutting. Flag which determines how points outside bounding box are drawn. If it is true then points are excluded from plot (it is default) otherwise the points are projected to edges of bounding box.

Parameters:

  • val (bool)

Returns:

  • (nil)


225
226
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 225

def set_cut
end

#set_cut_box(p1, p1) ⇒ nil

Cutting. 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.

Parameters:

Returns:

  • (nil)


236
237
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 236

def set_cut_box
end

#set_def_font(name, path = "") ⇒ nil

Font settings. Load default font typeface (for all newly created HMGL/mglGraph objects) from path/name.

Parameters:

  • name (String)
  • path (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


361
362
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 361

def set_def_font
end

#set_def_scheme(sch) ⇒ nil

Palette and colors. Sets the sch as default color scheme. Default value is “BbcyrR”.

Parameters:

  • sch (String)

Returns:

  • (nil)


381
382
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 381

def set_def_scheme
end

#set_diffuse(bright) ⇒ nil

Lighting. Set brightness of diffusive light (only for local light sources).

Parameters:

  • bright (Float)

Returns:

  • (nil)


125
126
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 125

def set_diffuse
end

#set_draw_reg(nx = 1, ny = 1, m = 0) ⇒ long

Bitmap in memory. Limits drawing region by rectangular area of m-th cell of matrix with sizes nx*ny (like in subplot). This function can be used to update only small region of the image for purposes of higher speed. This function for advanced users only.

Parameters:

  • nx (Integer) (defaults to: 1)

    default=1

  • ny (Integer) (defaults to: 1)

    default=1

  • m (Integer) (defaults to: 0)

    default=0

Returns:

  • (long)


1549
1550
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1549

def set_draw_reg
end

#set_event_func(func, par = NULL) ⇒ bool

Stop drawing. Set callback function which will be called to process events of GUI library.

Parameters:

  • func (function)
  • par (nil) (defaults to: NULL)

    default=NULL

Returns:

  • (bool)


508
509
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 508

def set_event_func
end

#set_face_num(val) ⇒ nil

Default sizes. 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.

Parameters:

  • val (Integer)

Returns:

  • (nil)


196
197
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 196

def set_face_num
end

#set_font_def(fnt) ⇒ nil

Font settings. Sets the font specification (see Text printing). Default is ‘rC’ – Roman font centering.

Parameters:

  • fnt (String)

Returns:

  • (nil)


277
278
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 277

def set_font_def
end

#set_font_size(val) ⇒ nil

Font settings. 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.

Parameters:

  • val (Float)

Returns:

  • (nil)


287
288
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 287

def set_font_size
end

#set_font_size_cm(cm, dpi = 72) ⇒ nil

Font settings. Set FontSize by size in centimeters and picture DPI (default is 0.56 cm = 16 pt).

Parameters:

  • cm (Float)
  • dpi (Integer) (defaults to: 72)

    default=72

Returns:

  • (nil)


309
310
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 309

def set_font_size_cm
end

#set_font_size_in(cm, dpi = 72) ⇒ nil

Font settings. Set FontSize by size in inch and picture DPI (default is 0.22 in = 16 pt).

Parameters:

  • cm (Float)
  • dpi (Integer) (defaults to: 72)

    default=72

Returns:

  • (nil)


320
321
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 320

def set_font_size_in
end

#set_font_size_pt(cm, dpi = 72) ⇒ nil

Font settings. Set FontSize by size in pt and picture DPI (default is 16 pt for dpi=72).

Parameters:

  • cm (Float)
  • dpi (Integer) (defaults to: 72)

    default=72

Returns:

  • (nil)


298
299
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 298

def set_font_size_pt
end

#set_frame(i) ⇒ nil

Frames/Animation. Finishes the frame drawing and sets drawing data to frame i, which should be in range (0, GetNumFrame()-1). This function is similar to EndFrame() but don’t add frame to the GIF image.

Parameters:

  • i (Integer)

Returns:

  • (nil)


1336
1337
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1336

def set_frame
end

#set_func(eqx, eqy, eqz = "", eqa = "") ⇒ nil

Curved coordinates. Sets transformation formulas for curvilinear coordinate. Each string should contain mathematical expression for real coordinate depending on internal coordinates ‘x’, ‘y’, ‘z’ and ‘a’ or ‘c’ for colorbar. For example, the cylindrical coordinates are introduced as SetFunc(“x*cos(y)”, “x*sin(y)”, “z”);. For removing of formulas the corresponding parameter should be empty or NULL. Using transformation formulas will slightly slowing the program. Parameter EqA set the similar transformation formula for color scheme. Textual formulas.

Parameters:

  • eqx (String)
  • eqy (String)
  • eqz (String) (defaults to: "")

    default=“”

  • eqa (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


650
651
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 650

def set_func
end

#set_global_warn(info) ⇒ nil

Error handling. Set warning message info for global scope.

Parameters:

  • info (String)

Returns:

  • (nil)


469
470
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 469

def set_global_warn
end

#set_legend_marks(num) ⇒ nil

Legend. Set the number of marks in the legend. By default 1 mark is used.

Parameters:

  • num (Integer)

Returns:

  • (nil)


2102
2103
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2102

def set_legend_marks
end

#set_mark_size(val) ⇒ nil

Default sizes. Sets size of marks for 1D plotting. Default value is 1.

Parameters:

  • val (Float)

Returns:

  • (nil)


166
167
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 166

def set_mark_size
end

#set_mask(id, hex) ⇒ nil #set_mask(id, hex) ⇒ nil

Masks. Sets new bit matrix hex of size 8*8 for mask with given id. This is global setting which influence on any later usage of symbol id. The predefined masks are (see Color scheme): ‘-’ is 000000FF00000000, ‘+’ is 080808FF08080808, ‘=’ is 0000FF00FF000000, ‘;’ is 0000007700000000, ‘o’ is 0000182424180000, ‘O’ is 0000183C3C180000, ‘s’ is 00003C24243C0000, ‘S’ is 00003C3C3C3C0000, ‘~’ is 0000060990600000, ‘<’ is 0060584658600000, ‘>’ is 00061A621A060000, ‘j’ is 0000005F00000000, ‘d’ is 0008142214080000, ‘D’ is 00081C3E1C080000, ‘*’ is 8142241818244281, ‘^’ is 0000001824420000.

Overloads:

  • #set_mask(id, hex) ⇒ nil

    Parameters:

    • id (String)
    • hex (String)

    Returns:

    • (nil)
  • #set_mask(id, hex) ⇒ nil

    Parameters:

    • id (String)
    • hex (uint64_t)

    Returns:

    • (nil)


410
411
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 410

def set_mask
end

#set_mask_angle(angle) ⇒ nil

Masks. Sets the default rotation angle (in degrees) for masks. Note, you can use symbols ‘', ’/‘, ’I’ in color scheme for setting rotation angles as 45, -45 and 90 degrees correspondingly.

Parameters:

  • angle (Integer)

Returns:

  • (nil)


420
421
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 420

def set_mask_angle
end

#set_mesh_num(val) ⇒ nil

Default sizes. Sets approximate number of lines in mesh, fall, grid2 and also the number of hachures in vect, dew and the number of cells in cloud. By default (=0) it draws all lines/hachures/cells.

Parameters:

  • val (Integer)

Returns:

  • (nil)


186
187
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 186

def set_mesh_num
end

#set_obj_id(id) ⇒ nil

Bitmap in memory. Set the numeric id for object or subplot/inplot.

Parameters:

  • id (Integer)

Returns:

  • (nil)


1493
1494
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1493

def set_obj_id
end

#set_origin(p0) ⇒ nil #set_origin(x0, y0, z0 = NAN) ⇒ nil

Ranges (bounding box). Sets center of axis cross section. If one of values is NAN then MathGL try to select optimal axis position.

Overloads:

  • #set_origin(p0) ⇒ nil

    Parameters:

    Returns:

    • (nil)
  • #set_origin(x0, y0, z0 = NAN) ⇒ nil

    Parameters:

    • x0 (Float)
    • y0 (Float)
    • z0 (Float) (defaults to: NAN)

      default=NAN

    Returns:

    • (nil)


626
627
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 626

def set_origin
end

#set_origin_tick(val = true) ⇒ nil

Ticks. Enable/disable drawing of ticks labels at axis origin. In C/Fortran you can use mgl_set_flag(gr,val, MGL_NO_ORIGIN);.

Parameters:

  • val (bool) (defaults to: true)

    default=true

Returns:

  • (nil)


818
819
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 818

def set_origin_tick
end

#set_palette(colors) ⇒ nil

Palette and colors. Sets the palette as selected colors. Default value is “Hbgrcmyhlnqeup” that corresponds to colors: dark gray ‘H’, blue ‘b’, green ‘g’, red ‘r’, cyan ‘c’, magenta ‘m’, yellow ‘y’, gray ‘h’, blue-green ‘l’, sky-blue ‘n’, orange ‘q’, yellow-green ‘e’, blue-violet ‘u’, purple ‘p’. The palette is used mostly in 1D plots (see 1D plotting) 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 box or axis functions).

Parameters:

  • colors (String)

Returns:

  • (nil)


371
372
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 371

def set_palette
end

#set_plot_factor(val) ⇒ nil

Subplots and rotation. 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.

Parameters:

  • val (Float)

Returns:

  • (nil)


1002
1003
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1002

def set_plot_factor
end

#set_plot_id(id) ⇒ nil

Default sizes. Sets default name id as filename for saving (in FLTK window for example).

Parameters:

  • id (String)

Returns:

  • (nil)


206
207
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 206

def set_plot_id
end

#set_quality(val = MGL_DRAW_NORM) ⇒ nil

Export picture. Sets quality of the plot depending on value val: MGL_DRAW_WIRE=0 – no face drawing (fastest), MGL_DRAW_FAST=1 – no color interpolation (fast), MGL_DRAW_NORM=2 – high quality (normal), MGL_DRAW_HIGH=3 – high quality with 3d primitives (arrows and marks); MGL_DRAW_LMEM=0x4 – direct bitmap drawing (low memory usage); MGL_DRAW_DOTS=0x8 – for dots drawing instead of primitives (extremely fast).

Parameters:

  • val (Integer) (defaults to: MGL_DRAW_NORM)

    default=MGL_DRAW_NORM

Returns:

  • (nil)


1058
1059
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1058

def set_quality
end

#set_range(dir, dat, add = false) ⇒ nil

Ranges (bounding box). Sets the range for ‘x’-,‘y’-,‘z’- coordinate or coloring (‘c’) as minimal and maximal values of data dat. Parameter add=on shows that the new range will be joined to existed one (not replace it).

Parameters:

  • dir (String)
  • dat (MglData)
  • add (bool) (defaults to: false)

    default=false

Returns:

  • (nil)


520
521
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 520

def set_range
end

#set_ranges(xx, yy) ⇒ nil #set_ranges(xx, yy, zz) ⇒ nil #set_ranges(xx, yy, zz, cc) ⇒ nil

Ranges (bounding box). Sets the ranges of ‘x’-,‘y’-,‘z’-coordinates and coloring as minimal and maximal values of data xx, yy, zz, cc correspondingly.

Overloads:



564
565
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 564

def set_ranges
end

#set_rotated_text(val) ⇒ nil

Font settings. Sets to use or not text rotation.

Parameters:

  • val (bool)

Returns:

  • (nil)


256
257
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 256

def set_rotated_text
end

#set_size(width, height) ⇒ nil

Export picture. Sets size of picture in pixels. This function must be called before any other plotting because it completely remove picture contents.

Parameters:

  • width (Integer)
  • height (Integer)

Returns:

  • (nil)


1048
1049
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1048

def set_size
end

#set_tick_len(val, stt = 1) ⇒ nil

Ticks. The relative length of axis ticks. Default value is 0.1. Parameter stt>0 set relative length of subticks which is in sqrt(1+stt) times smaller.

Parameters:

  • val (Float)
  • stt (Float) (defaults to: 1)

    default=1

Returns:

  • (nil)


829
830
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 829

def set_tick_len
end

#set_tick_rotate(val) ⇒ nil

Ticks. Enable/disable ticks rotation if there are too many ticks or ticks labels are too long.

Parameters:

  • val (bool)

Returns:

  • (nil)


787
788
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 787

def set_tick_rotate
end

#set_tick_shift(d) ⇒ nil

Ticks. Set value of additional shift for ticks labels.

Parameters:

Returns:

  • (nil)


777
778
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 777

def set_tick_shift
end

#set_tick_skip(val) ⇒ nil

Ticks. Enable/disable ticks skipping if there are too many ticks or ticks labels are too long.

Parameters:

  • val (bool)

Returns:

  • (nil)


797
798
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 797

def set_tick_skip
end

#set_tick_templ(dir, templ) ⇒ nil

Ticks. Set template templ for x-,y-,z-axis ticks or colorbar ticks. It may contain TeX symbols also. If templ=“” then default template is used (in simplest case it is ‘%.2g’). Setting on template switch off automatic ticks tuning.

Parameters:

  • dir (String)
  • templ (String)

Returns:

  • (nil)


744
745
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 744

def set_tick_templ
end

#set_ticks(dir, d = 0, ns = 0, org = NAN, fact = "") ⇒ nil

Ticks. Set the ticks step d, number of sub-ticks ns (used for positive d) and initial ticks position org for the axis along direction dir (use ‘c’ for colorbar ticks). Variable d set step for axis ticks (if positive) or it’s number on the axis range (if negative). Zero value set automatic ticks. If org value is NAN then axis origin is used. Parameter fact set text which will be printed after tick label (like “pi” for d=M_PI).

Parameters:

  • dir (String)
  • d (Float) (defaults to: 0)

    default=0

  • ns (Integer) (defaults to: 0)

    default=0

  • org (Float) (defaults to: NAN)

    default=NAN

  • fact (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


702
703
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 702

def set_ticks
end

#set_ticks_time(dir, val, templ) ⇒ nil

Ticks. Sets time labels with step val and template templ for x-,y-,z-axis ticks or colorbar ticks. It may contain TeX symbols also. The format of template templ is the same as described in www.manpagez.com/man/3/strftime/. Most common variants are ‘%X’ for national representation of time, ‘%x’ for national representation of date, ‘%Y’ for year with century. If val=0 and/or templ=“” then automatic tick step and/or template will be selected. You can use mgl_get_time() function for obtaining number of second for given date/time string. Note, that MS Visual Studio couldn’t handle date before 1970.

Parameters:

  • dir (String)
  • val (Float)
  • templ (String)

Returns:

  • (nil)


756
757
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 756

def set_ticks_time
end

#set_ticks_val(dir, lbl, add = false) ⇒ nil #set_ticks_val(dir, val, lbl, add = false) ⇒ nil

Ticks. Set the manual positions val and its labels lbl for ticks along axis dir. If array val is absent then values equidistantly distributed in x-axis range are used. Labels are separated by ‘n’ symbol. Use SetTicks() to restore automatic ticks.

Overloads:

  • #set_ticks_val(dir, lbl, add = false) ⇒ nil

    Parameters:

    • dir (String)
    • lbl (String)
    • add (bool) (defaults to: false)

      default=false

    Returns:

    • (nil)
  • #set_ticks_val(dir, val, lbl, add = false) ⇒ nil

    Parameters:

    • dir (String)
    • val (MglData)
    • lbl (String)
    • add (bool) (defaults to: false)

      default=false

    Returns:

    • (nil)


721
722
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 721

def set_ticks_val
end

#set_time_utc(val) ⇒ nil

Ticks.

Enable/disable using UTC time for ticks labels. In C/Fortran you can use mgl_set_flag(gr,val, MGL_USE_GMTIME);.

Parameters:

  • val (bool)

Returns:

  • (nil)


808
809
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 808

def set_time_utc
end

#set_transp_type(type) ⇒ nil

Transparency. Set the type of transparency. Possible values are: Types of transparency.

Parameters:

  • type (Integer)

Returns:

  • (nil)


71
72
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 71

def set_transp_type
end

#set_tune_ticks(tune, pos = 1.15) ⇒ nil

Ticks. 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 tune&1 is nonzero) or common component (for narrow range, like from 0.999 to 1.000 – enabled if tune&2 is nonzero). Also set the position pos of common multiplier/component on the axis: =0 at minimal axis value, =1 at maximal axis value. Default value is 1.15. If tune&4 is nonzero then zeros will be added to fixed width of all axis labels.

Parameters:

  • tune (Integer)
  • pos (Float) (defaults to: 1.15)

    default=1.15

Returns:

  • (nil)


767
768
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 767

def set_tune_ticks
end

#set_warn(code, info = "") ⇒ nil

Error handling. Set warning code. Normally you should call this function only for clearing the warning state, i.e. call SetWarn(0);. Text info will be printed as is if code<0.

Parameters:

  • code (Integer)
  • info (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


431
432
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 431

def set_warn
end

#show_frame(i) ⇒ nil

Frames/Animation. Appends drawing data from frame i to current one. Function work if MGL_VECT_FRAME is set on (by default).

Parameters:

  • i (Integer)

Returns:

  • (nil)


1356
1357
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1356

def show_frame
end

#show_image(viewer, nowait = false) ⇒ nil

Export to file. Displays the current picture using external program viewer for viewing. The function save the picture to temporary file and call viewer to display it. If nowait=true then the function return immediately (it will not wait while window will be closed).

Parameters:

  • viewer (String)
  • nowait (bool) (defaults to: false)

    default=false

Returns:

  • (nil)


1266
1267
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1266

def show_image
end

#sphere(p, r, stl = "r") ⇒ nil

Primitives. Draw the sphere with radius r and center at point p=(x0, y0, z0) and color stl.

Parameters:

  • p (MglPoint)
  • r (Float)
  • stl (String) (defaults to: "r")

    default=“r”

Returns:

  • (nil)


1761
1762
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1761

def sphere
end

#start_gif(fname, ms = 100) ⇒ nil

Frames/Animation. Start writing frames into animated GIF file fname. Parameter ms set the delay between frames in milliseconds. You should not change the picture size during writing the cinema. Use CloseGIF() to finalize writing. Note, that this function is disabled in OpenGL mode.

Parameters:

  • fname (String)
  • ms (Integer) (defaults to: 100)

    default=100

Returns:

  • (nil)


1396
1397
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1396

def start_gif
end

#start_group(name) ⇒ nil

Export picture. 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.

Parameters:

  • name (String)

Returns:

  • (nil)


1077
1078
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1077

def start_group
end

#stem(y, pen = "", opt = "") ⇒ nil #stem(x, y, pen = "", opt = "") ⇒ nil #stem(x, y, z, pen = "", opt = "") ⇒ nil

1D plotting. These functions draw vertical lines from points to axis plane. See also area, bars, plot, mark. Stem sample

Overloads:

  • #stem(y, pen = "", opt = "") ⇒ nil

    Parameters:

    • y (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #stem(x, y, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #stem(x, y, z, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2320
2321
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2320

def stem
end

#step(y, pen = "", opt = "") ⇒ nil #step(x, y, pen = "", opt = "") ⇒ nil #step(x, y, z, pen = "", opt = "") ⇒ nil

1D plotting. These functions draw continuous stairs for points to axis plane. See also plot, stem, tile, boxs. Step sample

Overloads:

  • #step(y, pen = "", opt = "") ⇒ nil

    Parameters:

    • y (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #step(x, y, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #step(x, y, z, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2168
2169
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2168

def step
end

#stfa(re, im, dn, sch = "", opt = "") ⇒ nil #stfa(x, y, re, im, dn, sch = "", opt = "") ⇒ nil

Dual plotting. Draws spectrogram of complex array re+i*im for Fourier size of dn points at plane z equal to minimal z-axis value. For example in 1D case, result is density plot of data res(i,j)=|sum_d^dn exp(I*j*d)*(re(i*dn+d)+I*im(i*dn+d))|/dn with size (int(nx/dn), dn, ny). At this array re, im parametrically depend on coordinates x, y. The size of re and im must be the same. The minor dimensions of arrays x, y, re should be equal. Arrays x, y can be vectors (not matrix as re). STFA sample

Overloads:

  • #stfa(re, im, dn, sch = "", opt = "") ⇒ nil

    Parameters:

    • re (MglData)
    • im (MglData)
    • dn (Integer)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #stfa(x, y, re, im, dn, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • re (MglData)
    • im (MglData)
    • dn (Integer)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


3536
3537
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3536

def stfa
end

#stick_plot(num, ind, tet, phi) ⇒ nil

Subplots and rotation. Puts further plotting in ind-th cell of stick with num cells. At this, stick is rotated on angles tet, phi. The position is relative to previous subplot (or inplot with rel=false).

Parameters:

  • num (Integer)
  • ind (Integer)
  • tet (Float)
  • phi (Float)

Returns:

  • (nil)


924
925
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 924

def stick_plot
end

#stop(stop = true) ⇒ nil

Stop drawing. Ask to stop drawing if stop is non-zero, otherwise reset stop flag.

Parameters:

  • stop (bool) (defaults to: true)

    default=true

Returns:

  • (nil)


488
489
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 488

def stop
end

#sub_plot(nx, ny, m, stl = "<>_^", dx = 0, dy = 0) ⇒ nil

Subplots and rotation. Puts further plotting in a m-th cell of nx*ny grid of the whole frame area. 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 stl contain: From the aesthetical point of view it is not recommended to use this function with different matrices in the same frame. The position of the cell can be shifted from its default position by relative size dx, dy. Note, colorbar can be invisible (be out of image borders) if you set empty style ”.

Parameters:

  • nx (Integer)
  • ny (Integer)
  • m (Integer)
  • stl (String) (defaults to: "<>_^")

    default=“<>_^”

  • dx (Float) (defaults to: 0)

    default=0

  • dy (Float) (defaults to: 0)

    default=0

Returns:

  • (nil)


857
858
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 857

def sub_plot
end

#suppress_warn(state) ⇒ nil

Error handling. Disable printing warnings to stderr if state is nonzero.

Parameters:

  • state (bool)

Returns:

  • (nil)


459
460
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 459

def suppress_warn
end

#surf(z, sch = "", opt = "") ⇒ nil #surf(x, y, z, sch = "", opt = "") ⇒ nil

2D plotting. The function draws surface specified parametrically (x(i,j), y(i,j), z(i,j)). If string sch have symbol ‘#’ then grid lines are drawn. If string sch have symbol ‘.’ then plot by dots is produced. See also mesh, dens, belt, tile, boxs, surfc, surfa. Surf sample

Overloads:

  • #surf(z, sch = "", opt = "") ⇒ nil

    Parameters:

    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #surf(x, y, z, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2737
2738
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2737

def surf
end

#surf3(a, sch = "", opt = "") ⇒ nil #surf3(x, y, z, a, sch = "", opt = "") ⇒ nil

3D plotting. Draws num-th uniformly distributed in color range isosurfaces for 3d data. Here num is equal to parameter value in options opt (default is 3).

Overloads:

  • #surf3(a, sch = "", opt = "") ⇒ nil

    Parameters:

    • a (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #surf3(x, y, z, a, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • a (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


3114
3115
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3114

def surf3
end

#surf_3a(a, c, sch = "", opt = "") ⇒ nil #surf_3a(x, y, z, a, c, sch = "", opt = "") ⇒ nil

Dual plotting. Draws num-th uniformly distributed in color range isosurfaces for 3d data. At this array c can be vector with values of transparency and num=c.nx. In opposite case num is equal to parameter value in options opt (default is 3).

Overloads:

  • #surf_3a(a, c, sch = "", opt = "") ⇒ nil

    Parameters:

    • a (MglData)
    • c (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #surf_3a(x, y, z, a, c, sch = "", opt = "") ⇒ nil

    Parameters:

    Returns:

    • (nil)


3445
3446
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3445

def surf_3a
end

#surf_3c(a, c, sch = "", opt = "") ⇒ nil #surf_3c(x, y, z, a, c, sch = "", opt = "") ⇒ nil

Dual plotting. Draws num-th uniformly distributed in color range isosurfaces for 3d data. Here num is equal to parameter value in options opt (default is 3).

Overloads:

  • #surf_3c(a, c, sch = "", opt = "") ⇒ nil

    Parameters:

    • a (MglData)
    • c (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #surf_3c(x, y, z, a, c, sch = "", opt = "") ⇒ nil

    Parameters:

    Returns:

    • (nil)


3375
3376
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3375

def surf_3c
end

#surf_a(z, c, sch = "", opt = "") ⇒ nil #surf_a(x, y, z, c, sch = "", opt = "") ⇒ nil

Dual plotting. The function draws surface specified parametrically (x(i,j), y(i,j), z(i,j)) and transparent it by matrix c(i,j). If string sch have symbol ‘#’ then grid lines are drawn. If string sch have symbol ‘.’ then plot by dots is produced. All dimensions of arrays z and c must be equal. Surface is plotted for each z slice of the data. See also surf, surfc, surf3a. SurfA sample

Overloads:

  • #surf_a(z, c, sch = "", opt = "") ⇒ nil

    Parameters:

    • z (MglData)
    • c (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #surf_a(x, y, z, c, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • c (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


3420
3421
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3420

def surf_a
end

#surf_c(z, c, sch = "", opt = "") ⇒ nil #surf_c(x, y, z, c, sch = "", opt = "") ⇒ nil

Dual plotting. The function draws surface specified parametrically (x(i,j), y(i,j), z(i,j)) and color it by matrix c(i,j). If string sch have symbol ‘#’ then grid lines are drawn. If string sch have symbol ‘.’ then plot by dots is produced. All dimensions of arrays z and c must be equal. Surface is plotted for each z slice of the data. See also surf, surfa, surf3c. SurfC sample

Overloads:

  • #surf_c(z, c, sch = "", opt = "") ⇒ nil

    Parameters:

    • z (MglData)
    • c (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #surf_c(x, y, z, c, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • c (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


3350
3351
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3350

def surf_c
end

#table(val, txt, fnt = "", opt = "") ⇒ nil #table(x, y, val, txt, fnt = "", opt = "") ⇒ nil

1D plotting. These functions draw table with values of val and captions from string txt (separated by newline symbol ‘n’) at points (x, y) (default at (0,0)) related to current subplot. String fnt may contain: Option value set the width of the table (default is 1). See also plot, label. Table sample

Overloads:

  • #table(val, txt, fnt = "", opt = "") ⇒ nil

    Parameters:

    • val (MglData)
    • txt (String)
    • fnt (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #table(x, y, val, txt, fnt = "", opt = "") ⇒ nil

    Parameters:

    • x (Float)
    • y (Float)
    • val (MglData)
    • txt (String)
    • fnt (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2650
2651
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2650

def table
end

#tape(y, pen = "", opt = "") ⇒ nil #tape(x, y, pen = "", opt = "") ⇒ nil #tape(x, y, z, pen = "", opt = "") ⇒ nil

1D plotting. These functions draw tapes of normals for curve between points (x(i), y(i), z(i)). Initial tape(s) was selected in x-y plane (for ‘x’ in pen) and/or y-z plane (for ‘x’ in pen). The width of tape is proportional to barwidth and can be changed by option value. See also plot, flow, barwidth. Tape sample

Overloads:

  • #tape(y, pen = "", opt = "") ⇒ nil

    Parameters:

    • y (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #tape(x, y, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #tape(x, y, z, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2225
2226
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2225

def tape
end

#tens(y, c, pen = "", opt = "") ⇒ nil #tens(x, y, c, pen = "", opt = "") ⇒ nil #tens(x, y, z, c, pen = "", opt = "") ⇒ nil

1D plotting. These functions draw continuous lines between points (x(i), y(i), z(i)) with color defined by the special array c(i) (look like tension plot). String pen specifies the color scheme (see Color scheme) and style and/or width of line (see Line styles). See also plot, mesh, fall. Tens sample

Overloads:

  • #tens(y, c, pen = "", opt = "") ⇒ nil

    Parameters:

    • y (MglData)
    • c (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #tens(x, y, c, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • c (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #tens(x, y, z, c, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • c (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2198
2199
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2198

def tens
end

#ternary(tern) ⇒ nil

Curved coordinates. The function sets to draws Ternary (tern=1), Quaternary (tern=2) plot or projections (tern=4,5,6).

Ternary plot is special plot for 3 dependent coordinates (components) a, b, c so that a+b+c=1. MathGL uses only 2 independent coordinates a=x and b=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.

Correspondingly, Quaternary plot is plot for 4 dependent coordinates a, b, c and d so that a+b+c+d=1. MathGL uses only 3 independent coordinates a=x, b=y and d=z since it is enough to plot everything.

Projections can be obtained by adding value 4 to tern argument. So, that tern=4 will draw projections in Cartesian coordinates, tern=5 will draw projections in Ternary coordinates, tern=6 will draw projections in Quaternary coordinates. If you add 8 instead of 4 then all text labels will not be printed on projections.

Use Ternary(0) for returning to usual axis. Ternary axis Axis projection

Parameters:

  • tern (Integer)

Returns:

  • (nil)


678
679
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 678

def ternary
end

#text(y, text, fnt = "", opt = "") ⇒ nil #text(x, y, text, fnt = "", opt = "") ⇒ nil #text(x, y, z, text, fnt = "", opt = "") ⇒ nil

Text printing. The function draws text along the curve between points (x(i), y(i), z(i)) by font style fnt. The string fnt may contain symbols ‘t’ for printing the text under the curve (default), or ‘T’ for printing the text under the curve. The sizes of 1st dimension must be equal for all arrays x.nx=y.nx=z.nx. If array x is not specified then its an automatic array is used with values equidistantly distributed in x-axis range (see Ranges (bounding box)). If array z is not specified then z(i) equal to minimal z-axis value is used. String opt contain command options (see Command options).

Overloads:

  • #text(y, text, fnt = "", opt = "") ⇒ nil

    Parameters:

    • y (MglData)
    • text (String)
    • fnt (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #text(x, y, text, fnt = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • text (String)
    • fnt (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #text(x, y, z, text, fnt = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • text (String)
    • fnt (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


1947
1948
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1947

def text
end

#text_mark(y, txt, fnt = "", opt = "") ⇒ nil #text_mark(y, r, txt, fnt = "", opt = "") ⇒ nil #text_mark(x, y, r, txt, fnt = "", opt = "") ⇒ nil #text_mark(x, y, z, r, txt, fnt = "", opt = "") ⇒ nil

1D plotting. These functions draw string txt as marks with size proportional to r(i)*marksize at points (x(i), y(i), z(i)). By default (if omitted) r(i)=1. See also plot, mark, stem. TextMark sample

Overloads:

  • #text_mark(y, txt, fnt = "", opt = "") ⇒ nil

    Parameters:

    • y (MglData)
    • txt (String)
    • fnt (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #text_mark(y, r, txt, fnt = "", opt = "") ⇒ nil

    Parameters:

    • y (MglData)
    • r (MglData)
    • txt (String)
    • fnt (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #text_mark(x, y, r, txt, fnt = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • r (MglData)
    • txt (String)
    • fnt (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #text_mark(x, y, z, r, txt, fnt = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • r (MglData)
    • txt (String)
    • fnt (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2596
2597
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2596

def text_mark
end

#tile(z, sch = "", opt = "") ⇒ nil #tile(x, y, z, sch = "", opt = "") ⇒ nil

2D plotting. The function draws horizontal tiles for surface specified parametrically (x(i,j), y(i,j), z(i,j)). Such plot can be used as 3d generalization of step. See also surf, boxs, step, tiles. Tile sample

Overloads:

  • #tile(z, sch = "", opt = "") ⇒ nil

    Parameters:

    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #tile(x, y, z, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2837
2838
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2837

def tile
end

#tile_s(z, c, sch = "", opt = "") ⇒ nil #tile_s(x, y, z, r, sch = "", opt = "") ⇒ nil

Dual plotting. The function draws horizontal tiles for surface specified parametrically (x(i,j), y(i,j), z(i,j)). It is mostly the same as tile but the size of tiles is determined by r array. This is some kind of “transparency” useful for exporting to EPS files. Tiles is plotted for each z slice of the data. See also surfa, tile. TileS sample

Overloads:

  • #tile_s(z, c, sch = "", opt = "") ⇒ nil

    Parameters:

    • z (MglData)
    • c (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #tile_s(x, y, z, r, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • r (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


3490
3491
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3490

def tile_s
end

#title(txt, stl = "", size = -2) ⇒ nil

Subplots and rotation. Add text title for current subplot/inplot. Parameter stl can contain: Parameter size set font size. This function set off any aspects or rotations. So it should be used just after creating subplot.

Parameters:

  • txt (String)
  • stl (String) (defaults to: "")

    default=“”

  • size (Float) (defaults to: -2)

    default=-2

Returns:

  • (nil)


937
938
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 937

def title
end

#torus(r, z, pen = "", opt = "") ⇒ nil

1D plotting. These functions draw surface which is result of curve (r, z) rotation around axis. If string pen contain symbols ‘x’ or ‘z’ then rotation axis will be set to specified direction (default is ‘y’). If string pen have symbol ‘#’ then wire plot is produced. If string pen have symbol ‘.’ then plot by dots is produced. See also plot, axial. Torus sample

Parameters:

  • r (MglData)
  • z (MglData)
  • pen (String) (defaults to: "")

    default=“”

  • opt (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


2717
2718
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2717

def torus
end

#traj(x, y, ax, ay, sch = "", opt = "") ⇒ nil #traj(x, y, z, ax, ay, az, sch = "", opt = "") ⇒ nil

Vector fields. The function draws vectors (ax, ay, az) along a curve (x, y, z). The length of arrows are proportional to sqrt(ax^2+ay^2+az^2). String pen specifies the color (see Line styles). By default (pen=“”) color from palette is used (see Palette and colors). Option value set the vector length factor (if non-zero) or vector length to be proportional the distance between curve points (if value=0). 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 vect. Traj sample

Overloads:

  • #traj(x, y, ax, ay, sch = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • ax (MglData)
    • ay (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #traj(x, y, z, ax, ay, az, sch = "", opt = "") ⇒ nil

    Parameters:

    Returns:

    • (nil)


3562
3563
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3562

def traj
end

#tri_cont(id, x, y, z, c, sch = "", opt = "") ⇒ nil #tri_cont(id, x, y, z, sch = "", opt = "") ⇒ nil

Other plotting. The function draws contour lines for surface of triangles at z=v(k) (or at z equal to minimal z-axis value if sch contain symbol ‘_’). Triangle vertexes are set by indexes id of data points (x(i), y(i), z(i)). Contours are plotted for z(i,j)=v(k) where v(k) are values of data array v. If v is absent then arrays of option value elements equidistantly distributed in color range is used. String sch sets the color scheme. Array c (if specified) is used for contour coloring. First dimensions of id must be 3 or greater. Arrays x, y, z must have equal sizes. Parameter c set the colors of triangles (if id.ny=c.nx) or colors of vertexes (if x.nx=c.nx). See also triplot, cont, triangulation.

Overloads:

  • #tri_cont(id, x, y, z, c, sch = "", opt = "") ⇒ nil

    Parameters:

    Returns:

    • (nil)
  • #tri_cont(id, x, y, z, sch = "", opt = "") ⇒ nil

    Parameters:

    • id (MglData)
    • x (MglData)
    • y (MglData)
    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


4150
4151
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 4150

def tri_cont
end

#tri_cont_v(v, id, x, y, z, c, sch = "", opt = "") ⇒ nil #tri_cont_v(v, id, x, y, z, sch = "", opt = "") ⇒ nil

Other plotting. The function draws contour lines for surface of triangles at z=v(k) (or at z equal to minimal z-axis value if sch contain symbol ‘_’). Triangle vertexes are set by indexes id of data points (x(i), y(i), z(i)). Contours are plotted for z(i,j)=v(k) where v(k) are values of data array v. If v is absent then arrays of option value elements equidistantly distributed in color range is used. String sch sets the color scheme. Array c (if specified) is used for contour coloring. First dimensions of id must be 3 or greater. Arrays x, y, z must have equal sizes. Parameter c set the colors of triangles (if id.ny=c.nx) or colors of vertexes (if x.nx=c.nx). See also triplot, cont, triangulation.

Overloads:

  • #tri_cont_v(v, id, x, y, z, c, sch = "", opt = "") ⇒ nil

    Parameters:

    Returns:

    • (nil)
  • #tri_cont_v(v, id, x, y, z, sch = "", opt = "") ⇒ nil

    Parameters:

    Returns:

    • (nil)


4177
4178
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 4177

def tri_cont_v
end

#tri_plot(id, x, y, sch = "", opt = "") ⇒ nil #tri_plot(id, x, y, z, c, sch = "", opt = "") ⇒ nil #tri_plot(id, x, y, z, sch = "", opt = "") ⇒ nil

Other plotting. The function draws the surface of triangles. Triangle vertexes are set by indexes id of data points (x(i), y(i), z(i)). String sch sets the color scheme. If string contain ‘#’ then wire plot is produced. First dimensions of id must be 3 or greater. Arrays x, y, z must have equal sizes. Parameter c set the colors of triangles (if id.ny=c.nx) or colors of vertexes (if x.nx=c.nx). See also dots, crust, quadplot, triangulation. TriPlot and QuadPlot

Overloads:

  • #tri_plot(id, x, y, sch = "", opt = "") ⇒ nil

    Parameters:

    • id (MglData)
    • x (MglData)
    • y (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #tri_plot(id, x, y, z, c, sch = "", opt = "") ⇒ nil

    Parameters:

    Returns:

    • (nil)
  • #tri_plot(id, x, y, z, sch = "", opt = "") ⇒ nil

    Parameters:

    • id (MglData)
    • x (MglData)
    • y (MglData)
    • z (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


4125
4126
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 4125

def tri_plot
end

#tube(y, r, pen = "", opt = "") ⇒ nil #tube(y, r, pen = "", opt = "") ⇒ nil #tube(x, y, r, pen = "", opt = "") ⇒ nil #tube(x, y, r, pen = "", opt = "") ⇒ nil #tube(x, y, z, r, pen = "", opt = "") ⇒ nil #tube(x, y, z, r, pen = "", opt = "") ⇒ nil

1D plotting. These functions draw the tube with variable radius r(i) along the curve between points (x(i), y(i), z(i)). See also plot. Tube sample

Overloads:

  • #tube(y, r, pen = "", opt = "") ⇒ nil

    Parameters:

    • y (MglData)
    • r (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #tube(y, r, pen = "", opt = "") ⇒ nil

    Parameters:

    • y (MglData)
    • r (Float)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #tube(x, y, r, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • r (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #tube(x, y, r, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • r (Float)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #tube(x, y, z, r, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • r (MglData)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #tube(x, y, z, r, pen = "", opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • r (Float)
    • pen (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


2704
2705
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 2704

def tube
end

#vect(ax, ay, az, sch = "", opt = "") ⇒ nil #vect(x, y, z, ax, ay, az, sch = "", opt = "") ⇒ nil

Vector fields. This is 3D version of the first functions. Here arrays ax, ay, az must be 3-ranged tensors with equal sizes and the length and color of arrows is proportional to sqrt(ax^2+ay^2+az^2).

Overloads:

  • #vect(ax, ay, az, sch = "", opt = "") ⇒ nil

    Parameters:

    • ax (MglData)
    • ay (MglData)
    • az (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #vect(x, y, z, ax, ay, az, sch = "", opt = "") ⇒ nil

    Parameters:

    Returns:

    • (nil)


3585
3586
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3585

def vect
end

#vect3(ax, ay, az, sch = "", sval = -1, opt = "") ⇒ nil #vect3(x, y, z, ax, ay, az, sch = "", sval = -1, opt = "") ⇒ nil

Vector fields. The function draws 3D vector field plot for the field (ax, ay, az) depending parametrically on coordinates x, y, z. Vector field is drawn at slice sVal in direction (‘x’, ‘y’, ‘z’) if sch contain corresponding symbol (by default, ‘y’ direction is used). The length and color of arrows are proportional to sqrt(ax^2+ay^2+az^2). The number of arrows depend on meshnum. The appearance of the hachures (arrows) can be changed by symbols: See also vect, flow, dew. Vect3 sample

Overloads:

  • #vect3(ax, ay, az, sch = "", sval = -1, opt = "") ⇒ nil

    Parameters:

    • ax (MglData)
    • ay (MglData)
    • az (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • sval (Float) (defaults to: -1)

      default=-1

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)
  • #vect3(x, y, z, ax, ay, az, sch = "", sval = -1, opt = "") ⇒ nil

    Parameters:

    • x (MglData)
    • y (MglData)
    • z (MglData)
    • ax (MglData)
    • ay (MglData)
    • az (MglData)
    • sch (String) (defaults to: "")

      default=“”

    • sval (Float) (defaults to: -1)

      default=-1

    • opt (String) (defaults to: "")

      default=“”

    Returns:

    • (nil)


3638
3639
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 3638

def vect3
end

#view(tetx, tetz, tety = 0) ⇒ nil

Subplots and rotation. Rotates a further plotting relative to each axis (x, z, y) consecutively on angles TetX, TetZ, TetY. Rotation is done independently on rotate. Attention! this settings can not be overwritten by DefaultPlotParam(). Use Zoom(0,0,1,1) to return default view.

Parameters:

  • tetx (Float)
  • tetz (Float)
  • tety (Float) (defaults to: 0)

    default=0

Returns:

  • (nil)


1024
1025
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1024

def view
end

#write_bmp(fname, descr = "") ⇒ nil

Export to file. Exports current frame to BMP file. Parameter fname specifies the file name, descr adds description to file. There is no compression used.

Parameters:

  • fname (String)
  • descr (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


1143
1144
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1143

def write_bmp
end

#write_bps(fname, descr = "") ⇒ nil

Export to file. Exports current frame to EPS file using bitmap representation. Parameter fname specifies the file name, descr adds description to file. By default there is no description added. If file name is terminated by ‘z’ (for example, ‘fname.eps.gz’) then file will be compressed in gzip format.

Parameters:

  • fname (String)
  • descr (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


1176
1177
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1176

def write_bps
end

#write_eps(fname, descr = "") ⇒ nil

Export to file. 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 fname specifies the file name, descr adds description to file. By default there is no description added. If file name is terminated by ‘z’ (for example, ‘fname.eps.gz’) 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 quality=1 for plotting.

Parameters:

  • fname (String)
  • descr (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


1165
1166
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1165

def write_eps
end

#write_frame(fname = "", descr = "") ⇒ nil

Export to file. Exports current frame to a file fname which type is determined by the extension. Parameter descr adds description to file (can be “”). If fname=“” then the file ‘frame####.jpg’ is used, where ‘####’ is current frame id and name ‘frame’ is defined by plotid class property.

Parameters:

  • fname (String) (defaults to: "")

    default=“”

  • descr (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


1097
1098
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1097

def write_frame
end

#write_gif(fname, descr = "") ⇒ nil

Export to file. Exports current frame to GIF file. Parameter fname specifies the file name, descr 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.

Parameters:

  • fname (String)
  • descr (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


1132
1133
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1132

def write_gif
end

#write_jpeg(fname, descr = "") ⇒ nil

Export to file. Exports current frame to JPEG file. Parameter fname specifies the file name, descr 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.

Parameters:

  • fname (String)
  • descr (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


1121
1122
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1121

def write_jpeg
end

#write_json(fname, descr = "") ⇒ nil

Export to file. Exports current frame to textual file using JSON format. Later this file can be used for faster loading and viewing by JavaScript script. Parameter fname specifies the file name, descr adds description to file.

Parameters:

  • fname (String)
  • descr (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


1277
1278
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1277

def write_json
end

#write_obj(fname, descr = "") ⇒ nil

Export to file. Exports current frame to OBJ/MTL file using vector representation (see en.wikipedia.org/wiki/Wavefront_.obj_file, OBJ format 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 fname specifies the file name, descr adds description to file (default is file name).

Parameters:

  • fname (String)
  • descr (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


1221
1222
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1221

def write_obj
end

#write_off(fname, descr = "", colored = false) ⇒ nil

Export to file. Exports current frame to OFF file using vector representation (see people.sc.fsu.edu/~jburkardt/data/off/off.html, OFF format 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 fname specifies the file name, descr adds description to file (default is file name).

Parameters:

  • fname (String)
  • descr (String) (defaults to: "")

    default=“”

  • colored (bool) (defaults to: false)

    default=false

Returns:

  • (nil)


1255
1256
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1255

def write_off
end

#write_png(fname, descr = "", compr = "", alpha = true) ⇒ nil

Export to file. Exports current frame to PNG file. Parameter fname specifies the file name, descr adds description to file, alpha 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.

Parameters:

  • fname (String)
  • descr (String) (defaults to: "")

    default=“”

  • compr (Integer) (defaults to: "")

    default=“”

  • alpha (bool) (defaults to: true)

    default=true

Returns:

  • (nil)


1110
1111
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1110

def write_png
end

#write_prc(fname, descr = "", make_pdf = true) ⇒ nil

Export to file. Exports current frame to PRC file using vector representation (see en.wikipedia.org/wiki/PRC_%28file_format%29). 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 fname specifies the file name, descr adds description to file (default is file name). If parameter make_pdf=true and PDF was enabled at MathGL configure then corresponding PDF file with 3D image will be created.

Parameters:

  • fname (String)
  • descr (String) (defaults to: "")

    default=“”

  • make_pdf (bool) (defaults to: true)

    default=true

Returns:

  • (nil)


1210
1211
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1210

def write_prc
end

#write_stl(fname, descr = "") ⇒ nil

Export to file. Exports current frame to STL file using vector representation (see en.wikipedia.org/wiki/STL_(file_format), STL format 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 fname specifies the file name, descr adds description to file (default is file name.

Parameters:

  • fname (String)
  • descr (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


1243
1244
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1243

def write_stl
end

#write_svg(fname, descr = "") ⇒ nil

Export to file. 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 surfa, surf3a or cloud). 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 fname specifies the file name, descr adds description to file (default is file name). If file name is terminated by ‘z’ (for example, ‘fname.svgz’) 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 quality=1 for plotting.

Parameters:

  • fname (String)
  • descr (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


1187
1188
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1187

def write_svg
end

#write_tex(fname, descr = "") ⇒ nil

Export to file. 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 fname specifies the file name, descr 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.

Parameters:

  • fname (String)
  • descr (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


1198
1199
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1198

def write_tex
end

#write_tga(fname, descr = "") ⇒ nil

Export to file. Exports current frame to TGA file. Parameter fname specifies the file name, descr adds description to file. There is no compression used.

Parameters:

  • fname (String)
  • descr (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


1154
1155
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1154

def write_tga
end

#write_xyz(fname, descr = "") ⇒ nil

Export to file. Exports current frame to XYZ/XYZL/XYZF files using vector representation (see people.sc.fsu.edu/~jburkardt/data/xyz/xyz.html, XYZ format 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 fname specifies the file name, descr adds description to file (default is file name).

Parameters:

  • fname (String)
  • descr (String) (defaults to: "")

    default=“”

Returns:

  • (nil)


1232
1233
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1232

def write_xyz
end

#zoom(x1, y1, x2, y2) ⇒ nil

Subplots and rotation. 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 x1, x2, y1, y2 changes from 0 to 1. Attention! this settings can not be overwritten by any other functions, including DefaultPlotParam(). Use Zoom(0,0,1,1) to return default view.

Parameters:

  • x1 (Float)
  • y1 (Float)
  • x2 (Float)
  • y2 (Float)

Returns:

  • (nil)


1037
1038
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 1037

def zoom
end

#zoom_axis(p1, p2) ⇒ nil

Ranges (bounding box). Additionally extend axis range for any settings made by SetRange or SetRanges functions according the formula min = (max-min)*p1 and max = (max-min)*p1 (or min *= (max/min)^p1 and max *= (max/min)^p1 for log-axis range when inf>max/min>100 or 0<max/min<0.01). Initial ranges are (0, 1). Attention! this settings can not be overwritten by any other functions, including DefaultPlotParam().

Parameters:

Returns:

  • (nil)


637
638
# File 'lib/mathgl/doc/libdoc_core_en.rb', line 637

def zoom_axis
end