foresight_script
foresight_script, interpreter of a gnuplot command subset.
Supported (with gnuplot abbreviations):
NAME = expression(a user variable, its value now),NAME(P1, ...) = expression(a user function, see foresight_expression); expressions take them everywhere, range ends included (set xrange [0:2*pi]);set|unset title|xlabel|ylabel|y2label|x2label ["text"],set xrange|yrange|y2range|x2range [min:max](*or empty autoscales an end),set|unset logscale [AXES](AXES concatenates x, y, y2, x2, cb, e.g.xy2; all when absent),set|unset grid,set|unset key,set output "file",set terminal svg|html [size W,H] [refresh SECONDS];set terminal dumb [size COLS,ROWS] [mono|ansi|ansi256|ansirgb](text, default 79x24 on standard output-),set terminal block [half|quadrants|sextants|braille] [size COLS,ROWS] [mono|ansi|ansi256|ansirgb](text drawn with Unicode block or Braille characters);set|unset multiplot [layout ROWS,COLS] [title "t"]: eachplotfills the next panel, settings carry over; without layout each panel lies in itsset origin X,Y/set size W,Hbox (page fractions); in a layout they give the next panel its own box, as gnuplot;set xtics|ytics|y2tics|x2tics [auto|STEP|START,STEP[,END]] [mirror|nomirror](y2 and x2 ticks are off until set),unset xtics|ytics|y2tics|x2tics,set format [AXES] ["fmt"],unset format,set key [on|off] [left|right|center] [top|bottom|center] [box|nobox] [autotitle [columnhead]|noautotitle],set style data|function STYLE,unset style function,set style line N [lc ...] [lt N] [lw W] [dt N] [pt N] [ps S];set datafile separator [whitespace|tab|comma|"chars"],unset datafile [separator];set samples N[,M];plot 'file' [using [X:]Y[:...]] [index N] [every I:J:K:L:M:N] [with STYLE] [title "t"|notitle] [axes x1y1|x1y2|x2y1|x2y2] [smooth FILTER] [bins[=N] [binrange [LO:HI]] [binwidth=W] [binvalue=sum|avg]] [lc [rgb] "color"|N] [lw W] [dt N] [pt N] [ps S], ...(''repeats the previous file; smooth and bins: see foresight_smooth), STYLElines|points|linespoints|impulses|steps|fsteps|histeps|dots|yerrorbars|xerrorbars|xyerrorbars|yerrorlines| xerrorlines|xyerrorlines(error bars:x:y:dyorx:y:low:high,x:y:dx:dyorx:y:xlow:xhigh:ylow:yhigh), abbreviated as gnuplot (foresight_style);replot [items]; ausingfield is a column number or a parenthesized expression,($2*1e3)(see foresight_expression), or a column header name,"residual";title columnhead[(N)]titles an item with a column header;ls N,lt Nin an item apply a line style, a linetype color;set colorsequence default|podo|classic|NAME [N]picks the linetype colors (NAME: a categorical order,batlowS, ...);with boxerrorbars|boxxyerror|candlesticks [whiskerbars [F]]|financebars|boxplot(gnuplot's layouts),set style boxplot [range R|fraction F] [[no]outliers] [pointtype P] [candlesticks|financebars] [medianlinewidth W] [separation S] [labels off|auto|x] [sorted|unsorted];with vectors|arrows [head|heads|nohead|backhead] [filled|empty|nofilled|noborder] [size [SYS] L,A] [fixed] [as|arrowstyle N],with ellipses [units xy],with polygons,with labels [left|center|right] [rotate by A] [offset X,Y] [point] [tc "c"](using x:y:N, the text of column N),with sectors(gnuplot's layouts);unset xrange|yrange|y2rangeautoscales;with parallelaxes [at X],set|unset spiderplot,with spiderplot(using Y[:key(N)], an axis per item, a line or polygon per row),set paxis N range [min:max]|tics [...]|label "t",unset paxis N tics,set style spiderplot [fs FILL] [lw W] [pt N] [ps S],set grid spiderplot;with boxes(using x:y[:width], from y = 0),with filledcurves [closed|x1|x2|y=V|xy=X,Y] [above|below](using x:y1:y2for a band),with rgbimage|rgbalpha(x:y:r:g:b[:a]),set|unset rgbmax V,fs|fillstyle FILLin an item,set style fill FILL(FILL:empty,[transparent] solid [D],pattern [N],border [lc C|-1],noborder),set boxwidth [W] [absolute|relative],unset boxwidth;with histograms(using Y[:xtic(N)], the rows at the point numbers 0, 1, ...),set style histogram clustered [gap G]|errorbars [gap G] [lw W]|rowstacked|columnstacked(errorbars:using Y:ERRorY:LOW:HIGH; columnstacked:key(N)the row names),plot newhistogram ["title"] [lt N] [fs FILL] [at X], ...groups;using ...:xtic(N)/xticlabels(N): the text of column N labels the abscissae, the labels replacing the x ticks;xtic(EXPR)a string expression (strcol(1) . ' K');x2tic,ytic,y2ticlikewise on their axis (the ordinates for y and y2; x2 and y2 once their ticks are set);pi|pointinterval Na marker every N points,pn|pointnumber Nabout N;pt "c"a character as the point (tcits color,fontignored);set errorbars [small|large|fullwidth|SIZE] [lc C] [lw W],unset errorbars;- string columns in
usingexpressions:strcol(N),stringcolumn(N)(N a number or a header name),columnhead(N), the pseudo-columnscolumn(-1)(block) andcolumn(-2)(dataset); the text of labels a column or an expression; plot 'file' [matrix] with image(using x:y:zon a regular grid, or the values of amatrixfile),set palette [rgbformulae R,G,B|defined (v c, ...)|cubehelix [start S] [cycles C] [saturation S]|file 'f' [index N] [every E] [using U]|gray|grey|color|NAME|positive| negative|maxcolors N|model RGB](NAME: a named palette of foresight_colormaps,viridis,batlow, ..., any case),set cbrange [min:max],set|unset cblabel ["t"],set|unset colorbox [vertical|horizontal] [default|user] [origin X,Y] [size W,H] [border|bdefault|noborder] [invert|noinvert] [front],set|unset cbtics,set format cb,set|unset logscale cb;with circles(using x:y[:r[:start:end]], wedges with angles in degrees); foresight'swith pie [donut F](using Y[:xtic(N)], alone in its panel);- foresight's panel charts:
with gauge range [A:B] [segments N] [format "fmt"],with radar,with rose [linear](using Y[:xtic(N)]), alone in their panel (several gauges or radars side by side); set|unset polar(items theta:r, functions oftoverset trange [min:max]),set angles degrees|radians(also the trigonometric functions of the expressions),set|unset theta [right|top|left|bottom] [clockwise|cw| counterclockwise|ccw],set rrange [min:max],set|unset rtics [...](as xtics),set|unset ttics [[START,]STEP] [format "fmt"],set|unset raxis,set grid [polar [STEP]],set border [MASK] [polar],unset border,set size [square|nosquare|ratio R|noratio] [W,H];- foresight extensions:
set terminal ... theme classic|vfd|lcd|washi|night [glow|noglow](any terminal), the colors of a 1980s display or of foresight's identity (see foresight_theme);fs ... segments N, bars cut into N cells over the y range (foresight_style);plot ... with readout [format "fmt"], the last finite value of the item in seven-segment digits on a glass offmt(a printf conversion with a field width,%10.3eby default; see foresight_readout),lcits only style option;set readout [on|off] [left|right|center] [top|bottom|center] [horizontal|vertical] [opaque|noopaque] [size H],unset readout; set label [N] "text" at POS ...,set arrow [N] from POS to|rto POS ...,set object [N] rectangle|circle|ellipse| polygon ...,unset label|arrow|object [N],set style arrow N ...,unset style arrow,set style rectangle ...(seeannotation_option, foresight_annotations);- time data:
set xdata|ydata|x2data|y2data [time](the x or y field read withset timefmt "fmt", the axis ticked and labelled in time units),set format x "%H:%M" [timedate|numeric], time strings as range ends and tick positions,timecolumn(N[, "fmt"]),strftime(fmt, t),strptime(fmt, s),time(0)(see foresight_time); - datablocks
$NAME << WORD(the lines up to one starting with WORD) plotted, fitted, stated as a file (plot $D),print $NAME,load FILE,call FILE ARG1 ...(ARG0..ARG9, ARGC, restored after it),eval STRING, macros@name(a string variable's value),undefine NAME|NAME*|$NAME;$NAME[i]a line of a datablock,|$NAME|their number; inline data'-'of plot, replot, fit and stats (the lines after the statement up to one starting withe, one block per item); - arrays:
array A[N],array A[N] = [E1, ...],array A = [E1, ...](elements of any type, some possibly without a value),A[i] = E,A[i]and|A|in expressions (an index of a data row resolved on each row),index(A, V),print A,plot Aandstats A(the index and the value of each element, as a file),ARGV(the arguments ofcallandforesight -c); system("command")(its standard output, run when the expression is compiled),system "command",`command`substitution outside single quotes;reset [session|errors|bind](seereset_command);set table ["file"|$NAME] [append],unset table(plots write their points as text, seewrite_table);pause SECONDS|-1|mouse ["message"](seepause_command);rereadis an error, deprecated in gnuplot 6.0;- a function of
xas a plot item,plot sin(x)/x title "sinc"(same options, styles lines, points or linespoints,set style function,linesby default): sampled atset samplespoints (100) over the x range before its extension to the ticks, the data extent, or [-10:10] with neither; evenly in log x on a log axis. - the pseudo-files
'+'(samples of a variable, column 1) and'++'(a u, v grid, columns 1 and 2),plot sample [t=a:b:step] '+' using (t):(f(t)), an item's[name=a:b:step];set urange,set vrange,set isosamples(the'++'grid; surfaces otherwise),unset trange|rrange|urange|vrange. - read and ignored, as they leave gnuplot's 2D svg output unchanged:
set|unset mouse,set|unset macros(macros always on),set pointintervalbox,set zrange,set|unset minussignandset|unset microwith the default encoding (rejected with utf8, where gnuplot changes the signs);refreshisreplotwithout new items;set|unset overflow [float|undefined|NaN](integer overflow, seeforesight_expression),set|unset mttics [N](minor ticks on the polar border),unset samples(100).
Anything else is an error naming the command, never silently ignored. Errors are returned (iostat, iomsg with source:line:), not stopped on, so a watch loop can survive a bad cycle.
Source: src/lib/foresight_script.F90
Dependencies
Contents
- line_style_object
- polar_grid_type
- loop_level
- local_state
- script_object
- script_model
- push
- init
- gnuplot_values
- store_variable
- store_element
- fetch_element
- fetch_variable
- run_block
- run_file
- run_text
- execute
- do_block
- for_clauses
- set_for
- run_loops
- for_values
- set_loop_variable
- while_block
- if_block
- run_body
- old_if_line
- run_list
- truth_of
- stats_command
- print_command
- fit_command
- script_model_values
- script_model_slopes
- set_parameter
- get_parameter
- binary_items
- sparse_items
- matrix_header_items
- plot_command
- array_elements
- plot_items
- call_command
- pause_command
- reset_command
- write_table
- expand_macros
- wall_option
- annotation_option
- range_value
- set_time_data
- load_data
- register_file
- save_output
- set_command
- unset_command
- fix_range
- item_auto_title
- smooth_scans3d
- map_points
- set_heights
- append_text
- using_parts
- exit_command
- push_local
- inline_items
- inline_statement
- autoscale_axis
- split_words
- split_range
- array_command
- default_styles
- expand_backquotes
- split_arguments
- regular_grid
- resolve_colors
- fail
- parse_using
- apply_line_style
- matrix_every
- parse_every
- sharpened
- above_below_base
- filled_options
- push_line_style
- fetch_voxel
- vgrid_ranges
- voxel_option
- voxel_statement
- fill_grid
- voxel_items
- string_expression
- font_spec
- string_argument
- text_color
- names_variable
- word_count
- first_word
- assignment
- is_cntrparam_word
- latex_title
- sector_values
- exact_real
- axis_span
- replace_colons
- top_colon
- is_datablock
- string_variable_of
- last_semicolon
- heredoc
- for_follows
- leading_word
- inline_name
- matching
- block_body
- old_if
- same_line_end
- parenthesized
- mentions
- closing_bracket
- after_command
- axes_argument
- style_code
- smooth_name
- canonical_style
- change_extension
- extension
- is_multiplot_option
- coordinate_system
- keyword
- is_word
- next_integer
- clip_words
- next_real
- next_length
- next_word
- no_more
- columnhead_title
- function_drawable
- colormap_index
- plain_data_format
- binary_type_name
- findloc_name
- in_wedge
- is_item_option
- is_line_option
- special_color
- argb_color
- line_option
- plain_columns
- sum_head
- expression_end
- expression_source
- valid_axes
- read_whole
- to_number
- vgrid_index
- split_top
- voxel_word
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
DUMB_CELL | real(kind=R8P) | parameter | Text device cell size [font size]. |
FOREVER | integer(kind=I4P) | parameter | Values of an unbounded plot iteration, for [i=A:*], at most. |
LC_VARIABLE | character(len=12) | parameter | lc variable marker in a line color. |
LC_RGB_VARIABLE | character(len=12) | parameter | lc rgb variable marker in a line color. |
warned_families | character(len=1024) | save | Font families warned about (not compiled in), |name| each. |
LC_PALETTE_Z | character(len=12) | parameter | lc palette [z] marker in a line color. |
PI_SCRIPT | real(kind=R8P) | parameter | pi. |
LC_PALETTE_CB | character(len=12) | parameter | lc palette cb V marker in a line color. |
LC_PALETTE_FRAC | character(len=12) | parameter | lc palette frac F marker in a line color. |
FUNCTION_STYLES | character(len=*) | parameter | Styles drawing functions. |
active | class(script_object) | pointer | The interpreter running (function blocks run in it). |
Derived Types
line_style_object
Line properties: a set style line, or the options of a plot item; unallocated means the default.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
id | integer(kind=I4P) | Style number. | |
lc | character(len=:) | allocatable | Color. |
lw | real(kind=R8P) | allocatable | Line width. |
dt | integer(kind=I4P) | allocatable | Dash type. |
ps | real(kind=R8P) | allocatable | Point size. |
pt | integer(kind=I4P) | allocatable | Point type. |
pi | integer(kind=I4P) | allocatable | A point every N (pointinterval). |
palette | real(kind=R8P) | Value of lc palette cb V or frac F. | |
pt_char | character(len=:) | allocatable | A character as the point (pt "c"). |
pn | integer(kind=I4P) | allocatable | About N points evenly spread (pointnumber). |
colormap | character(len=:) | allocatable | A named colormap (lc palette NAME). |
ptdef | integer(kind=I4P) | Default point type from lt N/ls N (gnuplot), 0 if none. |
polar_grid_type
gnuplot's set polar grid: the polar grid of with surface and the weighting of the data on it.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
theta_segments | integer(kind=I4P) | Angular segments. | |
r_segments | integer(kind=I4P) | Radial segments. | |
mode | integer(kind=I4P) | Weighting: 1 qnorm, 2 gauss, 3 cauchy, 4 exp, 5 box. | |
norm_q | integer(kind=I4P) | qnorm power. | |
kdensity | logical | Sums of weights (a kernel density), not weighted means. | |
scale | real(kind=R8P) | Distance scale of the kernels. | |
rmin | real(kind=R8P) | Radial clipping start (r [min:max]). | |
rmax | real(kind=R8P) | Radial clipping end. | |
tmin | real(kind=R8P) | Angular clipping start [deg] (theta [min:max]). | |
tmax | real(kind=R8P) | Angular clipping end [deg]. |
loop_level
One for [...] clause of a plot item: its variable, values, the value in use and the variable before the loop.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
name | character(len=:) | allocatable | Loop variable. |
values | type(token_object) | allocatable | Values, as text. |
words | logical | String values. | |
pos | integer(kind=I4P) | Value in use. | |
saved | type(saved_variable) | The variable before the loop. | |
forever | logical | for [i=A:*]: until an item yields no valid point. | |
clause | character(len=:) | allocatable | The clause, evaluated again when an outer variable moves. |
dependent | logical | Bounds depending on an outer variable. |
local_state
A variable made local in a function block: its state before, restored when the block ends.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
v | type(saved_variable) | The variable of the name. | |
a | type(saved_array) | The array of the name. |
script_object
Script interpreter state.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
figure | type(figure_object) | Figure being built. | |
output | character(len=:) | allocatable | Current output file. |
output_set | logical | Output set by set output. | |
default_output | character(len=:) | allocatable | The output given at init, back after a bare set output. |
previous_file | character(len=:) | allocatable | File of the last plot item, for ''. |
last_plot | character(len=:) | allocatable | Items of the last plot, for replot. |
data_files | type(token_object) | allocatable | Data files read, for watching. |
live_refresh | integer(kind=I4P) | HTML reload period applied when none is set [s]. | |
multiplot | logical | Inside set multiplot. | |
layout_kept | logical | An origin and size set before a multiplot layout. | |
kept_origin | real(kind=R8P) | That origin, back after unset multiplot. | |
kept_size | real(kind=R8P) | That size, back after unset multiplot. | |
parametric | logical | gnuplot set parametric: function items in pairs, x(t), y(t) over trange. | |
advance_pending | logical | A multiplot panel was plotted: the next command opens the next panel. | |
data_style | character(len=:) | allocatable | Default plot style, set style data. |
function_style | character(len=:) | allocatable | Default function style, set style function. |
autotitle | character(len=:) | allocatable | Untitled items: file (as written), columnhead, none (gnuplot set key [no]autotitle). |
line_styles | type(line_style_object) | allocatable | set style line definitions. |
polar_grid | type(polar_grid_type) | set polar grid. | |
separator | character(len=:) | allocatable | Data cell separators, empty for whitespace. |
missing | character(len=:) | allocatable | Missing data string, empty for none. |
comments | character(len=:) | allocatable | Characters starting a comment in data files. |
textbox_drawn | logical | set style textbox [N]: the boxed texts of style N have their box (opaque, or a border: gnuplot's svg draws the background then). | |
column_headers | logical | set datafile columnheaders: the first row of each dataset is a header. | |
samples | integer(kind=I4P) | Function samples, set samples. | |
rgbmax | real(kind=R8P) | Full intensity of RGB image components, set rgbmax. | |
binary_count | integer(kind=I4P) | Datablocks made of binary files ($__binaryN). | |
vgrids | type(vgrid_object) | allocatable | Voxel grids (set vgrid $name). |
vgrid_active | integer(kind=I4P) | The active one, 0 for none. | |
iso_triangles | logical | set isosurface triangles (else mixed). | |
iso_inside | integer(kind=I4P) | set isosurface insidecolor N (read, unused). | |
chi_fraction | real(kind=R8P) | Default concave hull length, a fraction of the longest convex hull edge (set chi_shape fraction). | |
symbols | type(symbols_object) | User variables and functions, a = 2, f(x) = .... | |
fit_options | type(fit_settings) | set fit limit, maxiter, lambda, scaling options. | |
fit_verbosity | character(len=7) | set fit quiet|results|brief: the report on the standard error (none by default, unlike gnuplot). | |
fit_logfile | character(len=:) | allocatable | set fit logfile, empty for none (the default). |
fit_errorvariables | logical | set fit errorvariables: NAME_err set. | |
fit_covariancevariables | logical | set fit covariancevariables: FIT_COV_A_B set. | |
timefmt | character(len=:) | allocatable | Input time format, gnuplot set timefmt. |
time_data | logical | Time data on x, y, y2, x2 (set xdata time). | |
print_file | character(len=:) | allocatable | set print: '' the standard error (gnuplot's default), '-' the standard output, else a file. |
loop_depth | integer(kind=I4P) | Loops (do for, while) being run. | |
loop_signal | integer(kind=I4P) | break (1) or continue (2) pending, else 0. | |
table | logical | set table: plots write their points as text. | |
arrow_styles | type(arrow_object) | allocatable | set style arrow N definitions (their tags). |
rectangle_style | type(shape_object) | set style rectangle: new rectangles' style. | |
table_file | character(len=:) | allocatable | standard output. |
table_sep | character(len=1) | set table separator, of plot with table. | |
block_depth | integer(kind=I4P) | Function blocks running. | |
returned | logical | return EXPR gave the running block a value. | |
return_value | type(value_object) | That value. | |
locals | type(local_state) | allocatable | Variables made local by the running blocks. |
encoding | character(len=:) | allocatable | set encoding: GPVAL_ENCODING, default or utf8. |
minus_sign | logical | set minussign: no effect with the default encoding. | |
micro | logical | set micro: no effect with the default encoding. | |
term_name | character(len=:) | allocatable | The terminal: GPVAL_TERM. |
exit_status | integer(kind=I4P) | exit status N: the status the run ends with. | |
dummy | character(len=:) | allocatable | set dummy NAME: the functions' variable, empty for gnuplot's (x, t in polar mode). |
isosamples | integer(kind=I4P) | set isosamples N,M: M, the v samples of '++' and the iso-curves of y of the splot functions. | |
isosamples1 | integer(kind=I4P) | N: the iso-curves of x of the splot functions. | |
samples2 | integer(kind=I4P) | set samples N,M: M, the samples along y of the splot functions' iso-curves of x. | |
last_splot | logical | The last plot a splot (for replot, refresh). | |
uv_range | real(kind=R8P) | set urange, set vrange (columns u, v). | |
data_curve | character(len=:) | allocatable | set style data filledcurves OPTIONS: the options of the data filledcurves given none. |
function_curve | character(len=:) | allocatable | The same of the functions (set style function). |
colormap_names | character(len=64) | allocatable | Named colormaps (set colormap new NAME). |
mapping | integer(kind=I4P) | set mapping: 0 cartesian, 1 spherical (theta, phi, r), 2 cylindrical (theta, z, r) splot data. | |
dummies | character(len=:) | allocatable | set dummy names, blank separated (the variables of a fit of several), empty for gnuplot's x y. |
colormaps | type(colormap_object) | allocatable | Their palettes and ranges. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
execute | pass(self) | Execute one statement. |
init | pass(self) | Reset the interpreter. |
run_file | pass(self) | Run a script file. |
run_text | pass(self) | Run script text. |
assignment | pass(self) | a = 2, f(x) = .... |
plot_command | pass(self) | plot. |
plot_items | pass(self) | plot items, binary files as datablocks. |
binary_items | pass(self) | Binary files of plot items as datablocks. |
sparse_items | pass(self) | Sparse matrices of plot items as datablocks. |
matrix_header_items | pass(self) | Matrices with headers of plot items as datablocks. |
reset_command | pass(self) | reset. |
pause_command | pass(self) | pause. |
write_table | pass(self) | The points of a plot as text (set table). |
fit_command | pass(self) | fit. |
print_command | pass(self) | print. |
stats_command | pass(self) | stats. |
load_data | pass(self) | Load a data file or a datablock. |
set_time_data | pass(self) | set xdata time, set xdata. |
range_value | pass(self) | Value of a range end. |
colormap_index | pass(self) | Index of a named colormap, 0 if none. |
annotation_option | pass(self) | set label, set arrow, set object. |
wall_option | pass(self) | set wall. |
call_command | pass(self) | load, call. |
expand_macros | pass(self) | @name substitution. |
do_block | pass(self) | do for [...] { ... }. |
set_for | pass(self) | set for [...] OPTION, unset for [...] OPTION. |
while_block | pass(self) | while (...) { ... }. |
if_block | pass(self) | if (...) { ... } else .... |
run_body | pass(self) | The statements of a block. |
old_if_line | pass(self) | gnuplot's old one-line if. |
run_list | pass(self) | Statements in order. |
run_loops | pass(self) | Nested for clauses of a block. |
string_expression | pass(self) | A string expression across tokens. |
string_argument | pass(self) | The string after a set option. |
text_color | pass(self) | The color after tc. |
register_file | pass(self) | Remember a data file. |
save_output | pass(self) | Render to the current output. |
set_command | pass(self) | set. |
unset_command | pass(self) | unset. |
exit_command | pass(self) | exit, quit. |
vgrid_index | pass(self) | A voxel grid by name. |
vgrid_ranges | pass(self) | The active voxel grid's ranges. |
voxel_option | pass(self) | set vgrid, set vxrange..., set isosurface. |
voxel_statement | pass(self) | unset vgrid, vclear, voxel(...) =, vfill. |
voxel_items | pass(self) | splot items of voxel grids as datablocks. |
script_model
A fit model: a user expression of x whose parameters are user variables, set and the expression compiled again for each parameter vector (a user variable is a constant of a compiled expression).
Inheritance
Extends: fit_model
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
text | character(len=:) | allocatable | Model expression. |
names | character(len=32) | allocatable | Parameter names. |
x | real(kind=R8P) | allocatable | Abscissae. |
degrees | logical | Angles in degrees. | |
symbols | type(symbols_object) | User variables and functions, a copy of the script's. | |
xs | real(kind=R8P) | allocatable | Independent variables of each point (point, variable), several. |
vars | character(len=:) | allocatable | Their names, blank separated (columns 1, 2, ... of a row). |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
values | pass(self) | Values at the abscissae. |
slopes | pass(self) | Slopes at the abscissae (xyerrors). |
Interfaces
push
Append an item through a temporary: nvfortran 26.9 corrupts list = [list, item] (and any list = f(list)) when the items hold deferred-length characters.
Module procedures: push_line_style
Subroutines
init
Reset the interpreter; plots go to output until set output, in the output theme (see foresight_theme, blank or absent: classic) until set terminal ... theme.
subroutine init(self, output, theme)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
output | character(len=*) | in | Default output file. | |
theme | character(len=*) | in | optional | Default output theme. |
Call graph
gnuplot_values
gnuplot's GPVAL_* variables of foresight: the gnuplot version it follows (6.0, patchlevel 0), its compile options (only those of gnuplot that foresight has: scripts test them to skip what is missing), the encoding, the terminal and the terminals, the system.
subroutine gnuplot_values(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. |
Call graph
store_variable
An assignment run by an expression (foresight_expression's store_hook), (a = 2, a + 1): the variable of the active interpreter set.
subroutine store_variable(name, v)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
name | character(len=*) | in | Variable name. | |
v | type(value_object) | in | Value. |
Call graph
store_element
An array element assigned by an expression (foresight_expression's element_hook), (A[$0+1] = $2): the element of the active interpreter's array set, ok false if out of range.
subroutine store_element(name, i, v, ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
name | character(len=*) | in | Array name. | |
i | integer(kind=I8P) | in | Element. | |
v | type(value_object) | in | Value. | |
ok | logical | out | Stored. |
Call graph
fetch_element
An array element read when an expression runs that assigns elements of it (foresight_expression's element_fetch_hook): the element of the active interpreter's array.
subroutine fetch_element(name, i, v, found, set)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
name | character(len=*) | in | Array name. | |
i | integer(kind=I8P) | in | Element. | |
v | type(value_object) | out | Value. | |
found | logical | out | In range. | |
set | logical | out | With a value. |
Call graph
fetch_variable
The value of a variable an expression assigns, read when it runs (foresight_expression's fetch_hook).
subroutine fetch_variable(name, v, found)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
name | character(len=*) | in | Variable name. | |
v | type(value_object) | out | Value. | |
found | logical | out | A variable of that name. |
Call graph
run_block
gnuplot 6.0 function block name called on args (foresight_expression's block_hook): its body run by the active interpreter with ARGC and ARGV the arguments (restored after), the variables made local restored when it ends; the value of its return, ok false if none (undefined) or if it failed (message). Parameter names. One name. End of the first line. Comma. Parameter counter.
Attributes: recursive
subroutine run_block(name, args, result, ok, message)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
name | character(len=*) | in | Block name. | |
args | type(value_object) | in | Arguments. | |
result | type(value_object) | out | Returned value. | |
ok | logical | out | A value returned. | |
message | character(len=:) | out | allocatable | Error, empty if none. |
Call graph
run_file
Run the script file. With args (as gnuplot's gnuplot -c FILE ARG1 ...), ARG0 is the file name, ARG1 to ARG9 the arguments (empty beyond them), ARGC their number.
Attributes: recursive
subroutine run_file(self, file, iostat, iomsg, args)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
file | character(len=*) | in | Script file. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
args | character(len=*) | in | optional | Script arguments, at most 9. |
Call graph
run_text
Run script text: lines ending in \ continue on the next one; the first error stops the run. A line $NAME << WORD starts a datablock: the lines after it, as they are, up to a line starting with WORD; a line function $NAME << WORD a function block (gnuplot 6.0). A return ends the run. The definition after function. Opening parenthesis. Closing parenthesis. The <<.
Attributes: recursive
subroutine run_text(self, text, iostat, iomsg, source)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | target | Interpreter. |
text | character(len=*) | in | Script text. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message, source:line: .... |
source | character(len=*) | in | optional | Source name for messages. |
Call graph
execute
Execute one statement. Statement without leading blanks.
Returned value.
Variable name. Its state before. End of the name.
The statement, its leading blanks removed.
The variable's string. A string variable.
Attributes: recursive
subroutine execute(self, statement, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | target | Interpreter. |
statement | character(len=*) | in | Statement. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
do_block
gnuplot do for [i = a:b[:c]] [for [...]] { ... } and do for [w in "words"] { ... }: the body run for each value, the clauses nested left to right; the loop variable is local to the loop (its value before is restored, or it is removed), bounds are truncated to integers, break leaves the whole do, continue its innermost clause.
Attributes: recursive
subroutine do_block(self, statement, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
statement | character(len=*) | in | The whole statement. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
for_clauses
The leading for [...] clauses of rest (brackets removed), rest left after them.
subroutine for_clauses(rest, specs, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
rest | character(len=:) | inout | allocatable | Text, the clauses removed. |
specs | type(token_object) | out | allocatable | Clauses. |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
set_for
gnuplot set for [i = a:b] OPTION ... and unset for [...] OPTION: the command run for each value of the clauses (nested left to right), the loop variable local to it, as do for.
Attributes: recursive
subroutine set_for(self, statement, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
statement | character(len=*) | in | The whole statement. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
run_loops
Run clause level of specs, the inner clauses (or the body) for each of its values.
Attributes: recursive
subroutine run_loops(self, specs, level, body, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
specs | type(token_object) | in | for clauses. | |
level | integer(kind=I4P) | in | Clause. | |
body | character(len=*) | in | Block body. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
for_values
The values of a for clause: var = a:b[:c] (integers, bounds truncated, c 1 by default) or var in "w1 w2" (the words of a string expression, words true).
subroutine for_values(self, text, var, values, words, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | in | Interpreter. | |
text | character(len=*) | in | Clause, brackets removed. | |
var | character(len=:) | out | allocatable | Loop variable. |
values | type(token_object) | out | allocatable | Values, as text. |
words | logical | out | in form: the values are strings. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
set_loop_variable
Set the loop variable name to value: a string (a word) or an integer in decimal.
subroutine set_loop_variable(self, name, value, is_string)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
name | character(len=*) | in | Variable. | |
value | character(len=*) | in | Value. | |
is_string | logical | in | A string. |
Call graph
while_block
gnuplot while (condition) { ... }: the body run while the condition (a number, not 0) holds.
Attributes: recursive
subroutine while_block(self, statement, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
statement | character(len=*) | in | The whole statement. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
if_block
gnuplot if (condition) { ... } [else if (condition) { ... }]... [else { ... }]: the first block whose condition holds is run. gnuplot's old one-line form, if (condition) command, is old_if_line's.
Attributes: recursive
subroutine if_block(self, statement, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
statement | character(len=*) | in | The whole statement. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
run_body
Run the statements of a block body, stopping at a break or a continue.
Attributes: recursive
subroutine run_body(self, body, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
body | character(len=*) | in | Body. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
old_if_line
gnuplot's old one-line if (condition) command; ...; [else command; ...]: statements the if and the rest of its line; when the condition holds the commands up to an else run, else those after it (else if chains), as gnuplot 6.0 still runs it.
Attributes: recursive
subroutine old_if_line(self, statements, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
statements | type(token_object) | in | The if and the statements after it on its line. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
run_list
Run statements in order (an old one-line if among them takes the rest), stopping at an error or a signal.
Attributes: recursive
subroutine run_list(self, statements, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
statements | type(token_object) | in | Statements. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
truth_of
Whether the constant expression condition holds (a number other than 0; a string is an error).
subroutine truth_of(self, condition, holds, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | in | Interpreter. | |
condition | character(len=*) | in | Condition. | |
holds | logical | out | True. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
stats_command
gnuplot stats [[xmin:xmax] ymax] FILE [using N[:M]] [index N] [every ...] [name "P"] [output|nooutput]: foresight_stats on the column (or the pair) as STATS_* variables (P_* with a name); the records with an undefined used value are invalid, those outside the ranges out of range. Silent unless output, unlike gnuplot: the report then goes where print writes (gnuplot's screen layout on the standard error or output, its name-tab-value lines in a set print file). Matrix. Submatrix. Its column indices. Its row indices. Matrix problem.
Pair statistics.
Column statistics.
First extreme, row by row.
subroutine stats_command(self, tokens, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
tokens | type(token_object) | in | Tokens after stats. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
print_command
gnuplot print EXPRESSION, ...: the values (strings as they are, numbers as gnuplot shows them) separated by a blank, on one line of the standard error, or where set print sends it. Datablock found.
Datablock lines. Datablock defined.
subroutine print_command(self, text, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
text | character(len=*) | in | Text after print. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
fit_command
gnuplot fit max EXPRESSION 'file' [using X:Y[:ERR]] [index N] [every ...] [yerrors|unitweights] via P1, P2, ...: the parameters (user variables; an undefined one starts at 1) fitted by foresight_fit, then set to the result, with P_err (set fit errorvariables) and FIT_NDF, FIT_WSSR, FIT_STDFIT, FIT_P, FIT_NITER, FIT_CONVERGED. The report goes to the standard error with set fit results|brief, to a file with set fit logfile; silent by default. On failure the parameters keep their values. A line. Before the comment. File unit. Status. Equal sign. # FIXED.
gnuplot's dummy_old_default. The names grown (a temporary: nvfortran 26.9 corrupts a self-append). Position.
Parameter counter.
subroutine fit_command(self, tokens, statement, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
tokens | type(token_object) | in | Tokens after fit. | |
statement | character(len=*) | in | The whole statement. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
script_model_values
The model at every abscissa, the parameters set as user variables of the model's own symbols.
subroutine script_model_values(self, p, f, ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_model) | inout | Model. | |
p | real(kind=R8P) | in | Parameters. | |
f | real(kind=R8P) | out | Values. | |
ok | logical | out | All defined. |
Call graph
script_model_slopes
The slopes of the model (one variable) at every abscissa, gnuplot's calc_derivatives: one-sided, the step max(0.001 |x|, 8e-8 (|x| + 1e-8)).
subroutine script_model_slopes(self, p, f, dfdx, ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_model) | inout | Model. | |
p | real(kind=R8P) | in | Parameters. | |
f | real(kind=R8P) | in | Model values. | |
dfdx | real(kind=R8P) | out | Slopes. | |
ok | logical | out | All defined. |
Call graph
set_parameter
Set the fit parameter name to v: a user variable, or an array element A[i] (gnuplot's via A[1], A[2]).
subroutine set_parameter(symbols, name, v)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
symbols | type(symbols_object) | inout | Symbols. | |
name | character(len=*) | in | Parameter. | |
v | real(kind=R8P) | in | Value. |
Call graph
get_parameter
Value of the fit parameter name: a user variable or an array element A[i]; found false if none (or none set).
subroutine get_parameter(symbols, name, v, found)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
symbols | type(symbols_object) | in | Symbols. | |
name | character(len=*) | in | Parameter. | |
v | real(kind=R8P) | out | Value. | |
found | logical | out | A value found. |
Call graph
binary_items
The plot tokens with each gnuplot binary array ('file' binary array=(W,H)|WxH [record=...] [format='%uchar...'] [flipx] [flipy] [flip=x|y] [dx=DX] [dy=DY] [origin=(X,Y)] [skip=N] [endian=little|big]) read into a datablock, one line per pixel: its fields (as the format: one specifier for every field, else one per field) then x and y (pixel i, j at origin + (i dx, j dy), the first scan line at the bottom unless flipped); the item's using prefixed by these x:y columns, or using x:y:1:...:N (N fields: rgbimage 3, rgbalpha 4, else the format's); a splot's (three_d) by x:y:(0), its pixels at z 0 (gnuplot's). center=(X,Y) moves the image's natural centre there; rotation=A (rotate, rot; A in radians, Ad degrees, Api multiples of pi) turns the pixels about that centre, or about the origin when origin= is given, as gnuplot's; an angle off the right ones makes each pixel a polygon of its four corners (with polygons, colored by its value through the palette, or by its packed RGB), as gnuplot draws rotated images. A splot's image in a 3D view (not the map) is drawn the same, each pixel a 3D polygon (lc rgb variable, the palette's color of its value over the set cbrange): in the xy plane at the z of center=(X,Y,Z) or origin=(X,Y,Z), or turned by perpendicular=(PX,PY,PZ) (gnuplot's rotation_matrix_3D: the image's normal along that vector), as gnuplot's df_readbinary. |p|. |p| in the xy plane. Scale.
A value written. Datablock text. Scan line. Pixel in it. Characters written. Width of a value.
Fields of a pixel. Pixel centre. Natural centre. Corner counter. Corners.
Corner from the reference, in the image's plane. The reference's place. The corner. The pixel centre. Coordinate.
The item's using. Its fields as expressions. Color expression. rgbimage or rgbalpha.
subroutine binary_items(self, tokens, three_d, items, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
tokens | type(token_object) | in | Items tokens. | |
three_d | logical | in | A splot. | |
items | type(token_object) | out | allocatable | Tokens, binary files as datablocks. |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
sparse_items
The plot tokens with each gnuplot sparse matrix ('file' sparse matrix=(C,R) [origin=(X0,Y0)] [dx=DX] [dy=DY]) read into a datablock, as gnuplot's populate_sparse_matrix: a grid of C x R cells at X0 + i DX, Y0 + j DY (origin 0,0, DX 1, DY = DX), every point of the item's using fields (1:2:3 by default) copied into the cell nearest to its x:y (rounded), the other cells undefined; the item reads using 1:2:... of the datablock. Unlike gnuplot, a point off its cell's centre is drawn at the centre (the image needs a regular grid).
subroutine sparse_items(self, tokens, items, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
tokens | type(token_object) | in | Items tokens. | |
items | type(token_object) | out | allocatable | Tokens, sparse matrices as datablocks. |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
matrix_header_items
The plot tokens with each gnuplot matrix rowheaders|columnheaders file without its headers, a datablock in the same separator: the first row (columnheaders, its first cell a corner with rowheaders) names the columns, the first cell of each row (rowheaders) names the row; the names become x and y tick labels at the column and row numbers from 0, as gnuplot's: items of their own appended, $names using 1:2:xtic(3) (ytic) with points of size 0, untitled and out of the autoscaling. File size.
subroutine matrix_header_items(self, tokens, items, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
tokens | type(token_object) | in | Items tokens. | |
items | type(token_object) | out | allocatable | Tokens, the matrices as datablocks. |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
plot_command
plot and splot (three_d) (plot_items), gnuplot's binary arrays ('file' binary array=...) first read into datablocks.
Attributes: recursive
subroutine plot_command(self, tokens, text, iostat, iomsg, three_d)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
tokens | type(token_object) | in | Items tokens. | |
text | character(len=*) | in | Text the tokens come from, for function titles. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
three_d | logical | in | optional | A splot. |
Call graph
array_elements
The tokens of a plot command with each array name followed at once by its brackets (U[i], no blank between) joined into one word, the element: the tokenizer ends a word at [, a range of the plot otherwise. The tokens kept.
subroutine array_elements(self, tokens, text, merged)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | in | Interpreter. | |
tokens | type(token_object) | in | Tokens. | |
text | character(len=*) | in | The statement. | |
merged | type(token_object) | out | allocatable | Tokens, the elements joined. |
Call graph
plot_items
plot items: each a data file or a function with modifiers, comma separated; replaces the previous plot and renders it.
Functions are sampled once all the items are read: their x range depends on the data of the whole plot, as gnuplot. Until then each holds its place (its color, its key row) as an empty series.
splot (splot_mode, gnuplot 6.0's): the items have a z, the third using field, read as the last column and kept apart (zfield), so that the other fields are the styles' plot fields; a function of x and y is sampled on its iso-curves (function_rows), a matrix becomes rows x y z (matrix_rows), both read as data. The series keep their heights and scans (attach_z): the blocks of the data, separated by blank lines. Last token of the item. Assignment error. Assignment status.
Constant value. Not a constant. Constant status. A string.
Function counter. First token of a function. The functions as fields.
First token of y(t). y(t) as written.
The first two names of set dummy. Read status.
A key(N) field.
The line.
Style number. The style.
Tokens, lt for the word. The linetype.
Tokens, lc for the word. Color read.
Opening parenthesis. Column.
Style number.
Color read.
Problem (none: checked when set).
The two dummy variables.
First name. Second name.
Generated rows.
Types column. The other columns. Column counter.
Sizes column. The other columns. Column counter.
Row.
Row.
Row.
The boxplot series. Linetype of the first factor. Factor counter. Distinct factors. Earlier label counter. A label met before.
The stack label on its first row.
Unknown word (none: checked by fill_ok).
Function.
subroutine plot_items(self, tokens, text, iostat, iomsg, splot_mode)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
tokens | type(token_object) | in | Items tokens. | |
text | character(len=*) | in | Text the tokens come from, for function titles. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
splot_mode | logical | in | A splot. |
Call graph
call_command
gnuplot load FILE and call FILE [ARG1 ... ARG9]: run the script FILE (a string expression), ARG0 its name and, for call, ARGC the number of arguments and ARG1 to ARG9 their texts (a quoted string as it is, a number as written, a variable or a parenthesized expression its value: a string as it is, an integer as it is, a real as %g; any other word as it is, gnuplot's call "f" sub1), ARGV their values (numbers for the numbers, as gnuplot's prepare_call); those variables are restored after it. The script is watched as a data file is. The argument values.
Attributes: recursive
subroutine call_command(self, tokens, is_call, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
tokens | type(token_object) | in | Statement tokens, the command first. | |
is_call | logical | in | call, else load. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
pause_command
gnuplot pause SECONDS ["message"]: the message on the standard error, then a wait of SECONDS (0: none); -1 waits for a line on the standard input (its end does not wait). pause mouse [EVENTS] ["message"]: no mouse here, the message only, as gnuplot on a terminal without one. With a plot in a loop, while (1) { plot ...; pause 5 }, the output is rewritten every 5 s: gnuplot 6.0's live idiom.
subroutine pause_command(self, tokens, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
tokens | type(token_object) | in | Tokens after pause. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
reset_command
gnuplot reset [session|errors|bind]: the plot settings back to their defaults, as gnuplot 6.0 keeps the terminal, the output, set fit, set print, set table, the multiplot, the linetypes (set colorsequence) and, a quirk kept, set style data. reset session also forgets the user variables, functions and arrays (the script arguments kept) and restores the default linetypes; reset errors and reset bind do nothing here.
subroutine reset_command(self, tokens, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
tokens | type(token_object) | in | Tokens after reset. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
write_table
set table: the points of the current panel's series as gnuplot 6.0 tabulates them, a block per series (# Curve K of N, M points, its title, the column names) whose rows are the values in the axis formats (set format, % h by default) and a flag, i in range, o outside a fixed range, u undefined; the columns: x y type, with ylow yhigh (y error bars), xlow xhigh (x error bars, boxes), both (xy error bars), y1 y2 (filled curves between two curves) or x y label (labels). Lines, NaN separated. Level of each chunk. First chunk of its level. Chunk counter. Row. Level number.
subroutine write_table(self, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
expand_macros
gnuplot macros: each @name outside quotes replaced by the value of the string variable name.
subroutine expand_macros(self, statement, expanded, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | in | Interpreter. | |
statement | character(len=*) | in | Statement. | |
expanded | character(len=:) | out | allocatable | Statement after substitution. |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
wall_option
gnuplot set wall [y0|x0|y1|x1|z0] [fs ...] [fc C] [lw W] ...: the grid walls of a 3D view, polygons over the planes x = 0, y = 0, x = 1, y = 1, z = 0 of the graph, drawn behind or in front of the plot as they face (gnuplot's LAYER_FRONTBACK); half transparent, bordered in black, in gnuplot's colors by default. Bare, y0, x0 and z0 on. Read as a set object polygon of graph corners (its options), kept apart from the objects.
subroutine wall_option(self, tokens, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
tokens | type(token_object) | in | Tokens, wall first. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
annotation_option
set label [N] ["text"] [at POS] [left|center|right] [norotate|rotate [by A]] [front|back] [tc COLOR] [point [pt N] [ps S] [lc C]|nopoint] [offset X,Y] [font F] [noenhanced], set arrow [N] [from POS to|rto POS] [as|arrowstyle S] [nohead|head|backhead|heads] [size [SYS] L,A[,B]] [filled|empty|nofilled|noborder] [front|back] [lc C] [lt N] [lw W] [dt N] (as S the look of set style arrow S, the options after it applied on it), set style arrow S [default|ARROW OPTIONS], set object [N] rectangle [from POS to|rto POS|center|at POS size W,H] | circle [at|center POS] size R [arc [A:B]] | ellipse [at|center POS] size W,H [angle A] | polygon from POS to POS ... [front|back|behind] [clip|noclip] [fc|fillcolor COLOR] [fs FILL] [lw W] [dt N] [default] (a new rectangle in the style of set style rectangle [fc C] [fs FILL] [lw W] [dt N], its layer not taken, as gnuplot 6.0); set label|arrow|object N ... without a position changes tag N (gnuplot's). A position is [SYS] x, [SYS] y, SYS among first (default), second, graph, screen, character, the system of x also y's unless given; each coordinate an expression, or a time string on a time axis. Not a constant. Constant status.
Style counter.
subroutine annotation_option(self, tokens, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
tokens | type(token_object) | in | Option tokens (the option first). | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
range_value
Value of a range end: a number, a constant expression (2*pi, user variables), or a string: a time read with the timefmt (set xrange ["2024-03-01":"2024-03-02"] on a time axis).
subroutine range_value(self, text, v, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | in | Interpreter. | |
text | character(len=*) | in | End text. | |
v | real(kind=R8P) | out | Value. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
set_time_data
set xdata|ydata|y2data|x2data [time] (option the option word): the data of that axis read as times with the timefmt (on), or as numbers; the axis ticked and labelled as times or numbers.
subroutine set_time_data(self, option, on)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
option | character(len=*) | in | Option word, xdata, y2da, ... | |
on | logical | in | Time data. |
Call graph
load_data
Load the data file file, or the datablock it names ($DATA), with the set datafile options; skip its first lines not read (gnuplot skip N); content the rows of a pseudo-file ('+') instead.
subroutine load_data(self, data, file, iostat, iomsg, keep_text, skip, content)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | in | Interpreter. | |
data | type(datafile_object) | inout | Data. | |
file | character(len=*) | in | File or datablock name. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
keep_text | logical | in | optional | Keep the cell texts. |
skip | integer(kind=I4P) | in | optional | First lines not read. |
content | character(len=*) | in | optional | Rows of a pseudo-file. |
Call graph
register_file
Remember file among the data files read (once), not a datablock.
subroutine register_file(self, file)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
file | character(len=*) | in | Data file. |
Call graph
save_output
Render the figure to the current output; the format follows its extension.
subroutine save_output(self, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
set_command
set options. The option without its no.
Size.
The other axes.
Fraction.
Full intensity.
LaTeX code.
Width and height [px].
Line width factor.
Dash length factor.
Color spec. SVG color. A color.
Font string. Size [pt]. Its comma. Read status.
Page font.
Page font.
The add token.
Token. Depth.
Token. Number read.
Bound given. Bounds. Column: 1 u, 2 v.
Box size.
Attributes: recursive
subroutine set_command(self, tokens, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
tokens | type(token_object) | in | Option tokens. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
unset_command
unset options. Axis number.
The other axes.
The other axes.
Tag. Token counter.
Tag. Token counter.
Axes named.
Default view.
subroutine unset_command(self, tokens, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
tokens | type(token_object) | in | Option tokens. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
fix_range
The range of axis fixed as it is (gnuplot unset autoscale): its set ends, else the effective ones.
Attributes: pure
subroutine fix_range(axis)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
axis | type(axis_object) | inout | Axis. |
Call graph
item_auto_title
The automatic title of a data item, gnuplot's: the item as written from its file (characters first to file_last of the statement text) through its data options (index, every, using, matrix, skip: up to last); inline data as '-' or "-"; from the file written in its quote and the using spec when the positions are not the text's (binary items rewritten). A subroutine with its arguments: nvfortran 26.9 broke the data of the plot through an internal function of plot_items returning the title.
Attributes: pure
subroutine item_auto_title(text, first, file_last, last, written, quote, spec, using, title)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in | Statement. | |
first | integer(kind=I4P) | in | First character of the file. | |
file_last | integer(kind=I4P) | in | Its last character. | |
last | integer(kind=I4P) | in | Last character of the data options. | |
written | character(len=*) | in | The file as written. | |
quote | character(len=*) | in | Its quote. | |
spec | character(len=*) | in | The using spec as written. | |
using | character(len=*) | in | The using keyword as written. | |
title | character(len=:) | out | allocatable | Title. |
Call graph
smooth_scans3d
Each scan of a 3D series smoothed by gnuplot's do_3d_cubic (foresight_smooth's spline_curve3d, mode csplines or acsplines, weights w), samples points each, a break between scans; the per point colors follow.
Attributes: pure
subroutine smooth_scans3d(series, w, mode, samples, ranges)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
series | type(series_object) | inout | Series. | |
w | real(kind=R8P) | in | Weights of the points. | |
mode | character(len=*) | in | Smoothing. | |
samples | integer(kind=I4P) | in | Points per smoothed scan. | |
ranges | real(kind=R8P) | in | Axis lengths. |
Call graph
map_points
The points of a 3D series read in spherical (mapping 1: theta, phi, r) or cylindrical (2: theta, z, r) coordinates made cartesian, as gnuplot's get_3ddata: x = r cos(theta) cos(phi), y = r sin(theta) cos(phi), z = r sin(phi); x = r cos(theta), y = r sin(theta), z the second. Angles in degrees with degrees.
Attributes: pure
subroutine map_points(series, mapping, degrees)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
series | type(series_object) | inout | Series. | |
mapping | integer(kind=I4P) | in | Mapping. | |
degrees | logical | in | Angles in degrees. |
set_heights
Give series its heights z and its scans (first and last point of each) in their datasets sets, the first grid of them its surface grid, read from data (gnuplot keeps those last first).
Attributes: pure
subroutine set_heights(series, z, scans, sets, grid, read)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
series | type(series_object) | inout | Series. | |
z | real(kind=R8P) | in | Heights. | |
scans | integer(kind=I4P) | in | Scans. | |
sets | integer(kind=I4P) | in | Their datasets. | |
grid | integer(kind=I4P) | in | Grid scans. | |
read | logical | in | Read from data. |
append_text
Append piece to buffer(1:used), doubling its length as needed: a long text built in linear time.
Attributes: pure
subroutine append_text(buffer, used, piece)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
buffer | character(len=:) | inout | allocatable | Text, valid up to used. |
used | integer(kind=I4P) | inout | Its length used. | |
piece | character(len=*) | in | Text appended. |
Call graph
using_parts
The fields of a using spec as written, split at the colons outside parentheses and quotes (as parse_using).
Attributes: pure
subroutine using_parts(spec, parts)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
spec | character(len=*) | in | Specification. | |
parts | character(len=:) | out | allocatable | Fields, blank padded. |
Call graph
exit_command
gnuplot exit, exit message "text" (the text on the standard error), exit error "text", exit status N, exit gnuplot, quit: exit ends the script file being read, as return (signal 3); the others the run (signal 4), exit status N with N its status.
Attributes: recursive
subroutine exit_command(self, statement, command, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
statement | character(len=*) | in | The statement. | |
command | character(len=*) | in | exit or quit. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
push_local
Append item to list, through a temporary (nvfortran 26.9: see foresight_tokens push).
Attributes: pure
subroutine push_local(list, item)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
list | type(local_state) | inout | allocatable | List. |
item | type(local_state) | in | New item. |
Call graph
inline_items
The inline data items '-' of the plot, replot, fit and stats statements of a line: rewritten with each one as its datablock (inline_name), quotes the quote of each (one character per item, empty if none), in order.
Attributes: pure
subroutine inline_items(line, rewritten, quotes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
line | character(len=*) | in | Logical line. | |
rewritten | character(len=:) | out | allocatable | Line with the datablock names. |
quotes | character(len=:) | out | allocatable | Quote of each item. |
Call graph
inline_statement
The inline data items of a plot, replot, fit or stats statement, quotes extended with theirs (see inline_items). An item is '-' or "-" where a file is expected: first, or after a comma, past inline ranges and for [...]; for fit, after a blank.
Attributes: pure
subroutine inline_statement(line, quotes, rewritten)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
line | character(len=*) | in | Statement. | |
quotes | character(len=:) | inout | allocatable | Quote of each item. |
rewritten | character(len=:) | out | allocatable | Statement with the datablock names. |
Call graph
autoscale_axis
axis autoscaled at its ends (min, max), not extended to the ticks with fix (gnuplot set autoscale).
Attributes: pure
subroutine autoscale_axis(axis, ends, fix)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
axis | type(axis_object) | inout | Axis. | |
ends | logical | in | min, max autoscaled. | |
fix | logical | in | Ends at the data. |
split_words
The blank-separated words of text (blanks, tabs, new lines), as gnuplot's words() and word().
Attributes: pure
subroutine split_words(text, words)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in | Text. | |
words | type(token_object) | out | allocatable | Words. |
Call graph
split_range
a:b[:c] cut at the colons outside parentheses and quotes.
Attributes: pure
subroutine split_range(text, parts)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in | Range. | |
parts | character(len=:) | out | allocatable | Ends. |
Call graph
array_command
gnuplot array NAME[N], array NAME[N] = [E1, E2, ...], array NAME = [E1, ...]: text follows array. Its elements. An array or a slice.
subroutine array_command(symbols, text, degrees, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
symbols | type(symbols_object) | inout | Symbols. | |
text | character(len=*) | in | Text after array. | |
degrees | logical | in | Angles in degrees. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
default_styles
gnuplot's default arrow styles (none) and rectangle style (filled with the page color, bordered black).
subroutine default_styles(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | type(script_object) | inout | Interpreter. |
Call graph
expand_backquotes
gnuplot's command substitution: each `command` outside single quotes replaced by the command's standard output, its trailing newline dropped; in double quotes a backslash escapes the next character (\`, \").
subroutine expand_backquotes(statement, expanded, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
statement | character(len=*) | in | Statement. | |
expanded | character(len=:) | out | allocatable | Statement substituted. |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
split_arguments
text cut at the commas outside quotes, parentheses and brackets (print a, sprintf("%d,%d", 1, 2)); no text is no part.
Attributes: pure
subroutine split_arguments(text, parts)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in | Text. | |
parts | type(token_object) | out | allocatable | Parts, trimmed. |
Call graph
regular_grid
Gather the points (x, y, z) on a regular grid: the sorted distinct finite abscissae xs and ordinates ys, evenly spaced, and the values grid(i, j) at (xs(i), ys(j)), NaN where no point lies; problem if the points do not lie on such a grid.
Attributes: pure
subroutine regular_grid(x, y, z, xs, ys, grid, problem)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
x | real(kind=R8P) | in | Abscissae. | |
y | real(kind=R8P) | in | Ordinates. | |
z | real(kind=R8P) | in | Values. | |
xs | real(kind=R8P) | out | allocatable | Pixel centre abscissae. |
ys | real(kind=R8P) | out | allocatable | Pixel centre ordinates. |
grid | real(kind=R8P) | out | allocatable | Values. |
problem | character(len=:) | out | allocatable | Problem, empty if none. |
Call graph
resolve_colors
Replace each color string of a statement, a string after rgb, lc, fc, tc or background (and their long forms), by its SVG color, as gnuplot reads it (gnuplot_color): "green" is #00ff00, gnuplot's, not SVG's #008000. A string that is no color fails as gnuplot.
Attributes: pure
subroutine resolve_colors(tokens, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tokens | type(token_object) | inout | Tokens. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
fail
Set an error.
Attributes: pure
subroutine fail(message, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
message | character(len=*) | in | Error message. | |
iostat | integer(kind=I4P) | out | Set to 1. | |
iomsg | character(len=:) | out | allocatable | Set to message. |
Call graph
parse_using
using specification: 1 to 6 colon separated fields, each a column number (0 is the point number) or a parenthesized expression (with the user variables and functions of symbols), as in gnuplot; sampled names the sample variables of a pseudo-file (columns 1 and 2).
subroutine parse_using(spec, fields, iostat, iomsg, degrees, symbols, sampled)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
spec | character(len=*) | in | Specification. | |
fields | type(expression_object) | out | allocatable | Fields. |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
degrees | logical | in | Angles of the expressions in degrees. | |
symbols | type(symbols_object) | inout | User variables and functions. | |
sampled | character(len=*) | in | optional | Sample variables of a pseudo-file. |
Call graph
apply_line_style
Apply the line style id to line: its defined properties; an undefined style is the linetype id, as gnuplot.
Attributes: pure
subroutine apply_line_style(styles, id, line, colors)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
styles | type(line_style_object) | in | Defined styles. | |
id | integer(kind=I4P) | in | Style number. | |
line | type(line_style_object) | inout | Line properties. | |
colors | character(len=9) | in | optional | Active linetype colors (set colorsequence). |
Call graph
matrix_every
The submatrix of z(column, row) gnuplot's every keeps: the columns as the points (point_incr, start_point, end_point), the rows as the blocks (block_incr, start_block, end_block), from 0; cx, ry their indices.
Attributes: pure
subroutine matrix_every(z, every, sub, cx, ry)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
z | real(kind=R8P) | in | Matrix. | |
every | integer(kind=I4P) | in | every fields, ends -1 for none. | |
sub | real(kind=R8P) | out | allocatable | Submatrix. |
cx | real(kind=R8P) | out | allocatable | Its column indices. |
ry | real(kind=R8P) | out | allocatable | Its row indices. |
Call graph
parse_every
gnuplot every point_incr:block_incr:start_point:start_block:end_point:end_block; empty or missing fields keep their defaults (1, 1, 0, 0, no end, no end); with symbols a field may be an expression, every ::j:0:j:0.
subroutine parse_every(spec, every, iostat, iomsg, symbols)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
spec | character(len=*) | in | Specification. | |
every | integer(kind=I4P) | out | Fields, ends -1 for none. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
symbols | type(symbols_object) | in | optional | User variables and functions. |
Call graph
sharpened
gnuplot 6.0's sharpen filter: the samples x, y of func with the truncated extrema added, found by a golden section search between the neighbours of a sample lower (higher) than the two on each side where the 5-term Savitzky-Golay second derivative two samples away is negative (positive), as gnuplot (filters.c).
subroutine sharpened(func, x, y, sx, sy)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
func | type(expression_object) | inout | Function. | |
x | real(kind=R8P) | in | Sample abscissae. | |
y | real(kind=R8P) | in | Sample values. | |
sx | real(kind=R8P) | out | allocatable | Abscissae, ascending. |
sy | real(kind=R8P) | out | allocatable | Values. |
Call graph
above_below_base
gnuplot's filledcurves above|below without y=V nor a band: above or below y = 0; with an axis (above x1) the words are dropped, the curve filled to the axis (gnuplot 6.0 ignores them there).
subroutine above_below_base(curve, base, band)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
curve | character(len=:) | inout | allocatable | Curve words. |
base | real(kind=R8P) | inout | allocatable | Base line. |
band | logical | in | A band x:y1:y2. |
Call graph
filled_options
The filledcurves options of text (words blank separated, xy=X,Y one word) as a plot item reads them: the curve words (closed, x1, x2, above, below, y1, y2, y, x=V, xy=X,Y) in curve, y=V (y1=, y2=) the base; bad names the problem, empty if none.
subroutine filled_options(text, curve, base, bad)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in | Options. | |
curve | character(len=:) | inout | allocatable | Curve words. |
base | real(kind=R8P) | inout | allocatable | Base line. |
bad | character(len=:) | out | allocatable | Problem, empty if none. |
Call graph
push_line_style
Append item to list (an unallocated list is empty), through a temporary: see push.
Attributes: pure
subroutine push_line_style(list, item)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
list | type(line_style_object) | inout | allocatable | List. |
item | type(line_style_object) | in | New item. |
fetch_voxel
The active interpreter's active voxel grid at p (foresight_expression's voxel_hook, gnuplot's voxel()): NaN out of its ranges, found false if no grid is active or its ranges are not set yet.
subroutine fetch_voxel(p, v, found)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
p | real(kind=R8P) | in | Point. | |
v | real(kind=R8P) | out | Value. | |
found | logical | out | A grid is active. |
Call graph
vgrid_ranges
The active grid's ranges (gnuplot's check_grid_ranges): those set by set vxrange..., else the fixed x, y, z ranges of the plot now; an error without either. Then its spacing.
subroutine vgrid_ranges(self, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
voxel_option
gnuplot 6.0's set vgrid $name [size N] (a new grid of N x N x N zeros, N 10..256, 100 by default, or the grid of that name kept, made active), set vxrange|vyrange|vzrange [min:max] (of the active grid) and set isosurface [mixed|triangles] [noinsidecolor|insidecolor N]. tokens from the option.
subroutine voxel_option(self, tokens, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
tokens | type(token_object) | in | Option tokens. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
voxel_statement
gnuplot 6.0's unset vgrid $name (its storage freed; no grid active if it was), vclear [$name] (its values zeroed, the active grid's by default), voxel(x,y,z) = value (the grid point of (x,y,z): out of the ranges a warning, gnuplot's, nothing set) and vfill/vgfill SOURCE using x:y:z:radius:(density) (voxelgrid.c: the density added to each grid point within the radius of each point, VoxelDistance and GridDistance its distances when the density is evaluated; vgfill's radius in grid units). The vfill rows are read as plot ... with table reads them, every source and option of a plot (sample [t=a:b] '+', datablocks, files, '-').
subroutine voxel_statement(self, command, tokens, statement, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
command | character(len=*) | in | Command word. | |
tokens | type(token_object) | in | Statement tokens. | |
statement | character(len=*) | in | Statement text. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
fill_grid
into a datablock), then for each point the grid points within its radius incremented by the density (the fifth field), VoxelDistance and GridDistance set to their distances when it is evaluated (gnuplot's modify_voxels: single precision sums; a point out of the grid's ranges ignored).
subroutine fill_grid(self, tokens, statement, u, parts, grid_units, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
tokens | type(token_object) | in | Statement tokens. | |
statement | character(len=*) | in | Statement text (the tokens' positions). | |
u | integer(kind=I4P) | in | using token. | |
parts | character(len=*) | in | using fields. | |
grid_units | logical | in | vgfill. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
voxel_items
The splot items of voxel grids as datablocks (gnuplot 6.0's vplot.c): $grid with points|dots [above L] the grid points above L (0 by default; dots without a style, gnuplot's), x, y, z and the value, colored by it with lc palette; $grid with isosurface level L the facets of the surface of L (marching cubes, set isosurface's mixed quadrangles and triangles or triangles only) as with polygons, in the item's color and the fill style. Each with a hidden item of the grid's corners, which autoscale the axes as gnuplot's grid ranges do.
subroutine voxel_items(self, tokens, items, iostat, iomsg)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
tokens | type(token_object) | in | Plot tokens. | |
items | type(token_object) | out | allocatable | Tokens, grids as datablocks. |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
Functions
string_expression
The string expression starting at token i, as gnuplot takes one wherever a string goes: a quoted string, or an expression of strings, string variables and functions ("run".i.".dat", sprintf("p = %.2f", p), name). On return i is its last token. A number is an error.
Returns: logical
function string_expression(self, tokens, i, text, iostat, iomsg) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | in | Interpreter. | |
tokens | type(token_object) | in | Tokens. | |
i | integer(kind=I4P) | inout | First token in, last token out. | |
text | character(len=:) | out | allocatable | String. |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
font_spec
The font after the font word at token i (gnuplot font "family:Bold:Italic,size", a string expression), i left on its last token. Compiled-in family. The family is compiled in.
Returns: logical
function font_spec(self, tokens, i, font, iostat, iomsg) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | in | Interpreter. | |
tokens | type(token_object) | in | Tokens. | |
i | integer(kind=I4P) | inout | The font word in, the spec's last token out. | |
font | type(font_object) | out | Font. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
string_argument
Optional string expression after an option (set title "T", set output name . ".svg"); absent means empty.
Returns: logical
function string_argument(self, tokens, text, iostat, iomsg) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | in | Interpreter. | |
tokens | type(token_object) | in | Option tokens. | |
text | character(len=:) | out | allocatable | String. |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
text_color
tc|textcolor COLOR with tc at token i, left on the color's last token: lt N (linetype N's color), else as a line color (rgb "red", "#rrggbb", a number); palette colors refused. Linetype.
Returns: logical
function text_color(self, tokens, i, color, iostat, iomsg) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | in | Interpreter. | |
tokens | type(token_object) | in | Statement tokens. | |
i | integer(kind=I4P) | inout | Token counter. | |
color | character(len=*) | inout | Color read. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
names_variable
Whether the k-th of the blank separated names is a name in the model text (gnuplot's fit_dummy_var). A module procedure, not fit_command's: an internal one there and nvfortran 26.9 loses the via names (move_alloc).
Attributes: pure
Returns: logical
function names_variable(model, names, k) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
model | character(len=*) | in | Fitted expression. | |
names | character(len=*) | in | Variable names. | |
k | integer(kind=I4P) | in | Variable. |
Call graph
word_count
Number of blank separated words of text.
Attributes: pure
Returns: integer(kind=I4P)
function word_count(text) result(n)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in | Text. |
Call graph
first_word
The first blank separated word of text.
Attributes: pure
Returns: character(len=:)
function first_word(text) result(word)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in | Text. |
Call graph
assignment
gnuplot's NAME = expression (a user variable, its value now) or NAME(P1, ...) = expression (a user function): an = right after the name or the parameter list, not ==. False if statement is neither.
Attributes: recursive
Returns: logical
function assignment(self, statement, iostat, iomsg) result(done)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | inout | Interpreter. | |
statement | character(len=*) | in | Statement. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
is_cntrparam_word
Whether word is an option of set cntrparam.
Attributes: pure
Returns: logical
function is_cntrparam_word(word) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
word | character(len=*) | in | Word. |
Call graph
latex_title
An automatic title for LaTeX, as gnuplot's texify_title: a function's in math ($...$), a data file's with LaTeX's reserved characters #$%^&_{}\ escaped by a backslash.
Attributes: pure
Returns: character(len=:)
function latex_title(title, formula) result(text)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
title | character(len=*) | in | Title. | |
formula | logical | in | A function's. |
sector_values
Per vertex values of sectors from their rows' (vertex_rows, 0 a separator: NaN).
Attributes: pure
Returns: real(kind=R8P)
function sector_values(rows_values, vertex_rows) result(values)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
rows_values | real(kind=R8P) | in | Value of each data row. | |
vertex_rows | integer(kind=I4P) | in | Row of each vertex. |
exact_real
v written to its last bit (17 significant digits), read back the same.
Attributes: pure
Returns: character(len=:)
function exact_real(v) result(text)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
v | real(kind=R8P) | in | Value. |
Call graph
axis_span
The length of axis as gnuplot's 3D splines read it while the data come: its set range, else the values' extent (1 for an empty one).
Attributes: pure
Returns: real(kind=R8P)
function axis_span(axis, values) result(span)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
axis | type(axis_object) | in | Axis. | |
values | real(kind=R8P) | in | Values of the item. |
Call graph
replace_colons
The fields of a using spec as blank separated words (the count of its fields by word_count).
Attributes: pure
Returns: character(len=:)
function replace_colons(spec) result(words)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
spec | character(len=*) | in | Specification. |
Call graph
top_colon
Position of the first : outside quotes and parentheses, 0 if none.
Attributes: pure
Returns: integer(kind=I4P)
function top_colon(text) result(colon)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in | Text. |
is_datablock
Whether word names a datablock: $, then a letter or _, then letters, digits, _ (gnuplot $DATA).
Attributes: pure
Returns: logical
function is_datablock(word) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
word | character(len=*) | in | Word. |
Call graph
string_variable_of
Whether name is a string variable of symbols.
Attributes: pure
Returns: logical
function string_variable_of(symbols, name) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
symbols | type(symbols_object) | in | Symbols. | |
name | character(len=*) | in | Name. |
Call graph
last_semicolon
Position of the last ; of line outside quotes (a statement separator), 0 if none.
Attributes: pure
Returns: integer(kind=I4P)
function last_semicolon(line) result(k)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
line | character(len=*) | in | Logical line. |
Call graph
heredoc
Whether line starts a datablock, $NAME << WORD (blanks optional around <<, a comment after WORD), giving its name ($NAME) and terminator.
Returns: logical
function heredoc(line, name, terminator) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
line | character(len=*) | in | Logical line. | |
name | character(len=:) | inout | allocatable | Datablock name. |
terminator | character(len=:) | inout | allocatable | Terminating word. |
Call graph
for_follows
Whether statement, after its command word, goes on with for [.
Attributes: pure
Returns: logical
function for_follows(statement, command) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
statement | character(len=*) | in | Statement. | |
command | character(len=*) | in | Its first word. |
Call graph
leading_word
The letters starting text (blanks skipped): do, if, while, else, for, break.
Attributes: pure
Returns: character(len=:)
function leading_word(text) result(word)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in | Text. |
Call graph
inline_name
The datablock of the n-th inline data item '-' of a line: $FS_INLINE_S<n> quoted by ', $FS_INLINE_D<n> by " (the auto title written back as the item was).
Attributes: pure
Returns: character(len=:)
function inline_name(quote, n) result(name)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
quote | character(len=1) | in | Quote of the item. | |
n | integer(kind=I4P) | in | Item order. |
Call graph
matching
Position of the bracket closing the one at open ((, [ or {), quotes and nesting respected; 0 if none.
Attributes: pure
Returns: integer(kind=I4P)
function matching(text, open) result(close)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in | Text. | |
open | integer(kind=I4P) | in | Opening bracket. |
Call graph
block_body
{ body } rest: the body and the text after the closing brace.
Returns: logical
function block_body(text, body, rest) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in | Text starting with {. | |
body | character(len=:) | out | allocatable | Body. |
rest | character(len=:) | out | allocatable | After the block. |
Call graph
old_if
Whether statement is gnuplot's old one-line if (condition) command (no block after the condition).
Returns: logical
function old_if(statement) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
statement | character(len=*) | in | Statement. |
Call graph
same_line_end
The last of statements (from s) on the same line of text as statement s.
Attributes: pure
Returns: integer(kind=I4P)
function same_line_end(text, statements, s) result(e)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in | Text the statements come from. | |
statements | type(token_object) | in | Statements, with their places in text. | |
s | integer(kind=I4P) | in | First statement. |
parenthesized
( inside ) rest.
Returns: logical
function parenthesized(text, inside, rest) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in | Text starting with (. | |
inside | character(len=:) | out | allocatable | Inside the parentheses. |
rest | character(len=:) | out | allocatable | After them. |
Call graph
mentions
Whether the identifier name appears in text (not as part of a longer identifier).
Attributes: pure
Returns: logical
function mentions(text, name) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in | Text. | |
name | character(len=*) | in | Identifier. |
closing_bracket
Position of the ] closing the [ at open in s (quotes and nested brackets skipped), 0 if none.
Attributes: pure
Returns: integer(kind=I4P)
function closing_bracket(s, open) result(close)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
s | character(len=*) | in | Text. | |
open | integer(kind=I4P) | in | Opening bracket. |
Call graph
after_command
Text of statement after its first word.
Attributes: pure
Returns: character(len=:)
function after_command(statement) result(rest)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
statement | character(len=*) | in | Statement. |
Call graph
axes_argument
Optional axes names after a logscale option (default all: xyy2cbx2); a base other than 10 is an error.
Returns: logical
function axes_argument(tokens, axes, iostat, iomsg) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tokens | type(token_object) | in | Option tokens. | |
axes | character(len=:) | out | allocatable | Axes letters. |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
style_code
Style code of a full style name.
Returns: integer(kind=I4P)
function style_code(name) result(code)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
name | character(len=*) | in | Full style name. |
Call graph
smooth_name
Full name of the smooth filter word, full or abbreviated as gnuplot 6.0 reads it (its plot_smooth_tbl, in order: f frequency, cum cumulative, mcs mcsplines, fnor fnormal, ...); word itself if no filter.
Attributes: pure
Returns: character(len=:)
function smooth_name(word) result(name)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
word | character(len=*) | in | Filter word. |
Call graph
canonical_style
Full gnuplot style name of word (full or abbreviated), empty if unsupported.
Attributes: pure
Returns: character(len=:)
function canonical_style(word) result(style)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
word | character(len=*) | in | Style word. |
Call graph
change_extension
file with its extension replaced by ext (appended if none).
Attributes: pure
Returns: character(len=:)
function change_extension(file, ext) result(renamed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
file | character(len=*) | in | File name. | |
ext | character(len=*) | in | New extension. |
Call graph
extension
Lower case extension of file, empty if none.
Attributes: pure
Returns: character(len=:)
function extension(file) result(ext)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
file | character(len=*) | in | File name. |
Call graph
is_multiplot_option
Whether the statement is set|unset multiplot ....
Attributes: pure
Returns: logical
function is_multiplot_option(tokens) result(is)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tokens | type(token_object) | in | Statement tokens. |
Call graph
coordinate_system
The coordinate system word abbreviates (gnuplot's fir
Attributes: pure
Returns: character(len=:)
function coordinate_system(word) result(system)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
word | character(len=*) | in | Word. |
Call graph
keyword
Whether word abbreviates full with at least minimum characters, as gnuplot keywords.
Attributes: pure
Returns: logical
function keyword(word, full, minimum) result(match)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
word | character(len=*) | in | Word. | |
full | character(len=*) | in | Full keyword. | |
minimum | integer(kind=I4P) | in | Shortest accepted abbreviation. |
Call graph
is_word
Whether word is one of the blank separated words.
Attributes: pure
Returns: logical
function is_word(word, words) result(found)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
word | character(len=*) | in | Word. | |
words | character(len=*) | in | Blank separated words. |
Call graph
next_integer
Advance i to the next token, which must be an integer. Value. Not a constant. Constant status.
Returns: logical
function next_integer(tokens, i, value, iostat, iomsg, symbols) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tokens | type(token_object) | in | Tokens. | |
i | integer(kind=I4P) | inout | Token counter. | |
value | integer(kind=I4P) | out | Integer. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
symbols | type(symbols_object) | in | optional | User variables: a constant expression too. |
Call graph
clip_words
gnuplot set clip (on) and unset clip words after the option: points, one, two, radial (polar: accepted, foresight clips at the plot area); bare set clip is points, bare unset clip all of them.
Returns: logical
function clip_words(panel, tokens, on, iostat, iomsg) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
panel | type(axes_object) | inout | Panel. | |
tokens | type(token_object) | in | Option tokens. | |
on | logical | in | set, else unset. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
next_real
Advance i to the next token, which must be a number. Not a constant. Constant status.
Returns: logical
function next_real(tokens, i, value, iostat, iomsg, symbols) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tokens | type(token_object) | in | Tokens. | |
i | integer(kind=I4P) | inout | Token counter. | |
value | real(kind=R8P) | out | Number. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
symbols | type(symbols_object) | in | optional | User variables: a constant expression too. |
Call graph
next_length
Advance i to the next token, a length of gnuplot's cairo terminals: a number in inches, or followed by its unit (8.5cm, 3in, 240pt, the unit joined or the next token), as pixels (96 to the inch).
Returns: logical
function next_length(tokens, i, px, iostat, iomsg) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tokens | type(token_object) | in | Tokens. | |
i | integer(kind=I4P) | inout | Token counter. | |
px | real(kind=R8P) | out | Length [px]. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
next_word
Advance i to the next token, which must be a bare word.
Returns: logical
function next_word(tokens, i, word, iostat, iomsg) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tokens | type(token_object) | in | Tokens. | |
i | integer(kind=I4P) | inout | Token counter. | |
word | character(len=:) | out | allocatable | Token text. |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
no_more
Error if tokens exist from position from on (unsupported sub-options).
Returns: logical
function no_more(tokens, from, iostat, iomsg) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tokens | type(token_object) | in | Tokens. | |
from | integer(kind=I4P) | in | First position that must be empty. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
Call graph
columnhead_title
Parse columnhead, columnheader or columnhead(N) (gnuplot title columnhead): column is N, or 0 for the column of the y field; false if word is none of them.
Returns: logical
function columnhead_title(word, column) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
word | character(len=*) | in | Title word. | |
column | integer(kind=I4P) | out | Header column, 0 for the y one. |
Call graph
function_drawable
Whether the style with draws a function (FUNCTION_STYLES): not error bars, nor the filled and panel styles.
Attributes: pure
Returns: logical
function function_drawable(with) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
with | character(len=*) | in | Full style name. |
Call graph
colormap_index
Index of the colormap name (set colormap new NAME), 0 if none.
Attributes: pure
Returns: integer(kind=I4P)
function colormap_index(self, name) result(k)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | in | Interpreter. | |
name | character(len=*) | in | Colormap name. |
Call graph
plain_data_format
Whether the data format of a using spec is blank separated numeric scanf conversions (%lf %lf): the default reading (a skipped column, %*lf, is not).
Attributes: pure
Returns: logical
function plain_data_format(format) result(plain)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
format | character(len=*) | in | Format. |
Call graph
binary_type_name
gnuplot's name of the binary field type word (its aliases of show datafile binary datasizes: f float, lf double, d and i int, byte int8, ...), a leading * (a skipped field) kept.
Attributes: pure
Returns: character(len=:)
function binary_type_name(word) result(name)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
word | character(len=*) | in | Type as written, without its %. |
Call graph
findloc_name
Index of name among names, 0 if absent (a loop: nvfortran 26.9 refuses findloc on some arrays). names is not allocatable: with a character(len=*), allocatable array dummy here, nvfortran 26.9 -O2 miscompiled the internal procedures of annotation_option (set label|arrow|object positions read wrong, bug 24).
Attributes: pure
Returns: integer(kind=I4P)
function findloc_name(names, name) result(k)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
names | character(len=*) | in | Names. | |
name | character(len=*) | in | Name. |
Call graph
in_wedge
Whether the angle t [deg] lies in the wedge from tmin to tmax [deg] (gnuplot's in_theta_wedge).
Attributes: pure
Returns: logical
function in_wedge(t, tmin, tmax) result(inside)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
t | real(kind=R8P) | in | Angle. | |
tmin | real(kind=R8P) | in | Wedge start. | |
tmax | real(kind=R8P) | in | Wedge end. |
is_item_option
Whether word is a plot item option: it ends a function expression.
Attributes: pure
Returns: logical
function is_item_option(word) result(is)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
word | character(len=*) | in | Word. |
Call graph
is_line_option
Whether word names a line property: lc, lt, lw, dt, ps, pt or their long forms.
Attributes: pure
Returns: logical
function is_line_option(word) result(is)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
word | character(len=*) | in | Option word. |
Call graph
special_color
SVG color of gnuplot's special linetypes: black, nodraw (nothing drawn), bgnd (the background, white).
Attributes: pure
Returns: character(len=:)
function special_color(word) result(color)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
word | character(len=*) | in | Special name. |
Call graph
argb_color
The SVG color of gnuplot's number 0xAARRGGBB: #rrggbb, or #rrggbbaa with the opacity 255 - AA (AA the transparency, 0 opaque).
Attributes: pure
Returns: character(len=:)
function argb_color(v) result(color)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
v | real(kind=R8P) | in | Color number. |
Call graph
line_option
Parse the line property at tokens(i) and its value into line, leaving i on the value's last token: lc [rgb] "color", lc N, lc [rgb] variable (the color column marker), lc palette [z|cb V|frac F] (markers, the value in line%palette), lt N (linetype color N), lw W, dt N, ps S, pt N. Color number.
Custom pattern. Not a string. String status. A string.
Returns: logical
function line_option(tokens, i, line, iostat, iomsg, colors, symbols) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tokens | type(token_object) | in | Tokens. | |
i | integer(kind=I4P) | inout | Token counter. | |
line | type(line_style_object) | inout | Line properties. | |
iostat | integer(kind=I4P) | out | 0 on success. | |
iomsg | character(len=:) | out | allocatable | Error message. |
colors | character(len=9) | in | optional | Active linetype colors (set colorsequence). |
symbols | type(symbols_object) | in | optional | User variables: lc i, lw w. |
Call graph
plain_columns
using fields of plain columns.
Attributes: pure
Returns: type(expression_object)
function plain_columns(columns) result(fields)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
columns | integer(kind=I4P) | in | Columns. |
Call graph
sum_head
Whether token ends with gnuplot's sum, its range next: sum [i=1:n] term, 2*sum [i=1:n] term.
Attributes: pure
Returns: logical
function sum_head(token) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
token | type(token_object) | in | Token. |
Call graph
expression_end
Last token of the expression starting at token first: tokens join where an operator lies between them (a word ending or starting with one of .+-*/%?:<>=!&|, or eq, ne), and a range glued to its left neighbour is a substring, s[1:2]: "run".i.".dat", 'f' . i, sprintf("%d", n).
Returns: integer(kind=I4P)
function expression_end(tokens, first) result(last)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tokens | type(token_object) | in | Tokens. | |
first | integer(kind=I4P) | in | First token. |
Call graph
expression_source
Expression text of tokens: quoted strings quoted again (escapes restored in double quotes), ranges bracketed.
Attributes: pure
Returns: character(len=:)
function expression_source(tokens) result(source)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tokens | type(token_object) | in | Tokens. |
Call graph
valid_axes
Whether names concatenates supported axis names: x, y, y2, cb, x2.
Attributes: pure
Returns: logical
function valid_axes(names) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
names | character(len=*) | in | Axis names. |
Call graph
read_whole
The whole content of file, ok false if it cannot be read.
Returns: logical
function read_whole(file, text) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
file | character(len=*) | in | File name. | |
text | character(len=:) | out | allocatable | Content. |
to_number
Parse a number; false if malformed or beyond the real range.
Returns: logical
function to_number(word, value) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
word | character(len=*) | in | Text. | |
value | real(kind=R8P) | out | Number. |
Call graph
vgrid_index
The voxel grid named name ($grid), 0 if none.
Returns: integer(kind=I4P)
function vgrid_index(self, name) result(k)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(script_object) | in | Interpreter. | |
name | character(len=*) | in | Name. |
Call graph
split_top
text split at the separator characters outside parentheses, brackets and quotes.
Attributes: pure
Returns: character(len=:)
function split_top(text, separator) result(parts)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in | Text. | |
separator | character(len=1) | in | Separator. |
Call graph
voxel_word
Whether a set/unset names a voxel option: vgrid, vxrange, vyrange, vzrange, isosurface.
Attributes: pure
Returns: logical
function voxel_word(tokens) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tokens | type(token_object) | in | Statement tokens. |
Call graph