GR Native functions - red-data-tools/GR.rb GitHub Wiki
See Official GR reference...
Basics
-
GR.setviewport(xmin, xmax, ymin, ymax)
- xmin (Numeric) — The left horizontal coordinate of the viewport.
- xmax (Numeric) — The right horizontal coordinate of the viewport (0 <=
xmin
<xmax
<= 1). - ymin (Numeric) — The bottom vertical coordinate of the viewport.
- ymax (Numeric) — The top vertical coordinate of the viewport (0 <=
ymin
<ymax
<= 1).
-
GR.setwindow(xmin, xmax, ymin, ymax)
- xmin (Numeric) — The left horizontal coordinate of the window (
xmin
<xmax
). - xmax (Numeric) — The right horizontal coordinate of the window.
- ymin (Numeric) — The bottom vertical coordinate of the window (
ymin
<ymax
). - ymax (Numeric) — The top vertical coordinate of the window.
- xmin (Numeric) — The left horizontal coordinate of the window (
-
GR.axes
orGR.axes2d
- x_tick (Numeric) — The interval between minor tick marks on the X axis.
- y_tick (Numeric) — The interval between minor tick marks on the Y axis.
- x_org (Numeric) — The world coordinates of the origin (point of intersection) of the X axis.
- y_org (Numeric) — The world coordinates of the origin (point of intersection) of the Y axis.
- major_x (Integer) — Unitless integer values specifying the number of minor tick intervals between major tick marks. Values of 0 or 1 imply no minor ticks. Negative values specify no labels will be drawn for the associated axis.
- major_y (Integer) — Unitless integer values specifying the number of minor tick intervals between major tick marks. Values of 0 or 1 imply no minor ticks. Negative values specify no labels will be drawn for the associated axis.
- tick_size (Numeric) — The length of minor tick marks specified in a normalized device coordinate unit. Major tick marks are twice as long as minor tick marks. A negative value reverses the tick marks on the axes from inward facing to outward facing (or vice versa).
-
GR.updatews
-
GR.clearws
-
GR.text
workstation
Plugin | GKS_WSTYPE | File Type |
---|---|---|
built-in | pdf / 102 | |
built-in | ps / 62 | PS |
built-in | eps / 62 | EPS |
videoplugin | gif / 130 | GIF |
videoplugin | mov / 120 | MOV |
videoplugin | mp4 / 160 | MP4 |
videoplugin | webm / 161 | WEBM |
videoplugin | ogg / 162 | OGG |
gsplugin | bmp / 320 | BMP |
cairoplugin | bmp / 145 | BMP |
gsplugin | jpg / jpeg / 321 | JPEG |
cairoplugin | jpg / jpeg / 144 | JPEG |
gsplugin | png / 322 | PNG |
cairoplugin | png / 140 | PNG |
gsplugin | tif / tiff / 323 | TIFF |
cairoplugin | tif / tiff / 146 | TIFF |
figplugin | fig / 370 | FIG |
svgplugin | svg / 382 | SVG |
wmfplugin | wmf / 390 | WMF |
htmplugin | html / 430 | HTML |
pgfplugin | pgf / 314 | PGF |
Line Types
Index | Marker Type | Image |
---|---|---|
1 | LINETYPE_SOLID | ![]() |
2 | LINETYPE_DASHED | ![]() |
3 | LINETYPE_DOTTED | ![]() |
4 | LINETYPE_DASHED_DOTTED | ![]() |
-1 | LINETYPE_DASH_2_DOT | ![]() |
-2 | LINETYPE_DASH_3_DOT | ![]() |
-3 | LINETYPE_LONG_DASH | ![]() |
-4 | LINETYPE_LONG_SHORT_DASH | ![]() |
-5 | LINETYPE_SPACED_DASH | ![]() |
-6 | LINETYPE_SPACED_DOT | ![]() |
-7 | LINETYPE_DOUBLE_DOT | ![]() |
-8 | LINETYPE_TRIPLE_DOT | ![]() |
Marker Types
Index | Marker Type | Image | Description |
---|---|---|---|
1 | MARKERTYPE_DOT | ![]() |
Smallest displayable dot |
2 | MARKERTYPE_PLUS | ![]() |
Plus sign |
3 | MARKERTYPE_ASTERISK | ![]() |
Asterisk |
4 | MARKERTYPE_CIRCLE | ![]() |
Hollow circle |
5 | MARKERTYPE_DIAGONAL_CROSS | ![]() |
Diagonal cross |
-1 | MARKERTYPE_SOLID_CIRCLE | ![]() |
Filled circle |
-2 | MARKERTYPE_TRIANGLE_UP | ![]() |
Hollow triangle pointing upward |
-3 | MARKERTYPE_SOLID_TRI_UP | ![]() |
Filled triangle pointing upward |
-4 | MARKERTYPE_TRIANGLE_DOWN | ![]() |
Hollow triangle pointing downward |
-5 | MARKERTYPE_SOLID_TRI_DOWN | ![]() |
Filled triangle pointing downward |
-6 | MARKERTYPE_SQUARE | ![]() |
Hollow square |
-7 | MARKERTYPE_SOLID_SQUARE | ![]() |
Filled square |
-8 | MARKERTYPE_BOWTIE | ![]() |
Hollow bowtie |
-9 | MARKERTYPE_SOLID_BOWTIE | ![]() |
Filled bowtie |
-10 | MARKERTYPE_HOURGLASS | ![]() |
Hollow hourglass |
-11 | MARKERTYPE_SOLID_HGLASS | ![]() |
Filled hourglass |
-12 | MARKERTYPE_DIAMOND | ![]() |
Hollow diamond |
-13 | MARKERTYPE_SOLID_DIAMOND | ![]() |
Filled Diamond |
-14 | MARKERTYPE_STAR | ![]() |
Hollow star |
-15 | MARKERTYPE_SOLID_STAR | ![]() |
Filled Star |
-16 | MARKERTYPE_TRI_UP_DOWN | ![]() |
Hollow triangles pointing up and down |
-17 | MARKERTYPE_SOLID_TRI_RIGHT | ![]() |
Filled triangle point right |
-18 | MARKERTYPE_SOLID_TRI_LEFT | ![]() |
Filled triangle pointing left |
-19 | MARKERTYPE_HOLLOW_PLUS | ![]() |
Hollow plus sign |
-20 | MARKERTYPE_SOLID_PLUS | ![]() |
Solid plus sign |
-21 | MARKERTYPE_PENTAGON | ![]() |
Pentagon |
-22 | MARKERTYPE_HEXAGON | ![]() |
Hexagon |
-23 | MARKERTYPE_HEPTAGON | ![]() |
Heptagon |
-24 | MARKERTYPE_OCTAGON | ![]() |
Octagon |
-25 | MARKERTYPE_STAR_4 | ![]() |
4-pointed star |
-26 | MARKERTYPE_STAR_5 | ![]() |
5-pointed star (Pentagram) |
-27 | MARKERTYPE_STAR_6 | ![]() |
6-pointed star (Hexagram) |
-28 | MARKERTYPE_STAR_7 | ![]() |
7-pointed star (Heptagram) |
-29 | MARKERTYPE_STAR_8 | ![]() |
8-pointed star (Octagram) |
-30 | MARKERTYPE_VLINE | ![]() |
Vertical line |
-31 | MARKERTYPE_HLINE | ![]() |
Horizontal line |
-32 | MARKERTYPE_OMARK | ![]() |
O-mark |
Fonts
Index | Name | |
---|---|---|
101 | Times Roman | ![]() |
102 | Times Italic | ![]() |
103 | Times Bold | ![]() |
104 | Times Bold Italic | ![]() |
105 | Helvetica | ![]() |
106 | Helvetica Oblique | ![]() |
107 | Helvetica Bold | ![]() |
108 | Helvetica Bold Oblique | ![]() |
109 | Courier | ![]() |
110 | Courier Oblique | ![]() |
111 | Courier Bold | ![]() |
112 | Courier Bold Oblique | ![]() |
113 | Symbol | ![]() |
114 | Bookman Light | ![]() |
115 | Bookman Light Italic | ![]() |
116 | Bookman Demi | ![]() |
117 | Bookman Demi Italic | ![]() |
118 | New Century Schoolbook Roman | ![]() |
119 | New Century Schoolbook Italic | ![]() |
120 | New Century Schoolbook Bold | ![]() |
121 | New Century Schoolbook Bold Italic | ![]() |
122 | Avantgarde Book | ![]() |
123 | Avantgarde Book Oblique | ![]() |
124 | Avantgarde Demi | ![]() |
125 | Avantgarde Demi Oblique | ![]() |
126 | Palatino Roman | ![]() |
127 | Palatino Italic | ![]() |
128 | Palatino Bold | ![]() |
129 | Palatino Bold Italic | ![]() |
130 | Zapf Chancery Medium Italic | ![]() |
131 | Zapf Dingbats | ![]() |
232 | Computer Modern | ![]() |
233 | DejaVu Sans | ![]() |